1 /* SPDX-License-Identifier: GPL-2.0 */
5 #define EXT_INTERRUPT 0
7 #define THIN_INTERRUPT 2
11 #define NR_IRQS NR_IRQS_BASE
12 #define NR_IRQS_LEGACY NR_IRQS_BASE
14 /* External interruption codes */
15 #define EXT_IRQ_INTERRUPT_KEY 0x0040
16 #define EXT_IRQ_CLK_COMP 0x1004
17 #define EXT_IRQ_CPU_TIMER 0x1005
18 #define EXT_IRQ_WARNING_TRACK 0x1007
19 #define EXT_IRQ_MALFUNC_ALERT 0x1200
20 #define EXT_IRQ_EMERGENCY_SIG 0x1201
21 #define EXT_IRQ_EXTERNAL_CALL 0x1202
22 #define EXT_IRQ_TIMING_ALERT 0x1406
23 #define EXT_IRQ_MEASURE_ALERT 0x1407
24 #define EXT_IRQ_SERVICE_SIG 0x2401
25 #define EXT_IRQ_CP_SERVICE 0x2603
26 #define EXT_IRQ_IUCV 0x4000
30 #include <linux/hardirq.h>
31 #include <linux/percpu.h>
32 #include <linux/cache.h>
33 #include <linux/types.h>
34 #include <asm/ctlreg.h>
36 enum interruption_class {
75 unsigned int irqs[NR_ARCH_IRQS];
78 DECLARE_PER_CPU_SHARED_ALIGNED(struct irq_stat, irq_stat);
80 static __always_inline void inc_irq_stat(enum interruption_class irq)
82 __this_cpu_inc(irq_stat.irqs[irq]);
88 unsigned short subcode;
91 unsigned int int_code;
95 typedef void (*ext_int_handler_t)(struct ext_code, unsigned int, unsigned long);
97 int register_external_irq(u16 code, ext_int_handler_t handler);
98 int unregister_external_irq(u16 code, ext_int_handler_t handler);
101 IRQ_SUBCLASS_MEASUREMENT_ALERT = 5,
102 IRQ_SUBCLASS_SERVICE_SIGNAL = 9,
103 IRQ_SUBCLASS_WARNING_TRACK = 33,
106 #define CR0_IRQ_SUBCLASS_MASK \
107 (CR0_WARNING_TRACK | \
108 CR0_MALFUNCTION_ALERT_SUBMASK | \
109 CR0_EMERGENCY_SIGNAL_SUBMASK | \
110 CR0_EXTERNAL_CALL_SUBMASK | \
111 CR0_CLOCK_COMPARATOR_SUBMASK | \
112 CR0_CPU_TIMER_SUBMASK | \
113 CR0_SERVICE_SIGNAL_SUBMASK | \
114 CR0_INTERRUPT_KEY_SUBMASK | \
115 CR0_MEASUREMENT_ALERT_SUBMASK | \
119 void irq_subclass_register(enum irq_subclass subclass);
120 void irq_subclass_unregister(enum irq_subclass subclass);
122 #define irq_canonicalize(irq) (irq)
124 #endif /* __ASSEMBLY__ */
126 #endif /* _ASM_IRQ_H */