diff options
| author | Mike Marshall <hubcap@omnibond.com> | 2017-01-27 13:33:25 -0500 |
|---|---|---|
| committer | Mike Marshall <hubcap@omnibond.com> | 2017-01-27 13:33:25 -0500 |
| commit | a1f817dc8ed79cdff2b76bc51d545fb9465982be (patch) | |
| tree | 2c92b9b7cdf3b0efb3b9ce33cd6f84ef4d54a1a7 /arch/mips/kernel/setup.c | |
| parent | 04102c76a779f1c4cec4f0fb51cacc360117b522 (diff) | |
| parent | 69973b830859bc6529a7a0468ba0d80ee5117826 (diff) | |
Merge tag 'v4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into for-next
Linux 4.9
Diffstat (limited to 'arch/mips/kernel/setup.c')
| -rw-r--r-- | arch/mips/kernel/setup.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 0d57909d9026..f66e5ce505b2 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c @@ -368,6 +368,19 @@ static void __init bootmem_init(void) end = PFN_DOWN(boot_mem_map.map[i].addr + boot_mem_map.map[i].size); +#ifndef CONFIG_HIGHMEM + /* + * Skip highmem here so we get an accurate max_low_pfn if low + * memory stops short of high memory. + * If the region overlaps HIGHMEM_START, end is clipped so + * max_pfn excludes the highmem portion. + */ + if (start >= PFN_DOWN(HIGHMEM_START)) + continue; + if (end > PFN_DOWN(HIGHMEM_START)) + end = PFN_DOWN(HIGHMEM_START); +#endif + if (end > max_low_pfn) max_low_pfn = end; if (start < min_low_pfn) |
