@@ -173,6 +173,19 @@ static int sdei_api_event_get_info(u32 event, u32 info, u64 *result)
0, 0, result);
}
+int sdei_event_get_info(u32 event, u32 info, u64 *result)
+{
+ int err;
+
+ mutex_lock(&sdei_events_lock);
+
+ err = sdei_api_event_get_info(event, info, result);
+
+ mutex_unlock(&sdei_events_lock);
+
+ return err;
+}
+
static struct sdei_event *sdei_event_create(u32 event_num,
sdei_event_callback *cb,
void *cb_arg)
@@ -64,6 +64,7 @@ struct sdei_event {
};
/* APIs */
+int sdei_event_get_info(u32 event, u32 info, u64 *result);
struct sdei_event *sdei_event_register(u32 event_num,
sdei_event_callback *cb, void *arg);
int sdei_event_unregister(struct sdei_event *event);
This adds API sdei_event_get_info(), to be used when virtualized SDEI is supported to retrieve the information about the specified event. Signed-off-by: Gavin Shan <gshan@redhat.com> --- drivers/firmware/arm_sdei.c | 13 +++++++++++++ include/linux/arm_sdei.h | 1 + 2 files changed, 14 insertions(+)