Skip to content
Commit 02511a3f authored by Andrea Arcangeli's avatar Andrea Arcangeli Committed by Greg Kroah-Hartman
Browse files

powerpc: fix off by one in max_zone_pfn initialization for ZONE_DMA



[ Upstream commit 03800e05 ]

25078dc1 first introduced an off by
one error in the ZONE_DMA initialization of PPC_BOOK3E_64=y and since
9739ab7e the off by one applies to
PPC32=y too. This simply corrects the off by one and should resolve
crashes like below:

[   65.179101] page 0x7fff outside node 0 zone DMA [ 0x0 - 0x7fff ]

Unfortunately in various MM places "max" means a non inclusive end of
range. free_area_init_nodes max_zone_pfn parameter is one case and
MAX_ORDER is another one (unrelated) that comes by memory.

Reported-by: default avatarZorro Lang <zlang@redhat.com>
Fixes: 25078dc1 ("powerpc: use mm zones more sensibly")
Fixes: 9739ab7e ("powerpc: enable a 30-bit ZONE_DMA for 32-bit pmac")
Signed-off-by: default avatarAndrea Arcangeli <aarcange@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190625141727.2883-1-aarcange@redhat.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 44879f85
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment