[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZICSg1voX4yKfU+m@lpieralisi>
Date: Wed, 7 Jun 2023 16:21:55 +0200
From: Lorenzo Pieralisi <lpieralisi@...nel.org>
To: Robin Murphy <robin.murphy@....com>
Cc: will@...nel.org, mark.rutland@....com, suzuki.poulose@....com,
bwicaksono@...dia.com, ilkka@...amperecomputing.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Sudeep Holla <sudeep.holla@....com>,
Hanjun Guo <guohanjun@...wei.com>
Subject: Re: [PATCH v2 2/4] ACPI/APMT: Don't register invalid resource
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@...nel.org>
> CC: Sudeep Holla <sudeep.holla@....com>
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@....com>
> Reviewed-by: Hanjun Guo <guohanjun@...wei.com>
> Reviewed-and-tested-by: Ilkka Koskinen <ilkka@...amperecomputing.com>
> Signed-off-by: Robin Murphy <robin.murphy@....com>
> ---
> drivers/acpi/arm64/apmt.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
Acked-by: Lorenzo Pieralisi <lpieralisi@...nel.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
>
Powered by blists - more mailing lists