mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-25 07:41:42 +01:00
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>
This commit is contained in:

committed by
Anup Patel

parent
693afc818f
commit
86d2c1797a
@@ -321,6 +321,11 @@ int sbi_ipi_init(struct sbi_scratch *scratch, bool cold_boot)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
ipi_halt_event = ret;
|
||||
|
||||
/* Initialize platform IPI support */
|
||||
ret = sbi_platform_ipi_init(sbi_platform_ptr(scratch));
|
||||
if (ret)
|
||||
return ret;
|
||||
} else {
|
||||
if (!ipi_data_off)
|
||||
return SBI_ENOMEM;
|
||||
@@ -332,11 +337,6 @@ int sbi_ipi_init(struct sbi_scratch *scratch, bool cold_boot)
|
||||
ipi_data = sbi_scratch_offset_ptr(scratch, ipi_data_off);
|
||||
ipi_data->ipi_type = 0x00;
|
||||
|
||||
/* Initialize platform IPI support */
|
||||
ret = sbi_platform_ipi_init(sbi_platform_ptr(scratch), cold_boot);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/* Clear any pending IPIs for the current hart */
|
||||
sbi_ipi_raw_clear();
|
||||
|
||||
@@ -353,7 +353,4 @@ void sbi_ipi_exit(struct sbi_scratch *scratch)
|
||||
|
||||
/* Process pending IPIs */
|
||||
sbi_ipi_process();
|
||||
|
||||
/* Platform exit */
|
||||
sbi_platform_ipi_exit(sbi_platform_ptr(scratch));
|
||||
}
|
||||
|
Reference in New Issue
Block a user