1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 #ifndef ASM__RISCV__IRQ_H 3 #define ASM__RISCV__IRQ_H 4 5 #include <xen/bug.h> 6 #include <xen/device_tree.h> 7 8 #include <asm/irq-dt.h> 9 10 /* 11 * According to the AIA spec: 12 * The maximum number of interrupt sources an APLIC may support is 1023. 13 * 14 * The same is true for PLIC. 15 * 16 * Interrupt Source 0 is reserved and shall never generate an interrupt. 17 */ 18 #define NR_IRQS 1024 19 20 #define IRQ_NO_PRIORITY 0 21 22 /* TODO */ 23 #define nr_irqs 0U 24 #define nr_static_irqs 0 25 #define arch_hwdom_irqs(domid) 0U 26 27 #define domain_pirq_to_irq(d, pirq) (pirq) 28 29 #define arch_evtchn_bind_pirq(d, pirq) ((void)((d) + (pirq))) 30 31 struct arch_pirq { 32 }; 33 34 struct arch_irq_desc { 35 unsigned int type; 36 }; 37 38 struct cpu_user_regs; 39 struct dt_device_node; 40 arch_move_irqs(struct vcpu * v)41static inline void arch_move_irqs(struct vcpu *v) 42 { 43 BUG_ON("unimplemented"); 44 } 45 46 int platform_get_irq(const struct dt_device_node *device, int index); 47 48 void init_IRQ(void); 49 50 void do_IRQ(struct cpu_user_regs *regs, unsigned int irq); 51 52 #endif /* ASM__RISCV__IRQ_H */ 53 54 /* 55 * Local variables: 56 * mode: C 57 * c-file-style: "BSD" 58 * c-basic-offset: 4 59 * indent-tabs-mode: nil 60 * End: 61 */ 62