powerpc/mm: Fix size of allocated PGDIR
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 8 Aug 2024 09:32:47 +0000 (11:32 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 12 Aug 2024 11:49:53 +0000 (21:49 +1000)
commite7a9af8c93aa9f408f9972809b642faeec5287e1
tree97f3fe972e95fdfa6adab1667fcdeeb08bfd9ed1
parent06ce0af34177a110d6a5cf71f924965b9b230691
powerpc/mm: Fix size of allocated PGDIR

Commit 6b0e82791bd0 ("powerpc/e500: switch to 64 bits PGD on 85xx
(32 bits)") increased the size of PGD entries but failed to increase
the PGD directory.

Use the size of pgd_t instead of the size of pointers to calculate
the allocated size.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Fixes: 6b0e82791bd0 ("powerpc/e500: switch to 64 bits PGD on 85xx (32 bits)")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/1cdaacb391cbd3e0240f0e0faf691202874e9422.1723109462.git.christophe.leroy@csgroup.eu
arch/powerpc/mm/init-common.c