From patchwork Fri Apr 28 16:58:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shanker Donthineni X-Patchwork-Id: 13226645 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 8E2DBC77B61 for ; Fri, 28 Apr 2023 16:59:35 +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:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=9K75PLhMqBJgb0Vccpav6cXsgMMS6LpIZx8ZJgbtgoE=; b=Cm+tHzzFTOUSHa 6Zu+Yd0BUH2/PHqsmaLoitJyhR9h9jK4C8uh3Qc/mm+cV4hyJLr1YbFvPUIW+fDLMwNuNsUt51kY3 D4DhD+yOP4p2pTwPJ3Y+RrbEYrAtULGWKUW1sjvE2kljxjz8t75EfgD2wuWB3/LcQg2KxypVQl5YG Cz0X8xOpdwHamEgGTB7RBCFBiGcDU7XP/jAvG6HhJlXjEd8e3z6RB36n/a32uxbvurC/Xy12lYSLL WcVVIf3LzKkQfPXGIkSOXM2EeGK+3Te7BHT//ywInYT1+hYsK0R5nNNzu/ZI78XapqaYdO6kLWPkd 1IKZjtyuUzwzP4QuqORA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1psRQi-00BHvS-0t; Fri, 28 Apr 2023 16:58:44 +0000 Received: from mail-co1nam11on20604.outbound.protection.outlook.com ([2a01:111:f400:7eab::604] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1psRQf-00BHuv-1M for linux-arm-kernel@lists.infradead.org; Fri, 28 Apr 2023 16:58:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j7Jw8rRVThwRZCl1gh4QtBpbFZBZNjoAl//ux69X1scDbAEeK8uxuV3l+owc04iyUbx+jq17ILpRmL3UGza+mThCVQ2sxUA3oljMx553tgFBTA1RDsoqtpFWdMWm/cW9MSyxEBCZ6rcvWOX/EmBagGH66nY3p44S9kVYDdvjWc1+KkoUYTscGYzBf/g3srRVTafiiwpEm6mH/oWcEP76B5RrnmTlY31MAJ9vNgxBhJaNCPcja3Ni4awTZDirRs7O8o2OlLPmvJH3R7mVzBnNynVIW4NXpbmK98dCZULVkA4R3Fu1VOQiaJe0fdlDRDV5BvAHoY+0HUADJGkfEqFTEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ktpMua07bsj5aPBAqRlSuWogD5xYxrC4N3Qpr0VNkqE=; b=cCK+DoWAB67p0bfd+wl5G+lOxCDVsfDImBHmIYuo9Lc9ru3LbciVZz1RuF46w8iluEXWVlhwqj5MBIvs66hjOHO6lUtBExctL2asjbgebISnFUXqtgHXq5DDWlNClT0Saf68lCu1Kt8okx3pR69beSNwRUkLt1oPWFtKEcP+H6dWDKRbeOjSgLmhI47yMQCSPLhV6wbNHVC4VsTJe2XXxfE5zcUutA1pJLtXrEGHAW9YHC8nF+K/qQVjx9XIS7nQohE1q71gSGWc5qacAfDfnICymKvA3BsKShsMiTcZUtR5BINnQR00nRN2bG1k1po+wX8zJbFKMuBUknCACyDc2Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ktpMua07bsj5aPBAqRlSuWogD5xYxrC4N3Qpr0VNkqE=; b=txwNoofuK5Dni8eDR5Q+OFn9xSKZPYx6Rn8BWbQdltqLFwt6wEJBj8O/bFyOkcTmwjLG7TttFzwshXYvC+Al7nkqAPM5npj4QasgzsutdF6VcnkajbS/Kzqq/B6l6FvYXBWQzpTniwnkWvh8LcnJ4FUJqE9X2ylvPBoZCuJTEX9kPRvuSE5Xdz7hl4tL6PgflcFQaOSvWTwIvpyJ2RGd2IbFD7AHcK9NafAfo5aQP6RmfSwQbkiN/WbaN0UUYzF1C4HtdtKl0S9nkG4ubW98ktPMNvAQJ8feewyB4HvP9SF20tUj5hSchh8vPhgWmDlM1D3BxbkWmK+QvJgj3r93vw== Received: from DM6PR11CA0042.namprd11.prod.outlook.com (2603:10b6:5:14c::19) by DM6PR12MB4284.namprd12.prod.outlook.com (2603:10b6:5:21a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.24; Fri, 28 Apr 2023 16:58:37 +0000 Received: from DM6NAM11FT047.eop-nam11.prod.protection.outlook.com (2603:10b6:5:14c:cafe::c) by DM6PR11CA0042.outlook.office365.com (2603:10b6:5:14c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.24 via Frontend Transport; Fri, 28 Apr 2023 16:58:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT047.mail.protection.outlook.com (10.13.172.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6340.23 via Frontend Transport; Fri, 28 Apr 2023 16:58:37 +0000 Received: from rnnvmail205.nvidia.com (10.129.68.10) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Fri, 28 Apr 2023 09:58:28 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail205.nvidia.com (10.129.68.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Fri, 28 Apr 2023 09:58:28 -0700 Received: from SDONTHINENI-DESKTOP.nvidia.com (10.127.8.9) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Fri, 28 Apr 2023 09:58:27 -0700 From: Shanker Donthineni To: Marc Zyngier , James Morse CC: Catalin Marinas , Shanker Donthineni , , "Jason Sequeira" Subject: [RFC] ACPI/irq: Apply ACPI_IRQCHIP_FWSPEC_ARG0 only for GSI domain Date: Fri, 28 Apr 2023 11:58:25 -0500 Message-ID: <20230428165825.699910-1-sdonthineni@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-NVConfidentiality: public X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT047:EE_|DM6PR12MB4284:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a3918f2-66cd-4a9e-a28b-08db4809cf3a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UTZzh9hBeRxzbFjrGl40gVJH+DiMaNnt8R7jpnJVNL1YlgT7GlB9sJy4TbhKbxIN10N5ZZq/G/ioniZsfzMZp83up+EguucRwtihX2+niyzZCkXBDRpWpj8c/cYNvWNXP9bKoTsrUknq36m61397rU4mMUVUjY5AnZ68XNYLlfNRKk3DCV+din6AbSAriRvxKAW+RKMKZPALZuvJwJsbelHPzgFdbNcw9L3Z+0j2QjsQZpUiTDh3FuTa1l2i6kt5SsqU8B6nQFkDvEvQOxz8r0Ut2cNqkyOOnfdnYPdHW3CFKg4wi4LXdpvihkm7yRXOsto2Syg04kV0rq3RblTcY7YxF6Xoiz3PCwdNenNPHt9Dgtz+zPhwnhYkoqQW5am7RWI53fW15Oq+uzNVGzyKvU4lXMAd1xTxFOYn0OBDUW7PpDr1UnyGhFjW1pIHppWINkiOgSnNqqpTCQfYiqFRvgshogu+9+RJ30nN3qiMEdTHI2ROR795BZHXJsajDW+gwMhjK7ZZjztoP9fmWm97RKX8YJ2YePVyovPcia27yXMwyj36AaB1c5dfEhJIzpJIHyF82dl58fSC7lo7PoMCyws7ZhKqtySLYElqqXQ+FMANzFIU5+Y/VzEqCr2xe2+adwVNmB7RUkCU7tyvbIvg+6rNBbP5V/leTwGPUMCsjlykZOMRERWUM+e3FzHj8aJuoUBSBkT3pT71MOOaRe89iQ6KOqhAbgAx7Ox0roTPHQc= X-Forefront-Antispam-Report: CIP:216.228.117.160;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mail.nvidia.com;PTR:dc6edge1.nvidia.com;CAT:NONE;SFS:(13230028)(4636009)(136003)(39860400002)(376002)(396003)(346002)(451199021)(36840700001)(46966006)(40470700004)(41300700001)(40480700001)(4326008)(82740400003)(356005)(7636003)(107886003)(2906002)(40460700003)(36756003)(8676002)(8936002)(54906003)(5660300002)(316002)(110136005)(86362001)(70206006)(70586007)(478600001)(7696005)(47076005)(26005)(1076003)(336012)(83380400001)(426003)(2616005)(186003)(34020700004)(36860700001)(82310400005);DIR:OUT;SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Apr 2023 16:58:37.0126 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7a3918f2-66cd-4a9e-a28b-08db4809cf3a X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.117.160];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT047.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4284 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230428_095841_528911_B9B01A3B X-CRM114-Status: GOOD ( 12.90 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The implementation of the updated GICv3 parameter parsing code in pack_fwspec() is not compatible for the non-GSI drivers. It uses the offset 1 for hardware IRQ, but the unmodified GPIO driver expects the offset value to be 0, leading to a regression. This patch applies new mapping to the GSI driver only to fix the issue. Signed-off-by: Shanker Donthineni --- drivers/acpi/irq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/irq.c b/drivers/acpi/irq.c index d4225d0b45d0..3d7f0643ed14 100644 --- a/drivers/acpi/irq.c +++ b/drivers/acpi/irq.c @@ -53,7 +53,8 @@ static void pack_fwspec(struct irq_fwspec *fwspec, u32 gsi, int trigger, { unsigned int offset = 0; - if (IS_ENABLED(CONFIG_ACPI_IRQCHIP_FWSPEC_ARG0)) { + if (IS_ENABLED(CONFIG_ACPI_IRQCHIP_FWSPEC_ARG0) && + (fwspec->fwnode == acpi_get_gsi_domain_id(gsi))) { fwspec->param[0] = ACPI_IRQCHIP_FWSPEC_ARG0; offset = 1; } @@ -216,8 +217,8 @@ static inline void acpi_irq_parse_one_match(struct fwnode_handle *fwnode, ctx->rc = 0; *ctx->res_flags = acpi_dev_irq_flags(triggering, polarity, shareable, wake_capable); - pack_fwspec(ctx->fwspec, hwirq, triggering, polarity); ctx->fwspec->fwnode = fwnode; + pack_fwspec(ctx->fwspec, hwirq, triggering, polarity); } /**