powerpc/mm: Fix memory hotplug BUG() on radix
authorReza Arbab <arbab@linux.vnet.ibm.com>
Tue, 3 Jan 2017 20:39:51 +0000 (14:39 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Dec 2017 21:01:52 +0000 (22:01 +0100)
commit57e76dbbc5609c49c8abb2199561e92f54bdd7eb
tree9cde82db8377dda8413b651a40c8e0f82b27f1d8
parenta88ff235e8adf50bb50f5243c242f5f82f7549fa
powerpc/mm: Fix memory hotplug BUG() on radix

[ 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.

Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/include/asm/book3s/64/hash.h
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/pgtable-book3s64.c