diff options
| author | Seth Forshee <sforshee@nvidia.com> | 2026-06-02 21:54:06 +0000 |
|---|---|---|
| committer | Sudeep Holla <sudeep.holla@arm.com> | 2026-06-29 10:42:56 +0100 |
| commit | 53716a4d745f1dac7aff33f3d1494b701eb2f888 (patch) | |
| tree | 76eadbb93e9054ea7eb8ad11145b56c4991f2791 /Documentation/tty/git@git.tavy.me:linux.git | |
| parent | dc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff) | |
firmware: arm_ffa: Respect firmware advertised RX/TX buffer size limits
FFA_FEATURES reports the minimum size and alignment boundary required
for RXTX_MAP. In FF-A v1.2 and later it can also report a maximum buffer
size, with zero meaning that no maximum is enforced.
The driver only used the minimum value and then rounded it up to PAGE_SIZE
before invoking RXTX_MAP after commit 83210251fd70 ("firmware: arm_ffa:
Use the correct buffer size during RXTX_MAP"). On systems where PAGE_SIZE
is larger than the advertised minimum, this can exceed a non-zero maximum
reported by firmware. Older implementations do not advertise a maximum and
may also reject the rounded-up size.
Decode the maximum size and clamp the page-aligned minimum to it when it
is present. If no maximum is advertised and RXTX_MAP rejects the rounded
size with INVALID_PARAMETERS, retry with the advertised minimum size.
Record drv_info->rxtx_bufsz only after RXTX_MAP succeeds so it reflects
the size registered with firmware.
While there, also update RXTX_MAP_MIN_BUFSZ() to use FIELD_GET() for
consistency.
Fixes: 83210251fd70 ("firmware: arm_ffa: Use the correct buffer size during RXTX_MAP")
Suggested-by: Sudeep Holla <sudeep.holla@kernel.org>
Signed-off-by: Seth Forshee <sforshee@nvidia.com>
Link: https://patch.msgid.link/20260602-b4-ffa-rxtx-map-fixes-v2-1-7cb06508da84@nvidia.com
(sudeep.holla: Minor rewording subject and commit message)
Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
Diffstat (limited to 'Documentation/tty/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
