* [PATCH v2] firmware: arm_ffa: Use the correct buffer size during RXTX_MAP
@ 2026-04-02 11:39 Sebastian Ene
2026-04-07 10:06 ` Sudeep Holla
0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Ene @ 2026-04-02 11:39 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, android-kvm; +Cc: sudeep.holla, Sebastian Ene
Don't use the discovered buffer size from an FFA_FEATURES call directly
since we can run on a system that has the PAGE_SIZE larger than the
returned size which makes the alloc_pages_exact for the buffer to be
rounded up.
Fixes: 61824feae5c0 ("firmware: arm_ffa: Fetch the Rx/Tx buffer size using ffa_features()")
Signed-off-by: Sebastian Ene <sebastianene@google.com>
---
v1 -> v2:
* use the correct macro PAGE_ALIGN when calculating the size of the buffer
---
drivers/firmware/arm_ffa/driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/arm_ffa/driver.c b/drivers/firmware/arm_ffa/driver.c
index f2f94d4d533e..eb2782848283 100644
--- a/drivers/firmware/arm_ffa/driver.c
+++ b/drivers/firmware/arm_ffa/driver.c
@@ -2078,7 +2078,7 @@ static int __init ffa_init(void)
ret = ffa_rxtx_map(virt_to_phys(drv_info->tx_buffer),
virt_to_phys(drv_info->rx_buffer),
- rxtx_bufsz / FFA_PAGE_SIZE);
+ PAGE_ALIGN(rxtx_bufsz) / FFA_PAGE_SIZE);
if (ret) {
pr_err("failed to register FFA RxTx buffers\n");
goto free_pages;
--
2.53.0.1213.gd9a14994de-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] firmware: arm_ffa: Use the correct buffer size during RXTX_MAP
2026-04-02 11:39 [PATCH v2] firmware: arm_ffa: Use the correct buffer size during RXTX_MAP Sebastian Ene
@ 2026-04-07 10:06 ` Sudeep Holla
0 siblings, 0 replies; 2+ messages in thread
From: Sudeep Holla @ 2026-04-07 10:06 UTC (permalink / raw)
To: linux-arm-kernel, linux-kernel, android-kvm, Sebastian Ene; +Cc: Sudeep Holla
On Thu, 02 Apr 2026 11:39:39 +0000, Sebastian Ene wrote:
> Don't use the discovered buffer size from an FFA_FEATURES call directly
> since we can run on a system that has the PAGE_SIZE larger than the
> returned size which makes the alloc_pages_exact for the buffer to be
> rounded up.
Applied to sudeep.holla/linux (for-next/ffa/fixes), thanks!
[1/1] firmware: arm_ffa: Use the correct buffer size during RXTX_MAP
https://git.kernel.org/sudeep.holla/c/83210251fd70
--
Regards,
Sudeep
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-07 10:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 11:39 [PATCH v2] firmware: arm_ffa: Use the correct buffer size during RXTX_MAP Sebastian Ene
2026-04-07 10:06 ` Sudeep Holla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox