[PATCH v5 13/26] powerpc/book3s64/pkeys: Enable MMU_FTR_PKEY
Aneesh Kumar K.V
aneesh.kumar at linux.ibm.com
Tue Jul 7 03:17:27 AEST 2020
>>
>>> /*
>>> * Let's assume 32 pkeys on P8 bare metal, if its not
>>> defined by device
>>> * tree. We make this exception since skiboot forgot to
>>> expose this
>>> * property on power8.
>>> */
>>> if (!firmware_has_feature(FW_FEATURE_LPAR) &&
>>> - cpu_has_feature(CPU_FTRS_POWER8))
>>> + early_cpu_has_feature(CPU_FTRS_POWER8))
>>> pkeys_total = 32;
>>
>> That's not how cpu_has_feature() works, we'll need to fix that.
>>
>> cheers
>>
>
> I did a separate patch to handle that which switch the above to
>
> /*
> * Let's assume 32 pkeys on P8/P9 bare metal, if its not
> defined by device
> * tree. We make this exception since skiboot forgot to expose
> this
> * property on power8/9.
> */
> if (!firmware_has_feature(FW_FEATURE_LPAR) &&
> (early_cpu_has_feature(CPU_FTR_ARCH_207S) ||
> early_cpu_has_feature(CPU_FTR_ARCH_300)))
> pkeys_total = 32;
>
We should do a PVR check here i guess.
ret = of_scan_flat_dt(dt_scan_storage_keys, &pkeys_total);
if (ret == 0) {
/*
* Let's assume 32 pkeys on P8/P9 bare metal, if its not defined by device
* tree. We make this exception since skiboot forgot to expose this
* property on power8/9.
*/
if (!firmware_has_feature(FW_FEATURE_LPAR) &&
(pvr_version_is(PVR_POWER8) || pvr_version_is(PVR_POWER9)))
pkeys_total = 32;
}
-aneesh
More information about the Linuxppc-dev
mailing list