Andreas, Am 01.12.2018 um 08:57 schrieb Andreas Schwab:
[ 0.000000] Linux version 4.19.0 (andreas@xxxxxxxxx) (gcc version 8.1.1 20180712 (GCC)) #3 Fri Nov 30 20:53:33 CET 2018 [ 0.000000] Saving 190 bytes of bootinfo [ 0.000000] console [debug0] enabled [ 0.000000] Atari hardware found: VIDEL STDMA-SCSI ST_MFP YM2149 PCM CODEC DSP56K SCC ANALOG_JOY BLITTER IDE TT_CLK FDC_SPEED [ 0.000000] Ignoring memory chunk at 0x0:0xe00000 before the first chunk [ 0.000000] Fix your bootloader or use a memfile to make use of this area! [ 0.000000] On node 0 totalpages: 786432 [ 0.000000] DMA zone: 7680 pages used for memmap [ 0.000000] DMA zone: 0 pages reserved [ 0.000000] DMA zone: 786432 pages, LIFO batch:63 [ 0.000000] NatFeats found (ARAnyM, 1.0) [ 0.000000] initrd: bf767a60 - c0000000 [ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768 [ 0.000000] pcpu-alloc: [0] 0 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 778752 [ 0.000000] Kernel command line: root=/dev/nfhd0p1 video=atafb:vga256 debug debug=par console=nfcon init=/bin/sh BOOT_IMAGE=vmlinux [ 0.000000] Dentry cache hash table entries: 524288 (order: 9, 2097152 bytes) [ 0.000000] Inode-cache hash table entries: 262144 (order: 8, 1048576 bytes) [ 0.000000] Sorting __ex_table... [ 0.000000] Unable to handle kernel NULL pointer dereference at virtual address (ptrval) [ 0.000000] Oops: 00000000 [ 0.000000] Modules linked in: [ 0.000000] PC: [<0069dbac>] free_all_bootmem+0x12c/0x186 [ 0.000000] SR: 2714 SP: (ptrval) a2: 005e3314 [ 0.000000] d0: 00000000 d1: 0000000a d2: 00000e00 d3: 00000000 [ 0.000000] d4: 005e1fc0 d5: 0000001a a0: 01000000 a1: 00000000 [ 0.000000] Process swapper (pid: 0, task=(ptrval)) [ 0.000000] Frame format=7 eff addr=00000736 ssw=0505 faddr=00000736 [ 0.000000] wb 1 stat/addr/data: 0000 00000000 00000000 [ 0.000000] wb 2 stat/addr/data: 0000 00000000 00000000 [ 0.000000] wb 3 stat/addr/data: 0000 00000736 00000000 [ 0.000000] push data: 00000000 00000000 00000000 00000000 [ 0.000000] Stack from 005e1f84: [ 0.000000] 00000000 0000000a 027d3260 006b5006 00000000 00000000 00000000 00000000 [ 0.000000] 0004f062 0003a220 0069e272 005e1ff8 0000054c 00000000 00e00000 00000000 [ 0.000000] 00000001 00693cd8 027d3260 0004f062 0003a220 00691be6 00000000 00000000 [ 0.000000] 00000000 00000000 00000000 00000000 006b5006 00000000 00690872 [ 0.000000] Call Trace: [<0004f062>] printk+0x0/0x18 [ 0.000000] [<0003a220>] parse_args+0x0/0x2d4 [ 0.000000] [<0069e272>] memblock_virt_alloc_try_nid+0x0/0xa4 [ 0.000000] [<00693cd8>] mem_init+0xa/0x5c [ 0.000000] [<0004f062>] printk+0x0/0x18 [ 0.000000] [<0003a220>] parse_args+0x0/0x2d4 [ 0.000000] [<00691be6>] start_kernel+0x1ca/0x462 [ 0.000000] [<00690872>] _sinittext+0x872/0x11f8 [ 0.000000] Code: 7a1a eaae 2270 6db0 0061 ef14 2f01 2f03 <96a9> 0736 2203 e589 d681 e78b d6a9 0732 2f03 2f40 0034 4eb9 0069 b8d0 260e 4fef [ 0.000000] Disabling lock debugging due to kernel taint [ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! [ 0.000000] Rebooting in 90 seconds..
Can you please send the disassembly of free_all_bootmem() (or kernel image and System.map)? I can't find that section of code in my disassembly of that function.
The only potential problem I can see right now is that we lost a PAGE_ALIGN(availmem) in paging_init() in commit 1008a11590b966b469e60dc3756c9226a685ce12. I can't see that memblock_reserve() deals with page alignment issues, so maybe we'd better add that back in.
Don't see how that would affect this bug though - doesn't hurt in my test case at least.
--- a/arch/m68k/mm/motorola.c +++ b/arch/m68k/mm/motorola.c @@ -251,6 +251,8 @@ void __init paging_init(void) high_memory = phys_to_virt(max_addr); + availmem = PAGE_ALIGN(availmem); + min_low_pfn = availmem >> PAGE_SHIFT; max_pfn = max_low_pfn = max_addr >> PAGE_SHIFT; Cheers, Michael
Andreas.