kernel-fxtec-pro1x/arch/mips
Kevin Cernekee b6da0ffb09 MIPS: pfn_valid() is broken on low memory HIGHMEM systems
pfn_valid() compares the PFN to max_mapnr:

        __pfn >= min_low_pfn && __pfn < max_mapnr;

On HIGHMEM kernels, highend_pfn is used to set the value of max_mapnr.
Unfortunately, highend_pfn is left at zero if the system does not
actually have enough RAM to reach into the HIGHMEM range.  This causes
pfn_valid() to always return false, and when debug checks are enabled
the kernel will fail catastrophically:

Memory: 22432k/32768k available (2249k kernel code, 10336k reserved, 653k data, 1352k init, 0k highmem)
NR_IRQS:128
kfree_debugcheck: out of range ptr 81c02900h.
Kernel bug detected[#1]:
Cpu 0
$ 0   : 00000000 10008400 00000034 00000000
$ 4   : 8003e160 802a0000 8003e160 00000000
$ 8   : 00000000 0000003e 00000747 00000747
...

On such a configuration, max_low_pfn should be used to set max_mapnr.

This was seen on 2.6.34.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/1992/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2011-07-25 17:26:52 +01:00
..
alchemy Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-05-19 17:44:13 -07:00
ar7 MIPS: AR7: Replace __attribute__((__packed__)) with __packed 2011-07-25 17:23:20 +01:00
ath79 USB: ohci: add bus glue for the Atheros AR71XX/AR7240 SoCs 2011-04-13 16:58:19 -07:00
bcm47xx MIPS: BCM47xx: Extend the filling of SPROM from NVRAM 2011-05-19 09:55:47 +01:00
bcm63xx SSB: Change fallback sprom to callback mechanism. 2011-05-19 09:55:47 +01:00
boot MIPS: Alchemy: Rewrite UART setup and constants. 2011-05-19 09:55:45 +01:00
cavium-octeon Merge git://git.infradead.org/mtd-2.6 2011-05-27 20:06:53 -07:00
cobalt
configs rtc: fix build warnings in defconfigs 2011-06-15 20:04:02 -07:00
dec MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
emma MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
fw Merge branch 'master' into for-next 2011-04-26 10:22:59 +02:00
include/asm MIPS: topdown mmap support 2011-07-25 17:26:51 +01:00
jazz MIPS: Jazz: Fix GCC 4.6.0 build error 2011-05-10 18:15:23 +01:00
jz4740 Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-05-19 17:44:13 -07:00
kernel MIPS: Remove redundant addr_limit assignment on exec. 2011-07-25 17:23:29 +01:00
lantiq MIPS: Lantiq: Add missing clk_enable and clk_disable functions. 2011-07-20 23:12:12 +01:00
lasat MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
lib MIPS: Kconfig and Makefile update for Netlogic XLR/XLS 2011-05-19 09:55:40 +01:00
loongson Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-05-19 17:44:13 -07:00
math-emu Fix common misspellings 2011-03-31 11:26:23 -03:00
mipssim MIPS: MIPSsim: Fix uniprocessor build. 2011-07-20 23:12:11 +01:00
mm MIPS: pfn_valid() is broken on low memory HIGHMEM systems 2011-07-25 17:26:52 +01:00
mti-malta MIPS: Malta: Fix crash in SMP kernel on non-CMP systems. 2011-07-20 23:12:10 +01:00
netlogic MIPS: Netlogic: SMP fixes for XLR/XLS platform code. 2011-07-20 23:12:11 +01:00
nxp/pnx8550/common
oprofile mips: change to new flag variable 2011-03-17 14:02:56 +01:00
pci MIPS: NILE4: Remove useless inclusion of GT64120 header. 2011-07-20 23:12:09 +01:00
pmc-sierra MIPS: Malta: Fix crash in SMP kernel on non-CMP systems. 2011-07-20 23:12:10 +01:00
pnx833x Fix common misspellings 2011-03-31 11:26:23 -03:00
pnx8550 MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
power MIPS: Hibernation: Fixes for PAGE_SIZE >= 64kb 2011-05-10 18:15:26 +01:00
powertv MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
rb532 MIPS: RB532: Fix iomap resource size miscalculation. 2011-05-18 14:18:26 +01:00
sgi-ip22 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2011-05-23 09:12:26 -07:00
sgi-ip27 Merge branch 'timers-clocksource-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-05-19 17:44:13 -07:00
sgi-ip32 MIPS: Convert the irq functions to the new names 2011-03-29 14:48:07 +02:00
sibyte MIPS: SB1250: Restore dropped irq_mask function 2011-07-20 23:12:11 +01:00
sni MIPS: SNI: Fix GCC 4.6.0 build error 2011-05-10 18:15:23 +01:00
txx9 Merge git://git.infradead.org/mtd-2.6 2011-05-27 20:06:53 -07:00
vr41xx mips: vr41xx: Use irdq_irq_disabled() 2011-03-29 14:48:07 +02:00
wrppmc
Kbuild
Kbuild.platforms MIPS: XLR, XLS: Move makefile bits to were they belong. 2011-07-20 23:12:11 +01:00
Kconfig arch: remove CONFIG_GENERIC_FIND_{NEXT_BIT,BIT_LE,LAST_BIT} 2011-05-26 17:12:38 -07:00
Kconfig.debug lib: consolidate DEBUG_STACK_USAGE option 2011-05-25 08:39:54 -07:00
Makefile MIPS: XLR, XLS: Move makefile bits to were they belong. 2011-07-20 23:12:11 +01:00