To big to be inlined, and we also want to avoid dereferencing struct cell in the header due to upcoming include reordering.
Signed-off-by: Jan Kiszka <[email protected]> --- hypervisor/arch/arm/include/asm/irqchip.h | 15 +-------------- hypervisor/arch/arm/irqchip.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/hypervisor/arch/arm/include/asm/irqchip.h b/hypervisor/arch/arm/include/asm/irqchip.h index 34b16c4..1457fd7 100644 --- a/hypervisor/arch/arm/include/asm/irqchip.h +++ b/hypervisor/arch/arm/include/asm/irqchip.h @@ -101,20 +101,7 @@ int irqchip_insert_pending(struct per_cpu *cpu_data, struct pending_irq *irq); int irqchip_remove_pending(struct per_cpu *cpu_data, struct pending_irq *irq); int irqchip_set_pending(struct per_cpu *cpu_data, u32 irq_id, bool try_inject); -static inline bool spi_in_cell(struct cell *cell, unsigned int spi) -{ - /* FIXME: Change the configuration to a bitmask range */ - u32 spi_mask; - - if (spi >= 64) - return false; - else if (spi >= 32) - spi_mask = cell->arch.spis >> 32; - else - spi_mask = cell->arch.spis; - - return spi_mask & (1 << (spi & 31)); -} +bool spi_in_cell(struct cell *cell, unsigned int spi); #endif /* __ASSEMBLY__ */ #endif /* _JAILHOUSE_ASM_IRQCHIP_H */ diff --git a/hypervisor/arch/arm/irqchip.c b/hypervisor/arch/arm/irqchip.c index 2d7840e..7a6d4ca 100644 --- a/hypervisor/arch/arm/irqchip.c +++ b/hypervisor/arch/arm/irqchip.c @@ -34,6 +34,21 @@ unsigned long gicd_size; static bool irqchip_is_init; static struct irqchip_ops irqchip; +bool spi_in_cell(struct cell *cell, unsigned int spi) +{ + /* FIXME: Change the configuration to a bitmask range */ + u32 spi_mask; + + if (spi >= 64) + return false; + else if (spi >= 32) + spi_mask = cell->arch.spis >> 32; + else + spi_mask = cell->arch.spis; + + return spi_mask & (1 << (spi & 31)); +} + static int irqchip_init_pending(struct per_cpu *cpu_data) { struct pending_irq *pend_array; -- 2.1.4 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
