forked from Mirrors/opensbi
		
	include: Rename ipi_inject() to ipi_send() for sbi_platform
For better naming, we rename ipi_inject() to ipi_send() in struct sbi_platform. We also replace term "inject" with "send" in all related places. Signed-off-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
		@@ -84,8 +84,8 @@ struct sbi_platform {
 | 
			
		||||
	/** Initialize the platform interrupt controller for current HART */
 | 
			
		||||
	int (*irqchip_init)(bool cold_boot);
 | 
			
		||||
 | 
			
		||||
	/** Inject IPI to a target HART */
 | 
			
		||||
	void (*ipi_inject)(u32 target_hart);
 | 
			
		||||
	/** Send IPI to a 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 */
 | 
			
		||||
@@ -321,16 +321,16 @@ static inline int sbi_platform_irqchip_init(struct sbi_platform *plat,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Inject IPI to a target HART
 | 
			
		||||
 * Send IPI to a target HART
 | 
			
		||||
 *
 | 
			
		||||
 * @param plat pointer to struct sbi_platform
 | 
			
		||||
 * @param target_hart HART ID of IPI target
 | 
			
		||||
 */
 | 
			
		||||
static inline void sbi_platform_ipi_inject(struct sbi_platform *plat,
 | 
			
		||||
					   u32 target_hart)
 | 
			
		||||
static inline void sbi_platform_ipi_send(struct sbi_platform *plat,
 | 
			
		||||
					 u32 target_hart)
 | 
			
		||||
{
 | 
			
		||||
	if (plat && plat->ipi_inject)
 | 
			
		||||
		plat->ipi_inject(target_hart);
 | 
			
		||||
	if (plat && plat->ipi_send)
 | 
			
		||||
		plat->ipi_send(target_hart);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 
 | 
			
		||||
@@ -331,7 +331,7 @@ void sbi_hart_wake_coldboot_harts(struct sbi_scratch *scratch, u32 hartid)
 | 
			
		||||
		/* send an IPI to every other hart */
 | 
			
		||||
		spin_lock(&coldboot_wait_bitmap_lock);
 | 
			
		||||
		if ((i != hartid) && (coldboot_wait_bitmap & (1UL << i)))
 | 
			
		||||
			sbi_platform_ipi_inject(plat, i);
 | 
			
		||||
			sbi_platform_ipi_send(plat, i);
 | 
			
		||||
		spin_unlock(&coldboot_wait_bitmap_lock);
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ int sbi_ipi_send_many(struct sbi_scratch *scratch,
 | 
			
		||||
			oth = sbi_hart_id_to_scratch(scratch, i);
 | 
			
		||||
			atomic_raw_set_bit(event, &oth->ipi_type);
 | 
			
		||||
			mb();
 | 
			
		||||
			sbi_platform_ipi_inject(plat, i);
 | 
			
		||||
			sbi_platform_ipi_send(plat, i);
 | 
			
		||||
			if (event != SBI_IPI_EVENT_SOFT)
 | 
			
		||||
				sbi_platform_ipi_sync(plat, i);
 | 
			
		||||
		}
 | 
			
		||||
 
 | 
			
		||||
@@ -12,7 +12,7 @@
 | 
			
		||||
 | 
			
		||||
#include <sbi/sbi_types.h>
 | 
			
		||||
 | 
			
		||||
void clint_ipi_inject(u32 target_hart);
 | 
			
		||||
void clint_ipi_send(u32 target_hart);
 | 
			
		||||
 | 
			
		||||
void clint_ipi_sync(u32 target_hart);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -16,7 +16,7 @@ static u32 clint_ipi_hart_count;
 | 
			
		||||
static volatile void *clint_ipi_base;
 | 
			
		||||
static volatile u32 *clint_ipi;
 | 
			
		||||
 | 
			
		||||
void clint_ipi_inject(u32 target_hart)
 | 
			
		||||
void clint_ipi_send(u32 target_hart)
 | 
			
		||||
{
 | 
			
		||||
	if (clint_ipi_hart_count <= target_hart)
 | 
			
		||||
		return;
 | 
			
		||||
 
 | 
			
		||||
@@ -114,7 +114,7 @@ struct sbi_platform platform = {
 | 
			
		||||
	.irqchip_init = k210_irqchip_init,
 | 
			
		||||
 | 
			
		||||
	.ipi_init = k210_ipi_init,
 | 
			
		||||
	.ipi_inject = clint_ipi_inject,
 | 
			
		||||
	.ipi_send = clint_ipi_send,
 | 
			
		||||
	.ipi_sync = clint_ipi_sync,
 | 
			
		||||
	.ipi_clear = clint_ipi_clear,
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -138,7 +138,7 @@ struct sbi_platform platform = {
 | 
			
		||||
	.console_getc = sifive_uart_getc,
 | 
			
		||||
	.console_init = sifive_u_console_init,
 | 
			
		||||
	.irqchip_init = sifive_u_irqchip_init,
 | 
			
		||||
	.ipi_inject = clint_ipi_inject,
 | 
			
		||||
	.ipi_send = clint_ipi_send,
 | 
			
		||||
	.ipi_sync = clint_ipi_sync,
 | 
			
		||||
	.ipi_clear = clint_ipi_clear,
 | 
			
		||||
	.ipi_init = sifive_u_ipi_init,
 | 
			
		||||
 
 | 
			
		||||
@@ -139,7 +139,7 @@ struct sbi_platform platform = {
 | 
			
		||||
	.console_getc = uart8250_getc,
 | 
			
		||||
	.console_init = virt_console_init,
 | 
			
		||||
	.irqchip_init = virt_irqchip_init,
 | 
			
		||||
	.ipi_inject = clint_ipi_inject,
 | 
			
		||||
	.ipi_send = clint_ipi_send,
 | 
			
		||||
	.ipi_sync = clint_ipi_sync,
 | 
			
		||||
	.ipi_clear = clint_ipi_clear,
 | 
			
		||||
	.ipi_init = virt_ipi_init,
 | 
			
		||||
 
 | 
			
		||||
@@ -191,7 +191,7 @@ struct sbi_platform platform = {
 | 
			
		||||
	.console_getc = sifive_uart_getc,
 | 
			
		||||
	.console_init = fu540_console_init,
 | 
			
		||||
	.irqchip_init = fu540_irqchip_init,
 | 
			
		||||
	.ipi_inject = clint_ipi_inject,
 | 
			
		||||
	.ipi_send = clint_ipi_send,
 | 
			
		||||
	.ipi_sync = clint_ipi_sync,
 | 
			
		||||
	.ipi_clear = clint_ipi_clear,
 | 
			
		||||
	.ipi_init = fu540_ipi_init,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user