Patch "powerpc/mm: Fix memory hotplug BUG() on radix" has been added to the 4.9-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
powerpc/mm: Fix memory hotplug BUG() on radix
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-mm-fix-memory-hotplug-bug-on-radix.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Wed Dec 6 17:39:55 CET 2017
From: Reza Arbab <[email protected]>
Date: Tue, 3 Jan 2017 14:39:51 -0600
Subject: powerpc/mm: Fix memory hotplug BUG() on radix
From: Reza Arbab <[email protected]>
[ Upstream commit 32b53c012e0bfe20b2745962a89db0dc72ef3270 ]
Memory hotplug is leading to hash page table calls, even on radix:
arch_add_memory
create_section_mapping
htab_bolt_mapping
BUG_ON(!ppc_md.hpte_insert);To fix, refactor {create,remove}_section_mapping() into hash__ and radix__ variants. Leave the radix versions stubbed for now.
--- arch/powerpc/include/asm/book3s/64/hash.h | 4 ++++ arch/powerpc/mm/hash_utils_64.c | 4 ++-- arch/powerpc/mm/pgtable-book3s64.c | 18 ++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-)
arch/powerpc/include/asm/book3s/64/hash.h +4 -0
@@ -201,6 +201,10 @@ extern int __meminit hash__vmemmap_creat unsigned long phys);extern void hash__vmemmap_remove_mapping (unsigned long start,unsigned long page_size); + +int hash__create_section_mapping (unsigned long start,unsigned long end); +int hash__remove_section_mapping (unsigned long start,unsigned long end); +#endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_BOOK3S_64_HASH_H */
arch/powerpc/mm/hash_utils_64.c +2 -2
@@ -747,7 +747,7 @@ static unsigned long __init htab_get_tab }#ifdef CONFIG_MEMORY_HOTPLUG -int create_section_mapping (unsigned long start,unsigned long end) +int hash__create_section_mapping (unsigned long start,unsigned long end) { int rc = htab_bolt_mapping(start, end, __pa(start), pgprot_val(PAGE_KERNEL), mmu_linear_psize,
@@ -761,7 +761,7 @@ int create_section_mapping(unsigned longreturn rc; } -int remove_section_mapping (unsigned long start,unsigned long end) +int hash__remove_section_mapping (unsigned long start,unsigned long end) {int rc =htab_remove_mapping (start, end, mmu_linear_psize, mmu_kernel_ssize);
arch/powerpc/mm/pgtable-book3s64.c +18 -0
@@ -125,3 +125,21 @@ void mmu_cleanup_all(void)else if (mmu_hash_ops.hpte_clear_all) mmu_hash_ops.hpte_clear_all (); } + +#ifdef CONFIG_MEMORY_HOTPLUG +int create_section_mapping (unsigned long start,unsigned long end) +{ +if (radix_enabled ()) +return -ENODEV ; + +return hash__create_section_mapping (start, end); +} + +int remove_section_mapping (unsigned long start,unsigned long end) +{ +if (radix_enabled ()) +return -ENODEV ; + +return hash__remove_section_mapping (start, end); +} +#endif /* CONFIG_MEMORY_HOTPLUG */
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/powerpc-mm-fix-memory-hotplug-bug-on-radix.patch