Athira Rajeev [off-list ref] writes:
quoted
On 08-Jul-2020, at 5:34 PM, Michael Ellerman [off-list ref] wrote:
Athira Rajeev <atrajeev@linux.vnet.ibm.com <mailto:atrajeev@linux.vnet.ibm.com>> writes:
quoted
From: Anju T Sudhakar <redacted>
Add extended regs to sample_reg_mask in the tool side to use
with `-I?` option. Perf tools side uses extended mask to display
...
quoted
quoted
+ */
+ 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