1 | // SPDX-License-Identifier: GPL-3.0-or-later |
2 | |
3 | #pragma once |
4 | |
5 | #include <mos/types.h> |
6 | |
7 | /** |
8 | * @brief The type of IPI to send |
9 | * |
10 | */ |
11 | typedef enum |
12 | { |
13 | IPI_TYPE_HALT = 0, // halt the CPU |
14 | IPI_TYPE_INVALIDATE_TLB, // TLB shootdown |
15 | IPI_TYPE_RESCHEDULE, // Reschedule |
16 | IPI_TYPE_MAX, |
17 | } ipi_type_t; |
18 | |
19 | MOS_STATIC_ASSERT(IPI_TYPE_MAX <= (u8) 0xFF, "IPI_TYPE_MAX must fit in a u8" ); |
20 | |
21 | #define TARGET_CPU_ALL 0xFF |
22 | |
23 | void ipi_send(u8 target, ipi_type_t type); |
24 | void ipi_send_all(ipi_type_t type); |
25 | void ipi_do_handle(ipi_type_t type); |
26 | |