All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] arm64: add SMCCC cache invalidation backend for memregion users
@ 2026-05-21  7:30 Srirangan Madhavan
  2026-05-21  7:30 ` [RFC PATCH 1/2] arm64: smccc: add cache clean/invalidate IDs and return codes Srirangan Madhavan
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Srirangan Madhavan @ 2026-05-21  7:30 UTC (permalink / raw)
  To: catalin.marinas, will, mark.rutland, lpieralisi, sudeep.holla
  Cc: conor, jic23, linux-arm-kernel, linux-kernel, vsethi, jevans,
	raghupathyk, srikars, nbenech, alwilliamson, Dan Williams,
	Srirangan Madhavan

This series adds an arm64 backend for memregion cache invalidation users
based on the Arm SMCCC cache clean+invalidate interface.

Per DEN0028, this interface targets systems where a Normal Cacheable
memory region can be modified in ways that are not handled by usual PE
coherency mechanisms, and where VA-based CMOs may be too slow or
insufficient for large ranges and/or system-cache implementations.

Representative use cases include device-backed memory state transitions
where stale CPU/system cache lines must be invalidated reliably (for
example secure erase, reset/offline flows, and dynamic memory
reconfiguration).

Patch 1 introduces the Arm SMCCC cache clean/invalidate function IDs and
transient return codes needed by callers [1].

Patch 2 adds an arm64 cache maintenance provider that:
- discovers SMCCC support and attributes at init time
- registers with the generic cache coherency framework used by
  cpu_cache_invalidate_memregion()
- handles transient BUSY/RATE_LIMITED responses with bounded retries
- coalesces waiters when firmware reports a global operation type

This patch set does not add a software fallback path; when firmware does
not implement the SMCCC cache maintenance interface, the provider is not
registered and existing behavior is preserved.

Reference:
[1] https://developer.arm.com/documentation/den0028/latest

Srirangan Madhavan (2):
  arm64: smccc: add cache clean/invalidate IDs and return codes
  arm64: mm: add SMCCC-backed cache invalidate provider

 MAINTAINERS                     |   1 +
 arch/arm64/mm/Makefile          |   1 +
 arch/arm64/mm/cache_maint.c     | 180 ++++++++++++++++++++++++++++++++
 include/linux/arm-smccc.h       |  17 ++-
 tools/include/linux/arm-smccc.h |  17 ++-
 5 files changed, 212 insertions(+), 4 deletions(-)
 create mode 100644 arch/arm64/mm/cache_maint.c


base-commit: 3b3bea6d4b9c162f9e555905d96b8c1da67ecd5b
-- 
2.43.0

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-05-21 20:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-21  7:30 [RFC PATCH 0/2] arm64: add SMCCC cache invalidation backend for memregion users Srirangan Madhavan
2026-05-21  7:30 ` [RFC PATCH 1/2] arm64: smccc: add cache clean/invalidate IDs and return codes Srirangan Madhavan
2026-05-21  7:30 ` [RFC PATCH 2/2] arm64: mm: add SMCCC-backed cache invalidate provider Srirangan Madhavan
2026-05-21 11:18   ` Jonathan Cameron
2026-05-21 14:12     ` Conor Dooley
2026-05-21 16:35     ` Catalin Marinas
2026-05-21 20:10   ` Dan Williams (nvidia)
2026-05-21 11:28 ` [RFC PATCH 0/2] arm64: add SMCCC cache invalidation backend for memregion users Jonathan Cameron

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.