diff --git a/repos/base-hw/src/core/include/spec/arm_gic/pic.h b/repos/base-hw/src/core/include/spec/arm_gic/pic.h index d21da649df..a1116abbcd 100644 --- a/repos/base-hw/src/core/include/spec/arm_gic/pic.h +++ b/repos/base-hw/src/core/include/spec/arm_gic/pic.h @@ -182,6 +182,7 @@ class Genode::Pic typedef Arm_gic_cpu_interface Cpui; typedef Arm_gic_distributor Distr; + static constexpr unsigned ipi = 1; static constexpr unsigned min_spi = 32; static constexpr unsigned spurious_id = 1023; @@ -190,11 +191,6 @@ class Genode::Pic unsigned const _max_irq; unsigned _last_request; - /** - * Return inter-processor IRQ of the CPU with kernel name 'cpu_id' - */ - unsigned _ipi(unsigned const cpu_id) const { return cpu_id + 1; } - /** * Platform specific initialization */ @@ -268,10 +264,9 @@ class Genode::Pic * Return wether an IRQ is inter-processor IRQ of a CPU * * \param irq_id kernel name of the IRQ - * \param cpu_id kernel name of the CPU */ - bool is_ip_interrupt(unsigned const irq_id, unsigned const cpu_id) { - return irq_id == _ipi(cpu_id); } + bool is_ip_interrupt(unsigned const irq_id) { + return irq_id == ipi; } /** * Raise inter-processor IRQ of the CPU with kernel name 'cpu_id' @@ -280,7 +275,7 @@ class Genode::Pic { typedef Distr::Sgir Sgir; Sgir::access_t sgir = 0; - Sgir::Sgi_int_id::set(sgir, _ipi(cpu_id)); + Sgir::Sgi_int_id::set(sgir, ipi); Sgir::Cpu_target_list::set(sgir, 1 << cpu_id); _distr.write(sgir); } diff --git a/repos/base-hw/src/core/include/spec/imx53/pic.h b/repos/base-hw/src/core/include/spec/imx53/pic.h index 4962e912ab..af5ad43523 100644 --- a/repos/base-hw/src/core/include/spec/imx53/pic.h +++ b/repos/base-hw/src/core/include/spec/imx53/pic.h @@ -149,7 +149,7 @@ class Genode::Pic : public Mmio /** * Wether an interrupt is inter-processor interrupt of a CPU */ - bool is_ip_interrupt(unsigned, unsigned) { return false; } + bool is_ip_interrupt(unsigned) { return false; } /************* ** Dummies ** diff --git a/repos/base-hw/src/core/include/spec/rpi/pic.h b/repos/base-hw/src/core/include/spec/rpi/pic.h index 8789732a8a..2368ce38f7 100644 --- a/repos/base-hw/src/core/include/spec/rpi/pic.h +++ b/repos/base-hw/src/core/include/spec/rpi/pic.h @@ -239,7 +239,7 @@ class Genode::Pic : Mmio * Dummies */ - bool is_ip_interrupt(unsigned, unsigned) { return false; } + bool is_ip_interrupt(unsigned) { return false; } void trigger_ip_interrupt(unsigned) { } }; diff --git a/repos/base-hw/src/core/kernel/cpu.cc b/repos/base-hw/src/core/kernel/cpu.cc index 01e6e70f46..32af596bd8 100644 --- a/repos/base-hw/src/core/kernel/cpu.cc +++ b/repos/base-hw/src/core/kernel/cpu.cc @@ -99,7 +99,7 @@ void Cpu_job::_interrupt(unsigned const cpu_id) if (!_cpu->timer_irq(irq_id)) { /* check wether the interrupt is our IPI */ - if (ic->is_ip_interrupt(irq_id, cpu_id)) { + if (ic->is_ip_interrupt(irq_id)) { cpu_domain_update_list()->do_each(); _cpu->ip_interrupt_handled();