OSDN Git Service

powerpc/mm: Use the correct pointer when setting a 2MB pte
authorReza Arbab <arbab@linux.vnet.ibm.com>
Wed, 25 Jan 2017 15:54:33 +0000 (09:54 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Feb 2017 07:08:27 +0000 (08:08 +0100)
commit4c953848c95b74def08172b07c04a773071f69ee
treee52498249e017ead1ed70abd6121d1690276ec05
parent8f415333be3a448d9db57a9142fde7efe863432d
powerpc/mm: Use the correct pointer when setting a 2MB pte

commit a0615a16f7d0ceb5804d295203c302d496d8ee91 upstream.

When setting a 2MB pte, radix__map_kernel_page() is using the address

ptep = (pte_t *)pudp;

Fix this conversion to use pmdp instead. Use pmdp_ptep() to do this
instead of casting the pointer.

Fixes: 2bfd65e45e87 ("powerpc/mm/radix: Add radix callbacks for early init routines")
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Reza Arbab <arbab@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/powerpc/mm/pgtable-radix.c