From: Albert H. <he...@us...> - 2009-03-02 19:26:44
|
Update of /cvsroot/gc-linux/linux/arch/powerpc/mm In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv6933/arch/powerpc/mm Modified Files: pgtable_32.c Log Message: Merge v2.6.29-rc6. NOTE: Some of the Kconfig options and Makefile entries for the drivers marked as "broken" will disappear with this commit. Index: pgtable_32.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/powerpc/mm/pgtable_32.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pgtable_32.c 1 Feb 2009 18:29:35 -0000 1.2 --- pgtable_32.c 2 Mar 2009 19:26:37 -0000 1.3 *************** *** 49,56 **** extern char etext[], _stext[]; - #ifdef CONFIG_SMP - extern void hash_page_sync(void); - #endif - #ifdef HAVE_BATS extern phys_addr_t v_mapped_by_bats(unsigned long va); --- 49,52 ---- *************** *** 66,71 **** #ifdef HAVE_TLBCAM extern unsigned int tlbcam_index; ! extern unsigned long v_mapped_by_tlbcam(unsigned long va); ! extern unsigned long p_mapped_by_tlbcam(unsigned long pa); #else /* !HAVE_TLBCAM */ #define v_mapped_by_tlbcam(x) (0UL) --- 62,67 ---- #ifdef HAVE_TLBCAM extern unsigned int tlbcam_index; ! extern phys_addr_t v_mapped_by_tlbcam(unsigned long va); ! extern unsigned long p_mapped_by_tlbcam(phys_addr_t pa); #else /* !HAVE_TLBCAM */ #define v_mapped_by_tlbcam(x) (0UL) *************** *** 73,82 **** #endif /* HAVE_TLBCAM */ ! #ifdef CONFIG_PTE_64BIT ! /* Some processors use an 8kB pgdir because they have 8-byte Linux PTEs. */ ! #define PGDIR_ORDER 1 ! #else ! #define PGDIR_ORDER 0 ! #endif pgd_t *pgd_alloc(struct mm_struct *mm) --- 69,73 ---- #endif /* HAVE_TLBCAM */ ! #define PGDIR_ORDER (32 + PGD_T_LOG2 - PGDIR_SHIFT) pgd_t *pgd_alloc(struct mm_struct *mm) *************** *** 84,88 **** pgd_t *ret; ! ret = (pgd_t *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, PGDIR_ORDER); return ret; } --- 75,85 ---- pgd_t *ret; ! /* pgdir take page or two with 4K pages and a page fraction otherwise */ ! #ifndef CONFIG_PPC_4K_PAGES ! ret = (pgd_t *)kzalloc(1 << PGDIR_ORDER, GFP_KERNEL); ! #else ! ret = (pgd_t *)__get_free_pages(GFP_KERNEL|__GFP_ZERO, ! PGDIR_ORDER - PAGE_SHIFT); ! #endif return ret; } *************** *** 90,94 **** void pgd_free(struct mm_struct *mm, pgd_t *pgd) { ! free_pages((unsigned long)pgd, PGDIR_ORDER); } --- 87,95 ---- void pgd_free(struct mm_struct *mm, pgd_t *pgd) { ! #ifndef CONFIG_PPC_4K_PAGES ! kfree((void *)pgd); ! #else ! free_pages((unsigned long)pgd, PGDIR_ORDER - PAGE_SHIFT); ! #endif } *************** *** 126,146 **** } - void pte_free_kernel(struct mm_struct *mm, pte_t *pte) - { - #ifdef CONFIG_SMP - hash_page_sync(); - #endif - free_page((unsigned long)pte); - } - - void pte_free(struct mm_struct *mm, pgtable_t ptepage) - { - #ifdef CONFIG_SMP - hash_page_sync(); - #endif - pgtable_page_dtor(ptepage); - __free_page(ptepage); - } - void __iomem * ioremap(phys_addr_t addr, unsigned long size) --- 127,130 ---- *************** *** 195,198 **** --- 179,183 ---- p += _ISA_MEM_BASE; + #ifndef CONFIG_CRASH_DUMP /* * Don't allow anybody to remap normal RAM that we're using. *************** *** 214,217 **** --- 199,203 ---- } } + #endif if (size == 0) *************** *** 291,295 **** * hash table */ ! BUG_ON(pte_val(*pg) & (_PAGE_PRESENT | _PAGE_HASHPTE)); set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); --- 277,282 ---- * hash table */ ! BUG_ON((pte_val(*pg) & (_PAGE_PRESENT | _PAGE_HASHPTE)) && ! flags); set_pte_at(&init_mm, va, pg, pfn_pte(pa >> PAGE_SHIFT, __pgprot(flags))); *************** *** 299,303 **** /* ! * Map in a big chunk of physical memory starting at KERNELBASE. */ void __init mapin_ram(void) --- 286,290 ---- /* ! * Map in a big chunk of physical memory starting at PAGE_OFFSET. */ void __init mapin_ram(void) *************** *** 308,312 **** s = mmu_mapin_ram(); ! v = KERNELBASE + s; p = memstart_addr + s; for (; s < total_lowmem; s += PAGE_SIZE) { --- 295,299 ---- s = mmu_mapin_ram(); ! v = PAGE_OFFSET + s; p = memstart_addr + s; for (; s < total_lowmem; s += PAGE_SIZE) { *************** *** 374,378 **** set_pte_at(&init_mm, address, kpte, mk_pte(page, prot)); wmb(); ! flush_HPTE(0, address, pmd_val(*kpmd)); pte_unmap(kpte); --- 361,369 ---- set_pte_at(&init_mm, address, kpte, mk_pte(page, prot)); wmb(); ! #ifdef CONFIG_PPC_STD_MMU ! flush_hash_pages(0, address, pmd_val(*kpmd), 1); ! #else ! flush_tlb_page(NULL, address); ! #endif pte_unmap(kpte); *************** *** 411,415 **** static int fixmaps; ! unsigned long FIXADDR_TOP = 0xfffff000; EXPORT_SYMBOL(FIXADDR_TOP); --- 402,406 ---- static int fixmaps; ! unsigned long FIXADDR_TOP = (-PAGE_SIZE); EXPORT_SYMBOL(FIXADDR_TOP); |