Skip to content

Commit 53ecde0

Browse files
antonblanchardmpe
authored andcommitted
powerpc/powernv: Increase memory block size to 1GB on radix
Memory hot unplug on PowerNV radix hosts is broken. Our memory block size is 256MB but since we map the linear region with very large pages, each pte we tear down maps 1GB. A hot unplug of one 256MB memory block results in 768MB of memory getting unintentionally unmapped. At this point we are likely to oops. Fix this by increasing our memory block size to 1GB on PowerNV radix hosts. Fixes: 4b5d62c ("powerpc/mm: add radix__remove_section_mapping()") Cc: stable@vger.kernel.org # v4.11+ Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent 7c6a4f3 commit 53ecde0

File tree

1 file changed

+9
-1
lines changed
  • arch/powerpc/platforms/powernv

1 file changed

+9
-1
lines changed

arch/powerpc/platforms/powernv/setup.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,15 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
272272
#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
273273
static unsigned long pnv_memory_block_size(void)
274274
{
275-
return 256UL * 1024 * 1024;
275+
/*
276+
* We map the kernel linear region with 1GB large pages on radix. For
277+
* memory hot unplug to work our memory block size must be at least
278+
* this size.
279+
*/
280+
if (radix_enabled())
281+
return 1UL * 1024 * 1024 * 1024;
282+
else
283+
return 256UL * 1024 * 1024;
276284
}
277285
#endif
278286

0 commit comments

Comments
 (0)