From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52DFAC7EE25 for ; Wed, 7 Jun 2023 14:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=oaganRGLq4J3dWqdx943b24s880h5FqUZ9pjQTza8No=; b=1fl7Ud7csEcaiR 66eASaknBA+I9aDFu3CXGSeOeekx2sWoxGMQNDIY+yyQVJIE1IgMHsb/941gdrgTqaIMw+FqpMdIZ XiE4uDzCAo/tbWik3ueB914V9y+8ly9AfYctddcjr59xrwPTJuv2A7Mg9FAmKzryfmWUK6I+yYJkw 5d4ySubRdJzRjf7JpUpYVI8XBcFqYXPACxeOUTYRvEgZWZOoWFXQ4c9iU0ceNtRZDdiCBIHMBpaOI dOOBTcQLT6zqGdHE1cI9CxeO+P+Q5nzQ59pbL6cv2swz5Jkit6Iqtrqp9gFt9xTYuYp6CtWplaEZS K3IlSDd8CAihSYo1+G6A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q6u33-006EtI-0x; Wed, 07 Jun 2023 14:22:05 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q6u30-006EsV-1Q for linux-arm-kernel@lists.infradead.org; Wed, 07 Jun 2023 14:22:03 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DB61E63FF0; Wed, 7 Jun 2023 14:22:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD41EC433EF; Wed, 7 Jun 2023 14:21:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686147721; bh=PWyDPpucE3UwcC14P8MHk7X2eKHdVp0MmHoFYCJy4qc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rSGIo2wqQgc1/y1rp138JEiKgpzLFwl2+PF4HMRDblbeb9FQc+AVj5dQj8Zwgt5V/ AkxUR3cAds3TTQT4sjR/GPBht6ndNOAJqwY21hkqbckTO367GuXnTYNLekPFitosoe vzni+2Q9BZtX4AFKa4kgl6Od0BJZKuBZUJ9wie3LSrVPzp32N82YJFvwIpitEL5DmG t4KyDCtW6m4qA5NdFIZ3NTdCIYYqtxEbSe67CZ4buibN2pg6scPmlEChII+p6urVj4 vLT0D+XQ5tQQQS/Q2oAOqnoXuUO+fhPJkX4fKH9Mc2Idv/dCt0lRRiXwjTuvm++vvj i8Cr4jMHsZsog== Date: Wed, 7 Jun 2023 16:21:55 +0200 From: Lorenzo Pieralisi To: Robin Murphy 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 , Hanjun Guo Subject: Re: [PATCH v2 2/4] ACPI/APMT: Don't register invalid resource Message-ID: References: <63b34656e1f7b41bcb458fb6d7496e04db757e0d.1685983270.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <63b34656e1f7b41bcb458fb6d7496e04db757e0d.1685983270.git.robin.murphy@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230607_072202_519673_9DF5BBAB X-CRM114-Status: GOOD ( 19.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > CC: Sudeep Holla > Reviewed-by: Suzuki K Poulose > Reviewed-by: Hanjun Guo > Reviewed-and-tested-by: Ilkka Koskinen > Signed-off-by: Robin Murphy > --- > drivers/acpi/arm64/apmt.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) Acked-by: Lorenzo Pieralisi 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel