diff options
| author | Dave Airlie <airlied@redhat.com> | 2016-11-07 09:37:09 +1000 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2016-11-07 09:37:09 +1000 |
| commit | 7b624ad8fea1be7ff4c22643e212191aa6a2a3c2 (patch) | |
| tree | 41d0357d3259868cd85521c3fb9578cd2fc13831 /arch/mips/kernel/setup.c | |
| parent | dc345c46774bc150ab852d2c74ee6542de438d46 (diff) | |
| parent | bc33b0ca11e3df467777a4fa7639ba488c9d4911 (diff) | |
| download | blackbird-op-linux-7b624ad8fea1be7ff4c22643e212191aa6a2a3c2.tar.gz blackbird-op-linux-7b624ad8fea1be7ff4c22643e212191aa6a2a3c2.zip | |
Backmerge tag 'v4.9-rc4' into drm-next
Linux 4.9-rc4
This is needed for nouveau development.
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) |

