diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-05-12 10:14:43 +0530 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2020-05-23 10:36:26 +0530 |
commit | 73d6ef3b2933ccf0b3a8a0ba110bf53ad9720b51 (patch) | |
tree | baa3468336030b1680162ed4e31d3a3fa6d89179 /lib/utils/irqchip/plic.c | |
parent | 89ba63493c4ce98861144180e408d6db391fd1c3 (diff) | |
download | opensbi-73d6ef3b2933ccf0b3a8a0ba110bf53ad9720b51.zip opensbi-73d6ef3b2933ccf0b3a8a0ba110bf53ad9720b51.tar.gz opensbi-73d6ef3b2933ccf0b3a8a0ba110bf53ad9720b51.tar.bz2 |
lib: utils: Remove redundant parameters from PLIC init functions
The "target_hart" and "hart_count" parameters of PLIC cold and
warm init functions are only used for sanity checks and not
required in PLIC initialization.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Diffstat (limited to 'lib/utils/irqchip/plic.c')
-rw-r--r-- | lib/utils/irqchip/plic.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/utils/irqchip/plic.c b/lib/utils/irqchip/plic.c index 7c40d28..8975729 100644 --- a/lib/utils/irqchip/plic.c +++ b/lib/utils/irqchip/plic.c @@ -20,7 +20,6 @@ #define PLIC_CONTEXT_BASE 0x200000 #define PLIC_CONTEXT_STRIDE 0x1000 -static u32 plic_hart_count; static u32 plic_num_sources; static volatile void *plic_base; @@ -45,13 +44,10 @@ void plic_set_ie(u32 cntxid, u32 word_index, u32 val) writel(val, plic_ie + word_index * 4); } -int plic_warm_irqchip_init(u32 target_hart, int m_cntx_id, int s_cntx_id) +int plic_warm_irqchip_init(int m_cntx_id, int s_cntx_id) { size_t i, ie_words = plic_num_sources / 32 + 1; - if (plic_hart_count <= target_hart) - return -1; - /* By default, disable all IRQs for M-mode of target HART */ if (m_cntx_id > -1) { for (i = 0; i < ie_words; i++) @@ -75,11 +71,10 @@ int plic_warm_irqchip_init(u32 target_hart, int m_cntx_id, int s_cntx_id) return 0; } -int plic_cold_irqchip_init(unsigned long base, u32 num_sources, u32 hart_count) +int plic_cold_irqchip_init(unsigned long base, u32 num_sources) { int i; - plic_hart_count = hart_count; plic_num_sources = num_sources; plic_base = (void *)base; |