Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1083639pxb; Thu, 15 Apr 2021 13:38:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2PRnCMh40YXHu3umZA0yXVbU/qFzaXS1dMPwW+7mZaerIyK2WUyFx4q+EIZlFFJet6n8N X-Received: by 2002:a17:906:d8cd:: with SMTP id re13mr310871ejb.141.1618519135920; Thu, 15 Apr 2021 13:38:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618519135; cv=none; d=google.com; s=arc-20160816; b=IfFML+/sbvIVAMxOxaZSErtuPNK9XB76QcDsocus4iZHwaTKj5h2nrf2v0lP/hj9r4 z/0sgH8Fii6FMn4GYjStlAumYeOXKcKDk7Yw4HBXPUvq5sghECwPf+jyKx7y3F3Ceaim DBNQR1lM6gKTCnPkd/Z75b+X+jWWu/daR8o1ItYNF3nXUBQ/qkf0PC2xdfTeVcBKEhn8 LXIY27KbGiOgjAE3QTxQU2l/qKvINQNygUfnFv2GsrEUfOrSnLE41rMK3+z92ek99BZA sbiBnOZ1HINFU5s1gTGjy6Sne1zH8CPfRTl9MiIHI1uTaUt5To7dFHnCU39sVpqwRKPZ h/XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=WAfI5gmtCJFa1TuhXQgYH1iMmMqE67AZfwLRWLHkhdg=; b=r7mpZ9jjAXhdX+cboGOz07sjrzxvz5q1ciy6mdORo9ZL9e7QqeehFOXI/P6BgQ3G6w WuZQxK3eqzu0RIFPzLDU10Jm8vma1wj4I9mHIQOvmiJqmC2yboTQjcN3tg+WNxjak2cm Wan1cdMJ/W2l8zo/CV6MVUQYqsKu+P167YjmysQl0ZGdOTkFDY1jhthukHNTR0UzAc7t pgXyiKLzv6m/rEBSukcsTaBCDy2gmR1hIgCzkYCfT7PsHyZzkxeykZH1qLQbisWi4zw8 +2GGquAou2y6YZrv+GtN/IaOJAK9SD2Kx0VfxUo49dzsYe9zqmmiWKj32X31H2Dy1SiY +ogA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SfuU7weN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id bf3si3063170edb.431.2021.04.15.13.38.31; Thu, 15 Apr 2021 13:38:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SfuU7weN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235367AbhDOUYg (ORCPT + 99 others); Thu, 15 Apr 2021 16:24:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234901AbhDOUYc (ORCPT ); Thu, 15 Apr 2021 16:24:32 -0400 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC374C061756 for ; Thu, 15 Apr 2021 13:24:07 -0700 (PDT) Received: by mail-pg1-x52b.google.com with SMTP id z16so17677119pga.1 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=hazXNIq3zdytzaU48TCGpN5krhDaH3XGYu0DY7hCebnyMi75CmA3knaHJhem8wPUic NsGsJ2qqhARuzrpzSzN6uJvU+ZQGTgoTlRZ5q27pGz7ynKJhCVsAsG6TED5TuTeT1F// NEpEG/MHjEqxbVUQhZff8gRBkXR1oRHJzKYk1BPS/rdEJHNuxZyv1N0XKmfrRUNDPoue onBlFLnochwfaJwv2jHdjfgtwvW9dIaux5GuIBVVH7fY7FJwHmHqNVNtCvyBCWjkpX0+ gIPzUU4vg6rTgkEAUfU+IBYcK917vjoDmzNxewuHEb+GYDd8hJXzyqUhfYrc3Y+kwjFP MWkQ== X-Gm-Message-State: AOAM533LBg5ZVFKYxwNu8iKnUjxZ0BvEkeW+C6U9eQ7NDDu+2Qd1qEkR OXlkN8H8wcJNhKivA83xtXd7kGEW7l4kcw== 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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); -- 2.25.1