[Skiboot] [PATCH v3 8/9] Nest Sampling rate workaround

Madhavan Srinivasan maddy at linux.vnet.ibm.com
Mon Aug 3 17:33:47 AEST 2015


HW325868 showed default sampling rate used by SLW IMA microcode
does not fetch any MCS write counter values. After alot of experiments,
64ms as sampling rate found to be effective. Add code to update the new sample
rate before starting the engine.

Signed-off-by: Madhavan Srinivasan <maddy at linux.vnet.ibm.com>
---
 hw/nest.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hw/nest.c b/hw/nest.c
index 879bf10b6e27..b6b75dcf82e7 100644
--- a/hw/nest.c
+++ b/hw/nest.c
@@ -387,6 +387,15 @@ void nest_pmu_init(int loaded)
 		dt_add_property_u64(chip_dev, "reg", addr);
 		dt_add_property_cells(chip_dev, "size", SLW_IMA_SIZE);
 		dt_add_property(chip_dev, "ibm,ima-chip", NULL, 0);
+
+		/*
+		 * Word around for HW325868, modify the sampling rate
+		 * since the default sampling rate of 128us does not
+		 * fetch any MCS Write data. Update the new sample rate
+		 * of 64ms before starting the engine.
+		 */
+		addr = chip->homer_base + CB_STRUCT_SPEED;
+		out_be64((u64 *)addr, 0x5);
 	}
 
 	/*
-- 
1.9.1



More information about the Skiboot mailing list