]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: Ensure "special" zones are empty
authorOliver O'Halloran <oohall@gmail.com>
Wed, 11 May 2016 09:22:18 +0000 (19:22 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 16 Jun 2016 06:03:21 +0000 (16:03 +1000)
commit255dd9b360518285d6baaf44d8ca6554d13796ee
tree0a7959515a04441f36465eddb58bb843301a5b17
parentea6dc379a300edd73fbadc2e796f157504c8b244
powerpc/mm: Ensure "special" zones are empty

The mm zone mechanism was traditionally used by arch specific code to
partition memory into allocation zones. However there are several zones
that are managed by the mm subsystem rather than the architecture. Most
architectures set the max PFN of these special zones to zero, however on
powerpc we set them to ~0ul. This, in conjunction with a bug in
free_area_init_nodes() results in all of system memory being placed in
ZONE_DEVICE when enabled. Device memory cannot be used for regular kernel
memory allocations so this will cause a kernel panic at boot. Given the
planned addition of more mm managed zones (ZONE_CMA) we should aim to be
consistent with every other architecture and set the max PFN for these
zones to zero.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Reviewed-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/mem.c