Re: [PATCH v2 06/10] powerpc/perf: power10 Performance Monitoring support
> On 07-Jul-2020, at 12:20 PM, Michael Neuling 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
Re: [PATCH v2 06/10] powerpc/perf: power10 Performance Monitoring support
> @@ -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? 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
Re: [PATCH v2 06/10] powerpc/perf: power10 Performance Monitoring support
Hi Athira, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on tip/perf/core v5.8-rc3 next-20200702] [cannot apply to kvm-ppc/kvm-ppc-next] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Athira-Rajeev/powerpc-perf-Add-support-for-power10-PMU-Hardware/20200701-181147 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next config: powerpc-allyesconfig (attached as .config) compiler: powerpc64-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> arch/powerpc/perf/power10-pmu.c:393:5: warning: no previous prototype for >> 'init_power10_pmu' [-Wmissing-prototypes] 393 | int init_power10_pmu(void) | ^~~~ vim +/init_power10_pmu +393 arch/powerpc/perf/power10-pmu.c 392 > 393 int init_power10_pmu(void) --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org .config.gz Description: application/gzip