2019-06-04 15:11:33 +07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2016-04-11 22:32:54 +07:00
|
|
|
/*
|
|
|
|
* include/linux/irqchip/arm-gic-common.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016 ARM Limited, All Rights Reserved.
|
|
|
|
*/
|
|
|
|
#ifndef __LINUX_IRQCHIP_ARM_GIC_COMMON_H
|
|
|
|
#define __LINUX_IRQCHIP_ARM_GIC_COMMON_H
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/ioport.h>
|
|
|
|
|
2018-08-28 22:51:18 +07:00
|
|
|
#define GICD_INT_DEF_PRI 0xa0
|
|
|
|
#define GICD_INT_DEF_PRI_X4 ((GICD_INT_DEF_PRI << 24) |\
|
|
|
|
(GICD_INT_DEF_PRI << 16) |\
|
|
|
|
(GICD_INT_DEF_PRI << 8) |\
|
|
|
|
GICD_INT_DEF_PRI)
|
|
|
|
|
2016-04-11 22:32:54 +07:00
|
|
|
enum gic_type {
|
|
|
|
GIC_V2,
|
2016-04-11 22:32:57 +07:00
|
|
|
GIC_V3,
|
2016-04-11 22:32:54 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct gic_kvm_info {
|
|
|
|
/* GIC type */
|
|
|
|
enum gic_type type;
|
|
|
|
/* Virtual CPU interface */
|
|
|
|
struct resource vcpu;
|
|
|
|
/* Interrupt number */
|
|
|
|
unsigned int maint_irq;
|
|
|
|
/* Virtual control interface */
|
|
|
|
struct resource vctrl;
|
2017-06-25 20:10:46 +07:00
|
|
|
/* vlpi support */
|
|
|
|
bool has_v4;
|
2020-03-05 03:33:13 +07:00
|
|
|
/* rvpeid support */
|
|
|
|
bool has_v4_1;
|
2016-04-11 22:32:54 +07:00
|
|
|
};
|
|
|
|
|
|
|
|
const struct gic_kvm_info *gic_get_kvm_info(void);
|
|
|
|
|
2019-06-10 17:52:01 +07:00
|
|
|
struct irq_domain;
|
|
|
|
struct fwnode_handle;
|
|
|
|
int gicv2m_init(struct fwnode_handle *parent_handle,
|
|
|
|
struct irq_domain *parent);
|
|
|
|
|
2016-04-11 22:32:54 +07:00
|
|
|
#endif /* __LINUX_IRQCHIP_ARM_GIC_COMMON_H */
|