[PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header

Michael Ellerman mpe at ellerman.id.au
Mon Jul 25 15:33:02 AEST 2016


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

> Hi Michael,
>
> On Mon, 25 Jul 2016 12:57:50 +1000 Michael Ellerman <mpe at ellerman.id.au> wrote:
>>
>> hpte_init_lpar() is part of the pseries platform, so name it as such.
>> Provide the fallback implementation in a header, rather than using a
>> weak function.
>
> firmware_has_feature(FW_FEATURE_LPAR) can also be true for
> CONFIG_PPC_PS3.  Is this a problem?

No it shouldn't be, because the PS3_LV1 check should have already hit:

	/* Select appropriate backend */
	if (firmware_has_feature(FW_FEATURE_PS3_LV1))
		ps3_early_mm_init();
	else if (firmware_has_feature(FW_FEATURE_LPAR))
		hpte_init_pseries();
	else
		hpte_init_native();

When we detect a PS3 we set both PS3_LV1 and LPAR at the same time, so
there should be no way they can get out of sync, other than due to a
bug in the code.

cheers


More information about the Linuxppc-dev mailing list