Thread (49 messages) flat view 49 messages, 2 authors, 2020-07-07

Re: [PATCH v5 13/26] powerpc/book3s64/pkeys: Enable MMU_FTR_PKEY

From: Aneesh Kumar K.V <hidden>
Date: 2020-07-06 17:19:23

quoted
quoted
          /*
           * 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help