powerpc/8xx: use pmd_off() to access a PMD entry in pte_update()
authorMike Rapoport <rppt@linux.ibm.com>
Mon, 15 Jun 2020 09:22:29 +0000 (12:22 +0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 17 Jun 2020 13:04:13 +0000 (23:04 +1000)
commit687993ccf3b05070598b89fad97410b26d7bc9d2
treebfb4ccf212cb6ad4ff6a6e0ecff7b13942da9b49
parent0bdcfa182506526fbe4e088ff9ca86a31b81828d
powerpc/8xx: use pmd_off() to access a PMD entry in pte_update()

The pte_update() implementation for PPC_8xx unfolds page table from the PGD
level to access a PMD entry. Since 8xx has only 2-level page table this can
be simplified with pmd_off() shortcut.

Replace explicit unfolding with pmd_off() and drop defines of pgd_index()
and pgd_offset() that are no longer needed.

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200615092229.23142-1-rppt@kernel.org
arch/powerpc/include/asm/nohash/32/pgtable.h