diff options
author | Colin Cross <ccross@android.com> | 2010-10-12 18:47:05 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2010-10-12 18:47:05 -0700 |
commit | 3d533ce331337e58f16b25e5de9a57f1665c4a73 (patch) | |
tree | 4022cf35ba4ff433311c3bbc24d6e1a628387ce7 /arch/arm/mm | |
parent | 5c7c63142d2298d383e6e9daa733da78370b8aa1 (diff) | |
parent | 4beaf8cc13b10367d1bbb63bacbfe8d12b667c3c (diff) |
Merge branch 'linux-tegra-2.6.36' into android-tegra-2.6.36
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/mm/attrib_alloc.c | 2 | ||||
-rw-r--r-- | arch/arm/mm/mmu.c | 60 |
3 files changed, 1 insertions, 70 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index d7fd03bd80eb..da057fcd0491 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -857,12 +857,3 @@ config ARCH_HAS_BARRIERS help This option allows the use of custom mandatory barriers included via the mach/barriers.h file. - -config ARCH_LOWMEM_IN_PTES - bool - help - This option will map the kernel direct-mapped lowmem region - using page table mappings rather than section mappings. - -config ARCH_USES_PG_UNCACHED - bool diff --git a/arch/arm/mm/attrib_alloc.c b/arch/arm/mm/attrib_alloc.c index 0966a8b8bf41..73be2d664669 100644 --- a/arch/arm/mm/attrib_alloc.c +++ b/arch/arm/mm/attrib_alloc.c @@ -121,6 +121,6 @@ struct page *arm_attrib_alloc_pages_exact_node(int nid, gfp_t gfp, update_pte(p, prot); } base = page_to_phys(page); - outer_flush_range(base, base + (size >> PAGE_SHIFT)); + outer_flush_range(base, base + size); return page; } diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 6e65f186905c..6a3a2d0cd6db 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c @@ -251,7 +251,6 @@ static struct mem_type mem_types[] = { L_PTE_USER | L_PTE_EXEC, .prot_l1 = PMD_TYPE_TABLE, .prot_sect = PMD_TYPE_SECT | PMD_SECT_AP_WRITE, - .prot_l1 = PMD_TYPE_TABLE, .domain = DOMAIN_KERNEL, }, [MT_ROM] = { @@ -556,30 +555,6 @@ static void __init alloc_init_pte(pmd_t *pmd, unsigned long addr, } while (pte++, addr += PAGE_SIZE, addr != end); } -#ifdef CONFIG_ARCH_LOWMEM_IN_PTES -static void __init realloc_init_pte(pmd_t *pmd, unsigned long addr, - unsigned long end, unsigned long pfn, - const struct mem_type *type) -{ - pte_t *pte, *ptep; - - if ((pmd_val(*pmd) & PMD_TYPE_MASK) != PMD_TYPE_SECT) - return; - - pte = early_alloc(2 * PTRS_PER_PTE * sizeof(pte_t)); - if (WARN_ON(!pte)) - return; - - ptep = pte + PTRS_PER_PTE + __pte_index(addr); - do { - set_pte_ext(ptep, pfn_pte(pfn, __pgprot(type->prot_pte)), 0); - pfn++; - } while (ptep++, addr += PAGE_SIZE, addr != end); - - __pmd_populate(pmd, __pa(pte) | type->prot_l1); -} -#endif - static void __init alloc_init_section(pgd_t *pgd, unsigned long addr, unsigned long end, unsigned long phys, const struct mem_type *type) @@ -1042,40 +1017,6 @@ static void __init map_lowmem(void) } } -static void __init remap_lowmem(void) -{ -#ifdef CONFIG_ARCH_LOWMEM_IN_PTES - struct meminfo *mi = &meminfo; - const struct mem_type *type = &mem_types[MT_MEMORY]; - int i; - - for (i = 0; i < mi->nr_banks; i++) { - pgd_t *pgd; - unsigned long phys, addr, end; - struct membank *bank = &mi->bank[i]; - - if (bank->highmem) - continue; - - phys = __pfn_to_phys(bank_pfn_start(bank)); - addr = __phys_to_virt(bank_phys_start(bank)); - end = addr + bank_phys_size(bank); - - pgd = pgd_offset_k(addr); - do { - unsigned long next = pgd_addr_end(addr, end); - pmd_t *pmd = pmd_offset(pgd, addr); - - realloc_init_pte(pmd, addr, next, - __phys_to_pfn(phys), type); - - phys += next - addr; - addr = next; - } while (pgd++, addr != end); - } -#endif -} - static int __init meminfo_cmp(const void *_a, const void *_b) { const struct membank *a = _a, *b = _b; @@ -1097,7 +1038,6 @@ void __init paging_init(struct machine_desc *mdesc) sanity_check_meminfo(); prepare_page_table(); map_lowmem(); - remap_lowmem(); devicemaps_init(mdesc); kmap_init(); |