mirror of
https://github.com/riscv-software-src/opensbi
synced 2025-10-14 04:46:06 +01:00
lib: irqchip/plic: fix typo in plic_warm_irqchip_init
The second invocation of plic_context_init() incorrectly calls the function with m_cntx_id instead of s_cntx_id. This breaks systems which only have 1 external interrupt per hart. Fixes: 8c362e7 ("lib: irqchip/plic: Factor out a context init function") Signed-off-by: Jan Remes <jan.remes@codasip.com> Reviewed-by: Anup Patel <anup@brainfault.org> Reviewed-by: Samuel Holland <samuel@sholland.org>
This commit is contained in:
parent
7738345396
commit
d76a196bfc
@ -145,7 +145,7 @@ int plic_warm_irqchip_init(const struct plic_data *plic,
|
|||||||
|
|
||||||
/* By default, disable all IRQs for S-mode of target HART */
|
/* By default, disable all IRQs for S-mode of target HART */
|
||||||
if (s_cntx_id > -1) {
|
if (s_cntx_id > -1) {
|
||||||
ret = plic_context_init(plic, m_cntx_id, false, 0x7);
|
ret = plic_context_init(plic, s_cntx_id, false, 0x7);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user