Arm FF-A fix for v7.1

Use the page aligned backing allocation size when computing the RXTX_MAP
 page count. This fixes FF-A RX/TX buffer registration on kernels built
 with 16K/64K PAGE_SIZE, where alloc_pages_exact() backs the buffer with a
 larger aligned span than the discovered minimum buffer size.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEunHlEgbzHrJD3ZPhAEG6vDF+4pgFAmnU1mgACgkQAEG6vDF+
 4pgxLRAA2Ajhzi3ckYBv10LqiOoRVqW9MscCCub6+lmByt0Yh1ZyzyOOrEeMDU0a
 U/GxU4qkImflmcm5bZ7etADEkZVzvjg3Bj3e9riZ7yPaX2tHgwUx3H4ULHpyVGgP
 uOFf2bsvduDnMMpm4E2f8ra5YPHyklCcQ6H+U0oH+uqnxzbmvPwenP8TIsTZ9lBD
 7TMZMvw2bySUmLn/eBnUVU9HJkuNdhCz+VLKEcXlsvx2poeUxQDMzrD+qOvBF9AQ
 OZnVoCuBSDH71nuKFVPfXKEMZz1XXlhOmDuLHUHEHc9Bm5tOruHV8gQB8PluDHhI
 SMXBPTKjuJekD17ivlMFD5agEmhUFXUsqT5Tjp9f4jUD9PHYQa2jtd6qmPSKw768
 aufBt0EQQhdN4V0vdnn1g51exKQKPC8bxhL5NiURVlRQ0gEcKSxm1i0Y7Pn09kuS
 goFXKmsXNEpHS8W59hWALgS46oSTMmVBg4ymwJ/aZ5bhUd+ywtNB8avLO84FoFSJ
 nyd0ndzTpTQk+ZTP19SglIPgAgSwtr9nGpdfOiB2lN63dCiS6M/k+p4hqyp5ReIp
 RjKF1znEZHaLnS4SmX+ktZhoEwPWIyLnSIeZ2n0FoJF9gQKS3uom3DBBM0eax70/
 M5aFF4pLwe+dAUlO0/zLzyHSfgDPpRhBpGZJGkZwtZKDWBPl7cc=
 =ceS/
 -----END PGP SIGNATURE-----

Merge tag 'ffa-fix-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into soc/drivers

Arm FF-A fix for v7.1

Use the page aligned backing allocation size when computing the RXTX_MAP
page count. This fixes FF-A RX/TX buffer registration on kernels built
with 16K/64K PAGE_SIZE, where alloc_pages_exact() backs the buffer with a
larger aligned span than the discovered minimum buffer size.

* tag 'ffa-fix-7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux:
  firmware: arm_ffa: Use the correct buffer size during RXTX_MAP

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
This commit is contained in:
Krzysztof Kozlowski 2026-04-11 10:48:50 +02:00
commit 33a20cdaf4

View File

@ -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;