]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Add arm64 version of get_cpuid()
authorJohn Garry <john.garry@huawei.com>
Fri, 13 Dec 2019 13:54:15 +0000 (21:54 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 12 Feb 2020 13:36:51 +0000 (10:36 -0300)
commit5721e1df761d290da8b3cb39bacce0ae03cbca80
tree8405eaf8eb2a84ec3f71020106f69230c61f4015
parent874c6be49fbc860a5f8f5b2694e339fe63c0fc1f
perf tools: Add arm64 version of get_cpuid()

Add an arm64 version of get_cpuid(), which is used for various annotation
and headers - for example, I now get the CPUID in "perf report --header",
as shown in this snippet:

  # hostname : ubuntu
  # os release : 5.5.0-rc1-dirty
  # perf version : 5.5.rc1.gbf8a13dc9851
  # arch : aarch64
  # nrcpus online : 96
  # nrcpus avail : 96
  # cpuid : 0x00000000480fd010

Since much of the code to read the MIDR is already in get_cpuid_str(),
factor out this code.

Tester notes:

I tested this patch on my new ARM64 Kunpeng 920 server.
[root@node1 zsk]# ./perf --version
perf version 5.6.rc1.g2cdb955b7252

Both perf list and perf stat can work.

Signed-off-by: John Garry <john.garry@huawei.com>
Tested-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxarm@huawei.com
Link: http://lore.kernel.org/lkml/1576245255-210926-1-git-send-email-john.garry@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/arch/arm64/util/header.c