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)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 16 Jan 2017 23:05:43 +0000 (10:05 +1100)
commit32b53c012e0bfe20b2745962a89db0dc72ef3270
tree4f6d713c1b48f508bdfe0bd802204aba11a40ec5
parent49def1853334396f948dcb4cedb9347abb318df5
powerpc/mm: Fix memory hotplug BUG() on radix

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>
arch/powerpc/include/asm/book3s/64/hash.h
arch/powerpc/mm/hash_utils_64.c
arch/powerpc/mm/pgtable-book3s64.c