Athira Rajeev <atraj...@linux.vnet.ibm.com> writes: >> On 08-Jul-2020, at 5:34 PM, Michael Ellerman <m...@ellerman.id.au> wrote: >> >> Athira Rajeev <atraj...@linux.vnet.ibm.com >> <mailto:atraj...@linux.vnet.ibm.com>> writes: >>> From: Anju T Sudhakar <a...@linux.vnet.ibm.com> >>> >>> Add extended regs to sample_reg_mask in the tool side to use >>> with `-I?` option. Perf tools side uses extended mask to display ... >> >>> + */ >>> + get_cpuid(buffer, sizeof(buffer)); >>> + ret = sscanf(buffer, "%u,", &version); >> >> This is powerpc specific code, why not just use mfspr(SPRN_PVR), rather >> than redirecting via printf/sscanf. > > Hi Michael > > For perf tools, defines for `mfspr` , `SPRN_PVR` are in > arch/powerpc/util/header.c > So I have re-used existing utility. Otherwise, we will need to include these > defines here as well > Does that sounds good ?
They should be moved to a header in that directory that both C files can include. cheers