]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/mm: Fix build break when PPC_NATIVE=n
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 25 Jul 2016 01:54:41 +0000 (11:54 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 26 Jul 2016 04:16:08 +0000 (14:16 +1000)
commit1da825116ed58ad738b331c6ff22b60a3c089a54
tree68a1e96d5d7372dd843f47fa52a8fdf9aaa4fccb
parent8cdcbd48151214c5ba950d3eeb97238d864015d5
powerpc/mm: Fix build break when PPC_NATIVE=n

The recent commit to rework the hash MMU setup broke the build when
CONFIG_PPC_NATIVE=n. Fix it by adding an IS_ENABLED() check before
calling hpte_init_native().

Removing the else clause opens the possibility that we don't set any
ops, which would probably lead to a strange crash later. So add a check
that we correctly initialised at least one member of the struct.

Fixes: 90b075b87782 ("powerpc/64: Move MMU backend selection out of platform code")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/hash_utils_64.c