[PATCH 1/3] powerpc/mm: Fix build break due when PPC_NATIVE=n

Michael Ellerman mpe at ellerman.id.au
Mon Jul 25 16:17:52 AEST 2016


Stephen Rothwell <sfr at canb.auug.org.au> writes:

> Hi Michael,
>
> On Mon, 25 Jul 2016 12:57:49 +1000 Michael Ellerman <mpe at ellerman.id.au> wrote:
>>
>> The recent commit to rework the hash MMU setup broke the build when
>> CONFIG_PPC_NATIVE=n. Fix it by providing a fallback implementation of
>> hpte_init_native().
>
> Alternatively, you could make the call site dependent on
> IS_ENABLED(CONFIG_PPC_NATIVE) and not need the fallback.
>
> so:
>
> 	else if (IS_ENABLED(CONFIG_PPC_NATIVE))
> 		hpte_init_native();
>
> in arch/powerpc/mm/hash_utils_64.c and let the compiler elide the call.

That would mean we might fall through and not assign any ops, so I think
it's preferable to have a fallback that explicitly panics().

cheers


More information about the Linuxppc-dev mailing list