diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-10-01 11:58:11 -0400 |
---|---|---|
committer | ard <ard.biesheuvel@linaro.org> | 2015-12-13 13:18:29 -0500 |
commit | 09414d00a137cf7f42b6dc7415f346258d60e8da (patch) | |
tree | 2c437a5bc7e4248a9eb9c92c796ba76d8f7f1266 /arch/arm/mm/init.c | |
parent | c7936206b9715d7a3075b53789c1fed0cab9147f (diff) |
ARM: only consider memblocks with NOMAP cleared for linear mapping
Take the new memblock attribute MEMBLOCK_NOMAP into account when
deciding whether a certain region is or should be covered by the
kernel direct mapping.
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Reviewed-by: Matt Fleming <matt@codeblueprint.co.uk>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Diffstat (limited to 'arch/arm/mm/init.c')
-rw-r--r-- | arch/arm/mm/init.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 8a63b4cdc0f2..16104b1e2661 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c | |||
@@ -191,7 +191,7 @@ static void __init zone_sizes_init(unsigned long min, unsigned long max_low, | |||
191 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID | 191 | #ifdef CONFIG_HAVE_ARCH_PFN_VALID |
192 | int pfn_valid(unsigned long pfn) | 192 | int pfn_valid(unsigned long pfn) |
193 | { | 193 | { |
194 | return memblock_is_memory(__pfn_to_phys(pfn)); | 194 | return memblock_is_map_memory(__pfn_to_phys(pfn)); |
195 | } | 195 | } |
196 | EXPORT_SYMBOL(pfn_valid); | 196 | EXPORT_SYMBOL(pfn_valid); |
197 | #endif | 197 | #endif |
@@ -432,6 +432,9 @@ static void __init free_highpages(void) | |||
432 | if (end <= max_low) | 432 | if (end <= max_low) |
433 | continue; | 433 | continue; |
434 | 434 | ||
435 | if (memblock_is_nomap(mem)) | ||
436 | continue; | ||
437 | |||
435 | /* Truncate partial highmem entries */ | 438 | /* Truncate partial highmem entries */ |
436 | if (start < max_low) | 439 | if (start < max_low) |
437 | start = max_low; | 440 | start = max_low; |