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