linux_dsm_epyc7002/arch/arm
Will Deacon 9af386c8dc ARM: 6890/1: memmap: only free allocated memmap entries when using SPARSEMEM
The SPARSEMEM code allocates memmap entries only for sections which are
present (i.e. those which contain some valid memory). The membank checks
in free_unused_memmap do not take this into account and can incorrectly
attempt to free memory which is not allocated, resulting in a BUG() in
the bootmem code.

However, if memory is configured as follows:

    |<----section---->|<----hole---->|<----section---->|
    +--------+--------+--------------+--------+--------+
    | bank 0 | unused |              | bank 1 | unused |
    +--------+--------+--------------+--------+--------+

where a bank only occupies part of a section, the memmap allocated for
the remainder of the section *can* be freed.

This patch modifies the checks in free_unused_memmap so that only valid
memmap entries are considered for removal.

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-05-12 10:52:00 +01:00
..
boot Merge first four commits of 'zImage_fixes' of git://git.linaro.org/people/nico/linux into fixes 2011-05-07 08:34:40 +01:00
common Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into fixes 2011-04-13 23:32:13 +01:00
configs Merge branch 'for-linus' of git://android.git.kernel.org/kernel/tegra 2011-03-24 09:33:14 -07:00
include/asm Merge branch 'kprobes' of git://git.linaro.org/people/nico/linux into fixes 2011-04-29 11:02:45 +01:00
kernel ARM: 6891/1: prevent heap corruption in OABI semtimedop 2011-04-29 15:53:14 +01:00
lib Merge branches 'fixes', 'pgt-next' and 'versatile' into devel 2011-03-20 09:32:12 +00:00
mach-at91 Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-bcmring Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-clps711x arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-cns3xxx ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-davinci Merge branch 'fixes' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-05-02 12:17:05 -07:00
mach-dove arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-ebsa110 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-ep93xx Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-exynos4 Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-footbridge arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-gemini arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-h720x arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-imx Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel-stable 2011-03-28 18:52:44 +01:00
mach-integrator Merge branches 'fixes', 'pgt-next' and 'versatile' into devel 2011-03-20 09:32:12 +00:00
mach-iop13xx Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-iop32x arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-iop33x arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-ixp4xx arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-ixp23xx arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-ixp2000 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-kirkwood Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-ks8695 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-l7200/include/mach
mach-loki Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00
mach-lpc32xx Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-mmp ARM: mmp: align NR_BUILTIN_GPIO with gpio interrupt number 2011-04-12 23:26:39 +08:00
mach-msm Merge branch 'for-39-rc4' of git://codeaurora.org/quic/kernel/davidb/linux-msm 2011-04-18 15:44:29 -07:00
mach-mv78xx0 arm: Cleanup the irq namespace 2011-03-29 14:47:57 +02:00
mach-mx3 ARM: imx: fix usb related build failure for mach-vpr200 2011-04-12 09:47:55 +02:00
mach-mx5 ARM: mx5/mx53_loco: Fix build warning related to gpio_keys_button structure 2011-04-18 19:51:14 +02:00
mach-mxc91231 ARM: mxc91231/iomux: allow pin_list to be const 2011-03-07 19:29:28 +01:00
mach-mxs ARM: mxs/clock-mx28: fix up name##_set_rate 2011-04-12 09:48:02 +02:00
mach-netx arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-nomadik ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-ns9xxx arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-nuc93x arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-omap1 Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-omap2 Merge branch 'for_tony_a_2.6.39rc' of git://git.pwsan.com/linux-2.6 into devel-fixes 2011-04-27 06:15:27 -07:00
mach-orion5x Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-pnx4008 arm: Cleanup the irq namespace 2011-03-29 14:47:57 +02:00
mach-pxa ARM: pxa/magician: bq24022 regulator needs to be enabled 2011-04-25 12:43:47 +08:00
mach-realview ARM: 6807/1: realview: Fix secondary GIC initialisation for EB with MPCore tile 2011-03-26 10:06:08 +00:00
mach-rpc arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-s3c24a0/include/mach ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-s3c64xx Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-s3c2400 ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
mach-s3c2410 Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-s3c2412 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-s3c2416 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-s3c2440 Merge commit 'v2.6.39-rc3' into for-2.6.39 2011-04-18 17:12:14 +01:00
mach-s3c2443 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-s5p64x0 ARM: S5P64X0: Fix iodesc array size for S5P6450 2011-03-28 16:17:53 +09:00
mach-s5p6442 Merge branch 'p2v' into devel 2011-03-16 23:35:27 +00:00
mach-s5pc100 Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-s5pv210 Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-sa1100 Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-shark arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-shmobile ARM: arch-shmobile: only run FSI init on respective boards 2011-04-06 11:21:38 -07:00
mach-spear3xx ARM: 6794/1: SPEAr: Append UL to device address macros. 2011-03-09 09:50:04 +00:00
mach-spear6xx ARM: 6794/1: SPEAr: Append UL to device address macros. 2011-03-09 09:50:04 +00:00
mach-stmp37xx ARM: stmp37xx: irq_data conversion. 2011-01-13 17:19:02 +01:00
mach-stmp378x ARM: stmp378x: irq_data conversion. 2011-01-13 17:19:01 +01:00
mach-tcc8k arm: Cleanup the irq namespace 2011-03-29 14:47:57 +02:00
mach-tegra Merge branch 'for-linus' of git://android.git.kernel.org/kernel/tegra 2011-04-15 20:19:17 -07:00
mach-u300 Fix common misspellings 2011-03-31 11:26:23 -03:00
mach-ux500 mach-ux500: fix i2c0 device setup regression 2011-04-20 18:43:53 +02:00
mach-versatile arm: versatile : Fix typo introduced in irq namespace cleanup 2011-03-30 12:02:15 +02:00
mach-vexpress ARM: 6771/1: vexpress: add support for multiple core tiles 2011-03-20 09:32:21 +00:00
mach-vt8500 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mach-w90x900 arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
mm ARM: 6890/1: memmap: only free allocated memmap entries when using SPARSEMEM 2011-05-12 10:52:00 +01:00
nwfpe
oprofile Merge branch 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-02-15 10:18:48 -08:00
plat-iop Merge branch 'clksrc' into devel 2011-01-05 18:09:03 +00:00
plat-mxc Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into fixes 2011-04-27 08:43:01 +01:00
plat-nomadik arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
plat-omap Fix common misspellings 2011-03-31 11:26:23 -03:00
plat-orion arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
plat-pxa Fix common misspellings 2011-03-31 11:26:23 -03:00
plat-s3c24xx Fix common misspellings 2011-03-31 11:26:23 -03:00
plat-s5p ARM: S5P: Remove unused s3c_pm_check_resume_pin 2011-04-14 13:19:40 +09:00
plat-samsung ARM: SAMSUNG: Fix warning 's3c_pm_show_resume_irqs' defined but not used 2011-04-14 13:20:05 +09:00
plat-spear Fix common misspellings 2011-03-31 11:26:23 -03:00
plat-stmp3xxx arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
plat-tcc ARM: P2V: separate PHYS_OFFSET from platform definitions 2011-02-17 23:26:55 +00:00
plat-versatile arm: Fold irq_set_chip/irq_set_handler 2011-03-29 14:47:58 +02:00
tools ARM: Update (and cut down) mach-types 2011-03-20 18:07:44 +00:00
vfp ARM: 6868/1: Preserve the VFP state during fork 2011-04-10 21:13:37 +01:00
Kconfig Merge branch 'fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ycmiao/pxa-linux-2.6 into fixes 2011-04-13 23:32:13 +01:00
Kconfig-nommu Fix common misspellings 2011-03-31 11:26:23 -03:00
Kconfig.debug ARM: 6876/1: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS 2011-04-14 09:15:24 +01:00
Makefile Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm 2011-03-17 19:08:06 -07:00