This is GICv2-only.
Signed-off-by: Jan Kiszka <[email protected]>
---
hypervisor/arch/arm-common/gic-common.c | 13 -------------
hypervisor/arch/arm-common/gic-v2.c | 13 +++++++++++++
hypervisor/arch/arm-common/include/asm/gic.h | 1 -
3 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/hypervisor/arch/arm-common/gic-common.c
b/hypervisor/arch/arm-common/gic-common.c
index acc1377..37a12b6 100644
--- a/hypervisor/arch/arm-common/gic-common.c
+++ b/hypervisor/arch/arm-common/gic-common.c
@@ -29,19 +29,6 @@ DEFINE_SPINLOCK(dist_lock);
/* The GICv2 interface numbering does not necessarily match the logical map */
u8 gicv2_target_cpu_map[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
-/* Check that the targeted interface belongs to the cell */
-bool gic_targets_in_cell(struct cell *cell, u8 targets)
-{
- unsigned int cpu;
-
- for (cpu = 0; cpu < ARRAY_SIZE(gicv2_target_cpu_map); cpu++)
- if (targets & gicv2_target_cpu_map[cpu] &&
- per_cpu(cpu)->cell != cell)
- return false;
-
- return true;
-}
-
/*
* Most of the GIC distributor writes only reconfigure the IRQs corresponding
to
* the bits of the written value, by using separate `set' and `clear'
registers.
diff --git a/hypervisor/arch/arm-common/gic-v2.c
b/hypervisor/arch/arm-common/gic-v2.c
index 26a0d60..d9362be 100644
--- a/hypervisor/arch/arm-common/gic-v2.c
+++ b/hypervisor/arch/arm-common/gic-v2.c
@@ -21,6 +21,19 @@ static unsigned int gic_num_lr;
void *gicc_base;
void *gich_base;
+/* Check that the targeted interface belongs to the cell */
+static bool gic_targets_in_cell(struct cell *cell, u8 targets)
+{
+ unsigned int cpu;
+
+ for (cpu = 0; cpu < ARRAY_SIZE(gicv2_target_cpu_map); cpu++)
+ if (targets & gicv2_target_cpu_map[cpu] &&
+ per_cpu(cpu)->cell != cell)
+ return false;
+
+ return true;
+}
+
static int gic_init(void)
{
gicc_base = paging_map_device(
diff --git a/hypervisor/arch/arm-common/include/asm/gic.h
b/hypervisor/arch/arm-common/include/asm/gic.h
index 7895633..d74ec9b 100644
--- a/hypervisor/arch/arm-common/include/asm/gic.h
+++ b/hypervisor/arch/arm-common/include/asm/gic.h
@@ -58,7 +58,6 @@ enum mmio_result gic_handle_dist_access(void *arg, struct
mmio_access *mmio);
enum mmio_result gic_handle_irq_route(struct mmio_access *mmio,
unsigned int irq);
void gic_handle_sgir_write(struct sgi *sgi, bool virt_input);
-bool gic_targets_in_cell(struct cell *cell, u8 targets);
void gic_set_irq_pending(u16 irq_id);
#endif /* !__ASSEMBLY__ */
--
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.