From: Lorenzo Pieralisi <lpieralisi@kernel.org>
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, Sudeep Holla <sudeep.holla@arm.com>,
Hanjun Guo <guohanjun@huawei.com>
Subject: Re: [PATCH v2 2/4] ACPI/APMT: Don't register invalid resource
Date: Wed, 7 Jun 2023 16:21:55 +0200 [thread overview]
Message-ID: <ZICSg1voX4yKfU+m@lpieralisi> (raw)
In-Reply-To: <63b34656e1f7b41bcb458fb6d7496e04db757e0d.1685983270.git.robin.murphy@arm.com>
On Mon, Jun 05, 2023 at 06:01:32PM +0100, Robin Murphy wrote:
> Don't register a resource for the second page unless the dual-page
> extension flag is actually present to say it's valid.
>
> CC: Lorenzo Pieralisi <lpieralisi@kernel.org>
> CC: Sudeep Holla <sudeep.holla@arm.com>
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
> Reviewed-by: Hanjun Guo <guohanjun@huawei.com>
> Reviewed-and-tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
> drivers/acpi/arm64/apmt.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
Acked-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
As you mentioned in v1 I don't think we need to backport this
since the kernel is working around it (in code you are cleaning
up) even though that would not hurt.
Lorenzo
> diff --git a/drivers/acpi/arm64/apmt.c b/drivers/acpi/arm64/apmt.c
> index 8cab69fa5d59..aa7d5c3c0dd8 100644
> --- a/drivers/acpi/arm64/apmt.c
> +++ b/drivers/acpi/arm64/apmt.c
> @@ -35,11 +35,13 @@ static int __init apmt_init_resources(struct resource *res,
>
> num_res++;
>
> - res[num_res].start = node->base_address1;
> - res[num_res].end = node->base_address1 + SZ_4K - 1;
> - res[num_res].flags = IORESOURCE_MEM;
> + if (node->flags & ACPI_APMT_FLAGS_DUAL_PAGE) {
> + res[num_res].start = node->base_address1;
> + res[num_res].end = node->base_address1 + SZ_4K - 1;
> + res[num_res].flags = IORESOURCE_MEM;
>
> - num_res++;
> + num_res++;
> + }
>
> if (node->ovflw_irq != 0) {
> trigger = (node->ovflw_irq_flags & ACPI_APMT_OVFLW_IRQ_FLAGS_MODE);
> --
> 2.39.2.101.g768bb238c484.dirty
>
next prev parent reply other threads:[~2023-06-07 14:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 17:01 [PATCH v2 0/4] perf/arm_cspmu: Fixes and cleanups Robin Murphy
2023-06-05 17:01 ` [PATCH v2 1/4] perf/arm_cspmu: Fix event attribute type Robin Murphy
2023-06-05 17:01 ` [PATCH v2 2/4] ACPI/APMT: Don't register invalid resource Robin Murphy
2023-06-07 14:21 ` Lorenzo Pieralisi [this message]
2023-06-05 17:01 ` [PATCH v2 3/4] perf/arm_cspmu: Clean up ACPI dependency Robin Murphy
2023-07-03 9:21 ` Geert Uytterhoeven
2023-07-03 10:56 ` Robin Murphy
2023-06-05 17:01 ` [PATCH v2 4/4] perf/arm_cspmu: Decouple APMT dependency Robin Murphy
2023-06-05 20:29 ` Ilkka Koskinen
2023-06-09 11:16 ` [PATCH v2 0/4] perf/arm_cspmu: Fixes and cleanups Will Deacon
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=ZICSg1voX4yKfU+m@lpieralisi \
--to=lpieralisi@kernel.org \
--cc=bwicaksono@nvidia.com \
--cc=guohanjun@huawei.com \
--cc=ilkka@os.amperecomputing.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=sudeep.holla@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