Message ID | 20230803055652.1322801-5-anshuman.khandual@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f41:0:b0:3e4:2afc:c1 with SMTP id v1csp956975vqx; Wed, 2 Aug 2023 23:59:07 -0700 (PDT) X-Google-Smtp-Source: APBJJlElKXl3cSk1OCcPEByrAjF1cZBDsopGSwPsm7/WSWz4h+8P7dobJm7jKLbX5vCSkRO44cjC X-Received: by 2002:a05:6402:27c7:b0:51e:34d8:f4c7 with SMTP id c7-20020a05640227c700b0051e34d8f4c7mr14355157ede.2.1691045947485; Wed, 02 Aug 2023 23:59:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691045947; cv=none; d=google.com; s=arc-20160816; b=c2lQexNF8huyy6fXBhnMEiQrOfl9kEsAbAStFB7QhRIFtuwFU96j+zF+pMhZIiNzjj GM0i7fPteQCHGDM/Q9byVk2OU011VI/lTFBBLtR2Uwy3XmPUPWDfinXeFzp8tNLeI/sw aACAsJnZEwPYp40Swkd/xeykcNPqBNWGeUwrL5mxmaAb3uAfRyvJyZ41YFfg+pEuYLPi jMfu+5YpcA8NYDMt8PK/l7LEteaCU1OUppX1PMwsVKbqstISZw1y6tgcnXLiz6AA6BA8 p/CG25mdLGBJ/jkRBdmhGk3t+ARY57uIODBcjXxLVJMJVvhw+hSD9IBMblA4tgUupeC1 Tdaw== 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; bh=iwb9CBNT4/f2vEJHLhafIA+pbYuYRXfDO81UdeO66WU=; fh=PK7qZE2l3RufuWL/yvUO8bu8mrcIpscTWlY+prmDsuM=; b=Bz/l7rvMk0tImTWuQBtgm/9k4NKuKGbtTkHcuM3m/8+hE8v/rEMLgcgtDWT/7WPCcl 2HkQX+5ZAKhRUFTZSn80dsaGzT3Pdbnp3NIzEVJfGUvD1KxI35P7vyJAZJ49ajz5MXWR Aru2/uqGblvUYu3iGvmttk/2ZMVuzwn0bl8kGGEc71696reydd6rq1xfthrh+in1wT3A iiQjV3McByPfDgbn8bGoJMjSacy/GJ+leTcBampXKmYKJULHs4qPgbd0DAWXgAu0/pTm enObUIuA13WYVRL7gkAjIfiAOdtBucvP4JbvstJctv1F8w8whf9fJeCTjB/FOGjBduL8 VUcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r11-20020aa7da0b000000b0052275246241si11041451eds.189.2023.08.02.23.58.43; Wed, 02 Aug 2023 23:59:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232904AbjHCF5t (ORCPT <rfc822;cambridge8321@gmail.com> + 99 others); Thu, 3 Aug 2023 01:57:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231490AbjHCF5f (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 3 Aug 2023 01:57:35 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 77D1830CA for <linux-kernel@vger.kernel.org>; Wed, 2 Aug 2023 22:57:26 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 226B712FC; Wed, 2 Aug 2023 22:58:09 -0700 (PDT) Received: from a077893.blr.arm.com (unknown [10.162.42.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CDC223F6C4; Wed, 2 Aug 2023 22:57:21 -0700 (PDT) From: Anshuman Khandual <anshuman.khandual@arm.com> To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Anshuman Khandual <anshuman.khandual@arm.com>, Sami Mujawar <sami.mujawar@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Mike Leach <mike.leach@linaro.org>, Leo Yan <leo.yan@linaro.org>, Alexander Shishkin <alexander.shishkin@linux.intel.com>, James Clark <james.clark@arm.com>, coresight@lists.linaro.org, linux-kernel@vger.kernel.org Subject: [PATCH V3 4/4] coresight: trbe: Enable ACPI based TRBE devices Date: Thu, 3 Aug 2023 11:26:52 +0530 Message-Id: <20230803055652.1322801-5-anshuman.khandual@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230803055652.1322801-1-anshuman.khandual@arm.com> References: <20230803055652.1322801-1-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773190195476548037 X-GMAIL-MSGID: 1773190195476548037 |
Series |
coresight: trbe: Enable ACPI based devices
|
|
Commit Message
Anshuman Khandual
Aug. 3, 2023, 5:56 a.m. UTC
This detects and enables ACPI based TRBE devices via the dummy platform
device created earlier for this purpose.
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
---
drivers/hwtracing/coresight/coresight-trbe.c | 9 +++++++++
drivers/hwtracing/coresight/coresight-trbe.h | 1 +
2 files changed, 10 insertions(+)
Comments
On 8/3/23 11:26, Anshuman Khandual wrote: > This detects and enables ACPI based TRBE devices via the dummy platform > device created earlier for this purpose. > > Cc: Suzuki K Poulose <suzuki.poulose@arm.com> > Cc: Mike Leach <mike.leach@linaro.org> > Cc: Leo Yan <leo.yan@linaro.org> > Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> > Cc: coresight@lists.linaro.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> > --- > drivers/hwtracing/coresight/coresight-trbe.c | 9 +++++++++ > drivers/hwtracing/coresight/coresight-trbe.h | 1 + > 2 files changed, 10 insertions(+) > > diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c > index e1d9d06e7725..f884883e9018 100644 > --- a/drivers/hwtracing/coresight/coresight-trbe.c > +++ b/drivers/hwtracing/coresight/coresight-trbe.c > @@ -1537,7 +1537,16 @@ static const struct of_device_id arm_trbe_of_match[] = { > }; > MODULE_DEVICE_TABLE(of, arm_trbe_of_match); > > +#ifdef CONFIG_ACPI > +static const struct platform_device_id arm_trbe_acpi_match[] = { > + { ARMV8_TRBE_PDEV_NAME, 0 }, > + { } > +}; > +MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); > +#endif > + > static struct platform_driver arm_trbe_driver = { > + .id_table = arm_trbe_acpi_match, The build problem [1] reported on the first version of the series still exists here i.e arm_trbe_acpi_match is hidden without CONFIG_ACPI. I had assumed that CONFIG_CORESIGHT always enables CONFIG_ACPI, which is not the case. Following random config (with CONFIG_ACPI=n and CONFIG_CORESIGHT_TRBE=y) easily triggers the build problem. https://download.01.org/0day-ci/archive/20230805/202308052123.uqR35d19-lkp@intel.com/config make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -s -j 128 drivers/hwtracing/coresight/coresight-trbe.c:1563:23: error: implicit declaration of function ‘ACPI_PTR’ [-Werror=implicit-function-declaration] 1563 | .acpi_match_table = ACPI_PTR(arm_trbe_acpi_match), | ^~~~~~~~ drivers/hwtracing/coresight/coresight-trbe.c:1563:32: error: ‘arm_trbe_acpi_match’ undeclared here (not in a function); did you mean ‘arm_trbe_of_match’? 1563 | .acpi_match_table = ACPI_PTR(arm_trbe_acpi_match), | ^~~~~~~~~~~~~~~~~~~ | arm_trbe_of_match Following config wrap around fixes the problem. --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -1557,7 +1557,9 @@ MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); #endif static struct platform_driver arm_trbe_driver = { +#ifdef CONFIG_ACPI .id_table = arm_trbe_acpi_match, +#endif .driver = { .name = DRVNAME, .of_match_table = of_match_ptr(arm_trbe_of_match), Please not that unlike other coresight drivers, TRBE is not using 'acpi_device_id' based "acpi_match_table = ACPI_PTR" construct. But regardless, ACPI_PTR() seems to be an alternate (probably better) solution as well. --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -1557,7 +1557,7 @@ MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); #endif static struct platform_driver arm_trbe_driver = { - .id_table = arm_trbe_acpi_match, + .id_table = ACPI_PTR(arm_trbe_acpi_match), .driver = { .name = DRVNAME, .of_match_table = of_match_ptr(arm_trbe_of_match), diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h index 94e67009848a..fce1735d5c58 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -7,6 +7,7 @@ * * Author: Anshuman Khandual <anshuman.khandual@arm.com> */ +#include <linux/acpi.h> #include <linux/coresight.h> #include <linux/device.h> #include <linux/irq.h> [1] https://lore.kernel.org/all/202308052123.uqR35d19-lkp@intel.com/ > .driver = { > .name = DRVNAME, > .of_match_table = of_match_ptr(arm_trbe_of_match), > diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h > index 77cbb5c63878..94e67009848a 100644 > --- a/drivers/hwtracing/coresight/coresight-trbe.h > +++ b/drivers/hwtracing/coresight/coresight-trbe.h > @@ -12,6 +12,7 @@ > #include <linux/irq.h> > #include <linux/kernel.h> > #include <linux/of.h> > +#include <linux/perf/arm_pmu.h> > #include <linux/platform_device.h> > #include <linux/smp.h> >
On 07/08/2023 05:43, Anshuman Khandual wrote: > > > On 8/3/23 11:26, Anshuman Khandual wrote: >> This detects and enables ACPI based TRBE devices via the dummy platform >> device created earlier for this purpose. >> >> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> >> Cc: Mike Leach <mike.leach@linaro.org> >> Cc: Leo Yan <leo.yan@linaro.org> >> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> >> Cc: coresight@lists.linaro.org >> Cc: linux-arm-kernel@lists.infradead.org >> Cc: linux-kernel@vger.kernel.org >> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> >> --- >> drivers/hwtracing/coresight/coresight-trbe.c | 9 +++++++++ >> drivers/hwtracing/coresight/coresight-trbe.h | 1 + >> 2 files changed, 10 insertions(+) >> >> diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c >> index e1d9d06e7725..f884883e9018 100644 >> --- a/drivers/hwtracing/coresight/coresight-trbe.c >> +++ b/drivers/hwtracing/coresight/coresight-trbe.c >> @@ -1537,7 +1537,16 @@ static const struct of_device_id arm_trbe_of_match[] = { >> }; >> MODULE_DEVICE_TABLE(of, arm_trbe_of_match); >> >> +#ifdef CONFIG_ACPI >> +static const struct platform_device_id arm_trbe_acpi_match[] = { >> + { ARMV8_TRBE_PDEV_NAME, 0 }, >> + { } >> +}; >> +MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); >> +#endif >> + >> static struct platform_driver arm_trbe_driver = { >> + .id_table = arm_trbe_acpi_match, > > The build problem [1] reported on the first version of the series still exists > here i.e arm_trbe_acpi_match is hidden without CONFIG_ACPI. I had assumed that > CONFIG_CORESIGHT always enables CONFIG_ACPI, which is not the case. Following > random config (with CONFIG_ACPI=n and CONFIG_CORESIGHT_TRBE=y) easily triggers > the build problem. > > https://download.01.org/0day-ci/archive/20230805/202308052123.uqR35d19-lkp@intel.com/config > > make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -s -j 128 > drivers/hwtracing/coresight/coresight-trbe.c:1563:23: error: implicit declaration of function ‘ACPI_PTR’ [-Werror=implicit-function-declaration] > 1563 | .acpi_match_table = ACPI_PTR(arm_trbe_acpi_match), > | ^~~~~~~~ > drivers/hwtracing/coresight/coresight-trbe.c:1563:32: error: ‘arm_trbe_acpi_match’ undeclared here (not in a function); did you mean ‘arm_trbe_of_match’? > 1563 | .acpi_match_table = ACPI_PTR(arm_trbe_acpi_match), > | ^~~~~~~~~~~~~~~~~~~ > | arm_trbe_of_match > > Following config wrap around fixes the problem. > > --- a/drivers/hwtracing/coresight/coresight-trbe.c > +++ b/drivers/hwtracing/coresight/coresight-trbe.c > @@ -1557,7 +1557,9 @@ MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); > #endif > > static struct platform_driver arm_trbe_driver = { > +#ifdef CONFIG_ACPI > .id_table = arm_trbe_acpi_match, > +#endif > .driver = { > .name = DRVNAME, > .of_match_table = of_match_ptr(arm_trbe_of_match), > > Please not that unlike other coresight drivers, TRBE is not using 'acpi_device_id' > based "acpi_match_table = ACPI_PTR" construct. But regardless, ACPI_PTR() seems to > be an alternate (probably better) solution as well. > > --- a/drivers/hwtracing/coresight/coresight-trbe.c > +++ b/drivers/hwtracing/coresight/coresight-trbe.c > @@ -1557,7 +1557,7 @@ MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); > #endif > > static struct platform_driver arm_trbe_driver = { > - .id_table = arm_trbe_acpi_match, > + .id_table = ACPI_PTR(arm_trbe_acpi_match), This is preferred. > .driver = { > .name = DRVNAME, > .of_match_table = of_match_ptr(arm_trbe_of_match), > diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h > index 94e67009848a..fce1735d5c58 100644 > --- a/drivers/hwtracing/coresight/coresight-trbe.h > +++ b/drivers/hwtracing/coresight/coresight-trbe.h > @@ -7,6 +7,7 @@ > * > * Author: Anshuman Khandual <anshuman.khandual@arm.com> > */ > +#include <linux/acpi.h> Shouldn't this be added in trbe.c ? Does trbe.h depend on any ACPI headers ? Suzuki
On 8/7/23 17:07, Suzuki K Poulose wrote: > On 07/08/2023 05:43, Anshuman Khandual wrote: >> >> >> On 8/3/23 11:26, Anshuman Khandual wrote: >>> This detects and enables ACPI based TRBE devices via the dummy platform >>> device created earlier for this purpose. >>> >>> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> >>> Cc: Mike Leach <mike.leach@linaro.org> >>> Cc: Leo Yan <leo.yan@linaro.org> >>> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> >>> Cc: coresight@lists.linaro.org >>> Cc: linux-arm-kernel@lists.infradead.org >>> Cc: linux-kernel@vger.kernel.org >>> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> >>> --- >>> drivers/hwtracing/coresight/coresight-trbe.c | 9 +++++++++ >>> drivers/hwtracing/coresight/coresight-trbe.h | 1 + >>> 2 files changed, 10 insertions(+) >>> >>> diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c >>> index e1d9d06e7725..f884883e9018 100644 >>> --- a/drivers/hwtracing/coresight/coresight-trbe.c >>> +++ b/drivers/hwtracing/coresight/coresight-trbe.c >>> @@ -1537,7 +1537,16 @@ static const struct of_device_id arm_trbe_of_match[] = { >>> }; >>> MODULE_DEVICE_TABLE(of, arm_trbe_of_match); >>> +#ifdef CONFIG_ACPI >>> +static const struct platform_device_id arm_trbe_acpi_match[] = { >>> + { ARMV8_TRBE_PDEV_NAME, 0 }, >>> + { } >>> +}; >>> +MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); >>> +#endif >>> + >>> static struct platform_driver arm_trbe_driver = { >>> + .id_table = arm_trbe_acpi_match, >> >> The build problem [1] reported on the first version of the series still exists >> here i.e arm_trbe_acpi_match is hidden without CONFIG_ACPI. I had assumed that >> CONFIG_CORESIGHT always enables CONFIG_ACPI, which is not the case. Following >> random config (with CONFIG_ACPI=n and CONFIG_CORESIGHT_TRBE=y) easily triggers >> the build problem. >> >> https://download.01.org/0day-ci/archive/20230805/202308052123.uqR35d19-lkp@intel.com/config >> >> make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -s -j 128 >> drivers/hwtracing/coresight/coresight-trbe.c:1563:23: error: implicit declaration of function ‘ACPI_PTR’ [-Werror=implicit-function-declaration] >> 1563 | .acpi_match_table = ACPI_PTR(arm_trbe_acpi_match), >> | ^~~~~~~~ >> drivers/hwtracing/coresight/coresight-trbe.c:1563:32: error: ‘arm_trbe_acpi_match’ undeclared here (not in a function); did you mean ‘arm_trbe_of_match’? >> 1563 | .acpi_match_table = ACPI_PTR(arm_trbe_acpi_match), >> | ^~~~~~~~~~~~~~~~~~~ >> | arm_trbe_of_match >> >> Following config wrap around fixes the problem. >> >> --- a/drivers/hwtracing/coresight/coresight-trbe.c >> +++ b/drivers/hwtracing/coresight/coresight-trbe.c >> @@ -1557,7 +1557,9 @@ MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); >> #endif >> static struct platform_driver arm_trbe_driver = { >> +#ifdef CONFIG_ACPI >> .id_table = arm_trbe_acpi_match, >> +#endif >> .driver = { >> .name = DRVNAME, >> .of_match_table = of_match_ptr(arm_trbe_of_match), >> >> Please not that unlike other coresight drivers, TRBE is not using 'acpi_device_id' >> based "acpi_match_table = ACPI_PTR" construct. But regardless, ACPI_PTR() seems to >> be an alternate (probably better) solution as well. >> >> --- a/drivers/hwtracing/coresight/coresight-trbe.c >> +++ b/drivers/hwtracing/coresight/coresight-trbe.c >> @@ -1557,7 +1557,7 @@ MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); >> #endif >> static struct platform_driver arm_trbe_driver = { >> - .id_table = arm_trbe_acpi_match, >> + .id_table = ACPI_PTR(arm_trbe_acpi_match), > > This is preferred. > >> .driver = { >> .name = DRVNAME, >> .of_match_table = of_match_ptr(arm_trbe_of_match), >> diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h >> index 94e67009848a..fce1735d5c58 100644 >> --- a/drivers/hwtracing/coresight/coresight-trbe.h >> +++ b/drivers/hwtracing/coresight/coresight-trbe.h >> @@ -7,6 +7,7 @@ >> * >> * Author: Anshuman Khandual <anshuman.khandual@arm.com> >> */ >> +#include <linux/acpi.h> > > Shouldn't this be added in trbe.c ? Does trbe.h depend on any ACPI headers ? The convention we have followed till now is all include/linux/ headers required in TRBE driver is included via trbe.h not directly in trbe.c, just followed the same principle this time around for acpi.h and perf/arm_pmu.h as well.
Hi Anshuman, kernel test robot noticed the following build errors: [auto build test ERROR on arm64/for-next/core] [also build test ERROR on arm/for-next soc/for-next linus/master arm/fixes v6.5-rc5 next-20230809] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Anshuman-Khandual/arm_pmu-acpi-Refactor-arm_spe_acpi_register_device/20230803-135907 base: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/core patch link: https://lore.kernel.org/r/20230803055652.1322801-5-anshuman.khandual%40arm.com patch subject: [PATCH V3 4/4] coresight: trbe: Enable ACPI based TRBE devices config: arm64-randconfig-r071-20230813 (https://download.01.org/0day-ci/archive/20230814/202308140529.wEpy3fPK-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 12.3.0 reproduce: (https://download.01.org/0day-ci/archive/20230814/202308140529.wEpy3fPK-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202308140529.wEpy3fPK-lkp@intel.com/ All errors (new ones prefixed by >>): >> drivers/hwtracing/coresight/coresight-trbe.c:1549:21: error: 'arm_trbe_acpi_match' undeclared here (not in a function); did you mean 'arm_trbe_of_match'? 1549 | .id_table = arm_trbe_acpi_match, | ^~~~~~~~~~~~~~~~~~~ | arm_trbe_of_match vim +1549 drivers/hwtracing/coresight/coresight-trbe.c 1547 1548 static struct platform_driver arm_trbe_driver = { > 1549 .id_table = arm_trbe_acpi_match, 1550 .driver = { 1551 .name = DRVNAME, 1552 .of_match_table = of_match_ptr(arm_trbe_of_match), 1553 .suppress_bind_attrs = true, 1554 }, 1555 .probe = arm_trbe_device_probe, 1556 .remove = arm_trbe_device_remove, 1557 }; 1558
diff --git a/drivers/hwtracing/coresight/coresight-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c index e1d9d06e7725..f884883e9018 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.c +++ b/drivers/hwtracing/coresight/coresight-trbe.c @@ -1537,7 +1537,16 @@ static const struct of_device_id arm_trbe_of_match[] = { }; MODULE_DEVICE_TABLE(of, arm_trbe_of_match); +#ifdef CONFIG_ACPI +static const struct platform_device_id arm_trbe_acpi_match[] = { + { ARMV8_TRBE_PDEV_NAME, 0 }, + { } +}; +MODULE_DEVICE_TABLE(platform, arm_trbe_acpi_match); +#endif + static struct platform_driver arm_trbe_driver = { + .id_table = arm_trbe_acpi_match, .driver = { .name = DRVNAME, .of_match_table = of_match_ptr(arm_trbe_of_match), diff --git a/drivers/hwtracing/coresight/coresight-trbe.h b/drivers/hwtracing/coresight/coresight-trbe.h index 77cbb5c63878..94e67009848a 100644 --- a/drivers/hwtracing/coresight/coresight-trbe.h +++ b/drivers/hwtracing/coresight/coresight-trbe.h @@ -12,6 +12,7 @@ #include <linux/irq.h> #include <linux/kernel.h> #include <linux/of.h> +#include <linux/perf/arm_pmu.h> #include <linux/platform_device.h> #include <linux/smp.h>