10#if MOS_CONFIG(MOS_SMP)
20static void ipi_handler_invalidate_tlb(
ipi_type_t type)
23 pr_dinfo2(ipi,
"Received invalidate TLB IPI");
27static void ipi_handler_reschedule(
ipi_type_t type)
30 pr_dinfo2(ipi,
"Received reschedule IPI");
35#define IPI_ENTRY(_type, _handler) [_type] = { .handle = _handler, .nr = PER_CPU_VAR_INIT }
49 pr_dinfo2(ipi,
"Sending IPI to %d of type %d", target, type);
55 pr_dinfo2(ipi,
"Sending IPI to all of type %d", type);
61 pr_dinfo2(ipi,
"Handling IPI of type %d", type);
65 mos_warn(
"IPI type %d is out of range", type);
69 if (ipi_handlers[type].handle ==
NULL)
71 mos_warn(
"No handler for IPI type %d", type);
75 (*
per_cpu(ipi_handlers[type].nr))++;
76 ipi_handlers[type].handle(type);
80#define STUB_FUNCTION(func, ...) void func(__VA_ARGS__){}
81#define STUB_FUNCTION_UNREACHABLE(func, ...) void func(__VA_ARGS__){ MOS_UNREACHABLE(); }
void platform_invalidate_tlb(ptr_t vaddr)
void platform_halt_cpu(void)
#define mos_warn(fmt,...)
MOSAPI void(1, 2) fatal_abort(const char *fmt
void ipi_send(u8 __maybe_unused target, ipi_type_t __maybe_unused type)
void ipi_do_handle(ipi_type_t __maybe_unused type)
#define STUB_FUNCTION_UNREACHABLE(func,...)
void ipi_send_all(ipi_type_t __maybe_unused type)
#define STUB_FUNCTION(func,...)
ipi_type_t
The type of IPI to send.
@ IPI_TYPE_INVALIDATE_TLB
#define pr_dinfo2(feat, fmt,...)
void reschedule(void)
reschedule.
#define spinlock_acquire(lock)