[PATCH 14/14] drivers/firmware/sdei: Add sdei_event_get_info()
Gavin Shan
gshan at redhat.com
Mon Jul 6 01:47:32 EDT 2020
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 at redhat.com>
---
drivers/firmware/arm_sdei.c | 13 +++++++++++++
include/linux/arm_sdei.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
index c6bd43914ea0..d5aadf99d0c1 100644
--- a/drivers/firmware/arm_sdei.c
+++ b/drivers/firmware/arm_sdei.c
@@ -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)
diff --git a/include/linux/arm_sdei.h b/include/linux/arm_sdei.h
index 36003751e26e..11dd66273209 100644
--- a/include/linux/arm_sdei.h
+++ b/include/linux/arm_sdei.h
@@ -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);
--
2.23.0
More information about the linux-arm-kernel
mailing list