Re: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header
Benjamin Herrenschmidtwrites: > On Mon, 2016-07-25 at 20:36 +1000, Michael Ellerman wrote: >> That would be nice, but these look fishy at least: >> >> arch/powerpc/platforms/cell/spu_manage.c: if >> (!firmware_has_feature(FW_FEATURE_LPAR)) >> arch/powerpc/platforms/cell/spu_manage.c: if >> (!firmware_has_feature(FW_FEATURE_LPAR)) { >> > arch/powerpc/platforms/cell/spu_manage.c: if >> > (!firmware_has_feature(FW_FEATURE_LPAR)) > > Those can just be checks for LV1, I think .. Yeah they can now. Previously we had BEAT (the celleb HV), but now that's gone we can switch those to LV1. >> > arch/powerpc/platforms/pasemi/iommu.c: >> > !firmware_has_feature(FW_FEATURE_LPAR)) { >> drivers/net/ethernet/pasemi/pasemi_mac.c: return >> firmware_has_feature(FW_FEATURE_LPAR); > > And that was some experiemtal PAPR'ish thing wasn't it ? Not sure, it was news to me that pasemi ever had any HV support. cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header
On Mon, 2016-07-25 at 20:36 +1000, Michael Ellerman wrote: > That would be nice, but these look fishy at least: > > arch/powerpc/platforms/cell/spu_manage.c: if > (!firmware_has_feature(FW_FEATURE_LPAR)) > arch/powerpc/platforms/cell/spu_manage.c: if > (!firmware_has_feature(FW_FEATURE_LPAR)) { > > arch/powerpc/platforms/cell/spu_manage.c: if > > (!firmware_has_feature(FW_FEATURE_LPAR)) Those can just be checks for LV1, I think .. > > arch/powerpc/platforms/pasemi/iommu.c: > > !firmware_has_feature(FW_FEATURE_LPAR)) { > drivers/net/ethernet/pasemi/pasemi_mac.c: return > firmware_has_feature(FW_FEATURE_LPAR); And that was some experiemtal PAPR'ish thing wasn't it ? Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header
Benjamin Herrenschmidtwrites: > On Mon, 2016-07-25 at 15:33 +1000, Michael Ellerman wrote: >> 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. > > I thought I had changed PS3 to no longer set LPAR ? Nope: FW_FEATURE_PS3_POSSIBLE = FW_FEATURE_LPAR | FW_FEATURE_PS3_LV1, ... #ifdef CONFIG_PPC_PS3 /* Identify PS3 firmware */ if (of_flat_dt_is_compatible(of_get_flat_dt_root(), "sony,ps3")) powerpc_firmware_features |= FW_FEATURE_PS3_POSSIBLE; #endif > I like having a flag that basically says PAPR and that's pretty much > what LPAR is, in fact I think I've been using it elsewhere with that > meaning That would be nice, but these look fishy at least: arch/powerpc/platforms/cell/spu_manage.c: if (!firmware_has_feature(FW_FEATURE_LPAR)) arch/powerpc/platforms/cell/spu_manage.c: if (!firmware_has_feature(FW_FEATURE_LPAR)) { arch/powerpc/platforms/cell/spu_manage.c: if (!firmware_has_feature(FW_FEATURE_LPAR)) arch/powerpc/platforms/pasemi/iommu.c: !firmware_has_feature(FW_FEATURE_LPAR)) { drivers/net/ethernet/pasemi/pasemi_mac.c: return firmware_has_feature(FW_FEATURE_LPAR); cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header
On Mon, 2016-07-25 at 15:33 +1000, Michael Ellerman wrote: > 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. I thought I had changed PS3 to no longer set LPAR ? I like having a flag that basically says PAPR and that's pretty much what LPAR is, in fact I think I've been using it elsewhere with that meaning Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header
Stephen Rothwellwrites: > Hi Michael, > > On Mon, 25 Jul 2016 12:57:50 +1000 Michael Ellerman > 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 ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header
On Mon, 2016-07-25 at 14:13 +1000, Stephen Rothwell wrote: > Hi Michael, > > On Mon, 25 Jul 2016 12:57:50 +1000 Michael Ellerman> 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? Shouldn't be with my latest series Cheers, Ben. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev
Re: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header
Hi Michael, On Mon, 25 Jul 2016 12:57:50 +1000 Michael Ellermanwrote: > > 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? -- Cheers, Stephen Rothwell ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev