mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
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: 4b5d62ca17
("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>
This commit is contained in:
parent
7c6a4f3b16
commit
53ecde0b91
1 changed files with 9 additions and 1 deletions
|
@ -272,6 +272,14 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
|
||||||
#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
|
#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
|
||||||
static unsigned long pnv_memory_block_size(void)
|
static unsigned long pnv_memory_block_size(void)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* We map the kernel linear region with 1GB large pages on radix. For
|
||||||
|
* memory hot unplug to work our memory block size must be at least
|
||||||
|
* this size.
|
||||||
|
*/
|
||||||
|
if (radix_enabled())
|
||||||
|
return 1UL * 1024 * 1024 * 1024;
|
||||||
|
else
|
||||||
return 256UL * 1024 * 1024;
|
return 256UL * 1024 * 1024;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue