From: Ilkka Koskinen <ilkka@os.amperecomputing.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: will@kernel.org, mark.rutland@arm.com, suzuki.poulose@arm.com,
bwicaksono@nvidia.com, ilkka@os.amperecomputing.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] perf/arm_cspmu: Clean up ACPI dependency
Date: Mon, 5 Jun 2023 00:33:19 -0700 (PDT) [thread overview]
Message-ID: <a096d294-76bc-b2b7-be57-64cacc68d890@os.amperecomputing.com> (raw)
In-Reply-To: <70067704d217cd7504d9552d8485a54e5c071c90.1685619571.git.robin.murphy@arm.com>
On Thu, 1 Jun 2023, Robin Murphy wrote:
> Build-wise, the ACPI dependency consists of only a couple of things
> which could probably stand being factored out into ACPI helpers anyway.
> However for the immediate concern of working towards Devicetree support
> here, it's easy enough to make a few tweaks to contain the affected code
> locally, such that we can relax the Kconfig dependency.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> ---
> drivers/perf/arm_cspmu/Kconfig | 3 +--
> drivers/perf/arm_cspmu/arm_cspmu.c | 17 +++++++++++++++--
> 2 files changed, 16 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/perf/arm_cspmu/Kconfig b/drivers/perf/arm_cspmu/Kconfig
> index 0b316fe69a45..25d25ded0983 100644
> --- a/drivers/perf/arm_cspmu/Kconfig
> +++ b/drivers/perf/arm_cspmu/Kconfig
> @@ -4,8 +4,7 @@
>
> config ARM_CORESIGHT_PMU_ARCH_SYSTEM_PMU
> tristate "ARM Coresight Architecture PMU"
> - depends on ARM64 && ACPI
> - depends on ACPI_APMT || COMPILE_TEST
> + depends on ARM64 || COMPILE_TEST
> help
> Provides support for performance monitoring unit (PMU) devices
> based on ARM CoreSight PMU architecture. Note that this PMU
> diff --git a/drivers/perf/arm_cspmu/arm_cspmu.c b/drivers/perf/arm_cspmu/arm_cspmu.c
> index 72dc7a9e1ca8..3b91115c376d 100644
> --- a/drivers/perf/arm_cspmu/arm_cspmu.c
> +++ b/drivers/perf/arm_cspmu/arm_cspmu.c
> @@ -28,7 +28,6 @@
> #include <linux/module.h>
> #include <linux/perf_event.h>
> #include <linux/platform_device.h>
> -#include <acpi/processor.h>
>
> #include "arm_cspmu.h"
> #include "nvidia_cspmu.h"
> @@ -1075,6 +1074,9 @@ static int arm_cspmu_request_irq(struct arm_cspmu *cspmu)
> return 0;
> }
>
> +#if defined(CONFIG_ACPI) && defined(CONFIG_ARM64)
> +#include <acpi/processor.h>
> +
> static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid)
> {
> u32 acpi_uid;
> @@ -1099,7 +1101,7 @@ static inline int arm_cspmu_find_cpu_container(int cpu, u32 container_uid)
> return -ENODEV;
> }
>
> -static int arm_cspmu_get_cpus(struct arm_cspmu *cspmu)
> +static int arm_cspmu_acpi_get_cpus(struct arm_cspmu *cspmu)
> {
> struct device *dev;
> struct acpi_apmt_node *apmt_node;
> @@ -1135,6 +1137,17 @@ static int arm_cspmu_get_cpus(struct arm_cspmu *cspmu)
>
> return 0;
> }
> +#else
> +static int arm_cspmu_acpi_get_cpus(struct arm_cspmu *cspmu)
> +{
> + return -ENODEV;
> +}
> +#endif
> +
> +static int arm_cspmu_get_cpus(struct arm_cspmu *cspmu)
> +{
> + return arm_cspmu_acpi_get_cpus(cspmu);
> +}
>
> static int arm_cspmu_register_pmu(struct arm_cspmu *cspmu)
> {
> --
> 2.39.2.101.g768bb238c484.dirty
>
>
next prev parent reply other threads:[~2023-06-05 7:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 11:59 [PATCH 0/4] perf/arm_cspmu: Fixes and cleanups Robin Murphy
2023-06-01 11:59 ` [PATCH 1/4] perf/arm_cspmu: Fix event attribute type Robin Murphy
2023-06-02 10:25 ` Suzuki K Poulose
2023-06-05 7:29 ` Ilkka Koskinen
2023-06-01 11:59 ` [PATCH 2/4] ACPI/APMT: Don't register invalid resource Robin Murphy
2023-06-02 10:27 ` Suzuki K Poulose
2023-06-03 7:42 ` Hanjun Guo
2023-06-05 7:31 ` Ilkka Koskinen
2023-06-01 11:59 ` [PATCH 3/4] perf/arm_cspmu: Clean up ACPI dependency Robin Murphy
2023-06-02 16:02 ` Suzuki K Poulose
2023-06-05 7:33 ` Ilkka Koskinen [this message]
2023-06-01 11:59 ` [PATCH 4/4] perf/arm_cspmu: Decouple APMT dependency Robin Murphy
2023-06-02 10:55 ` Suzuki K Poulose
2023-06-05 7:12 ` Ilkka Koskinen
2023-06-05 10:49 ` Robin Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a096d294-76bc-b2b7-be57-64cacc68d890@os.amperecomputing.com \
--to=ilkka@os.amperecomputing.com \
--cc=bwicaksono@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robin.murphy@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®