From patchwork Wed Apr 14 19:48:08 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Leach X-Patchwork-Id: 12203639 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A940C433ED for ; Wed, 14 Apr 2021 19:50:31 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B89FF61153 for ; Wed, 14 Apr 2021 19:50:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B89FF61153 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=cTdlhz2Ynoeat21opD/pyINfB/HEhaXJDUrC9yTZj3E=; b=D3/XsMYyr7taK4YGjgqDFy6XK5 R1KkKY3FjPK7/hmW64Ug2BrAJ7nucRlb6+M75b8OGnMOWJEtz5kfIn3vXEdnV//1LDGFLm5BaaYN2 Sj9G8aUYg3aED4ZXkS6+9ZYN5dd7VdaCrXuGEFckC7sOE9KbRgoD48S73CHgCgmnfrsenncRc3vy+ LGsY1CS48SvdmDisKhvWnDALjgOahRcILO5SpdgEDoZQPmaOyNdAM629If3WQA/Q+uxAo/oRBbdF1 LaVZQTWhy0wurr11nXedrHw2U+YS0sX25on+85S9dGXzFG5m7GeO4jjY0mNLdDwGoYo5v0tl0DFiN wX8H2Gmg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lWlUz-00DcbJ-7i; Wed, 14 Apr 2021 19:48:29 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWlUv-00Dca8-WF for linux-arm-kernel@desiato.infradead.org; Wed, 14 Apr 2021 19:48:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To:References; bh=0q7AO+a1TFA9eFDCO6sk3DtCP8qPdgYDojCYV5YMQYI=; b=CLxGepDcADYVxft0kaPzbRNw4w 59TEqIXGiQGTFScK54jRA1WAb8tJpMXWfMfGENP//3Ar7uDBeqIMWWKg7++9TKy1k92xv2yru3iqN XK2BTTZIJrPaOjx0FG4pImeAec88CpCO3waoALztZEqT3bdIpKmpUg3S60zwjaOjTi1RwBTgfnrR5 f26orhU2BlT6bdIE+xtDMC+yuR6zF0mHUt+ZKo5827yFSyWN9c49yqxkPwMDc4bb+pa8tMUiJgHde p4I2YgqyShmEYrlueGfdv6mzb13Bs9hpHvI9bn0UTdpTunjFgExo4GVvXn3aOityY78Hg2ZfjAOXC SlJ0L7sw==; Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lWlUt-0084DP-GO for linux-arm-kernel@lists.infradead.org; Wed, 14 Apr 2021 19:48:24 +0000 Received: by mail-wr1-x42a.google.com with SMTP id c15so12048334wro.13 for ; Wed, 14 Apr 2021 12:48:22 -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; bh=0q7AO+a1TFA9eFDCO6sk3DtCP8qPdgYDojCYV5YMQYI=; b=Q+ji8n9urUENtcCynWac2wuz8S/W13P/sF/B2RJEdtHx+mymfGzZvHyjntLDvuM7xV G058DsSkMuCG3lR7QAqjieaUX67U0ef1ZIdq0qlODX7WjBNtn+Ht9ViOHB6ks6xzEUyT nIMDXYpYS2Q4PvYmSWswigtQNmaftg2pjDqSi8GNkFw6YEOskWE3W8uV2rYv+9mGOwjz 6A02NZp3RGwMeD8eMyWfp1pb7EP5cu6XytwNHDvi7Mkl0cUoMchXOctALvUpsfSiv55S 7nk2GPMdiF/p9Hf5GYd2EQLmzKVr9RVlwGuPiFMY9rb1s2MpPLrqMf8+zxqRfxqq/e4C gs2Q== 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; bh=0q7AO+a1TFA9eFDCO6sk3DtCP8qPdgYDojCYV5YMQYI=; b=TQeddSewgcHUnjFdj9pf9mmSAvvZWrJAHEpvzfRon3WF+/XSqI9RyMKxReKDwgEO7O YPYeG1OM546p8h9H5o7hpWaDy9mW8DPOfgl3yyK0dDIAL2SBrTRR62QFi8eIes1Jk7+t wLf7H1nkAseOX0GF2QbQn/zwBy9hXpt2LYWwrWSZWpPW45Pdka7n/ZW0EKs1jXCgwfUL vh1loLsdronz+AG8/LIwZMSj7DhwhCCNC2Y6/X4dHPmSTfScEotzWiB4AI9Hyu6de174 bEqxZq0VS6z5Rf+ZnKjiRGJYyQS7pFYDtpQuwY55tFls+dZ5FmVn/8kXUfYA22f78iFk Suig== X-Gm-Message-State: AOAM532fZE7IWdWFhHqUZDnzloEGXAt3g2aR/pH4F/GoJlZKOAvOpuaW HVLIN0b6sTLEIsPkjk3Wlll6Mwf7jVUbIg== X-Google-Smtp-Source: ABdhPJxgVZvSf1rv70nU2LtIB0FiIoLhR5emTfQDrxM+cF6N3zwfgRmD9snPR2eZ9eP3XZNGflv4Cg== X-Received: by 2002:a05:6000:1acb:: with SMTP id i11mr44601759wry.68.1618429701495; Wed, 14 Apr 2021 12:48:21 -0700 (PDT) Received: from linaro.org ([2a00:23c5:6809:2201:546d:7d59:1703:bf96]) by smtp.gmail.com with ESMTPSA id v189sm280449wme.39.2021.04.14.12.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Apr 2021 12:48:21 -0700 (PDT) From: Mike Leach To: linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org, mathieu.poirier@linaro.org, suzuki.poulose@arm.com Cc: leo.yan@linaro.org, alexander.shishkin@linux.intel.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, Mike Leach Subject: [PATCH] coresight: etm-perf: Fix define build issue when built as module Date: Wed, 14 Apr 2021 20:48:08 +0100 Message-Id: <20210414194808.22872-1-mike.leach@linaro.org> X-Mailer: git-send-email 2.17.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210414_124823_566629_3E63CF44 X-CRM114-Status: GOOD ( 11.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org CONFIG_CORESIGHT_SOURCE_ETM4X is undefined when built as module, CONFIG_CORESIGHT_SOURCE_ETM4X_MODULE is defined instead. Therefore code in format_attr_contextid_show() not correctly complied when coresight built as module. Use IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X) to correct this. Fixes: 88f11864cf1d ("coresight: etm-perf: Support PID tracing for kernel at EL2") Signed-off-by: Mike Leach Reviewed-by: Leo Yan --- drivers/hwtracing/coresight/coresight-etm-perf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c index 560baefdfed8..b2d6db78a025 100644 --- a/drivers/hwtracing/coresight/coresight-etm-perf.c +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c @@ -78,7 +78,7 @@ static ssize_t format_attr_contextid_show(struct device *dev, { int pid_fmt = ETM_OPT_CTXTID; -#if defined(CONFIG_CORESIGHT_SOURCE_ETM4X) +#if IS_ENABLED(CONFIG_CORESIGHT_SOURCE_ETM4X) pid_fmt = is_kernel_in_hyp_mode() ? ETM_OPT_CTXTID2 : ETM_OPT_CTXTID; #endif return sprintf(page, "config:%d\n", pid_fmt);