mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
perf powerpc: Support CPU ID matching for Powerpc
Implement code that returns the generic CPU ID string for Powerpc. This will be used to identify the specific table of PMU events to parse/compare user specified events against. Signed-off-by: Sukadev Bhattiprolu <[email protected]> Acked-by: Ingo Molnar <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Madhavan Srinivasan <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
933f82ff72
commit
ce88f27ccc
1 changed files with 11 additions and 0 deletions
|
|
@ -32,3 +32,14 @@ get_cpuid(char *buffer, size_t sz)
|
|||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
char *
|
||||
get_cpuid_str(void)
|
||||
{
|
||||
char *bufp;
|
||||
|
||||
if (asprintf(&bufp, "%.8lx", mfspr(SPRN_PVR)) < 0)
|
||||
bufp = NULL;
|
||||
|
||||
return bufp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue