浏览代码

perf kvm: Fix subcommands on s390

With commit eca0fa28cd0d ("perf record: Provide detailed information on
s390 CPU") s390 platform provides detailed type/model/capacity
information in the CPU identifier string instead of just "IBM/S390".

This breaks 'perf kvm' support which uses hard coded string IBM/S390 to
compare with the CPU identifier string. Fix this by changing the
comparison.

Reported-by: Stefan Raspl <raspl@linux.ibm.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Tested-by: Stefan Raspl <raspl@linux.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: stable@vger.kernel.org
Fixes: eca0fa28cd0d ("perf record: Provide detailed information on s390 CPU")
Link: http://lkml.kernel.org/r/20180712070936.67547-1-tmricht@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Thomas Richter 7 年之前
父节点
当前提交
8a95c89945
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/perf/arch/s390/util/kvm-stat.c

+ 1 - 1
tools/perf/arch/s390/util/kvm-stat.c

@@ -102,7 +102,7 @@ const char * const kvm_skip_events[] = {
 
 
 int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid)
 int cpu_isa_init(struct perf_kvm_stat *kvm, const char *cpuid)
 {
 {
-	if (strstr(cpuid, "IBM/S390")) {
+	if (strstr(cpuid, "IBM")) {
 		kvm->exit_reasons = sie_exit_reasons;
 		kvm->exit_reasons = sie_exit_reasons;
 		kvm->exit_reasons_isa = "SIE";
 		kvm->exit_reasons_isa = "SIE";
 	} else
 	} else