Thread (41 messages) flat view 41 messages, 6 authors, 2020-07-15

Re: [PATCH v2 06/10] powerpc/perf: power10 Performance Monitoring support

From: Athira Rajeev <hidden>
Date: 2020-07-08 10:58:36

On 07-Jul-2020, at 12:20 PM, Michael Neuling [off-list ref] wrote:

quoted
@@ -480,6 +520,7 @@ int isa207_compute_mmcr(u64 event[], int n_ev,
	mmcr[1] = mmcr1;
	mmcr[2] = mmcra;
	mmcr[3] = mmcr2;
+	mmcr[4] = mmcr3;
This is fragile like the kvm vcpu case I commented on before but it gets passed
in via a function parameter?! Can you create a struct to store these in rather
than this odd ball numbering?
Mikey,
Yes, it gets passed as cpuhw->mmcr array 
I will check on these cleanup changes for the kvm vcpu case as well as cpu_hw_events mmcr array

Thanks
Athira
The cleanup should start in patch 1/10 here:

       /*
        * The order of the MMCR array is:
-        *  - 64-bit, MMCR0, MMCR1, MMCRA, MMCR2
+        *  - 64-bit, MMCR0, MMCR1, MMCRA, MMCR2, MMCR3
        *  - 32-bit, MMCR0, MMCR1, MMCR2
        */
-       unsigned long mmcr[4];
+       unsigned long mmcr[5];



mikey
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help