From patchwork Tue Jan 28 22:07:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13953236 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 BD357C0218A for ; Tue, 28 Jan 2025 22:12:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zgA/tH8fOJAo5SkcG52zN2NzIf4+m2UNmjV5YfqCDw4=; b=D5qut0KknCRxAU/Qby1UacUo4S Dpf67KsCUPQs3CQFkHR0yKZHJx/6BPPE6/kqjFn1Ew95HQ70ghefAQC/fhsHrSWvFo34RhJEQIUTq lds0f9Hzv9mylHi01ZmdJpfMKDfJQLfV5wTR9AkjE1fC06p/eV6Y8sHVDAMQb4NEgENjGUT3VZZ/W 7Yj4E0Ezwz8IupT4CKAymlniDLcZiSHXv/cWAX7M7sN0WKc0CvgPJnR3RvWaSjTWUR8tU300X9k/g E6ax/uhrwm861LQxHDYzVZiA59W9vYeYM+0Im32FM4Y0Xa6CgivCUmvIDelmV6YjeykK04pjOveL3 FSit6XFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tctoz-00000005uGR-2YcY; Tue, 28 Jan 2025 22:12:37 +0000 Received: from mail-westeuropeazlp170110003.outbound.protection.outlook.com ([2a01:111:f403:c201::3] helo=AS8PR04CU009.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tctl4-00000005tXI-0EaJ for linux-arm-kernel@lists.infradead.org; Tue, 28 Jan 2025 22:08:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UfeU3gITMyOoKeO+wLMKaWX6k2/4LHuJsyWMfTMKZd/fzT/K6LRh9hmAj1fyQtFMoyB2uXY+nWQMBBKCz56wUhCAdHqfrG3/u+ZEqhPwE6ni/C8iHyTOHfvytssa6KhxeT0wE/i0wL/N6rlwyAkkBVioWdF4oWvYiLl5XdUlWWrisqOJ3fivzfh0NeF1yg//fB3hoZUfzxH7ldfTunY/OYU6GmaT66n7zvbpo8fw3Wkg9+hj9YvYxgQ/1v3TCzZNsGsCm8O/DTOw6ArPlQUHPlc3Bh8BeI2KPlapXnRjYkhbjxljAqupED2I+WFn+ThJG1qQhYWgZjkrvRqF79BYMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=zgA/tH8fOJAo5SkcG52zN2NzIf4+m2UNmjV5YfqCDw4=; b=TYVB4ZM8nr5y8yb2VT07AzhDzmnw/bkBmL6CI3bH7NkfxgaGox8cUeViFdiyvwmYPDjTO7n3TcRACFzrU3ROo8buSZiMo3P2uuGZArZMfqtW7VJAeCbcsW3HPAA7smgJgPWfybEyoajGJaIxMM/BqzcHQav+CurlstZ4ZWkeSaxo/Z61f3hZ2VtEmHEtySkV2tyEllcXgz1AH2mSHIT/WFRz4B4zaG2o+NctKDRu8Wzvnwt3CwCoRp+xHuos8ze266ZhyFhFH0tWdQZz7CeTGY8H/TATzu2YccZe4MJnN7SxeZ/6vbZxoAHT181avBLfruy/6Vi8Z24+5b/I4laJCg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zgA/tH8fOJAo5SkcG52zN2NzIf4+m2UNmjV5YfqCDw4=; b=S6I8xtfZY6xYAM6puDegM6ytwaF4KxS4IhHtTAZgeidD3dwFF+koPQHj2kDzMu6cvTp7qSXqxLb6Hc1HPaOxGipJkbUSqgknuZ/78iG0ZKK7H7pe5WiSO80wmgBMtomvMWvujcQMV+Ymz/MrfJsOj9g8LHSzQdBNKvouSEwPhvkNHrdEVlJHHF5s3S7S11d9ECaxx2zfCSnYVgeV58ZcXmvp0sQHMQxSCpdGvpO4ITaLSE+LDqpgOqFYGKav624HUHpFpOoOZ4Zt1bcuQNTohqt2dJBAVknv2Tt10wLe+CA4w1ukWL5uGCZmo334qleFyYJOGhNfFt7cHM+THCk9xQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AM9PR04MB8555.eurprd04.prod.outlook.com (2603:10a6:20b:436::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8398.18; Tue, 28 Jan 2025 22:08:29 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%5]) with mapi id 15.20.8377.021; Tue, 28 Jan 2025 22:08:29 +0000 From: Frank Li Date: Tue, 28 Jan 2025 17:07:34 -0500 Subject: [PATCH v9 1/7] PCI: dwc: Use resource start as iomap() input in dw_pcie_pme_turn_off() Message-Id: <20250128-pci_fixup_addr-v9-1-3c4bb506f665@nxp.com> References: <20250128-pci_fixup_addr-v9-0-3c4bb506f665@nxp.com> In-Reply-To: <20250128-pci_fixup_addr-v9-0-3c4bb506f665@nxp.com> To: Rob Herring , Saravana Kannan , Jingoo Han , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Bjorn Helgaas , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Niklas Cassel , Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1738102098; l=1066; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=s6o84+rwYoULnhQEXwAB8qc9+uDgyGOz45L78dOCBOM=; b=0juyvV0ugVTYVd4moa9DBOmNe6YnK84+XUZleSDZWXJ8lCvCy4mVNmcb1WHfg44XwHDUyOz1a TpkjvkpR/bIDk8UkKWCn3tcp7gcYvufZKWTzBWmbATDQWZ63Z7eEZPt X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR03CA0130.namprd03.prod.outlook.com (2603:10b6:a03:33c::15) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM9PR04MB8555:EE_ X-MS-Office365-Filtering-Correlation-Id: b3159dfc-f08c-454a-8979-08dd3fe84bc4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|366016|7416014|376014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?W1AbXiOIVXeaocwIA0SptFvZ685Zyli?= =?utf-8?q?ugHzGRDVOcCuddW2paQFMz2nUC1N4Qcj8O5puHaEmYhVRJRmOxXhfuz2mySV6tTLd?= =?utf-8?q?UT/ZkGCujoJcTn1iLZFsVc2uvmYSGd46WEuPWBzBatVMj9clT4XtuwjDhx/NOsqx3?= =?utf-8?q?VR6owKdH9ZnVTcJ5cyeB9w7SGvkuVptTBDT9mSzbzBpoIvAdk8KeW9HBJMjx2ntVQ?= =?utf-8?q?NP1EP+0b/+UTw9WlqSUU0sOKOCclOaytt0/R3whPRvwCrygbRXMzL3QixhJHhB8p+?= =?utf-8?q?UdCKQTcbaQYD2AkxUbLWMFiQgc+tIboOUKjoPEJOGAeYd9AtprZV8NkBrL0Gl1MOD?= =?utf-8?q?v/Fu6/elEAxOpCqYW8kpljYtEGXoxAbj39P91Nw03czFXV3lB9b4K7Ilzwz3iIGY6?= =?utf-8?q?Wka7kb7EQ0+ui3+n7mGhSjxh2guxQZklMe7r7zQIiadkyLhjDCeH/43j4RBAziPjW?= =?utf-8?q?YaW2G/7N55zePMfjrHVHGES1PDAliekv1yas4bhB0+gNg6P/+QATcMQ0CAyjkoHTD?= =?utf-8?q?RkJi0OjlUjuNUo1NHSBSi9gUufixS2zJcT3guaMt41Gwo3ndxJGGVKhJozu0bpgDF?= =?utf-8?q?p3n7IAN/l4ed7tp0kaIP1ARfb3ZbIZeTdFjV3nVk+DV7PL+5WjCKdA8beYzNdvXSw?= =?utf-8?q?k32DsGmxbh4njaRevSe9lbGk6bPkjLaKMShrXDvUwJcvtz+vGJjvtV3CvmNgvwVwj?= =?utf-8?q?Fvr8AtIZO/C6NoiMw53WJvbE1IGP9CWliyhuWocRZnPUU9dCCjFSl9mLBpdKzQMW1?= =?utf-8?q?AMje/KD8Ip0y+uEK+f98n1W7gXGsKclpiT7mJnLcEzjT+ryfEhAl6LCpl6Bk6FTjp?= =?utf-8?q?8fqiPG5Hlj+XcJ6r+k5EmEiCAK+YpKnaSBHfsMC8ATkHutOKVa8SiqqFCsidIhIvQ?= =?utf-8?q?3u98N4ZuktbfVjDccYG466RT1Kr9tpnQH/wL4TrEnArYWwuYjKO+Y1Vd3hPFnAqyp?= =?utf-8?q?HgnDPmzGgPdARoEuFKFIOv20q1eb4bH1wIxyFpBsvjkzt5hKF/YwAHVXb0gzNYTUq?= =?utf-8?q?GsCEGUMbvB6DNrfaelGPgW1n0vU9MaL7iQO+cL7mwAb08KvY+EY/+910qEO3Nfx5W?= =?utf-8?q?gSraes4aKnz4Uq+8Qe0Vi0G1ytye8k1oH/GMnuFpc+/llw+Enb7xkvgULyPfLD6rl?= =?utf-8?q?aqQeyNW2dG64CdyduzjrnjUrd2nE138Yn2yYfP2sZzia0novCoiRTaNelFOWdvFVi?= =?utf-8?q?1fVXYEDOIme/JeNNRF8VY7Cq03RR1HS7hHXZOdAQ7kYmrZCnouWoC5o2I/lsTbFCO?= =?utf-8?q?w0FjqkJ8tvHJHwfnra/2CFbSeTfkmFoY1W+fHs8OzmElbIJTqj9dS7HjZLAkTV7E2?= =?utf-8?q?1To1XAWuM8hPz8gR9jcsddBZScBcZm91fCG5OGwQMz6ogkreMh0P+8lS4uZoSPNdj?= =?utf-8?q?1WvNpEkF9g2fQm9/XPo+zQKE5wDCE6rFA=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(7416014)(376014)(52116014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?jtzZ/urR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SIF7vJe6BiqlIYXm?= =?utf-8?q?ZPYg57RV29g7zP5+4WQLgW1hEXfhlT6OKuTcH9pyrXxobTLZNLO6iQsaRkopCy9C0?= =?utf-8?q?0RclXG5kfd88AQ883urvrhRkIukhu7SQQT0MDQR0r7ocBxHzajB/v1C8fwzho5vYG?= =?utf-8?q?yxy+Fj1+jAoQG6XlgxLD1LLawSsPfdF7GPKyCeCeu9TusRghbJBSnW0hHoTf/vA9h?= =?utf-8?q?0Tj0SGZW8pokOyI++wBlmOGgeoi9/EL9MKQ1eDNT+7+ptvSQWw7dln3PcF/xSvnOs?= =?utf-8?q?Vi6RMpbABjFeSkzUc04t0afy1Wxhv1BI93i8MIfbfhjXM+N6nMCPEhEqN5FYv1/3a?= =?utf-8?q?7QoO5aWmaB8HZcyTUnIy+fbOisem5mlE3A+F17Dty79oZN851a0bTjIi0HfalHw+q?= =?utf-8?q?s2SDsjimoGmPSytPdRLOn2qtJkBiJGCC66tNVPdaSJ8gT7AXBgVz+lsE6ciVx1CPS?= =?utf-8?q?BkNhi7is2phUrA5oFSMtknXdPZeMwtV0ThBSN7HKkdGmz2Ecgmv3DZqzRj9JkEqmV?= =?utf-8?q?sEmpRMeLzkUSSrADyFv1WW1mZIm/XfV1rgHTV2BzMzM5Z7MIvOWxypeckiyWBCDMT?= =?utf-8?q?Y/cY7EHL9+/fHd26Btpl8yMs2LYrD7JAw4ImGXrMTwrx44E+PuuXojG2hYQkntADj?= =?utf-8?q?GLuaxSD75t3f?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b3159dfc-f08c-454a-8979-08dd3fe84bc4 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jan 2025 22:08:29.3664 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: sY6LnzTuURr56fCa2eDkcKim4hGtxgBWOmFvhsuAsNTQwQ2F8tHaj3/kv1FpV6pN3FdoUKmesL5oMfpcX/cNkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8555 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250128_140834_098304_2BFCA2EA X-CRM114-Status: GOOD ( 13.11 ) 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 Pass resource start as the input argument to iomap() instead of atu.cpu_address in dw_pcie_pme_turn_off(). While atu.cpu_address happens to be the same here, it actually represents the parent bus address before ATU, which may not always align with the CPU address. Using resource start ensures correctness and clarity. Signed-off-by: Frank Li --- change from v9 to v10 - new patch --- drivers/pci/controller/dwc/pcie-designware-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index ffaded8f2df7b..ae3fd2a5dbf85 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -908,7 +908,7 @@ static int dw_pcie_pme_turn_off(struct dw_pcie *pci) if (ret) return ret; - mem = ioremap(atu.cpu_addr, pci->region_align); + mem = ioremap(pci->pp.msg_res->start, pci->region_align); if (!mem) return -ENOMEM;