From patchwork Wed Feb 21 18:07:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 129128 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp903528ljc; Wed, 21 Feb 2018 10:09:45 -0800 (PST) X-Google-Smtp-Source: AH8x226ZumeDm6JAXwjxvA8ypIgN/yv7koQWa1/HD4D66WYm6sSvCvlyWZH0gHXs7azuCMFanSkD X-Received: by 2002:a17:902:63:: with SMTP id 90-v6mr3843005pla.125.1519236585108; Wed, 21 Feb 2018 10:09:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519236585; cv=none; d=google.com; s=arc-20160816; b=x+AZW+6ok0fT/arQUG6iVmcHwqWZu66HOOdJItDzViYqm4VO3XSG11QTG1iXZEHF+M GPiEjcOYyc3AUAvOzCtgetX7W8Qjqzo4X+XqFrBISjDIfUA1fcVCaSSkBvF750k7pR8k ez9V5QBkLRsJZqOsrQ7sDydthlQUubOJT5lbzHPT+8EsaGI5Jz9EYY29Xk0CK8G8GYPz CVqPdISFWdYhMRkBo1joHSwVDhvGjz+WauVEoVgf9CgGBkb9KfzlP8LwW6OSFyBWisaU V9KVwi5W0AEhZZ97z2xkzc4PrUfVJ5UoqCKnQ0iCot6bBVzr7nM7/vGDHy4nk/QoEUzj RBFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=ljQ9h7q4idaGVu/GzNq7X6BG2wx+Noe4L1VTQ99qX7g=; b=paXFTLMFgKUcO6AqDy5RJJGJn5Q/IiPadGHk+E44Mb5emSpxgK/evyjV9U5Wu1Cz9T +rbbDyL5KrqaRqVUCYb0YxJqDepFzpZTkgnhiJAKBJZdyE6gGv2nwu39lUSXk8DBGmsa I0MJ/ChpiTKO+2phvD5U5pFBw88qpVVPT+m/f3PsZMb6KB1oBS1KYEXsih8ajwxU21Ex 3kpOvtalYiXj2vT5PAZPk69HGduguRtjxZlck+idnxmIyOjyichq16q4Qm5YufWUWMI9 QgCsWZfYe6fP81l1ePkI9zoCpLREApOM8/WxM+1lFufPqcZPE8r39ww/pTqEnC9Y3k1O dmTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BFbAmtRO; 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 sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g3-v6si14156367plt.528.2018.02.21.10.09.44; Wed, 21 Feb 2018 10:09:45 -0800 (PST) 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 header.s=google header.b=BFbAmtRO; 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 sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755122AbeBUSJk (ORCPT + 28 others); Wed, 21 Feb 2018 13:09:40 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:44514 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751644AbeBUSJi (ORCPT ); Wed, 21 Feb 2018 13:09:38 -0500 Received: by mail-oi0-f66.google.com with SMTP id b8so1770526oib.11 for ; Wed, 21 Feb 2018 10:09:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ljQ9h7q4idaGVu/GzNq7X6BG2wx+Noe4L1VTQ99qX7g=; b=BFbAmtRO2PYmsNBcEK8dmbfkyykrmHU26Sx4IkkYYff/dIpA3yCD2XISb7OICuTBH5 xaXKsuumZegMFbxR5ToyzHY0rfeL+HbOwE5Uua/tRl8Mppo8PLHwhDfk2EA7oAmuqsva q6r1BHPxPsrNSfB2GrHvTwlQWnwy78trI7pS0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ljQ9h7q4idaGVu/GzNq7X6BG2wx+Noe4L1VTQ99qX7g=; b=YgGE1lLFL6kSf8envSwMHojcfyLIa869rRoK+B82zDLIQspR5yAVVAJrrt32HFxck6 6kg1vRdqgLlmsjlikuoD/U36XArggRNieMsZ5SGCpdl5pL5PUkN5jUP+S8jiEF05Fi4b zXgZUv6+lsIZdKKpUZPNsqGPerRZ6rN4YkPbk4yZG/VBLLSuEAuA1pkJRgqaYir1I8Hb swA256xfczRfqP3CdHNS3EqDhHz3che7aUwHEAqzBq4KLlDjmN9ETo6bHgjZnnnSSlw8 Vdmj7i33ODYJqCfvXtuc5JorzpPs3CM+OWot+Jt/7QQyyc+zNIHeyPQXBIAhQf6WotuC ZUsg== X-Gm-Message-State: APf1xPC/nFHZiYJ1UBb5SppIz978mt/teW5IgJz8Grvfocbz/0vIrVYm sl4Ah60VRpJtCA+FTpT4eXNfvQ== X-Received: by 10.202.16.11 with SMTP id 11mr2824414oiq.41.1519236577607; Wed, 21 Feb 2018 10:09:37 -0800 (PST) Received: from aura.cortijodelrio.net (CableLink-187-161-113-185.PCs.InterCable.net. [187.161.113.185]) by smtp.googlemail.com with ESMTPSA id d93sm80498oic.51.2018.02.21.10.09.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Feb 2018 10:09:36 -0800 (PST) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: shuahkh@osg.samsung.com, linux-kselftest@vger.kernel.org Cc: =?utf-8?q?Daniel_D=C3=ADaz?= , Shuah Khan , Philippe Ombredanne , SeongJae Park , Thomas Gleixner , Greg Kroah-Hartman , linux-kernel@vger.kernel.org (open list) Subject: [PATCH] selftests/intel_pstate: Fix build rule for x86 Date: Wed, 21 Feb 2018 12:07:57 -0600 Message-Id: <1519236493-13851-1-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ensure that ARCH is defined and that this only builds for x86 architectures. It is possible to build from the root of the Linux tree, which will define ARCH, or to run make from the selftests/ directory itself, which has no provision for defining ARCH, so this change is to use the current definition (if any), or to check uname -m if undefined. Signed-off-by: Daniel Díaz --- tools/testing/selftests/intel_pstate/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/tools/testing/selftests/intel_pstate/Makefile b/tools/testing/selftests/intel_pstate/Makefile index 5a3f7d37..7340fd6 100644 --- a/tools/testing/selftests/intel_pstate/Makefile +++ b/tools/testing/selftests/intel_pstate/Makefile @@ -2,7 +2,10 @@ CFLAGS := $(CFLAGS) -Wall -D_GNU_SOURCE LDLIBS := $(LDLIBS) -lm -ifeq (,$(filter $(ARCH),x86)) +uname_M := $(shell uname -m 2>/dev/null || echo not) +ARCH ?= $(shell echo $(uname_M) | sed -e s/i.86/x86/ -e s/x86_64/x86/) + +ifeq (x86,$(ARCH)) TEST_GEN_FILES := msr aperf endif