blob: 9a1a479a2bf45495675561cdf7d23a5f74a6a2e0 [file] [log] [blame]
Julien Grall502d6df2016-04-11 16:32:54 +01001/*
2 * include/linux/irqchip/arm-gic-common.h
3 *
4 * Copyright (C) 2016 ARM Limited, All Rights Reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10#ifndef __LINUX_IRQCHIP_ARM_GIC_COMMON_H
11#define __LINUX_IRQCHIP_ARM_GIC_COMMON_H
12
13#include <linux/types.h>
14#include <linux/ioport.h>
15
Julien Thierry2130b782018-08-28 16:51:18 +010016#define GICD_INT_DEF_PRI 0xa0
17#define GICD_INT_DEF_PRI_X4 ((GICD_INT_DEF_PRI << 24) |\
18 (GICD_INT_DEF_PRI << 16) |\
19 (GICD_INT_DEF_PRI << 8) |\
20 GICD_INT_DEF_PRI)
21
Julien Grall502d6df2016-04-11 16:32:54 +010022enum gic_type {
23 GIC_V2,
Julien Grall1839e572016-04-11 16:32:57 +010024 GIC_V3,
Julien Grall502d6df2016-04-11 16:32:54 +010025};
26
27struct gic_kvm_info {
28 /* GIC type */
29 enum gic_type type;
30 /* Virtual CPU interface */
31 struct resource vcpu;
32 /* Interrupt number */
33 unsigned int maint_irq;
34 /* Virtual control interface */
35 struct resource vctrl;
Marc Zyngier4bdf5022017-06-25 14:10:46 +010036 /* vlpi support */
37 bool has_v4;
Julien Grall502d6df2016-04-11 16:32:54 +010038};
39
40const struct gic_kvm_info *gic_get_kvm_info(void);
41
42#endif /* __LINUX_IRQCHIP_ARM_GIC_COMMON_H */