summaryrefslogtreecommitdiff
path: root/include/linux/arm_ffa.h
diff options
context:
space:
mode:
authorMarc Bonnici <marc.bonnici@arm.com>2021-10-15 17:57:42 +0100
committerSudeep Holla <sudeep.holla@arm.com>2021-10-18 13:11:06 +0100
commit82a8daaecfd9382e9450a05f86be8a274cf69a27 (patch)
treed7eb418850dc994495b0cd06f1ff0f30ef1bbc3e /include/linux/arm_ffa.h
parent8e3f9da608f14cfebac2659d8dd8737b79d01308 (diff)
firmware: arm_ffa: Add support for MEM_LEND
As part of the FF-A spec, an endpoint is allowed to transfer access of, or lend, a memory region to one or more borrowers. Extend the existing memory sharing implementation to support FF-A MEM_LEND functionality and expose this to other kernel drivers. Note that upon a successful MEM_LEND request the caller must ensure that the memory region specified is not accessed until a successful MEM_RECALIM call has been made. On systems with a hypervisor present this will been enforced, however on systems without a hypervisor the responsibility falls to the calling kernel driver to prevent access. Link: https://lore.kernel.org/r/20211015165742.2513065-1-marc.bonnici@arm.com Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Marc Bonnici <marc.bonnici@arm.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/linux/arm_ffa.h')
-rw-r--r--include/linux/arm_ffa.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h
index 505c679b6a9b..85651e41ded8 100644
--- a/include/linux/arm_ffa.h
+++ b/include/linux/arm_ffa.h
@@ -262,6 +262,8 @@ struct ffa_dev_ops {
int (*memory_reclaim)(u64 g_handle, u32 flags);
int (*memory_share)(struct ffa_device *dev,
struct ffa_mem_ops_args *args);
+ int (*memory_lend)(struct ffa_device *dev,
+ struct ffa_mem_ops_args *args);
};
#endif /* _LINUX_ARM_FFA_H */