From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010034.outbound.protection.outlook.com [52.101.69.34]) (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 2C9752777FC; Sat, 6 Jun 2026 03:40:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.34 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780717227; cv=fail; b=SWuUWchROlLmbG7zTZC35HsyPVwK+YV1falMGWwUdA6DKAvlMfSqnXSpiho9Cc8KWOAMTmAjD0ZLLqfERyrU8Ec/UsECjgQwdqfdV0BYYNMysZzXUCYCbJwEjS3oQswgmD38RLHhGwPpGd4CAAKHHt7xec9DkUDJXnMlnzSewFg= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780717227; c=relaxed/simple; bh=D4VsYt5MtZfhdW6lPzcTmNxioQlObT9XX2o5Or/4M6Q=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=SiSzp1+WFsT0U1cGlqs4vDjwtkUJ38mThyaCWIzfbRFHjnaj4z4TL7+IEPO6xeFsrFZUoh+MrBSgp0rBkmr6c/1OI2IwVcxJuW9FO3oax83GJxOsbyxdykej50WMRMYNXSrDx+LYsxASLko0Nq6vudmg/aoW3Jiw+JBcuOtpo5E= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=bxf8kweD; arc=fail smtp.client-ip=52.101.69.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="bxf8kweD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tM86KqPeaOfto53srJ/HpjGhqq+tV0xJTPXx7U0/LwtvUI+uzaMg+bP5XDsLC/nGw6UXd2k8KdBxP+mjP2C78Fe9tGQCC1QbJrD6+GUhJ4TbPkZ/ji3+bVGGI0cOlQEB9LPPqFhEUqoMOk/QgPmkGzJf87nxLsSW4piFjrVuK/y7Q7M/sknLKD1W+sssgTEgpRv/eRvgQzB4LS35DwNr/T/VYKnnYimKSaUunsL0Q+xaa3ygiuHeqE09b/li5hYTFRXfFsJwwZlxH1+3vs0I2UFVEXRwP7ODPx4hNgztQLo0Gf+b+hNqTmJLBBHa3W60izDtQ8RlVBdrkv/AJbkxzg== 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=x+ZF4/cjv9brM77l1xkezRH02pa+QC+OuiIb76gRAeM=; b=srv8R8Ui7iJyYdm7qYHxrORa9pYfmTlmxz76cKJkzMSFFAuZpw86xebx6ik2FEitXBxbTZCJlG5b8cHifCamGHW09dnhZrs5rG+u93XR1PF7fvRu22deOcqpdctDNgjOD0hNEzHnuC2v92sP9whp0l2NoODAxoxVzs9KOh81GFXcwDZHZVrZ5hVHeSAEDKFoWhBKL302nxAQu4Mc/RvMVMBihaB3x3O2ZwlG6nv9qkvC1QkGXXwX4MdUIBkvJJeAysiRAsr42nKADu+Yv25QB/fHyAEdJ/QPD/C+csyajFTUthkcvwK6l97mO2VvSEB8FzRD7bE9FVF6NZI5DfbAVg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x+ZF4/cjv9brM77l1xkezRH02pa+QC+OuiIb76gRAeM=; b=bxf8kweDyt6S08/RSBoE3bY6fPcRYngT1weObGakcPxASMhOKzS/ZkUkMkmH3ktc5hIbli1Ch+yd3i9xB1bNNGTVPv5VEuQgxV8Jd+MVzIDCE3q4Np4YAU5P0i8kZDXV8/YwYFRV0tWL1i0yJH4eSNuQBX/KjOMPXUKRpd+8B73lGcFP5MBpoBqo5TQ+XgOxDPPdqab3VZAP/r8s9kM4j1ttpcgeWV34oGB1hsZnDETEvPRnjK9ZM8UvpIZjB1bTh/XNqqFWHh6qDbuTmE04vWcdnKK+dYUvbY27o4pfw7Rd2HVWv7+MF6+vC9gTf8NW6XrRjVTcpHihzuuNHsh/UQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from MRWPR04MB12330.eurprd04.prod.outlook.com (2603:10a6:501:7f::23) by AM0PR04MB6979.eurprd04.prod.outlook.com (2603:10a6:208:18b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.92.8; Sat, 6 Jun 2026 03:40:22 +0000 Received: from MRWPR04MB12330.eurprd04.prod.outlook.com ([fe80::ca22:f8c8:6aca:7889]) by MRWPR04MB12330.eurprd04.prod.outlook.com ([fe80::ca22:f8c8:6aca:7889%6]) with mapi id 15.21.0092.006; Sat, 6 Jun 2026 03:40:21 +0000 Date: Sat, 6 Jun 2026 11:43:19 +0800 From: Peng Fan To: Mathieu Poirier Cc: Ben Levinsky , arnaud.pouliquen@foss.st.com, daniel.baluta@nxp.com, Bjorn Andersson , linux-remoteproc@vger.kernel.org, Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Geert Uytterhoeven , Magnus Damm , Patrice Chotard , Maxime Coquelin , Alexandre Torgue , Tanmay Shah , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH v3 0/5] remoteproc: cleanup shared carveout and resource-table helpers Message-ID: References: <20260529021637.2077602-1-ben.levinsky@amd.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: SI2P153CA0016.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::17) To MRWPR04MB12330.eurprd04.prod.outlook.com (2603:10a6:501:7f::23) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MRWPR04MB12330:EE_|AM0PR04MB6979:EE_ X-MS-Office365-Filtering-Correlation-Id: 9194b4b4-c06a-40af-e3a4-08dec37d55a9 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|19092799006|1800799024|7416014|52116014|376014|38350700014|11063799006|4143699003|56012099006|6133799003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: LXemJ3yeKxg0SCG60y7Ca/bAzF84IIGSwepkYTsV9DrlWptzLRzqJtwWxZSrVO16eNCphn7I+opfYEeCqfBJBYn8g2KCJf90QfoLBZcrOI1PP/TZ3q8kkbHcTyjrZYGzaluTxay+kDpKSZptbK0zwGkP0Ub79HquZOGI76DEg13N+ITUuqfWmwOvnLqneUJxGD/AjJfFvWNfBFOqq6fsXe6S9RiRBYHhrhnnErKWuuWBhBkCGNb9epCs9tktotZds2Z0Tc0AZKqKSQd9qRSjtI5jULVA1yR0CN45TzJBeYNjxpi47Vggs1hPrRNamVP1WWoMHg8a5wu/Ftv/PumwrddEZpMbGWgKw9UKfKCWv6NC3HC/RWRgzRFNYVT4aL3/FvhpJfc9NDlWCjVrWTU9+UCMLbMIOgzrJ1r8jFT6fDjtV+NvT6RHyOk8ylOjbPNXB+KXFctu85riTwjc8oR/6bQYJb2plarHilmrJx7nW7POXrUj7vZTigo+DR1KCH3YEyBxTI3G/wFLdZtUmm4teMN2tMKjj32bHaEiYT2fo2jaRTyksDMRaAZUnT7kWCif9JImJF6nH/Ji1SF1W8OQM6l5Ln8ZJQgKE+2ljroItewmJDwIQ7PyTJP7+nleQB6GqNxY8QQTn0QRYec+mwdb8l/TefY1+x83el74jZ3+mMvGRxPZH1J0p4qGAA1GOxUeXezYog3ziJoXmAVDBhk8MRUEFT44pdeR+T5hwj40pbxrZU9O+YCeuDLwaFugxEuk X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MRWPR04MB12330.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(19092799006)(1800799024)(7416014)(52116014)(376014)(38350700014)(11063799006)(4143699003)(56012099006)(6133799003)(18002099003)(22082099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?dDJkCH7qdM1Ld+llCCiZ7+LM5RIkffFB+PlRQ1vUrUdH/85Wz46YIJX6wB5k?= =?us-ascii?Q?c5wwzKoAjq4D3gn3D+OO8z/YrnWxb38AItoyXtQUR+N1PIZTsI87lf3gCXWm?= =?us-ascii?Q?CyLApfMZaAdII+BgW9d26UJSkgQVR6eyCnORwynfzRkDwmoAr7LdYQMbyz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1R8fz2Sk/uoWr5AHSK8tuYfzhJgxQg68gPRUzUp0tE?= =?us-ascii?Q?RIDTkGsZd0/U5R7UHUBZhNcmw5gEn/H0Nf0qJnywHsB+5Sbr1zrWFlCKdD4x?= =?us-ascii?Q?SPIKarIA96w8iCuqLRpjiS5vxIoh/MR8oQgpj9ur+XvKTXLa2t+wVeo6xECk?= =?us-ascii?Q?kiI6KnwIc0ngDkc6wiubPfkPSGFe6wyHHZsOs1yftD9R03HdXRdlaqfHofqS?= =?us-ascii?Q?srQT+TU/pPQJBqcZBf/bnPWd512J9mbDmeL+CBeNIRiI82eA0zJ3GQlPpwJC?= =?us-ascii?Q?6C2KrIVvV4e4OP/bRAyxEBXpc5dmAyLgAPbRan0obYjuYEVF8WxPJ+wHSWR/?= =?us-ascii?Q?xHQxMQThNMfoBXW45beB/V/uJG6n2RJXSo0F6xEBnDq+Ggyrhi7gzrTSYoTO?= =?us-ascii?Q?Gz7TmFxDrGfa4WQYeD65kWHD+O+QNaNoPFGIw4ep33ietaCygGCy09qv+lku?= =?us-ascii?Q?X612Z3gOTIXwqk0PHhvSrRbEpbbYUXVW7AXvlRMsTpO/tpKXmgYFuFU71Kdf?= =?us-ascii?Q?AVrR3wMZaDjD3aRv40MpcJHE1rEjMD7LgTn/rYuyDnF8f5FAreQwrLA75+0G?= =?us-ascii?Q?u+5cc05+Zl/9dwGn4iiUSYVZQMdXROCs2a1r2ydNNqLr7cyEKAxnIN/2vcT3?= =?us-ascii?Q?iujcQjUe/EQxy/V8UchJm84hlNuTWEjl4frDBPQLEO9zRJk0LiDXchP9SIj8?= =?us-ascii?Q?Xjxsuwe9jg=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9194b4b4-c06a-40af-e3a4-08dec37d55a9 X-MS-Exchange-CrossTenant-AuthSource: MRWPR04MB12330.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2026 03:40:21.5583 (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: rrDm2PqwjjOQPX1QbOtMyKYGVGeeUrV56pEjztKUdV3mJEuC/h+IGP38LqqZ4qJqZ2iMSBu9zpP3p0tEeyU6mA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6979 On Mon, Jun 01, 2026 at 08:42:29AM -0600, Mathieu Poirier wrote: >Good morning, > >On Thu, May 28, 2026 at 07:16:32PM -0700, Ben Levinsky wrote: >> This series is a preparatory remoteproc cleanup split out from review of >> the AMD BRAM-based remoteproc series. >> >> During review, there was a request to move the duplicated plain >> ioremap_wc()/iounmap() carveout callbacks into common code and to >> factor the "missing resource table is OK" ELF parsing path into a >> common helper as well. There was also a request to send that cleanup as >> its own patchset first, with the AMD BRAM series respun afterwards on >> top once this cleanup is merged. >> >> This version keeps the same overall cleanup goals as v2, but reworks >> the optional resource-table pieces based on follow-up review: >> >> - reshape the optional resource-table helper in patch 4 into the thin >> parse_fw() wrapper form suggested on the thread >> - switch the patch 5 clients over to that helper shape directly, >> without post-helper rproc->table_ptr checks >> - keep the driver-local parse_fw() wrappers and their existing log >> messages and severity choices >> - retain as much of the existing per-driver parse_fw() logic and code >> placement as possible while moving the missing-table handling >> through the shared helper >> >> This series now does that in five patches: >> >> 1. add common subsystem-private callbacks for the exact-match >> wc-ioremap carveout case >> 2. switch the in-tree exact-match users over to those callbacks >> 3. mark carveouts mapped through the shared wc-ioremap helper as >> iomem so the framework uses the proper I/O accessors >> 4. add a common helper for drivers that treat a missing ELF resource >> table as optional while keeping per-driver logging decisions local >> 5. switch the matching in-tree drivers over to that helper while >> keeping thin local parse_fw() wrappers >> >> For the carveout map/unmap cleanup, this series covers the exact-match >> users called out in review: xlnx_r5_remoteproc, rcar_rproc, >> st_remoteproc, stm32_rproc, imx_rproc, and imx_dsp_rproc. The zynqmp R5 >> TCM mapping path is left alone because it also clears the mapped memory >> and is not an exact match. >> >> For the optional resource-table handling, this series converts >> xlnx_r5_remoteproc, rcar_rproc, stm32_rproc, imx_rproc, and >> imx_dsp_rproc. st_remoteproc is intentionally left unchanged because its >> parse_fw() callback also builds carveouts and is therefore not a direct >> match for the helper introduced here. >> >> Changes in v3: >> - rework patch 4 so the optional resource-table helper matches the >> thin-wrapper form suggested in review >> - note that patch 4 still triggers a checkpatch --strict warning for >> the flow-control macro form, but that implementation follows the >> maintainer's review suggestion for the thin parse_fw() wrapper shape >> - update patch 5 to use that helper shape directly in the client >> parse_fw() callbacks >> - drop the post-helper rproc->table_ptr checks from the converted >> drivers >> - keep the converted parse_fw() wrappers otherwise close to their >> existing structure and placement >> - test xlnx_r5_remoteproc on the latest tree with firmware images >> both with and without an ELF resource table >> >> Changes in v2: >> - split the mem->is_iomem change out into a separate patch >> - add a common error message on ioremap_wc() failure >> - drop logging from the optional resource-table helper >> - keep driver-local parse_fw() wrappers to preserve per-platform >> missing-resource-table logging policy >> >> Ben Levinsky (5): >> remoteproc: add common wc-ioremap carveout callbacks >> remoteproc: switch exact-match drivers to wc-ioremap callbacks >> remoteproc: mark wc-ioremap carveouts as iomem >> remoteproc: add helper for optional ELF resource tables >> remoteproc: switch drivers to optional resource-table helper >> >> drivers/remoteproc/imx_dsp_rproc.c | 41 +++----------- >> drivers/remoteproc/imx_rproc.c | 40 ++------------ >> drivers/remoteproc/rcar_rproc.c | 41 ++------------ >> drivers/remoteproc/remoteproc_internal.h | 38 +++++++++++++ >> drivers/remoteproc/st_remoteproc.c | 31 +---------- >> drivers/remoteproc/stm32_rproc.c | 39 ++----------- >> drivers/remoteproc/xlnx_r5_remoteproc.c | 70 +++++------------------- > >This set looks good to me. I am fine with the checkpatch warning on the macro - >given the redundancy it avoids, I think it can be tolerated. > >Wolfram has already indicated he wanted to test these changes - Arnaud, Daniel >and Peng, please do the same for your platforms. Tested-by: Peng Fan #i.MX8MP-EVK > >Thanks, >Mathieu > >> 7 files changed, 73 insertions(+), 227 deletions(-) >> >> -- >> 2.34.1