aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorSamuel Holland <samuel.holland@sifive.com>2024-10-25 11:59:48 -0700
committerAnup Patel <anup@brainfault.org>2024-11-11 18:21:04 +0530
commit86d2c1797a44975e628bcf77e30e687fd6738e81 (patch)
tree655d5be8fb89fadf22932bea881cd4c8f617d7dd /platform
parent693afc818feecdbddb75f5c9ec4b436d56f64208 (diff)
downloadopensbi-86d2c1797a44975e628bcf77e30e687fd6738e81.zip
opensbi-86d2c1797a44975e628bcf77e30e687fd6738e81.tar.gz
opensbi-86d2c1797a44975e628bcf77e30e687fd6738e81.tar.bz2
platform: Drop IPI warm init and exit hooks
Now that the SBI IPI core clears IPIs at warm boot in a generic way, none of the drivers or platforms use these hooks, and we can remove them. Platforms need only to initialize the driver once during cold init. If other hooks are needed in the future, they can be added to struct sbi_ipi_device. Signed-off-by: Samuel Holland <samuel.holland@sifive.com> Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'platform')
-rw-r--r--platform/fpga/ariane/platform.c14
-rw-r--r--platform/fpga/openpiton/platform.c14
-rw-r--r--platform/generic/platform.c1
-rw-r--r--platform/kendryte/k210/platform.c12
-rw-r--r--platform/nuclei/ux600/platform.c12
-rw-r--r--platform/template/platform.c14
6 files changed, 13 insertions, 54 deletions
diff --git a/platform/fpga/ariane/platform.c b/platform/fpga/ariane/platform.c
index fb98aad..d25506a 100644
--- a/platform/fpga/ariane/platform.c
+++ b/platform/fpga/ariane/platform.c
@@ -131,19 +131,11 @@ static int ariane_irqchip_init(bool cold_boot)
}
/*
- * Initialize IPI for current HART.
+ * Initialize IPI during cold boot.
*/
-static int ariane_ipi_init(bool cold_boot)
+static int ariane_ipi_init(void)
{
- int ret;
-
- if (cold_boot) {
- ret = aclint_mswi_cold_init(&mswi);
- if (ret)
- return ret;
- }
-
- return 0;
+ return aclint_mswi_cold_init(&mswi);
}
/*
diff --git a/platform/fpga/openpiton/platform.c b/platform/fpga/openpiton/platform.c
index 6c658be..1ed4283 100644
--- a/platform/fpga/openpiton/platform.c
+++ b/platform/fpga/openpiton/platform.c
@@ -162,19 +162,11 @@ static int openpiton_irqchip_init(bool cold_boot)
}
/*
- * Initialize IPI for current HART.
+ * Initialize IPI during cold boot.
*/
-static int openpiton_ipi_init(bool cold_boot)
+static int openpiton_ipi_init(void)
{
- int ret;
-
- if (cold_boot) {
- ret = aclint_mswi_cold_init(&mswi);
- if (ret)
- return ret;
- }
-
- return 0;
+ return aclint_mswi_cold_init(&mswi);
}
/*
diff --git a/platform/generic/platform.c b/platform/generic/platform.c
index a22db49..3b20ffb 100644
--- a/platform/generic/platform.c
+++ b/platform/generic/platform.c
@@ -421,7 +421,6 @@ const struct sbi_platform_operations platform_ops = {
.irqchip_init = fdt_irqchip_init,
.irqchip_exit = fdt_irqchip_exit,
.ipi_init = fdt_ipi_init,
- .ipi_exit = fdt_ipi_exit,
.pmu_init = generic_pmu_init,
.pmu_xlate_to_mhpmevent = generic_pmu_xlate_to_mhpmevent,
.get_tlbr_flush_limit = generic_tlbr_flush_limit,
diff --git a/platform/kendryte/k210/platform.c b/platform/kendryte/k210/platform.c
index 1c7bd11..338120f 100644
--- a/platform/kendryte/k210/platform.c
+++ b/platform/kendryte/k210/platform.c
@@ -146,17 +146,9 @@ static int k210_irqchip_init(bool cold_boot)
return plic_warm_irqchip_init(&plic, hartid * 2, hartid * 2 + 1);
}
-static int k210_ipi_init(bool cold_boot)
+static int k210_ipi_init(void)
{
- int rc;
-
- if (cold_boot) {
- rc = aclint_mswi_cold_init(&mswi);
- if (rc)
- return rc;
- }
-
- return 0;
+ return aclint_mswi_cold_init(&mswi);
}
static int k210_timer_init(void)
diff --git a/platform/nuclei/ux600/platform.c b/platform/nuclei/ux600/platform.c
index f3b7f98..8d1cc67 100644
--- a/platform/nuclei/ux600/platform.c
+++ b/platform/nuclei/ux600/platform.c
@@ -202,17 +202,9 @@ static int ux600_irqchip_init(bool cold_boot)
(hartid) ? (2 * hartid) : -1);
}
-static int ux600_ipi_init(bool cold_boot)
+static int ux600_ipi_init(void)
{
- int rc;
-
- if (cold_boot) {
- rc = aclint_mswi_cold_init(&mswi);
- if (rc)
- return rc;
- }
-
- return 0;
+ return aclint_mswi_cold_init(&mswi);
}
static int ux600_timer_init(void)
diff --git a/platform/template/platform.c b/platform/template/platform.c
index d0f9f32..9f1b3b0 100644
--- a/platform/template/platform.c
+++ b/platform/template/platform.c
@@ -99,20 +99,12 @@ static int platform_irqchip_init(bool cold_boot)
}
/*
- * Initialize IPI for current HART.
+ * Initialize IPI during cold boot.
*/
-static int platform_ipi_init(bool cold_boot)
+static int platform_ipi_init(void)
{
- int ret;
-
/* Example if the generic ACLINT driver is used */
- if (cold_boot) {
- ret = aclint_mswi_cold_init(&mswi);
- if (ret)
- return ret;
- }
-
- return 0;
+ return aclint_mswi_cold_init(&mswi);
}
/*