1
0
Fork 0
alistair23-linux/arch/m68k/kernel
Mike Rapoport 560dbf34de m68k: nommu: register start of the memory with memblock
[ Upstream commit d63bd8c81d ]

The m68k nommu setup code didn't register the beginning of the physical
memory with memblock because it was anyway occupied by the kernel. However,
commit fa3354e4ea ("mm: free_area_init: use maximal zone PFNs rather than
zone sizes") changed zones initialization to use memblock.memory to detect
the zone extents and this caused inconsistency between zone PFNs and the
actual PFNs:

BUG: Bad page state in process swapper  pfn:20165
page:41fe0ca0 refcount:0 mapcount:1 mapping:00000000 index:0x0 flags: 0x0()
raw: 00000000 00000100 00000122 00000000 00000000 00000000 00000000 00000000
page dumped because: nonzero mapcount
CPU: 0 PID: 1 Comm: swapper Not tainted 5.8.0-rc1-00001-g3a38f8a60c65-dirty #1
Stack from 404c9ebc:
        404c9ebc 4029ab28 4029ab28 40088470 41fe0ca0 40299e21 40299df1 404ba2a4
        00020165 00000000 41fd2c10 402c7ba0 41fd2c04 40088504 41fe0ca0 40299e21
        00000000 40088a12 41fe0ca0 41fe0ca4 0000020a 00000000 00000001 402ca000
        00000000 41fe0ca0 41fd2c10 41fd2c10 00000000 00000000 402b2388 00000001
        400a0934 40091056 404c9f44 404c9f44 40088db4 402c7ba0 00000001 41fd2c04
        41fe0ca0 41fd2000 41fe0ca0 40089e02 4026ecf4 40089e4e 41fe0ca0 ffffffff
Call Trace:
        [<40088470>] 0x40088470
 [<40088504>] 0x40088504
 [<40088a12>] 0x40088a12
 [<402ca000>] 0x402ca000
 [<400a0934>] 0x400a0934

Adjust the memory registration with memblock to include the beginning of
the physical memory and make sure that the area occupied by the kernel is
marked as reserved.

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-22 09:32:52 +02:00
..
syscalls arch: mark syscall number 435 reserved for clone3 2019-07-15 00:39:33 +02:00
.gitignore m68k: Add vmlinux.lds to .gitignore 2009-01-12 20:56:32 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
asm-offsets.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bootinfo_proc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dma.c dma-mapping updates for 5.4: 2019-09-19 13:27:23 -07:00
early_printk.c m68knommu: remove obsolete 68360 support 2016-03-07 10:07:17 +10:00
entry.S m68k: Use conventional function parameters for do_sigreturn 2016-02-29 09:51:43 +01:00
head.S m68k: Fix boot regression on machines with RAM at non-zero 2014-07-10 09:58:26 +02:00
ints.c m68k: Do not rely on magic indirect includes 2014-03-05 13:28:32 +01:00
irq.c Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
machine_kexec.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
module.c m68k/kernel: Modernize printing of kernel messages 2017-02-12 10:36:52 +01:00
module.lds m68k: runtime patching infrastructure 2007-05-31 07:58:13 -07:00
pcibios.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
process.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ptrace.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
relocate_kernel.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
setup.c m68k: pull mach_beep in setup.c 2017-11-06 08:25:21 +10:00
setup_mm.c m68k: Dispatch nvram_ops calls to Atari or Mac functions 2019-01-22 10:21:45 +01:00
setup_no.c m68k: nommu: register start of the memory with memblock 2020-07-22 09:32:52 +02:00
signal.c signal: Remove task parameter from force_sig 2019-05-27 09:36:28 -05:00
sun3-head.S m68k/sun3: Remove is_medusa and m68k_pgtable_cachemode 2018-08-31 09:30:42 +02:00
sys_m68k.c mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff() 2018-04-02 20:16:11 +02:00
syscalltable.S m68k: Generate uapi header and syscall table header files 2018-12-04 09:47:55 +01:00
time.c treewide: Add SPDX license identifier for missed files 2019-05-21 10:50:45 +02:00
traps.c signal: Remove the task parameter from force_sig_fault 2019-05-29 09:31:43 -05:00
uboot.c mm: remove include/linux/bootmem.h 2018-10-31 08:54:16 -07:00
vectors.c Disintegrate asm/system.h for M68K 2012-03-28 18:30:02 +01:00
vmlinux-nommu.lds m68k: add missing SOFTIRQENTRY_TEXT linker section 2017-12-04 10:15:18 +10:00
vmlinux-std.lds m68k: add missing SOFTIRQENTRY_TEXT linker section 2017-12-04 10:15:18 +10:00
vmlinux-sun3.lds m68k: add missing SOFTIRQENTRY_TEXT linker section 2017-12-04 10:15:18 +10:00
vmlinux.lds.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00