diff options
Diffstat (limited to 'arch/arm/mm')
-rw-r--r-- | arch/arm/mm/mmu.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 08a92368d9d3..9d9e736c2b4f 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -763,15 +763,12 @@ static void __init sanity_check_meminfo(void) | |||
763 | { | 763 | { |
764 | int i, j, highmem = 0; | 764 | int i, j, highmem = 0; |
765 | 765 | ||
766 | lowmem_limit = __pa(vmalloc_min - 1) + 1; | ||
767 | memblock_set_current_limit(lowmem_limit); | ||
768 | |||
769 | for (i = 0, j = 0; i < meminfo.nr_banks; i++) { | 766 | for (i = 0, j = 0; i < meminfo.nr_banks; i++) { |
770 | struct membank *bank = &meminfo.bank[j]; | 767 | struct membank *bank = &meminfo.bank[j]; |
771 | *bank = meminfo.bank[i]; | 768 | *bank = meminfo.bank[i]; |
772 | 769 | ||
773 | #ifdef CONFIG_HIGHMEM | 770 | #ifdef CONFIG_HIGHMEM |
774 | if (__va(bank->start) > vmalloc_min || | 771 | if (__va(bank->start) >= vmalloc_min || |
775 | __va(bank->start) < (void *)PAGE_OFFSET) | 772 | __va(bank->start) < (void *)PAGE_OFFSET) |
776 | highmem = 1; | 773 | highmem = 1; |
777 | 774 | ||
@@ -829,6 +826,9 @@ static void __init sanity_check_meminfo(void) | |||
829 | bank->size = newsize; | 826 | bank->size = newsize; |
830 | } | 827 | } |
831 | #endif | 828 | #endif |
829 | if (!bank->highmem && bank->start + bank->size > lowmem_limit) | ||
830 | lowmem_limit = bank->start + bank->size; | ||
831 | |||
832 | j++; | 832 | j++; |
833 | } | 833 | } |
834 | #ifdef CONFIG_HIGHMEM | 834 | #ifdef CONFIG_HIGHMEM |
@@ -852,6 +852,7 @@ static void __init sanity_check_meminfo(void) | |||
852 | } | 852 | } |
853 | #endif | 853 | #endif |
854 | meminfo.nr_banks = j; | 854 | meminfo.nr_banks = j; |
855 | memblock_set_current_limit(lowmem_limit); | ||
855 | } | 856 | } |
856 | 857 | ||
857 | static inline void prepare_page_table(void) | 858 | static inline void prepare_page_table(void) |