forked from openbmc/linux
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
irqchip/gic-v2: Parse and export virtual GIC information
For now, the firmware tables are parsed 2 times: once in the GIC drivers, the other timer when initializing the vGIC. It means code duplication and make more tedious to add the support for another firmware table (like ACPI). Introduce a new structure and set of helpers to get/set the virtual GIC information. Also fill up the structure for GICv2. Signed-off-by: Julien Grall <julien.grall@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
- Loading branch information
Showing
4 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* include/linux/irqchip/arm-gic-common.h | ||
* | ||
* Copyright (C) 2016 ARM Limited, All Rights Reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2 as | ||
* published by the Free Software Foundation. | ||
*/ | ||
#ifndef __LINUX_IRQCHIP_ARM_GIC_COMMON_H | ||
#define __LINUX_IRQCHIP_ARM_GIC_COMMON_H | ||
|
||
#include <linux/types.h> | ||
#include <linux/ioport.h> | ||
|
||
enum gic_type { | ||
GIC_V2, | ||
}; | ||
|
||
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; | ||
}; | ||
|
||
const struct gic_kvm_info *gic_get_kvm_info(void); | ||
|
||
#endif /* __LINUX_IRQCHIP_ARM_GIC_COMMON_H */ |