• Mike Rapoport's avatar
    m68k: nommu: register start of the memory with memblock · d63bd8c8
    Mike Rapoport authored
    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 fa3354e4 ("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: default avatarMike Rapoport <rppt@linux.ibm.com>
    Signed-off-by: default avatarGreg Ungerer <gerg@linux-m68k.org>
    d63bd8c8
setup_no.c 5.89 KB