powerpc: introduce pte_set_hidx() helper
authorRam Pai <linuxram@us.ibm.com>
Mon, 6 Nov 2017 08:50:45 +0000 (00:50 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 20 Dec 2017 07:57:19 +0000 (18:57 +1100)
commit59aa31fd6f964ac63ac9cb90c8468f60e9bb0756
treef0673ee345d3d76db127fe1ec5025b218ea90a3d
parentf36dbfe1a504b85c7b3bf89fdd99991afbaa0f74
powerpc: introduce pte_set_hidx() helper

Introduce pte_set_hidx().It sets the (H_PAGE_F_SECOND|H_PAGE_F_GIX) bits
at the appropriate location in the PTE of 4K PTE. For 64K PTE, it sets
the bits in the second part of the PTE. Though the implementation for
the former just needs the slot parameter, it does take some additional
parameters to keep the prototype consistent.

This function will be handy as we work towards re-arranging the bits in
the subsequent patches.

Acked-by: Balbir Singh <bsingharora@gmail.com>
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/book3s/64/hash-4k.h
arch/powerpc/include/asm/book3s/64/hash-64k.h