Skip to content
Commit 7353644f authored by Michael Ellerman's avatar Michael Ellerman
Browse files

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: 166dd7d3

 ("powerpc/64: Move MMU backend selection out of platform code")
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Acked-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent ccf5c442
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment