aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-08-15 07:36:00 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-08-15 07:36:00 -0400
commitdde5828f56cb2c1aa70365c476e6830482127258 (patch)
treec5765e13e62d9356a0059d08dba7334202707948 /arch/arm/mm/mmu.c
parent3b3119fc549c93df60316d28bdd77c2de3986588 (diff)
ARM: Fix broken highmem support
Currently, highmem is selectable, and you can request an increased vmalloc area. However, none of this has any effect on the memory layout since a patch in the highmem series was accidentally dropped. Moreover, even if you did want highmem, all memory would still be registered as lowmem, possibly resulting in overflow of the available virtual mapping space. The highmem boundary is determined by the highest allowed beginning of the vmalloc area, which depends on its configurable minimum size (see commit 60296c71f6c5063e3c1f1d2619ca0b60940162e7 for details on this). We should create mappings and initialize bootmem only for low memory, while the zone allocator must still be told about highmem. Currently, memory nodes which are completely located in high memory are not supported. This is not a huge limitation since systems relying on highmem support are unlikely to have discontiguous memory with large holes. [ A similar patch was meant to be merged before commit 5f0fbf9ecaf3 and be available in Linux v2.6.30, however some git rebase screw-up of mine dropped the first commit of the series, and that goofage escaped testing somehow as well. -- Nico ] Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Reviewed-by: Nicolas Pitre <nico@marvell.com>
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 4722582b17b8..4426ee67ceca 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -687,13 +687,19 @@ __early_param("vmalloc=", early_vmalloc);
687 687
688static void __init sanity_check_meminfo(void) 688static void __init sanity_check_meminfo(void)
689{ 689{
690 int i, j; 690 int i, j, highmem = 0;
691 691
692 for (i = 0, j = 0; i < meminfo.nr_banks; i++) { 692 for (i = 0, j = 0; i < meminfo.nr_banks; i++) {
693 struct membank *bank = &meminfo.bank[j]; 693 struct membank *bank = &meminfo.bank[j];
694 *bank = meminfo.bank[i]; 694 *bank = meminfo.bank[i];
695 695
696#ifdef CONFIG_HIGHMEM 696#ifdef CONFIG_HIGHMEM
697 if (__va(bank->start) > VMALLOC_MIN ||
698 __va(bank->start) < (void *)PAGE_OFFSET)
699 highmem = 1;
700
701 bank->highmem = highmem;
702
697 /* 703 /*
698 * Split those memory banks which are partially overlapping 704 * Split those memory banks which are partially overlapping
699 * the vmalloc area greatly simplifying things later. 705 * the vmalloc area greatly simplifying things later.
@@ -714,6 +720,7 @@ static void __init sanity_check_meminfo(void)
714 i++; 720 i++;
715 bank[1].size -= VMALLOC_MIN - __va(bank->start); 721 bank[1].size -= VMALLOC_MIN - __va(bank->start);
716 bank[1].start = __pa(VMALLOC_MIN - 1) + 1; 722 bank[1].start = __pa(VMALLOC_MIN - 1) + 1;
723 bank[1].highmem = highmem = 1;
717 j++; 724 j++;
718 } 725 }
719 bank->size = VMALLOC_MIN - __va(bank->start); 726 bank->size = VMALLOC_MIN - __va(bank->start);