diff options
author | Anup Patel <anup.patel@wdc.com> | 2019-01-22 12:03:41 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2019-01-23 06:09:26 +0300 |
commit | 74fd2e5bb217278fcb2c0020038ea5f19bd5d22f (patch) | |
tree | 8f1c27d00aaf3c017d3f970ca81e21770341a0cb /platform/qemu | |
parent | 18ec89e46e3cf8011b30deded6ea8d77720bdb3c (diff) | |
download | opensbi-74fd2e5bb217278fcb2c0020038ea5f19bd5d22f.tar.xz |
lib: Remove hartid parameter from IRQCHIP callbacks
The hartid parameter in IRQCHIP callbacks of sbi_platform
is not required because current hartid can be determined
using sbi_current_hartid() API.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'platform/qemu')
-rw-r--r-- | platform/qemu/sifive_u/platform.c | 4 | ||||
-rw-r--r-- | platform/qemu/virt/platform.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/platform/qemu/sifive_u/platform.c b/platform/qemu/sifive_u/platform.c index a386765..281b265 100644 --- a/platform/qemu/sifive_u/platform.c +++ b/platform/qemu/sifive_u/platform.c @@ -9,6 +9,7 @@ #include <sbi/riscv_encoding.h> #include <sbi/sbi_const.h> +#include <sbi/sbi_hart.h> #include <sbi/sbi_platform.h> #include <plat/irqchip/plic.h> #include <plat/serial/sifive-uart.h> @@ -72,9 +73,10 @@ static int sifive_u_console_init(void) SIFIVE_U_PERIPH_CLK, 115200); } -static int sifive_u_irqchip_init(u32 hartid, bool cold_boot) +static int sifive_u_irqchip_init(bool cold_boot) { int rc; + u32 hartid = sbi_current_hartid(); if (cold_boot) { rc = plic_cold_irqchip_init(SIFIVE_U_PLIC_ADDR, diff --git a/platform/qemu/virt/platform.c b/platform/qemu/virt/platform.c index 31bff48..65b36a2 100644 --- a/platform/qemu/virt/platform.c +++ b/platform/qemu/virt/platform.c @@ -9,6 +9,7 @@ #include <sbi/riscv_encoding.h> #include <sbi/sbi_const.h> +#include <sbi/sbi_hart.h> #include <sbi/sbi_platform.h> #include <plat/irqchip/plic.h> #include <plat/serial/uart8250.h> @@ -73,9 +74,10 @@ static int virt_console_init(void) VIRT_UART_BAUDRATE, 0, 1); } -static int virt_irqchip_init(u32 hartid, bool cold_boot) +static int virt_irqchip_init(bool cold_boot) { int rc; + u32 hartid = sbi_current_hartid(); if (cold_boot) { rc = plic_cold_irqchip_init(VIRT_PLIC_ADDR, |