1*67730e6cSSean Christopherson /* SPDX-License-Identifier: GPL-2.0 */ 2*67730e6cSSean Christopherson /* 3*67730e6cSSean Christopherson * ARM Generic Interrupt Controller (GIC) private defines that's only 4*67730e6cSSean Christopherson * shared among the GIC library code. 5*67730e6cSSean Christopherson */ 6*67730e6cSSean Christopherson 7*67730e6cSSean Christopherson #ifndef SELFTEST_KVM_GIC_PRIVATE_H 8*67730e6cSSean Christopherson #define SELFTEST_KVM_GIC_PRIVATE_H 9*67730e6cSSean Christopherson 10*67730e6cSSean Christopherson struct gic_common_ops { 11*67730e6cSSean Christopherson void (*gic_init)(unsigned int nr_cpus); 12*67730e6cSSean Christopherson void (*gic_cpu_init)(unsigned int cpu); 13*67730e6cSSean Christopherson void (*gic_irq_enable)(unsigned int intid); 14*67730e6cSSean Christopherson void (*gic_irq_disable)(unsigned int intid); 15*67730e6cSSean Christopherson uint64_t (*gic_read_iar)(void); 16*67730e6cSSean Christopherson void (*gic_write_eoir)(uint32_t irq); 17*67730e6cSSean Christopherson void (*gic_write_dir)(uint32_t irq); 18*67730e6cSSean Christopherson void (*gic_set_eoi_split)(bool split); 19*67730e6cSSean Christopherson void (*gic_set_priority_mask)(uint64_t mask); 20*67730e6cSSean Christopherson void (*gic_set_priority)(uint32_t intid, uint32_t prio); 21*67730e6cSSean Christopherson void (*gic_irq_set_active)(uint32_t intid); 22*67730e6cSSean Christopherson void (*gic_irq_clear_active)(uint32_t intid); 23*67730e6cSSean Christopherson bool (*gic_irq_get_active)(uint32_t intid); 24*67730e6cSSean Christopherson void (*gic_irq_set_pending)(uint32_t intid); 25*67730e6cSSean Christopherson void (*gic_irq_clear_pending)(uint32_t intid); 26*67730e6cSSean Christopherson bool (*gic_irq_get_pending)(uint32_t intid); 27*67730e6cSSean Christopherson void (*gic_irq_set_config)(uint32_t intid, bool is_edge); 28*67730e6cSSean Christopherson }; 29*67730e6cSSean Christopherson 30*67730e6cSSean Christopherson extern const struct gic_common_ops gicv3_ops; 31*67730e6cSSean Christopherson 32*67730e6cSSean Christopherson #endif /* SELFTEST_KVM_GIC_PRIVATE_H */ 33