> On 07-Jul-2020, at 12:20 PM, Michael Neuling <mi...@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

Reply via email to