From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBF86425CC0 for ; Mon, 29 Jun 2026 15:36:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782747368; cv=none; b=ByeCkV7QoPvuayoNIwl4dY0eUtL6nfibcml7N+zB4MRlXW0Ivt7bwKWNZC8PP0q9UlcU2xhPK3ZECuV+mJjqpmDdM3ya5HNuiIvo04XO38OAdwBUrNxvkyLfbO+O/zEOPWc7/3k6G3EjFkDe9+uVWQK+j9PyXv0o5ndBHv5e9EA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782747368; c=relaxed/simple; bh=dPo8To4lMTniabQIFcwXhKUudpCTlGapUPHUrc4t7vE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=kCYOI0QTghbwE038URwriY2oDZ9raaRiDFU+Vy8DDZuvLnMp0Y2qCSOJ+hBkDT2vdoPnWOHXs4E6VwdwiIS4th3iCe+tq8GQRKwNu+cp5tJDm68q+uWBl6BaTZkf+++1dqawQYVUaIz+F8/U66SQVC9aW5J+8PJt3TwZj/Jk+7Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=ivuyIXk1; arc=none smtp.client-ip=209.85.214.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="ivuyIXk1" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-2ca15944645so4216165ad.0 for ; Mon, 29 Jun 2026 08:36:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1782747365; x=1783352165; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=RsiAkF5rnsXrEzna1iMYWZla+7JEf5EC3Z4oGTp3rT8=; b=ivuyIXk1NnQNuMeWlJvjZkrpeKXoBAcIKz4Uj1WpGnzkY0BVFnf6Tcp6bDOgYiGKxl MiJYT6jhdY1KyRsVi1PuUAfmQj4Y9NpaQZ5WpUjRilfPUJ/D1oO8SAg/zoxLw7AqhH08 g6ien+v33DrmsfxNIh6Aqcrd2ip35GTcb55tHxVHuFFUj6eYkg8NjHrkaePsPVQNVGXa PwGmaBStyxZqFKFJo8aMYYH5P2+64XoL6YOvDGbpojTPAdFvyG+7EwcWFWE2BnSf8O9c R2IuNBUwgOFcJ0wE/5EmkEOPMCIoP/ii6H/X8trWv0KZDXkUQmPvQU08KGMk764jMxYO TghQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782747365; x=1783352165; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RsiAkF5rnsXrEzna1iMYWZla+7JEf5EC3Z4oGTp3rT8=; b=Ax6Y+bfyL3Ir8aCKtMFrwjReXPEhGKunHt2pyBGOdRHkW/Z7952b70uh9ynuwok8y8 X9OwN5pGSei2cBYo8qo6iLV0xTPzIl7PWpv0sU9NXpkQo9oAu9A1bQi6vmRsMHLK9x74 2Pd155E1MirBp4Dzqe3Uw+tC/Z9CEkOeOdUnrCfOCCbW7cDunFiUBzzgE8khwOvCcal0 r/UOUfLo0Zzi/Hs73qtVJe3LWbydpj4kHwhbHV1RjVB+ndiAvZ6qXEt8izxnFjcC3K3j zeJXsY5uW4BiFSp0qPGP+2axPC7TOhwrolVzN+nkP9Hz1Q5tvc8KehBXnv3Taxe8z1Ke ne0A== X-Forwarded-Encrypted: i=1; AHgh+Rq97FZ7iX2QF3wY7FaHxKzImG5rs2Rg1QXwlge0mEdHabLes+M0RG0stqRB/vnsUG4sFFfzV+JILpFRPCk=@vger.kernel.org X-Gm-Message-State: AOJu0YxRXJfycl5mHyA3kvLkUl4DbQljItB40XL8DtgHhTfL7uS7eOFn ZauLUJ9tT5haxzVYMQKMEeffCcM88QsayJMLKDY0pQeDyht2hWPG3GeUcWSVgQYDdNcqB5YNwHK ljLRpiDo= X-Gm-Gg: AfdE7ckWR+yubpCZ3TJQxLZQd8Iy0Ij/AovMfem1UJB9XzRCL0r0+TbyiXK1bKZp6T/ 0vy05PpUm4Ihe2MrkairbQUCnVytTAnZG1GaazMccoz/5MPAvtPbebUvWS8uHBiYUyk0sPj+Ylr rQeSn+T0T4PsSD5ZxzFQd5hrUJog+GCfWD8hrvBCyno+5aRS0SBGPp3DncZohB3+F1eraDavTom W1UldHY+hPZs6QBY1hx/l87VMtoT8L998opXY7qaI7V14AGzGTxyRxOleauv3QCDSjEIXccYlH4 UpE4WcvdXTlStOk/qh++3okv7kOVd21iNyFoyKw1tAJYLgeAh5OFIQlNCbq7DfQvN0Pmsykx/ix mBkD70N3Hvws5/ZSRUgYJ2q87FpZlDWirq5IvwCvCsQlXTws/Gk2E1otE5S4g0CgoSSn48CutlA QpbGsn8gygmDPqB/yPIjrv0AUs2i8= X-Received: by 2002:a17:903:2f8a:b0:2c0:b5c1:8e22 with SMTP id d9443c01a7336-2c9854b5597mr89458355ad.12.1782747364963; Mon, 29 Jun 2026 08:36:04 -0700 (PDT) Received: from p14s ([2604:3d09:148c:c800:aa83:261a:68a7:9974]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2c7f63d09f0sm98408955ad.56.2026.06.29.08.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2026 08:36:04 -0700 (PDT) Date: Mon, 29 Jun 2026 09:36:00 -0600 From: Mathieu Poirier To: Ben Levinsky Cc: 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 , Arnaud Pouliquen , Daniel Baluta , 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260529021637.2077602-1-ben.levinsky@amd.com> Applied. Thanks, Mathieu 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 +++++------------------- > 7 files changed, 73 insertions(+), 227 deletions(-) > > -- > 2.34.1