diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-06-25 05:52:58 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-06-29 09:33:31 -0400 |
commit | eeb3fee8f6cca5e7bf1647d9e327c7b40e384578 (patch) | |
tree | 15a144989b561303c1f228603e93b9b644686146 | |
parent | b4d103d1a45fed0da2f31c905eb5e053c84a41c6 (diff) |
ARM: add helpful message when truncating physical memory
Add a nmessage to suggest that HIGHMEM is enabled when physical memory
is truncated due to lack of virtual address space to map it in the low
memory mapping.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mm/mmu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c index 904d1532e6d0..79de062c6077 100644 --- a/arch/arm/mm/mmu.c +++ b/arch/arm/mm/mmu.c | |||
@@ -1072,6 +1072,7 @@ void __init sanity_check_meminfo(void) | |||
1072 | int highmem = 0; | 1072 | int highmem = 0; |
1073 | phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1; | 1073 | phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1; |
1074 | struct memblock_region *reg; | 1074 | struct memblock_region *reg; |
1075 | bool should_use_highmem = false; | ||
1075 | 1076 | ||
1076 | for_each_memblock(memory, reg) { | 1077 | for_each_memblock(memory, reg) { |
1077 | phys_addr_t block_start = reg->base; | 1078 | phys_addr_t block_start = reg->base; |
@@ -1090,6 +1091,7 @@ void __init sanity_check_meminfo(void) | |||
1090 | pr_notice("Ignoring RAM at %pa-%pa (!CONFIG_HIGHMEM)\n", | 1091 | pr_notice("Ignoring RAM at %pa-%pa (!CONFIG_HIGHMEM)\n", |
1091 | &block_start, &block_end); | 1092 | &block_start, &block_end); |
1092 | memblock_remove(reg->base, reg->size); | 1093 | memblock_remove(reg->base, reg->size); |
1094 | should_use_highmem = true; | ||
1093 | continue; | 1095 | continue; |
1094 | } | 1096 | } |
1095 | 1097 | ||
@@ -1100,6 +1102,7 @@ void __init sanity_check_meminfo(void) | |||
1100 | &block_start, &block_end, &vmalloc_limit); | 1102 | &block_start, &block_end, &vmalloc_limit); |
1101 | memblock_remove(vmalloc_limit, overlap_size); | 1103 | memblock_remove(vmalloc_limit, overlap_size); |
1102 | block_end = vmalloc_limit; | 1104 | block_end = vmalloc_limit; |
1105 | should_use_highmem = true; | ||
1103 | } | 1106 | } |
1104 | } | 1107 | } |
1105 | 1108 | ||
@@ -1134,6 +1137,9 @@ void __init sanity_check_meminfo(void) | |||
1134 | } | 1137 | } |
1135 | } | 1138 | } |
1136 | 1139 | ||
1140 | if (should_use_highmem) | ||
1141 | pr_notice("Consider using a HIGHMEM enabled kernel.\n"); | ||
1142 | |||
1137 | high_memory = __va(arm_lowmem_limit - 1) + 1; | 1143 | high_memory = __va(arm_lowmem_limit - 1) + 1; |
1138 | 1144 | ||
1139 | /* | 1145 | /* |