Message ID | 20250310-pci_fixup_addr-v10-1-409dafc950d1@nxp.com (mailing list archive) |
---|---|
State | New |
Delegated to: | Krzysztof WilczyĆski |
Headers | show
Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2071.outbound.protection.outlook.com [40.107.20.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4CFE51DDC36; Mon, 10 Mar 2025 20:17:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741637848; cv=fail; b=pPfEoBZJvAjib/RJNLurCMPrmFQ/ipCZvV+/t14sOvrBtt98Rj9Yv/gc8g/zwMz2rz3yWuDYH0oMgPTC8+o4uReq/wLtrD9F9NiPFObbqevQwqTKLTu2313EUqka90ZAdxKC8thQzbq+yqW4gZqvHaN7l2oxaty8y+Dl1KAKC/g= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741637848; c=relaxed/simple; bh=GhWYz5HcYm3OAMKz2PmWS29ZgS7yWsv5STiuxZVCogM=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=mczRz5e2555oDEf8EalOt16X57wwHoNbzIlmf/8uW09DP2UumYd4fKdZhlflcrIJTQ6zHF0FOvEIukaNwCF8LaxzdpsmxgCHjidz1n67wdz2pwPz1aYUu2L3fj7hPecsG9d587MwaGa7hmXfMEoxZ3Fgj6PaVMZx9QmqArNbu3o= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=MEDKCh0T; arc=fail smtp.client-ip=40.107.20.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="MEDKCh0T" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=soz2c03uUnKZL2jhyktvtmYgtPpMWqXZ7xJ4YEY2kswTCjKP7bt/n1f6NbZNjcE6OaOfKadokj0+6a0ytP0qJ2xVrRASuoljG4LzHyiYPQ49R7+4rk5B+fxabaQjv3Bm3OadkIj/5a6htSNV1K2o6SFp6RHF+CFdlXkMmiKQAsK6lIOUxF1MOEgJ6tLhSGejibvB14F+sHcZHibC0+UHFHwJUKxzdfBPxdTYcCi5I0ATAlXUtaQoAhpzgK0dEEj5pr7979Skhl65Pk/hi2yyhKqBCzsEgXh/d42VAneYTKGSwT09RabyLmZ6MhxWUGDBslC7UaMSYte2eBAl8loCOw== 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=5HxuOEZVhNafxiCmkc/toHtjLW4vDiGTAjHZhLP9vTk=; b=nZktdXheesE0DSBP5rGCSrm4bWr/+VghYlhC5L90pUb8390kxEPXZJcHbWt6UPLh1nM+JxMHqr/v8WS6SpLMpSwkVZ1mQeLSWKO9/ODq98Nh3mAHaw2EWiikm2jWR/nJlrCM09JNEuyqdex22OH59zNTqz13oLgaIF7zLA1ZVsLvgdpK9CEIdbrhHdJIptlg4PvkwHqssT4Dw/8gpRGnq7o3/WIBN8So7xQaGI5zsEqN0sgyyROU3vEp3UBEfXKiTDXIDdxWTPajeboijogRMVGYC/mbxCY+HPULZLKJiCnaCOHCv3Lo4NuiWt1jmBAhNYIsH1HNC7gwvCW8AB32vA== 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=5HxuOEZVhNafxiCmkc/toHtjLW4vDiGTAjHZhLP9vTk=; b=MEDKCh0TCzpvy9XBvK6O3FsH6GoTBoZ196QblYaT2s9ViZ6Izm8MQErVyXWesAYPWG+Zvt84eACIsVjxpJuQAFWQiuabaZTS83kXexyzGaM7B67zSqUIHgoJbIpIzwolnZNlFBOz5tPcX5BDVw9RAPCZf9/40+hnnA2uQUn+2FoICyUsqfHTijXFIKZqxKVAirSr68D8WuQ6oi3clWc8k3HFoqoo+dzHUxaYAyeBSRrTkHhAbUOyd50jaav6/9BMyikHd5EJykKx2uqF60j+s0OjqfMShjs3ArdsvZ7GhO3GAqTa1fHUguEOM4d0bUAj8g+XDgyGEAq1BMqsKyORXg== 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 GVXPR04MB10682.eurprd04.prod.outlook.com (2603:10a6:150:214::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8511.26; Mon, 10 Mar 2025 20:17:24 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%3]) with mapi id 15.20.8511.025; Mon, 10 Mar 2025 20:17:24 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Mon, 10 Mar 2025 16:16:39 -0400 Subject: [PATCH v10 01/10] PCI: dwc: Use resource start as iomap() input in dw_pcie_pme_turn_off() Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250310-pci_fixup_addr-v10-1-409dafc950d1@nxp.com> References: <20250310-pci_fixup_addr-v10-0-409dafc950d1@nxp.com> In-Reply-To: <20250310-pci_fixup_addr-v10-0-409dafc950d1@nxp.com> To: Rob Herring <robh@kernel.org>, Saravana Kannan <saravanak@google.com>, Jingoo Han <jingoohan1@gmail.com>, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, Lorenzo Pieralisi <lpieralisi@kernel.org>, =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= <kw@linux.com>, Bjorn Helgaas <bhelgaas@google.com>, Richard Zhu <hongxing.zhu@nxp.com>, Lucas Stach <l.stach@pengutronix.de>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com> 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 <cassel@kernel.org>, Frank Li <Frank.Li@nxp.com> X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1741637834; l=1364; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=GhWYz5HcYm3OAMKz2PmWS29ZgS7yWsv5STiuxZVCogM=; b=WLcg7Pn7NMuD65venfBLnLYrGCBpC6jQLImm3BJIMxDeMMQS3o8c9wyYnRfN/OGiec//cTcdc R72DrgiHLRgAcSV19ztKwivUGQXtosNiUFEJl4yNGmpRSOwA9ys+9WV X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR08CA0058.namprd08.prod.outlook.com (2603:10b6:a03:117::35) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: <linux-pci.vger.kernel.org> List-Subscribe: <mailto:linux-pci+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-pci+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|GVXPR04MB10682:EE_ X-MS-Office365-Filtering-Correlation-Id: b9087607-f00b-4a2f-f6f4-08dd60109206 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|366016|1800799024|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?lXrxwtTV2Ys6Wdqvlzbyt8KPYHynACa?= =?utf-8?q?0uf/qzx36qPbiKwaBDW4lBhWVyLMewls3EcucyOfKIFdU9ozEWNCD2tky101EDdeV?= =?utf-8?q?FXyPfsM61A5IKtml8MHPuZi00pHb1eesKW38WMbWE3xZRyF6Mo+YJQSfazfQNXR2K?= =?utf-8?q?JhBUU4evTCoDQnD8uJxqLQf76mCWUl3yAYxiMDaRV+ep0cs3CaOGeA0ej09XErTiz?= =?utf-8?q?+BppzdLL7rgpEI3kgRjg5aZUJJLk2PGZtT9k8NfzLsGYDofa4eJ1EUK/mqc3iGIIh?= =?utf-8?q?tM5KRiAwM674Yd4S5Ol0LwDrJjTyHc0m062+WPuhRfQheNBcwDXUvK2DJBF0pJqzT?= =?utf-8?q?dnT3KC3MgtoErhPo7f+KQJ9Wwr1eJrPJurcNPZhUFVsm8/UT8fPihnA5BLkVI2YiK?= =?utf-8?q?oMg+HaEDW9nz+OA1wRnwrDUWvC+hJ6nyvmqESz2YgWahB31vrqzad/+QrZlXPQEYd?= =?utf-8?q?plsvhwUPMf66aSIyOh2BrxYXAe4PG7wT0pkcR8BUFivuTEmj4vSmtAna1azGiefek?= =?utf-8?q?PelryuFATioSYuz5g9DFVEltZU8VaEUY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g5nMvDw=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)(7416014)(376014)(52116014)(366016)(1800799024)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?FVEiFlzIYBkIq4UaD0AzbHPEVm6+?= =?utf-8?q?8uEG7vXW3WXyzVbU8JyiOhGVhVOtL+Aw9AuE1q/wpzcY9FAVcrbUz/q7mGcBIw+zw?= =?utf-8?q?q7wF+DuGnF5Wqt4O6N4OMMdUKt+NdrYriYrSqACGfgURmC/IT3E0h+Q/aUNecxKt/?= =?utf-8?q?YPyGcdUFfUFK/dMmgHcsqTLuPpEiSIT52b1+IkcVS8TdGVX9JmGzZjR7dFAj2bPI6?= =?utf-8?q?vguG0QjPDVADn3y/Z2aAXiL/IXz6gSu0CYLqk5KW8CAe11W42fmRbHpofwdTSoH0/?= =?utf-8?q?VAPt7E2yFUuNIrBPsnQYJ7aMw9fByfI/WT/kGv7eyqZyKlJXh2jl27x9V6fLulAQ5?= =?utf-8?q?X88JmWCZc14ot0Doo5TBZzLm6WdyzJmfY6bVF2/BCPBXuW2y1fQx4by78mHxtF+9M?= =?utf-8?q?7xBBwqK8cnbAdOLNg/ZWXAy5fqn6NMhp4mw9PrR8gLo+RTj6gaqMZdBSobKiAXYvO?= =?utf-8?q?Aq5ZGoEJDlfUBahOW8+7yGyBzGgF25j9Ij9lRdYjpggOJwPA5wuX4r3ctXN5klaIC?= =?utf-8?q?f2AqLiNBYXStv+pgw1CdHocCls2wofsyCfiWR0XoSN4MV+2YgW3m/rDjtqpMW+Lai?= =?utf-8?q?HatVy2QiFidEWQqjEe/e3N7t1bdJnreg16kJc9Rgm8HAXYb3c666nOCSv9CxDGU5q?= =?utf-8?q?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X-MS-Exchange-CrossTenant-Network-Message-Id: b9087607-f00b-4a2f-f6f4-08dd60109206 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2025 20:17:24.3312 (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: fBs2XbWopM5yj/pxDdTsOmKASDkt9gv8r1YJoBPJ5WxsAt+GceOQzMnk0dF+hAOY9eMhKwPtWv67TEQgCbe0qQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB10682 |
Series |
PCI: Use device bus range info to cleanup RC Host/EP pci_fixup_addr()
|
expand
|
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;
The msg_res region translates writes into PCIe Message TLPs. Previously we mapped this region using atu.cpu_addr, the input address programmed into the ATU. "cpu_addr" is a misnomer because when a bus fabric translates addresses between the CPU and the ATU, the ATU input address is different from the CPU address. A future patch will rename "cpu_addr" and correct the value to be the ATU input address instead of the CPU physical address. Map the msg_res region before writing to it using the msg_res resource start, a CPU physical address. Signed-off-by: Frank Li <Frank.Li@nxp.com> --- change from v9 to v10 - use bjorn's suggested commit messaage. change from v8 to v9 - new patch --- drivers/pci/controller/dwc/pcie-designware-host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)