]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
arm: Consolidate gic_irqchip to irqchip
authorJan Kiszka <jan.kiszka@siemens.com>
Thu, 16 Jun 2016 09:24:13 +0000 (11:24 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sun, 26 Jun 2016 07:16:27 +0000 (09:16 +0200)
Likely, we will never support alternative irqchips to the GIC (only
cascaded ones). So this copying-over is not required.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
hypervisor/arch/arm/gic-v2.c
hypervisor/arch/arm/gic-v3.c
hypervisor/arch/arm/irqchip.c

index 8f5fc0b5e3ccb44bd5f40fdfdf7bbfcc5894c166..ff0036b03f42f6d6302f5fec346d1bb95fa39198 100644 (file)
@@ -293,7 +293,7 @@ unsigned int irqchip_mmio_count_regions(struct cell *cell)
        return 1;
 }
 
-struct irqchip_ops gic_irqchip = {
+struct irqchip_ops irqchip = {
        .init = gic_init,
        .cpu_init = gic_cpu_init,
        .cpu_reset = gic_cpu_reset,
index 4ab03ad84282f2dfdea64b5ba8f52056fbedf27a..b4222002fb8e5a95d3b613bfeac85760a352f27e 100644 (file)
@@ -410,7 +410,7 @@ unsigned int irqchip_mmio_count_regions(struct cell *cell)
        return 2;
 }
 
-struct irqchip_ops gic_irqchip = {
+struct irqchip_ops irqchip = {
        .init = gic_init,
        .cpu_init = gic_cpu_init,
        .cpu_reset = gic_cpu_reset,
index 26b3026debd0e9e0470c42ab4757a72da3a9ec9c..0b1193ccc7be57eeff0959e61b683707367939f1 100644 (file)
@@ -24,6 +24,8 @@
 /* AMBA's biosfood */
 #define AMBA_DEVICE    0xb105f00d
 
+extern struct irqchip_ops irqchip;
+
 void *gicd_base;
 unsigned long gicd_size;
 
@@ -32,7 +34,6 @@ unsigned long gicd_size;
  * per-cpu setup, which means that a bool must be set by the master CPU
  */
 static bool irqchip_is_init;
-static struct irqchip_ops irqchip;
 
 bool spi_in_cell(struct cell *cell, unsigned int spi)
 {
@@ -189,9 +190,6 @@ void irqchip_root_cell_shrink(struct cell *cell)
        root_cell.arch.spis &= ~(cell->arch.spis);
 }
 
-/* Only the GIC is implemented */
-extern struct irqchip_ops gic_irqchip;
-
 int irqchip_init(void)
 {
        int i, err;
@@ -222,7 +220,6 @@ int irqchip_init(void)
        case 0x2:
        case 0x3:
        case 0x4:
-               memcpy(&irqchip, &gic_irqchip, sizeof(struct irqchip_ops));
                break;
        default:
                goto err_no_distributor;