hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/linux/arm_sdei.h
....@@ -5,13 +5,11 @@
55
66 #include <uapi/linux/arm_sdei.h>
77
8
-enum sdei_conduit_types {
9
- CONDUIT_INVALID = 0,
10
- CONDUIT_SMC,
11
- CONDUIT_HVC,
12
-};
8
+#include <acpi/ghes.h>
139
10
+#ifdef CONFIG_ARM_SDE_INTERFACE
1411 #include <asm/sdei.h>
12
+#endif
1513
1614 /* Arch code should override this to set the entry point from firmware... */
1715 #ifndef sdei_arch_get_entry_point
....@@ -40,21 +38,68 @@
4038 int sdei_event_disable(u32 event_num);
4139
4240 #ifdef CONFIG_FIQ_DEBUGGER_TRUST_ZONE
41
+#ifdef CONFIG_ARM_SDE_INTERFACE
4342 int sdei_event_enable_nolock(u32 event_num);
4443 int sdei_event_disable_nolock(u32 event_num);
4544 int sdei_event_routing_set_nolock(u32 event_num, unsigned long flags,
4645 unsigned long affinity);
4746 int sdei_event_routing_set(u32 event_num, unsigned long flags,
4847 unsigned long affinity);
49
-#endif
48
+int sdei_interrupt_bind(u32 intr_num, u32 *event_num);
49
+int sdei_interrupt_release(u32 event_num);
50
+#else
51
+static inline int sdei_event_enable_nolock(u32 event_num)
52
+{
53
+ return SDEI_NOT_SUPPORTED;
54
+}
55
+
56
+static inline int sdei_event_disable_nolock(u32 event_num)
57
+{
58
+ return SDEI_NOT_SUPPORTED;
59
+}
60
+
61
+static inline int sdei_event_routing_set_nolock(u32 event_num,
62
+ unsigned long flags,
63
+ unsigned long affinity)
64
+{
65
+ return SDEI_NOT_SUPPORTED;
66
+}
67
+
68
+static inline int sdei_event_routing_set(u32 event_num,
69
+ unsigned long flags,
70
+ unsigned long affinity)
71
+{
72
+ return SDEI_NOT_SUPPORTED;
73
+}
74
+
75
+static inline int sdei_interrupt_bind(u32 intr_num, u32 *event_num)
76
+{
77
+ return SDEI_NOT_SUPPORTED;
78
+}
79
+
80
+static inline int sdei_interrupt_release(u32 event_num)
81
+{
82
+ return SDEI_NOT_SUPPORTED;
83
+}
84
+#endif /* CONFIG_ARM_SDE_INTERFACE */
85
+#endif /* CONFIG_FIQ_DEBUGGER_TRUST_ZONE */
86
+
87
+/* GHES register/unregister helpers */
88
+int sdei_register_ghes(struct ghes *ghes, sdei_event_callback *normal_cb,
89
+ sdei_event_callback *critical_cb);
90
+int sdei_unregister_ghes(struct ghes *ghes);
5091
5192 #ifdef CONFIG_ARM_SDE_INTERFACE
5293 /* For use by arch code when CPU hotplug notifiers are not appropriate. */
5394 int sdei_mask_local_cpu(void);
5495 int sdei_unmask_local_cpu(void);
96
+void __init sdei_init(void);
97
+void sdei_handler_abort(void);
5598 #else
5699 static inline int sdei_mask_local_cpu(void) { return 0; }
57100 static inline int sdei_unmask_local_cpu(void) { return 0; }
101
+static inline void sdei_init(void) { }
102
+static inline void sdei_handler_abort(void) { }
58103 #endif /* CONFIG_ARM_SDE_INTERFACE */
59104
60105