From patchwork Fri Sep 16 15:49:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 76394 Delivered-To: patch@linaro.org Received: by 10.140.106.72 with SMTP id d66csp564885qgf; Fri, 16 Sep 2016 08:50:30 -0700 (PDT) X-Received: by 10.98.147.22 with SMTP id b22mr24037647pfe.88.1474041029958; Fri, 16 Sep 2016 08:50:29 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si10865002pav.31.2016.09.16.08.50.29; Fri, 16 Sep 2016 08:50:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964880AbcIPPuU (ORCPT + 27 others); Fri, 16 Sep 2016 11:50:20 -0400 Received: from mail-it0-f49.google.com ([209.85.214.49]:35617 "EHLO mail-it0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753955AbcIPPuK (ORCPT ); Fri, 16 Sep 2016 11:50:10 -0400 Received: by mail-it0-f49.google.com with SMTP id r192so19174199ita.0 for ; Fri, 16 Sep 2016 08:50:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Flk5MklqMnOOINoDTnJJmrOngRSvR3qHrdojrqVHZac=; b=kObXNwXRUdFWP+SUS+kMJd1Uz3YfeJZJKAuonqVGDAY3x3JYIkITep7s02lrUSdhW7 xszaSkE5DoNN2Th22YMQCHoZWazsm1hTSEfbem/SZhkO8PqckK5H30tGI0XmX1a5CT3R bxf8LFI/H0jF9p5FrsucEdx9jVhcJ/PN9UDvA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Flk5MklqMnOOINoDTnJJmrOngRSvR3qHrdojrqVHZac=; b=BxlRvTLsVbibNxTwL9mTvjt+Wr26sg7cGj23TjJo6A3zK1EABWNpWN6ukkPzkQcrAo mELG4MgBrgjDaRbURTOihOHJ140kFi12FYPci/PP2oFQAhHlwYNvphCUQ06xOakcYSJv 5Za8+64Sr2LuxuopCpwYJuecxcfz0JPPHlZuBlYONDFD9Fa2OsWZ3xm3KXZWCdEGN7vU cHD5Y+1LAPst+x7egR6ae5Wjxu2Q29JVjAAONEVR07pK7Ai9Tc6rmo0OtLrhajEwGC1R cINS5A0GA2Zj261wmQhnbPsdF9fZVSOE1L0IcKCs5JMHXzS9odyp3djJzvg95nJRnl5S fSEg== X-Gm-Message-State: AE9vXwPJtQ7YjUs+JoVOhLdSGH9XGQaoGKi2NNjNME2rW5SWcqsfpap66imGh7KuZuk72npe X-Received: by 10.36.3.76 with SMTP id e73mr6506852ite.42.1474041009488; Fri, 16 Sep 2016 08:50:09 -0700 (PDT) Received: from t430.cg.shawcable.net (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id h63sm3177750ita.12.2016.09.16.08.50.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Sep 2016 08:50:08 -0700 (PDT) From: Mathieu Poirier To: acme@kernel.org Cc: acme@infradead.org, peterz@infradead.org, jolsa@kernel.org, mingo@redhat.com, alexander.shishkin@linux.intel.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH V8 1/7] perf tools: confining __get_cpuid() to x86 architecture Date: Fri, 16 Sep 2016 09:49:58 -0600 Message-Id: <1474041004-13956-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474041004-13956-1-git-send-email-mathieu.poirier@linaro.org> References: <1474041004-13956-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The __get_cpuid() test is only valid when compiling for x86. When compiling for other architectures like ARM/ARM64 the test fails event if the functionality is not required. This patch isolate the build-in feature check to x86 platform, allowing the compilation and usage of PMUs that use the AUXTRACE infrastructure on other architectures (i.e ARM CoreSight). Signed-off-by: Mathieu Poirier Acked-by: Adrian Hunter Acked-by: Jiri Olsa --- tools/perf/Makefile.config | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index 24803c58049a..72edf83d76b7 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -746,10 +746,13 @@ ifdef LIBBABELTRACE endif ifndef NO_AUXTRACE - ifeq ($(feature-get_cpuid), 0) - msg := $(warning Your gcc lacks the __get_cpuid() builtin, disables support for auxtrace/Intel PT, please install a newer gcc); - NO_AUXTRACE := 1 - else + ifeq ($(ARCH),x86) + ifeq ($(feature-get_cpuid), 0) + msg := $(warning Your gcc lacks the __get_cpuid() builtin, disables support for auxtrace/Intel PT, please install a newer gcc); + NO_AUXTRACE := 1 + endif + endif + ifndef NO_AUXTRACE $(call detected,CONFIG_AUXTRACE) CFLAGS += -DHAVE_AUXTRACE_SUPPORT endif