Skip to content

Commit 8321025

Browse files
Sebastian EneSudeep Holla
authored andcommitted
firmware: arm_ffa: Use the correct buffer size during RXTX_MAP
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: 61824fe ("firmware: arm_ffa: Fetch the Rx/Tx buffer size using ffa_features()") Signed-off-by: Sebastian Ene <sebastianene@google.com> Link: https://patch.msgid.link/20260402113939.930221-1-sebastianene@google.com Signed-off-by: Sudeep Holla <sudeep.holla@kernel.org>
1 parent 6de23f8 commit 8321025

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/firmware/arm_ffa/driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2078,7 +2078,7 @@ static int __init ffa_init(void)
20782078

20792079
ret = ffa_rxtx_map(virt_to_phys(drv_info->tx_buffer),
20802080
virt_to_phys(drv_info->rx_buffer),
2081-
rxtx_bufsz / FFA_PAGE_SIZE);
2081+
PAGE_ALIGN(rxtx_bufsz) / FFA_PAGE_SIZE);
20822082
if (ret) {
20832083
pr_err("failed to register FFA RxTx buffers\n");
20842084
goto free_pages;

0 commit comments

Comments
 (0)