From: Xiao Guangrong <xiaoguangr...@linux.vnet.ibm.com> Now, 'perf kvm stat' is only supported on x86, let its code depend on (__x86_64__ || __i386__) to fix building it on other architectures.
Reviewed-by: David Howells <dhowe...@redhat.com> Signed-off-by: Xiao Guangrong <xiaoguangr...@linux.vnet.ibm.com> Cc: Borislav Petkov <b...@alien8.de> Cc: David Ahern <dsah...@gmail.com> Cc: David Howells <dhowe...@redhat.com> Cc: Dong Hao <haod...@linux.vnet.ibm.com> Cc: Ingo Molnar <mi...@kernel.org> Cc: Josh Boyer <jwbo...@gmail.com> Cc: Linus Torvalds <torva...@linux-foundation.org> Cc: Namhyung Kim <namhy...@gmail.com> Cc: Paul Mackerras <pau...@samba.org> Cc: Runzhen Wang <runz...@linux.vnet.ibm.com> Cc: Thomas Gleixner <t...@linutronix.de> Cc: linux-a...@vger.kernel.org Cc: x...@kernel.org Link: http://lkml.kernel.org/r/50a9eb89.70...@linux.vnet.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <a...@redhat.com> --- tools/perf/builtin-kvm.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c index 9fa45fa..283b439 100644 --- a/tools/perf/builtin-kvm.c +++ b/tools/perf/builtin-kvm.c @@ -22,6 +22,7 @@ #include <pthread.h> #include <math.h> +#if defined(__i386__) || defined(__x86_64__) #include <asm/svm.h> #include <asm/vmx.h> #include <asm/kvm.h> @@ -896,6 +897,7 @@ static int kvm_cmd_stat(const char *file_name, int argc, const char **argv) perf_stat: return cmd_stat(argc, argv, NULL); } +#endif static int __cmd_record(const char *file_name, int argc, const char **argv) { @@ -1018,8 +1020,10 @@ int cmd_kvm(int argc, const char **argv, const char *prefix __maybe_unused) return cmd_top(argc, argv, NULL); else if (!strncmp(argv[0], "buildid-list", 12)) return __cmd_buildid_list(file_name, argc, argv); +#if defined(__i386__) || defined(__x86_64__) else if (!strncmp(argv[0], "stat", 4)) return kvm_cmd_stat(file_name, argc, argv); +#endif else usage_with_options(kvm_usage, kvm_options); -- 1.7.9.2.358.g22243 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/