linux-stable/arch/mips
James Hogan 16a767ec63 MIPS: Fix max_low_pfn with disabled highmem
When low memory doesn't reach HIGHMEM_START (e.g. up to 256MB at PA=0 is
common) and highmem is present above HIGHMEM_START (e.g. on Malta the
RAM overlayed by the IO region is aliased at PA=0x90000000), max_low_pfn
will be initially calculated very large and then clipped down to
HIGHMEM_START.

This causes crashes when reading /sys/kernel/mm/page_idle/bitmap
(i.e. CONFIG_IDLE_PAGE_TRACKING=y) when highmem is disabled. pfn_valid()
will compare against max_mapnr which is derived from max_low_pfn when
there is no highend_pfn set up, and will return true for PFNs right up
to HIGHMEM_START, even though they are beyond the end of low memory and
no page structs will actually exist for these PFNs.

This is fixed by skipping high memory regions when initially calculating
max_low_pfn if highmem is disabled, so it doesn't get clipped too high.
We also clip regions which overlap the highmem boundary when highmem is
disabled, so that max_pfn doesn't extend into highmem either.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14490/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-11-04 01:45:22 +01:00
..
alchemy MIPS: Sanitise coherentio semantics 2016-10-06 18:01:28 +02:00
ar7
ath25
ath79 MIPS: ath79: Fix test for error return of clk_register_fixed_factor(). 2016-09-13 14:13:26 +02:00
bcm47xx MIPS: BCM47xx: Make serial explicitly non-modular 2016-10-04 16:13:57 +02:00
bcm63xx MIPS: BCM63xx: Let clk_disable() return immediately if clk is NULL 2016-10-04 16:13:57 +02:00
bmips MIPS: BMIPS: Support APPENDED_DTB 2016-10-06 17:31:02 +02:00
boot MIPS: Malta: Fixup reboot 2016-11-04 00:27:27 +01:00
cavium-octeon Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-10-15 09:26:12 -07:00
cobalt MIPS: Cobalt: Fix typo 2016-08-03 08:16:30 +02:00
configs MIPS: generic: Convert SEAD-3 to a generic board 2016-10-06 18:04:20 +02:00
dec MIPS: DEC: Avoid la pseudo-instruction in delay slots 2016-09-29 18:59:49 +02:00
emma
fw MIPS: Fix misspellings in comments. 2016-04-03 12:32:09 +02:00
generic MIPS: generic: Fix KASLR for generic kernel. 2016-11-04 00:32:06 +01:00
include MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue 2016-11-04 01:28:41 +01:00
jazz
jz4740 tree-wide: replace config_enabled() with IS_ENABLED() 2016-08-04 08:50:07 -04:00
kernel MIPS: Fix max_low_pfn with disabled highmem 2016-11-04 01:45:22 +01:00
kvm KVM: MIPS: Add missing uaccess.h include 2016-10-19 00:37:05 +01:00
lantiq MIPS: Lantiq: Make xrx200_phy_fw explicitly non-modular 2016-10-04 16:13:57 +02:00
lasat mips: separate extable.h, switch module.h to it 2016-10-05 18:36:18 -04:00
lib MIPS: dump_tlb: Fix printk continuations 2016-11-04 01:04:32 +01:00
loongson32 MIPS: Add RTC support for Loongson1C board 2016-10-04 16:13:57 +02:00
loongson64 mips/loongson/smp: Convert to hotplug state machine 2016-09-19 21:44:32 +02:00
math-emu treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
mm Merge branch 'gup_flag-cleanups' 2016-10-19 08:39:47 -07:00
mti-malta MIPS: Print CM error reports upon bus errors 2016-10-06 18:02:18 +02:00
net treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
netlogic dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
oprofile MIPS/Loongson-3: Convert oprofile to hotplug state machine 2016-07-15 10:40:29 +02:00
paravirt
pci MIPS: Sanitise coherentio semantics 2016-10-06 18:01:28 +02:00
pic32 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
pistachio Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-08-06 09:13:11 -04:00
pmcs-msp71xx MIPS: MSP71xx: Use __flush_cache_all instead of flush_cache_all. 2016-05-13 14:01:38 +02:00
pnx833x MIPS: Squash lines for simple wrapper functions 2016-10-04 16:13:57 +02:00
power
ralink MIPS: ralink: Make timer explicitly non-modular 2016-10-04 16:13:57 +02:00
rb532
sgi-ip22 rtc: ds1286: move header to linux/rtc 2016-07-08 16:23:11 +02:00
sgi-ip27 MIPS: Spelling fix lets -> let's 2016-05-28 12:35:09 +02:00
sgi-ip32
sibyte MIPS: Sibyte: Fix Kconfig dependencies of SIBYTE_BUS_WATCHER 2016-05-09 12:00:03 +02:00
sni char/genrtc: remove asm-generic/rtc.h from mips 2016-06-04 00:23:36 +02:00
txx9 MIPS: PCI: Reduce stack frame usage 2016-10-04 16:13:57 +02:00
vdso MIPS: VDSO: Drop duplicated -I*/-E* aflags 2016-10-11 15:07:30 +02:00
vr41xx MIPS: VR41xx: Fix typo 2016-05-28 12:35:09 +02:00
xilfpga mips: Remove unnecessary of_platform_populate with default match table 2016-06-23 15:00:29 -05:00
Kbuild
Kbuild.platforms MIPS: generic: Convert SEAD-3 to a generic board 2016-10-06 18:04:20 +02:00
Kconfig Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2016-10-15 09:26:12 -07:00
Kconfig.debug MIPS: Remove compact branch policy Kconfig entries 2016-09-13 14:14:50 +02:00
Makefile MIPS: Fix build of compressed image 2016-11-04 00:37:15 +01:00