platform: Remove the ipi_sync method from all platforms.
OpenSBI manages outstanding TLB flush requests by queueing them in a fifo synchronously. An ipi sync which uses an atomic operation on MMIO address is no longer required. Remove the ipi sync method from platform header and all usage. Signed-off-by: Atish Patra <atish.patra@wdc.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
parent
897a97a6af
commit
75229705a0
|
@ -90,8 +90,6 @@ struct sbi_platform_operations {
|
||||||
|
|
||||||
/** Send IPI to a target HART */
|
/** Send IPI to a target HART */
|
||||||
void (*ipi_send)(u32 target_hart);
|
void (*ipi_send)(u32 target_hart);
|
||||||
/** Wait for target HART to acknowledge IPI */
|
|
||||||
void (*ipi_sync)(u32 target_hart);
|
|
||||||
/** Clear IPI for a target HART */
|
/** Clear IPI for a target HART */
|
||||||
void (*ipi_clear)(u32 target_hart);
|
void (*ipi_clear)(u32 target_hart);
|
||||||
/** Initialize IPI for current HART */
|
/** Initialize IPI for current HART */
|
||||||
|
@ -370,19 +368,6 @@ static inline void sbi_platform_ipi_send(const struct sbi_platform *plat,
|
||||||
sbi_platform_ops(plat)->ipi_send(target_hart);
|
sbi_platform_ops(plat)->ipi_send(target_hart);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Wait for target HART to acknowledge IPI
|
|
||||||
*
|
|
||||||
* @param plat pointer to struct sbi_platform
|
|
||||||
* @param target_hart HART ID of IPI target
|
|
||||||
*/
|
|
||||||
static inline void sbi_platform_ipi_sync(const struct sbi_platform *plat,
|
|
||||||
u32 target_hart)
|
|
||||||
{
|
|
||||||
if (plat && sbi_platform_ops(plat)->ipi_sync)
|
|
||||||
sbi_platform_ops(plat)->ipi_sync(target_hart);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clear IPI for a target HART
|
* Clear IPI for a target HART
|
||||||
*
|
*
|
||||||
|
|
|
@ -25,29 +25,6 @@ void clint_ipi_send(u32 target_hart)
|
||||||
writel(1, &clint_ipi[target_hart]);
|
writel(1, &clint_ipi[target_hart]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void clint_ipi_sync(u32 target_hart)
|
|
||||||
{
|
|
||||||
u32 target_ipi, incoming_ipi;
|
|
||||||
u32 source_hart = sbi_current_hartid();
|
|
||||||
|
|
||||||
if (clint_ipi_hart_count <= target_hart)
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* Wait until target HART has handled IPI */
|
|
||||||
incoming_ipi = 0;
|
|
||||||
while (1) {
|
|
||||||
target_ipi = readl(&clint_ipi[target_hart]);
|
|
||||||
if (!target_ipi)
|
|
||||||
break;
|
|
||||||
|
|
||||||
incoming_ipi |=
|
|
||||||
atomic_raw_xchg_uint(&clint_ipi[source_hart], 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (incoming_ipi)
|
|
||||||
writel(incoming_ipi, &clint_ipi[source_hart]);
|
|
||||||
}
|
|
||||||
|
|
||||||
void clint_ipi_clear(u32 target_hart)
|
void clint_ipi_clear(u32 target_hart)
|
||||||
{
|
{
|
||||||
if (clint_ipi_hart_count <= target_hart)
|
if (clint_ipi_hart_count <= target_hart)
|
||||||
|
|
|
@ -185,7 +185,6 @@ const struct sbi_platform_operations platform_ops = {
|
||||||
.irqchip_init = ariane_irqchip_init,
|
.irqchip_init = ariane_irqchip_init,
|
||||||
.ipi_init = ariane_ipi_init,
|
.ipi_init = ariane_ipi_init,
|
||||||
.ipi_send = clint_ipi_send,
|
.ipi_send = clint_ipi_send,
|
||||||
.ipi_sync = clint_ipi_sync,
|
|
||||||
.ipi_clear = clint_ipi_clear,
|
.ipi_clear = clint_ipi_clear,
|
||||||
.timer_init = ariane_timer_init,
|
.timer_init = ariane_timer_init,
|
||||||
.timer_value = clint_timer_value,
|
.timer_value = clint_timer_value,
|
||||||
|
|
|
@ -102,7 +102,6 @@ const struct sbi_platform_operations platform_ops = {
|
||||||
|
|
||||||
.ipi_init = k210_ipi_init,
|
.ipi_init = k210_ipi_init,
|
||||||
.ipi_send = clint_ipi_send,
|
.ipi_send = clint_ipi_send,
|
||||||
.ipi_sync = clint_ipi_sync,
|
|
||||||
.ipi_clear = clint_ipi_clear,
|
.ipi_clear = clint_ipi_clear,
|
||||||
|
|
||||||
.timer_init = k210_timer_init,
|
.timer_init = k210_timer_init,
|
||||||
|
|
|
@ -136,7 +136,6 @@ const struct sbi_platform_operations platform_ops = {
|
||||||
.console_init = sifive_u_console_init,
|
.console_init = sifive_u_console_init,
|
||||||
.irqchip_init = sifive_u_irqchip_init,
|
.irqchip_init = sifive_u_irqchip_init,
|
||||||
.ipi_send = clint_ipi_send,
|
.ipi_send = clint_ipi_send,
|
||||||
.ipi_sync = clint_ipi_sync,
|
|
||||||
.ipi_clear = clint_ipi_clear,
|
.ipi_clear = clint_ipi_clear,
|
||||||
.ipi_init = sifive_u_ipi_init,
|
.ipi_init = sifive_u_ipi_init,
|
||||||
.timer_value = clint_timer_value,
|
.timer_value = clint_timer_value,
|
||||||
|
|
|
@ -141,7 +141,6 @@ const struct sbi_platform_operations platform_ops = {
|
||||||
.console_init = virt_console_init,
|
.console_init = virt_console_init,
|
||||||
.irqchip_init = virt_irqchip_init,
|
.irqchip_init = virt_irqchip_init,
|
||||||
.ipi_send = clint_ipi_send,
|
.ipi_send = clint_ipi_send,
|
||||||
.ipi_sync = clint_ipi_sync,
|
|
||||||
.ipi_clear = clint_ipi_clear,
|
.ipi_clear = clint_ipi_clear,
|
||||||
.ipi_init = virt_ipi_init,
|
.ipi_init = virt_ipi_init,
|
||||||
.timer_value = clint_timer_value,
|
.timer_value = clint_timer_value,
|
||||||
|
|
|
@ -199,7 +199,6 @@ const struct sbi_platform_operations platform_ops = {
|
||||||
.console_init = fu540_console_init,
|
.console_init = fu540_console_init,
|
||||||
.irqchip_init = fu540_irqchip_init,
|
.irqchip_init = fu540_irqchip_init,
|
||||||
.ipi_send = clint_ipi_send,
|
.ipi_send = clint_ipi_send,
|
||||||
.ipi_sync = clint_ipi_sync,
|
|
||||||
.ipi_clear = clint_ipi_clear,
|
.ipi_clear = clint_ipi_clear,
|
||||||
.ipi_init = fu540_ipi_init,
|
.ipi_init = fu540_ipi_init,
|
||||||
.timer_value = clint_timer_value,
|
.timer_value = clint_timer_value,
|
||||||
|
|
|
@ -124,15 +124,6 @@ static void platform_ipi_send(u32 target_hart)
|
||||||
clint_ipi_send(target_hart);
|
clint_ipi_send(target_hart);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Wait for target HART to acknowledge IPI.
|
|
||||||
*/
|
|
||||||
static void platform_ipi_sync(u32 target_hart)
|
|
||||||
{
|
|
||||||
/* Example if the generic CLINT driver is used */
|
|
||||||
clint_ipi_sync(target_hart);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clear IPI for a target HART.
|
* Clear IPI for a target HART.
|
||||||
*/
|
*/
|
||||||
|
@ -216,7 +207,6 @@ const struct sbi_platform_operations platform_ops = {
|
||||||
.console_init = platform_console_init,
|
.console_init = platform_console_init,
|
||||||
.irqchip_init = platform_irqchip_init,
|
.irqchip_init = platform_irqchip_init,
|
||||||
.ipi_send = platform_ipi_send,
|
.ipi_send = platform_ipi_send,
|
||||||
.ipi_sync = platform_ipi_sync,
|
|
||||||
.ipi_clear = platform_ipi_clear,
|
.ipi_clear = platform_ipi_clear,
|
||||||
.ipi_init = platform_ipi_init,
|
.ipi_init = platform_ipi_init,
|
||||||
.timer_value = platform_timer_value,
|
.timer_value = platform_timer_value,
|
||||||
|
|
Loading…
Reference in New Issue