Unverified Commit dfc80d65 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

Merge tag 'ffa-fix-7.0' of...

Merge tag 'ffa-fix-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux into arm/fixes

Arm FF-A fix for v7.0

Fix removing the vm_id argument from ffa_rxtx_unmap(), as the FF-A
specification mandates this field be zero in all contexts except a
non-secure physical FF-A instance, where the ID is inherently 0.

* tag 'ffa-fix-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/sudeep.holla/linux

:
  firmware: arm_ffa: Remove vm_id argument in ffa_rxtx_unmap()

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents b3315ba0 a4e8473b
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -205,12 +205,12 @@ static int ffa_rxtx_map(phys_addr_t tx_buf, phys_addr_t rx_buf, u32 pg_cnt)
	return 0;
}

static int ffa_rxtx_unmap(u16 vm_id)
static int ffa_rxtx_unmap(void)
{
	ffa_value_t ret;

	invoke_ffa_fn((ffa_value_t){
		      .a0 = FFA_RXTX_UNMAP, .a1 = PACK_TARGET_INFO(vm_id, 0),
		      .a0 = FFA_RXTX_UNMAP,
		      }, &ret);

	if (ret.a0 == FFA_ERROR)
@@ -2097,7 +2097,7 @@ static int __init ffa_init(void)

	pr_err("failed to setup partitions\n");
	ffa_notifications_cleanup();
	ffa_rxtx_unmap(drv_info->vm_id);
	ffa_rxtx_unmap();
free_pages:
	if (drv_info->tx_buffer)
		free_pages_exact(drv_info->tx_buffer, rxtx_bufsz);
@@ -2112,7 +2112,7 @@ static void __exit ffa_exit(void)
{
	ffa_notifications_cleanup();
	ffa_partitions_cleanup();
	ffa_rxtx_unmap(drv_info->vm_id);
	ffa_rxtx_unmap();
	free_pages_exact(drv_info->tx_buffer, drv_info->rxtx_bufsz);
	free_pages_exact(drv_info->rx_buffer, drv_info->rxtx_bufsz);
	kfree(drv_info);