From: Ryan Roberts <ryan.roberts@arm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Jean-Philippe Brucker <jpb@kernel.org>,
Oded Gabbay <ogabbay@kernel.org>,
Jonathan Corbet <corbet@lwn.net>
Cc: Ryan Roberts <ryan.roberts@arm.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org
Subject: [RFC PATCH v1 0/8] Arm Core Local Accelerator Driver
Date: Fri, 17 Jul 2026 11:47:44 +0100 [thread overview]
Message-ID: <20260717104759.123203-1-ryan.roberts@arm.com> (raw)
Hi All,
This RFC introduces a driver for the Arm Core Local Accelerator (CLA), a
CPU-local interface for programming attached accelerators. While the interface
is agnostic to the accelerator type, the initial (and currently only) target is
a compute engine.
The RFC aims to engage the community and get feedback on some key aspects. This
will help plan our approach for eventual upstreaming. The patches implement a
bare bones driver to aid discussion. Arm plans to publish the CLA spec in
future, but for now I hope the documentation included with patch 1 suffices.
Note that the CLA is not part of the Arm Architecture.
Patch 1 documents the hardware and driver design, and adds a driver skeleton.
Patches 2-4 initialize and probe the device. Patches 5-8 add context management
for switching the device between different users.
Aspects I'm seeking feedback for:
* The general structure of the driver: The current shape addresses the
performance requirements we have for the use cases, and is therefore our
preferred approach. But there are some unusual aspects due to the HW design.
* Driver interaction with architectural support: I've opted to treat the CLA as
a device rather than a CPU extension, so it's implemented as a (mostly)
self-contained driver. It has some unavoidable coupling to the arch code since
it needs to share page tables and ASIDs (arm64_mm_context_[put|get]()).
* The location of the driver: although most accelerators will likely be compute
ones, CLA is a generic MMIO interface that could handle any kind of
accelerator. It's currently implemented as a misc driver. accel is another
potential option, but given the current SVA approach, we would not use any of
the services (memory-management or otherwise) that accel provides.
* User space availability: The kernel driver exposes the capabilities of the
hardware to user space. Arm plans to open source a user space driver, but does
not yet have any committed date. I'd like to understand if the availability of
this component will be a prerequisite for upstream acceptance of the kernel
driver; either way, I'm hoping we can at least progress with some discussion
in its absence.
I'm deliberately constraining the scope to bare-metal support for now.
Virtualization is something we are considering (and have prototyped), but plan
to post a separate RFC for that as follow-up, once we have agreement on
direction for the bare-metal driver.
Source, along with some tests, is available at [1]. Patches based on v7.2-rc3.
[1] https://gitlab.arm.com/linux-arm/linux-rr/-/tree/features/cla-driver-v1-rfc-tests
Thanks,
Ryan
Jean-Philippe Brucker (5):
misc/arm-cla: Add driver skeleton and documentation
misc/arm-cla: Add launch operation helpers
misc/arm-cla: Probe firmware-described devices
misc/arm-cla: Initialize devices on CPU bringup
misc/arm-cla: Accelerator context save and restore
Ryan Roberts (3):
misc/arm-cla: Set up memory translation context
misc/arm-cla: Manage domain contexts
misc/arm-cla: Add userspace interface
Documentation/misc-devices/arm-cla.rst | 206 ++++++++++
drivers/misc/Kconfig | 1 +
drivers/misc/Makefile | 1 +
drivers/misc/arm-cla/Kconfig | 10 +
drivers/misc/arm-cla/Makefile | 13 +
drivers/misc/arm-cla/arm-cla-regs.h | 179 +++++++++
drivers/misc/arm-cla/arm-cla.h | 296 +++++++++++++++
drivers/misc/arm-cla/cla-ctx.c | 142 +++++++
drivers/misc/arm-cla/cla-init.c | 503 +++++++++++++++++++++++++
drivers/misc/arm-cla/cla-mtc.c | 139 +++++++
drivers/misc/arm-cla/cla-ops.c | 342 +++++++++++++++++
drivers/misc/arm-cla/cla-regs.c | 263 +++++++++++++
drivers/misc/arm-cla/cla-sched.c | 474 +++++++++++++++++++++++
drivers/misc/arm-cla/cla-topology.c | 187 +++++++++
drivers/misc/arm-cla/cla-user.c | 351 +++++++++++++++++
include/uapi/linux/arm-cla.h | 207 ++++++++++
16 files changed, 3314 insertions(+)
create mode 100644 Documentation/misc-devices/arm-cla.rst
create mode 100644 drivers/misc/arm-cla/Kconfig
create mode 100644 drivers/misc/arm-cla/Makefile
create mode 100644 drivers/misc/arm-cla/arm-cla-regs.h
create mode 100644 drivers/misc/arm-cla/arm-cla.h
create mode 100644 drivers/misc/arm-cla/cla-ctx.c
create mode 100644 drivers/misc/arm-cla/cla-init.c
create mode 100644 drivers/misc/arm-cla/cla-mtc.c
create mode 100644 drivers/misc/arm-cla/cla-ops.c
create mode 100644 drivers/misc/arm-cla/cla-regs.c
create mode 100644 drivers/misc/arm-cla/cla-sched.c
create mode 100644 drivers/misc/arm-cla/cla-topology.c
create mode 100644 drivers/misc/arm-cla/cla-user.c
create mode 100644 include/uapi/linux/arm-cla.h
--
2.43.0
next reply other threads:[~2026-07-17 10:48 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 10:47 Ryan Roberts [this message]
2026-07-17 10:47 ` [RFC PATCH v1 1/8] misc/arm-cla: Add driver skeleton and documentation Ryan Roberts
2026-07-17 10:56 ` sashiko-bot
2026-07-17 13:49 ` Arnd Bergmann
2026-07-17 15:44 ` Ryan Roberts
2026-07-17 16:10 ` Arnd Bergmann
2026-07-17 10:47 ` [RFC PATCH v1 2/8] misc/arm-cla: Add launch operation helpers Ryan Roberts
2026-07-17 11:01 ` sashiko-bot
2026-07-17 12:16 ` Arnd Bergmann
2026-07-17 10:47 ` [RFC PATCH v1 3/8] misc/arm-cla: Probe firmware-described devices Ryan Roberts
2026-07-17 10:57 ` sashiko-bot
2026-07-17 12:25 ` Arnd Bergmann
2026-07-17 12:36 ` Ryan Roberts
2026-07-17 10:47 ` [RFC PATCH v1 4/8] misc/arm-cla: Initialize devices on CPU bringup Ryan Roberts
2026-07-17 10:58 ` sashiko-bot
2026-07-17 10:47 ` [RFC PATCH v1 5/8] misc/arm-cla: Accelerator context save and restore Ryan Roberts
2026-07-17 10:58 ` sashiko-bot
2026-07-17 10:47 ` [RFC PATCH v1 6/8] misc/arm-cla: Set up memory translation context Ryan Roberts
2026-07-17 11:02 ` sashiko-bot
2026-07-17 10:47 ` [RFC PATCH v1 7/8] misc/arm-cla: Manage domain contexts Ryan Roberts
2026-07-17 11:01 ` sashiko-bot
2026-07-17 10:47 ` [RFC PATCH v1 8/8] misc/arm-cla: Add userspace interface Ryan Roberts
2026-07-17 11:10 ` sashiko-bot
2026-07-17 12:54 ` Arnd Bergmann
2026-07-17 14:35 ` Ryan Roberts
2026-07-17 15:31 ` Arnd Bergmann
2026-07-17 16:21 ` Ryan Roberts
2026-07-17 20:11 ` Arnd Bergmann
2026-07-17 11:33 ` [RFC PATCH v1 0/8] Arm Core Local Accelerator Driver Will Deacon
2026-07-17 12:09 ` Marc Zyngier
2026-07-17 12:33 ` Ryan Roberts
2026-07-17 12:30 ` Ryan Roberts
2026-07-17 13:32 ` Jason Gunthorpe
2026-07-17 13:42 ` Ryan Roberts
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260717104759.123203-1-ryan.roberts@arm.com \
--to=ryan.roberts@arm.com \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=gregkh@linuxfoundation.org \
--cc=jpb@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=ogabbay@kernel.org \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.