From 0184450b8b1e7734110472616c4758839e1aff96 Mon Sep 17 00:00:00 2001 From: Sudeep Holla Date: Thu, 5 Oct 2023 15:45:02 +0100 Subject: firmware: arm_ffa: Add schedule receiver callback mechanism Enable client drivers to register a callback function that will be called when one or more notifications are pending for a target partition as part of schedule receiver interrupt handling. Link: https://lore.kernel.org/r/20231005-ffa_v1-1_notif-v4-9-cddd3237809c@arm.com Signed-off-by: Sudeep Holla --- include/linux/arm_ffa.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/linux/arm_ffa.h') diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h index 12fd134bf670..f9cf6114ef82 100644 --- a/include/linux/arm_ffa.h +++ b/include/linux/arm_ffa.h @@ -391,11 +391,19 @@ struct ffa_cpu_ops { int (*run)(struct ffa_device *dev, u16 vcpu); }; +typedef void (*ffa_sched_recv_cb)(u16 vcpu, bool is_per_vcpu, void *cb_data); +struct ffa_notifier_ops { + int (*sched_recv_cb_register)(struct ffa_device *dev, + ffa_sched_recv_cb cb, void *cb_data); + int (*sched_recv_cb_unregister)(struct ffa_device *dev); +}; + struct ffa_ops { const struct ffa_info_ops *info_ops; const struct ffa_msg_ops *msg_ops; const struct ffa_mem_ops *mem_ops; const struct ffa_cpu_ops *cpu_ops; + const struct ffa_notifier_ops *notifier_ops; }; #endif /* _LINUX_ARM_FFA_H */ -- cgit