]> rtime.felk.cvut.cz Git - jailhouse.git/commitdiff
arm: Make cpu_init and cpu_reset callbacks mandatory
authorJan Kiszka <jan.kiszka@siemens.com>
Thu, 16 Jun 2016 09:15:03 +0000 (11:15 +0200)
committerJan Kiszka <jan.kiszka@siemens.com>
Sun, 26 Jun 2016 07:16:27 +0000 (09:16 +0200)
No need for checking them to be NULL, we need them in both
implementations.

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

index 7f81eb8ea2dfc81ee66387f05bd14920dac67e69..a1772200e3d093c263c140b07a7a36af0f75ab5a 100644 (file)
@@ -127,20 +127,14 @@ int irqchip_send_sgi(struct sgi *sgi)
 
 int irqchip_cpu_init(struct per_cpu *cpu_data)
 {
-       if (irqchip.cpu_init)
-               return irqchip.cpu_init(cpu_data);
-
-       return 0;
+       return irqchip.cpu_init(cpu_data);
 }
 
 int irqchip_cpu_reset(struct per_cpu *cpu_data)
 {
        cpu_data->pending_irqs_head = cpu_data->pending_irqs_tail = 0;
 
-       if (irqchip.cpu_reset)
-               return irqchip.cpu_reset(cpu_data, false);
-
-       return 0;
+       return irqchip.cpu_reset(cpu_data, false);
 }
 
 void irqchip_cpu_shutdown(struct per_cpu *cpu_data)
@@ -150,8 +144,7 @@ void irqchip_cpu_shutdown(struct per_cpu *cpu_data)
         * it has been initialised: this function may be executed during the
         * setup phase.
         */
-       if (irqchip.cpu_reset)
-               irqchip.cpu_reset(cpu_data, true);
+       irqchip.cpu_reset(cpu_data, true);
 }
 
 static const struct jailhouse_irqchip *