diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2009-03-24 18:47:45 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-03-24 18:47:45 -0400 |
commit | fbf2b1f9cfdb4e4b5d042839142ed19ff5d46679 (patch) | |
tree | 3a17c02aa0cf9bdbed9aa479739974aa2416ecac /arch/arm/mm/mmu.c | |
parent | 9a38e989b8ce04923f919fc2a8a24eb07fb484e2 (diff) | |
parent | 053a96ca11a9785a7e63fc89eed4514a6446ec58 (diff) |
Merge branch 'highmem' into devel
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r-- | arch/arm/mm/mmu.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 8c6fc5a6237e..1585814f8414 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -18,9 +18,11 @@ | |||
18 | #include <asm/cputype.h> | 18 | #include <asm/cputype.h> |
19 | #include <asm/mach-types.h> | 19 | #include <asm/mach-types.h> |
20 | #include <asm/sections.h> | 20 | #include <asm/sections.h> |
21 | #include <asm/cachetype.h> | ||
21 | #include <asm/setup.h> | 22 | #include <asm/setup.h> |
22 | #include <asm/sizes.h> | 23 | #include <asm/sizes.h> |
23 | #include <asm/tlb.h> | 24 | #include <asm/tlb.h> |
25 | #include <asm/highmem.h> | ||
24 | 26 | ||
25 | #include <asm/mach/arch.h> | 27 | #include <asm/mach/arch.h> |
26 | #include <asm/mach/map.h> | 28 | #include <asm/mach/map.h> |
@@ -700,6 +702,10 @@ static void __init sanity_check_meminfo(void) | |||
700 | if (meminfo.nr_banks >= NR_BANKS) { | 702 | if (meminfo.nr_banks >= NR_BANKS) { |
701 | printk(KERN_CRIT "NR_BANKS too low, " | 703 | printk(KERN_CRIT "NR_BANKS too low, " |
702 | "ignoring high memory\n"); | 704 | "ignoring high memory\n"); |
705 | } else if (cache_is_vipt_aliasing()) { | ||
706 | printk(KERN_CRIT "HIGHMEM is not yet supported " | ||
707 | "with VIPT aliasing cache, " | ||
708 | "ignoring high memory\n"); | ||
703 | } else { | 709 | } else { |
704 | memmove(bank + 1, bank, | 710 | memmove(bank + 1, bank, |
705 | (meminfo.nr_banks - i) * sizeof(*bank)); | 711 | (meminfo.nr_banks - i) * sizeof(*bank)); |
@@ -918,6 +924,17 @@ static void __init devicemaps_init(struct machine_desc *mdesc) | |||
918 | flush_cache_all(); | 924 | flush_cache_all(); |
919 | } | 925 | } |
920 | 926 | ||
927 | static void __init kmap_init(void) | ||
928 | { | ||
929 | #ifdef CONFIG_HIGHMEM | ||
930 | pmd_t *pmd = pmd_off_k(PKMAP_BASE); | ||
931 | pte_t *pte = alloc_bootmem_low_pages(2 * PTRS_PER_PTE * sizeof(pte_t)); | ||
932 | BUG_ON(!pmd_none(*pmd) || !pte); | ||
933 | __pmd_populate(pmd, __pa(pte) | _PAGE_KERNEL_TABLE); | ||
934 | pkmap_page_table = pte + PTRS_PER_PTE; | ||
935 | #endif | ||
936 | } | ||
937 | |||
921 | /* | 938 | /* |
922 | * paging_init() sets up the page tables, initialises the zone memory | 939 | * paging_init() sets up the page tables, initialises the zone memory |
923 | * maps, and sets up the zero page, bad page and bad page tables. | 940 | * 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) | |||
931 | prepare_page_table(); | 948 | prepare_page_table(); |
932 | bootmem_init(); | 949 | bootmem_init(); |
933 | devicemaps_init(mdesc); | 950 | devicemaps_init(mdesc); |
951 | kmap_init(); | ||
934 | 952 | ||
935 | top_pmd = pmd_off_k(0xffff0000); | 953 | top_pmd = pmd_off_k(0xffff0000); |
936 | 954 | ||