Skip to content

Commit

Permalink
ARM: add helpful message when truncating physical memory
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Jun 29, 2015
1 parent b4d103d commit eeb3fee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions arch/arm/mm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1072,6 +1072,7 @@ void __init sanity_check_meminfo(void)
int highmem = 0;
phys_addr_t vmalloc_limit = __pa(vmalloc_min - 1) + 1;
struct memblock_region *reg;
bool should_use_highmem = false;

for_each_memblock(memory, reg) {
phys_addr_t block_start = reg->base;
Expand All @@ -1090,6 +1091,7 @@ void __init sanity_check_meminfo(void)
pr_notice("Ignoring RAM at %pa-%pa (!CONFIG_HIGHMEM)\n",
&block_start, &block_end);
memblock_remove(reg->base, reg->size);
should_use_highmem = true;
continue;
}

Expand All @@ -1100,6 +1102,7 @@ void __init sanity_check_meminfo(void)
&block_start, &block_end, &vmalloc_limit);
memblock_remove(vmalloc_limit, overlap_size);
block_end = vmalloc_limit;
should_use_highmem = true;
}
}

Expand Down Expand Up @@ -1134,6 +1137,9 @@ void __init sanity_check_meminfo(void)
}
}

if (should_use_highmem)
pr_notice("Consider using a HIGHMEM enabled kernel.\n");

high_memory = __va(arm_lowmem_limit - 1) + 1;

/*
Expand Down

0 comments on commit eeb3fee

Please sign in to comment.