[Skiboot] [PATCH v2 09/11] Nest Sampling rate workaround

Madhavan Srinivasan maddy at linux.vnet.ibm.com
Tue Jul 21 16:38:49 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 29d62c29036b..9ff95c7e2baa 100644
--- a/hw/nest.c
+++ b/hw/nest.c
@@ -391,6 +391,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