xref: /linux/tools/testing/selftests/kvm/lib/aarch64/gic_private.h (revision f4b0c4b508364fde023e4f7b9f23f7e38c663dfe)
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 	uint64_t (*gic_read_iar)(void);
16 	void (*gic_write_eoir)(uint32_t irq);
17 	void (*gic_write_dir)(uint32_t irq);
18 	void (*gic_set_eoi_split)(bool split);
19 	void (*gic_set_priority_mask)(uint64_t mask);
20 	void (*gic_set_priority)(uint32_t intid, uint32_t prio);
21 	void (*gic_irq_set_active)(uint32_t intid);
22 	void (*gic_irq_clear_active)(uint32_t intid);
23 	bool (*gic_irq_get_active)(uint32_t intid);
24 	void (*gic_irq_set_pending)(uint32_t intid);
25 	void (*gic_irq_clear_pending)(uint32_t intid);
26 	bool (*gic_irq_get_pending)(uint32_t intid);
27 	void (*gic_irq_set_config)(uint32_t intid, bool is_edge);
28 };
29 
30 extern const struct gic_common_ops gicv3_ops;
31 
32 #endif /* SELFTEST_KVM_GIC_PRIVATE_H */
33