.. | .. |
---|
5 | 5 | |
---|
6 | 6 | #include <uapi/linux/arm_sdei.h> |
---|
7 | 7 | |
---|
8 | | -enum sdei_conduit_types { |
---|
9 | | - CONDUIT_INVALID = 0, |
---|
10 | | - CONDUIT_SMC, |
---|
11 | | - CONDUIT_HVC, |
---|
12 | | -}; |
---|
| 8 | +#include <acpi/ghes.h> |
---|
13 | 9 | |
---|
| 10 | +#ifdef CONFIG_ARM_SDE_INTERFACE |
---|
14 | 11 | #include <asm/sdei.h> |
---|
| 12 | +#endif |
---|
15 | 13 | |
---|
16 | 14 | /* Arch code should override this to set the entry point from firmware... */ |
---|
17 | 15 | #ifndef sdei_arch_get_entry_point |
---|
.. | .. |
---|
40 | 38 | int sdei_event_disable(u32 event_num); |
---|
41 | 39 | |
---|
42 | 40 | #ifdef CONFIG_FIQ_DEBUGGER_TRUST_ZONE |
---|
| 41 | +#ifdef CONFIG_ARM_SDE_INTERFACE |
---|
43 | 42 | int sdei_event_enable_nolock(u32 event_num); |
---|
44 | 43 | int sdei_event_disable_nolock(u32 event_num); |
---|
45 | 44 | int sdei_event_routing_set_nolock(u32 event_num, unsigned long flags, |
---|
46 | 45 | unsigned long affinity); |
---|
47 | 46 | int sdei_event_routing_set(u32 event_num, unsigned long flags, |
---|
48 | 47 | 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); |
---|
50 | 91 | |
---|
51 | 92 | #ifdef CONFIG_ARM_SDE_INTERFACE |
---|
52 | 93 | /* For use by arch code when CPU hotplug notifiers are not appropriate. */ |
---|
53 | 94 | int sdei_mask_local_cpu(void); |
---|
54 | 95 | int sdei_unmask_local_cpu(void); |
---|
| 96 | +void __init sdei_init(void); |
---|
| 97 | +void sdei_handler_abort(void); |
---|
55 | 98 | #else |
---|
56 | 99 | static inline int sdei_mask_local_cpu(void) { return 0; } |
---|
57 | 100 | 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) { } |
---|
58 | 103 | #endif /* CONFIG_ARM_SDE_INTERFACE */ |
---|
59 | 104 | |
---|
60 | 105 | |
---|