Re: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-07-25 05:33:03
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-07-25 05:33:03
Stephen Rothwell [off-list ref] writes:
Hi Michael, On Mon, 25 Jul 2016 12:57:50 +1000 Michael Ellerman [off-list ref] wrote:quoted
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