Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * include/linux/irqchip/arm-vgic-info.h
0004  *
0005  * Copyright (C) 2016 ARM Limited, All Rights Reserved.
0006  */
0007 #ifndef __LINUX_IRQCHIP_ARM_VGIC_INFO_H
0008 #define __LINUX_IRQCHIP_ARM_VGIC_INFO_H
0009 
0010 #include <linux/types.h>
0011 #include <linux/ioport.h>
0012 
0013 enum gic_type {
0014     /* Full GICv2 */
0015     GIC_V2,
0016     /* Full GICv3, optionally with v2 compat */
0017     GIC_V3,
0018 };
0019 
0020 struct gic_kvm_info {
0021     /* GIC type */
0022     enum gic_type   type;
0023     /* Virtual CPU interface */
0024     struct resource vcpu;
0025     /* Interrupt number */
0026     unsigned int    maint_irq;
0027     /* No interrupt mask, no need to use the above field */
0028     bool        no_maint_irq_mask;
0029     /* Virtual control interface */
0030     struct resource vctrl;
0031     /* vlpi support */
0032     bool        has_v4;
0033     /* rvpeid support */
0034     bool        has_v4_1;
0035     /* Deactivation impared, subpar stuff */
0036     bool        no_hw_deactivation;
0037 };
0038 
0039 #ifdef CONFIG_KVM
0040 void vgic_set_kvm_info(const struct gic_kvm_info *info);
0041 #else
0042 static inline void vgic_set_kvm_info(const struct gic_kvm_info *info) {}
0043 #endif
0044 
0045 #endif