Merge branch 'highmem' into devel

This commit is contained in:
Russell King
2009-03-24 22:47:45 +00:00
committed by Russell King
22 changed files with 559 additions and 81 deletions

View File

@@ -18,9 +18,11 @@
#include <asm/cputype.h>
#include <asm/mach-types.h>
#include <asm/sections.h>
#include <asm/cachetype.h>
#include <asm/setup.h>
#include <asm/sizes.h>
#include <asm/tlb.h>
#include <asm/highmem.h>
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
@@ -700,6 +702,10 @@ static void __init sanity_check_meminfo(void)
if (meminfo.nr_banks >= NR_BANKS) {
printk(KERN_CRIT "NR_BANKS too low, "
"ignoring high memory\n");
} else if (cache_is_vipt_aliasing()) {
printk(KERN_CRIT "HIGHMEM is not yet supported "
"with VIPT aliasing cache, "
"ignoring high memory\n");
} else {
memmove(bank + 1, bank,
(meminfo.nr_banks - i) * sizeof(*bank));
@@ -918,6 +924,17 @@ static void __init devicemaps_init(struct machine_desc *mdesc)
flush_cache_all();
}
static void __init kmap_init(void)
{
#ifdef CONFIG_HIGHMEM
pmd_t *pmd = pmd_off_k(PKMAP_BASE);
pte_t *pte = alloc_bootmem_low_pages(2 * PTRS_PER_PTE * sizeof(pte_t));
BUG_ON(!pmd_none(*pmd) || !pte);
__pmd_populate(pmd, __pa(pte) | _PAGE_KERNEL_TABLE);
pkmap_page_table = pte + PTRS_PER_PTE;
#endif
}
/*
* paging_init() sets up the page tables, initialises the zone memory
* maps, and sets up the zero page, bad page and bad page tables.
@@ -931,6 +948,7 @@ void __init paging_init(struct machine_desc *mdesc)
prepare_page_table();
bootmem_init();
devicemaps_init(mdesc);
kmap_init();
top_pmd = pmd_off_k(0xffff0000);