From patchwork Thu Apr 15 20:24:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 12206017 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,URIBL_BLOCKED, 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 D397FC433ED for ; Thu, 15 Apr 2021 20:26:24 +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 513396103D for ; Thu, 15 Apr 2021 20:26:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 513396103D 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:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: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:List-Owner; bh=kCZAlsJTNho5IIKQUr8ygDD7npi2msa7Ob8PboODqjc=; b=AjqjUPfTBRED0iFyLv/y+h5CL 0S+daeiEHjM1RIrqa6vS51oqUe1SSRtKTRttNccqkWKR9zcT3rVmvclJhzu9bDIAx6QnFGmuh0oTV naMTg5tus5snc6KyS+zQTER1UI835wLDl70qKYL3Irl7FeDUiRyPIH7pmJaUTzb25hnWLAQE2uKLR IagmNsm3QmA3NtXya0fnre+rkPi5BemyTFeBokZem9gR817x0j1P6TZ8Wh98c5n0aOcq3qtuy9ukl zDRqZcW81/knz/gjGFuUMkVv8CQSjrppfuBKeKk+3X/HJC5ITmchgCHmvXwGvDcjsq1FY03evdIOU KWXgdAacw==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lX8XM-00HFhp-Tz; Thu, 15 Apr 2021 20:24: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 1lX8X5-00HFgF-0q for linux-arm-kernel@desiato.infradead.org; Thu, 15 Apr 2021 20:24:11 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=WAfI5gmtCJFa1TuhXQgYH1iMmMqE67AZfwLRWLHkhdg=; b=qbf+H6I1v2hNHhD+SXbqhwYYj0 9btUH/OasgDkUH9wALzu9egn4T/nw8COeMCvfiMwl1B7YEhWFT/Pm8HqN6J7s6sE2F7tIOMLUBaUN g8pXXbLsMtLouoA02J45BIOEOUhTHdQTneFfYU09g2mA/w6/mBPqvYvDIY1lkR9It15wFJjEVrJOd 8/Do5bc4jsnoeK+1u8Rdj8kQRvwlDcgc96LAK7BGJOfLllW98dTadyCH7K3n69UmeAu9B+mymOX5n Zg4Bk1dSwZv98hMTYEwnxX8o4lz5gxJs9RIk7TZABifm0q/B/flQ5Ni0Z6WLXUnpSWBlBCLZ2WI88 HQI0F8Cg==; Received: from mail-pf1-x435.google.com ([2607:f8b0:4864:20::435]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lX8X2-008sIA-A9 for linux-arm-kernel@lists.infradead.org; Thu, 15 Apr 2021 20:24:09 +0000 Received: by mail-pf1-x435.google.com with SMTP id c17so16842548pfn.6 for ; Thu, 15 Apr 2021 13:24:07 -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 :mime-version:content-transfer-encoding; bh=WAfI5gmtCJFa1TuhXQgYH1iMmMqE67AZfwLRWLHkhdg=; b=SfuU7weNeHlXrJzX/vyKr9IQdOgWWIPnlj2MFyTJEfnnYfEwPhHR3N759aYT6JghbO p9o8NNekkePdGsRrdvgrA6swzgQIrYjwiKIg1WzOWIqArUgGNEJDe1auTCG8f/0q+pq4 LTZ7ymDfuy1cYnxRdkIggzG+yKw8O8D6NKZ1weJULh0F4stt5oWBSDHcoWM3fjD7c4sH FUsGIvSGcb6HPizlskaxJE1PiWWZUM6hwIwuBDT51gaohppviENCajg3KvkfvwP4nqZ0 Bi7UTnDU0YOojsNj93dtnF8bbCN+OlGrCP0MExLTPXYEx3DSCXnaI28unrNyTNS6+qH8 2LZA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=WAfI5gmtCJFa1TuhXQgYH1iMmMqE67AZfwLRWLHkhdg=; b=r/75axF7PEEs4W5hz6vuxr8+MuGMPDzstluTd5hEqHB4DkTI670RPmD5ggileZ3Wvd JZL2yEnxalLsbkbeQRzgGDeD3/pGDNQUYuaPbqbUwrvheGag+IvJ3HeruTCmN/9tcijM ru85ABJtF3YJ9dAnSprS+IFfs6Krf1+z79uQNCjf9Xa4bYNpmEF5F5zKuWMJ7i3s+QFs jCsGomiG2XqMuMdLau8P6Dka9THLomUQjIQOzqyoWMQmUhICYI93KWZxNWGB6DfSGCBl bfebDuGpjJXFPu/zRm1pwgRNMoP3hM+K3uRoTJ4507v6rRBPr7jVin8iAX3yLL7iXmTZ NnvA== X-Gm-Message-State: AOAM5300gKNZqCE7cwwznKQJ5bDVFma0G6KIqR84KXTDxSUAIsynqG4N BQ2UD8ZFOvvkS74gJ44gSgryww== X-Google-Smtp-Source: ABdhPJx1ODeNmclj2OVM31Oq3MuqlC1GsIRH+OAzqYgBCbFwAB55189RQ9pMY/doig9PvfmEHHoioQ== X-Received: by 2002:a63:f4e:: with SMTP id 14mr4270192pgp.236.1618518247557; Thu, 15 Apr 2021 13:24:07 -0700 (PDT) Received: from xps15.cg.shawcable.net (S0106889e681aac74.cg.shawcable.net. [68.147.0.187]) by smtp.gmail.com with ESMTPSA id kk6sm3275829pjb.51.2021.04.15.13.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Apr 2021 13:24:06 -0700 (PDT) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: mike.leach@linaro.org, leo.yan@linaro.org, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] coresight: etm-perf: Fix define build issue when built as module Date: Thu, 15 Apr 2021 14:24:04 -0600 Message-Id: <20210415202404.945368-2-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210415202404.945368-1-mathieu.poirier@linaro.org> References: <20210415202404.945368-1-mathieu.poirier@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210415_132408_379526_C995A465 X-CRM114-Status: GOOD ( 12.40 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Mike Leach 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 Link: https://lore.kernel.org/r/20210414194808.22872-1-mike.leach@linaro.org Signed-off-by: Mathieu Poirier --- 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 0f603b4094f2..a706ba11b93e 100644 --- a/drivers/hwtracing/coresight/coresight-etm-perf.c +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c @@ -52,7 +52,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);