Skip to content

Commit

Permalink
arm: Make cpu_init and cpu_reset callbacks mandatory
Browse files Browse the repository at this point in the history
No need for checking them to be NULL, we need them in both
implementations.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
  • Loading branch information
jan-kiszka committed Jun 26, 2016
1 parent 8bf054e commit 313bfa1
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions hypervisor/arch/arm/irqchip.c
Expand Up @@ -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)
Expand All @@ -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 *
Expand Down

0 comments on commit 313bfa1

Please sign in to comment.