aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm/mmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mm/mmu.c')
-rw-r--r--arch/arm/mm/mmu.c39
1 files changed, 35 insertions, 4 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 4426ee67ceca..02243eeccf50 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -21,6 +21,7 @@
21#include <asm/cachetype.h> 21#include <asm/cachetype.h>
22#include <asm/setup.h> 22#include <asm/setup.h>
23#include <asm/sizes.h> 23#include <asm/sizes.h>
24#include <asm/smp_plat.h>
24#include <asm/tlb.h> 25#include <asm/tlb.h>
25#include <asm/highmem.h> 26#include <asm/highmem.h>
26 27
@@ -709,10 +710,6 @@ static void __init sanity_check_meminfo(void)
709 if (meminfo.nr_banks >= NR_BANKS) { 710 if (meminfo.nr_banks >= NR_BANKS) {
710 printk(KERN_CRIT "NR_BANKS too low, " 711 printk(KERN_CRIT "NR_BANKS too low, "
711 "ignoring high memory\n"); 712 "ignoring high memory\n");
712 } else if (cache_is_vipt_aliasing()) {
713 printk(KERN_CRIT "HIGHMEM is not yet supported "
714 "with VIPT aliasing cache, "
715 "ignoring high memory\n");
716 } else { 713 } else {
717 memmove(bank + 1, bank, 714 memmove(bank + 1, bank,
718 (meminfo.nr_banks - i) * sizeof(*bank)); 715 (meminfo.nr_banks - i) * sizeof(*bank));
@@ -726,6 +723,8 @@ static void __init sanity_check_meminfo(void)
726 bank->size = VMALLOC_MIN - __va(bank->start); 723 bank->size = VMALLOC_MIN - __va(bank->start);
727 } 724 }
728#else 725#else
726 bank->highmem = highmem;
727
729 /* 728 /*
730 * Check whether this memory bank would entirely overlap 729 * Check whether this memory bank would entirely overlap
731 * the vmalloc area. 730 * the vmalloc area.
@@ -754,6 +753,38 @@ static void __init sanity_check_meminfo(void)
754#endif 753#endif
755 j++; 754 j++;
756 } 755 }
756#ifdef CONFIG_HIGHMEM
757 if (highmem) {
758 const char *reason = NULL;
759
760 if (cache_is_vipt_aliasing()) {
761 /*
762 * Interactions between kmap and other mappings
763 * make highmem support with aliasing VIPT caches
764 * rather difficult.
765 */
766 reason = "with VIPT aliasing cache";
767#ifdef CONFIG_SMP
768 } else if (tlb_ops_need_broadcast()) {
769 /*
770 * kmap_high needs to occasionally flush TLB entries,
771 * however, if the TLB entries need to be broadcast
772 * we may deadlock:
773 * kmap_high(irqs off)->flush_all_zero_pkmaps->
774 * flush_tlb_kernel_range->smp_call_function_many
775 * (must not be called with irqs off)
776 */
777 reason = "without hardware TLB ops broadcasting";
778#endif
779 }
780 if (reason) {
781 printk(KERN_CRIT "HIGHMEM is not supported %s, ignoring high memory\n",
782 reason);
783 while (j > 0 && meminfo.bank[j - 1].highmem)
784 j--;
785 }
786 }
787#endif
757 meminfo.nr_banks = j; 788 meminfo.nr_banks = j;
758} 789}
759 790