[PATCH v5 0/6] remoteproc: qcom: pas: Misc fixes

Mukesh Ojha posted 6 patches an hour ago
drivers/firmware/qcom/qcom_scm.c       | 18 +++++-
drivers/remoteproc/qcom_q6v5_adsp.c    |  6 +-
drivers/remoteproc/qcom_q6v5_pas.c     | 87 ++++++++++++++------------
drivers/remoteproc/qcom_wcnss.c        |  6 +-
drivers/soc/qcom/mdt_loader.c          | 15 +++--
include/linux/firmware/qcom/qcom_pas.h | 13 ++++
include/linux/soc/qcom/mdt_loader.h    |  4 +-
7 files changed, 94 insertions(+), 55 deletions(-)
[PATCH v5 0/6] remoteproc: qcom: pas: Misc fixes
Posted by Mukesh Ojha an hour ago
This series is a collection of misc fixes for the Qualcomm PAS remoteproc
driver and its supporting SCM/MDT loader infrastructure.

- Fix sparse __iomem warnings in qcom_adsp, qcom_pas and qcom_wcnss by
  annotating mem_region fields with __iomem and using __force at call sites.
- Guard the DTB metadata release in qcom_pas_load() with a dtb_pas_id check,
  consistent with all other release sites in the driver.
- Move PAS context allocation from probe into qcom_pas_alloc_memory_region()
  so the DTB context is only created for subsystems that actually use it.
- Map/unmap the subsystem memory region on demand around firmware load and
  coredump, avoiding potential XPU violations on EL2 platforms where the
  region may be handed off to the remote side.
- Drop the now-unused dtb_mem_region field from struct qcom_pas.
- Add a keep_mdt_buf flag to struct qcom_scm_pas_context to make metadata
  buffer retention explicit rather than implicit.

Depends on:
https://lore.kernel.org/lkml/20260702115835.167602-1-sumit.garg@kernel.org/
https://lore.kernel.org/lkml/20260724094939.613844-1-mukesh.ojha@oss.qualcomm.com/

Changes in v5:
   link to v4(https://lore.kernel.org/lkml/20260430191253.4052025-1-mukesh.ojha@oss.qualcomm.com/)
 - Rebased it latest changes on Generic PAS changes.
 - Changed a bit related to map API so that it can be used by both
   by mdt_loader and pas.( 4/6 )

Changes in v4:
 https://lore.kernel.org/lkml/20260331183957.2015440-1-mukesh.ojha@oss.qualcomm.com/
 https://lore.kernel.org/lkml/20260331191210.2019758-2-mukesh.ojha@oss.qualcomm.com/

 - Last series mistakenly divided two series cause laptop shutdown.
 - Some minor refactor common code rest is same a rebased on latest
   kernel.
 - Added new 6/6 to the series.

Mukesh Ojha (6):
  remoteproc: qcom: annotate mem_region fields with __iomem
  remoteproc: qcom: pas: Guard dtb metadata release with dtb_pas_id
    check
  remoteproc: qcom: pas: Fix the PAS context creation placement
  remoteproc: qcom: pas: Map/unmap subsystem region before
    auth_and_reset
  remoteproc: qcom: pas: Drop unused dtb_mem_region field
  firmware: qcom: scm: introduce keep_mdt_buf flag in PAS context

 drivers/firmware/qcom/qcom_scm.c       | 18 +++++-
 drivers/remoteproc/qcom_q6v5_adsp.c    |  6 +-
 drivers/remoteproc/qcom_q6v5_pas.c     | 87 ++++++++++++++------------
 drivers/remoteproc/qcom_wcnss.c        |  6 +-
 drivers/soc/qcom/mdt_loader.c          | 15 +++--
 include/linux/firmware/qcom/qcom_pas.h | 13 ++++
 include/linux/soc/qcom/mdt_loader.h    |  4 +-
 7 files changed, 94 insertions(+), 55 deletions(-)

-- 
2.53.0