Merge tag 'mmc-v4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
[cascardo/linux.git] / tools / perf / arch / powerpc / util / header.c
index f8ccee1..9aaa6f5 100644 (file)
@@ -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;
+}