[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH WIP v1 03/10] xen: arm: add platform hook for routing IRQ to guests
Tegra contains a secondary set of IRQ registers which dom0 wants to poke at, we will use this for that. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- xen/arch/arm/irq.c | 4 ++++ xen/arch/arm/platform.c | 6 ++++++ xen/include/asm-arm/platform.h | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c index cb9c99b..c574b92 100644 --- a/xen/arch/arm/irq.c +++ b/xen/arch/arm/irq.c @@ -27,6 +27,7 @@ #include <asm/gic.h> #include <asm/vgic.h> +#include <asm/platform.h> static unsigned int local_irqs_type[NR_LOCAL_IRQS]; static DEFINE_SPINLOCK(local_irqs_type_lock); @@ -423,6 +424,9 @@ int route_irq_to_guest(struct domain *d, unsigned int irq, gic_route_irq_to_guest(d, desc, cpumask_of(smp_processor_id()), GIC_PRI_IRQ); + + platform_route_irq_to_guest(d, desc); + spin_unlock_irqrestore(&desc->lock, flags); return 0; diff --git a/xen/arch/arm/platform.c b/xen/arch/arm/platform.c index 86daf2b..c58e251 100644 --- a/xen/arch/arm/platform.c +++ b/xen/arch/arm/platform.c @@ -160,6 +160,12 @@ bool_t platform_device_is_blacklisted(const struct dt_device_node *node) return (dt_match_node(blacklist, node) != NULL); } +void platform_route_irq_to_guest(struct domain *d, struct irq_desc *desc) +{ + if ( platform && platform->route_irq_to_guest ) + platform->route_irq_to_guest(d, desc); +} + void platform_dom0_gnttab(paddr_t *start, paddr_t *size) { if ( platform && platform->dom0_gnttab_size ) diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h index 4eba37b..22d1f8b 100644 --- a/xen/include/asm-arm/platform.h +++ b/xen/include/asm-arm/platform.h @@ -26,6 +26,9 @@ struct platform_desc { void (*reset)(void); /* Platform power-off */ void (*poweroff)(void); + + void (*route_irq_to_guest)(struct domain *d, struct irq_desc *); + /* * Platform quirks * Defined has a function because a platform can support multiple @@ -70,6 +73,8 @@ bool_t platform_device_is_blacklisted(const struct dt_device_node *node); unsigned int platform_dom0_evtchn_ppi(void); void platform_dom0_gnttab(paddr_t *start, paddr_t *size); +void platform_route_irq_to_guest(struct domain *, struct irq_desc *); + #define PLATFORM_START(_name, _namestr) \ static const struct platform_desc __plat_desc_##_name __used \ __attribute__((__section__(".arch.info"))) = { \ -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |