[PATCH v2 06/10] powerpc/perf: power10 Performance Monitoring support
Athira Rajeev
atrajeev at linux.vnet.ibm.com
Wed Jul 8 20:56:32 AEST 2020
> On 07-Jul-2020, at 12:20 PM, Michael Neuling <mikey at neuling.org> wrote:
>
>
>> @@ -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
More information about the Linuxppc-dev
mailing list