revert between 56095 -> 55830 in arch
[AROS.git] / arch / all-pc / kernel / kernel_ipi.h
blob7a4eac6e3c2aa117d43b4389dc5e2b17b2d4adcd
1 /*
2 Copyright © 1995-2017, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef __KERNEL_IPI_H_
7 #define __KERNEL_IPI_H_
9 #include <aros/types/spinlock_s.h>
10 #include <utility/hooks.h>
11 #include "kernel_base.h"
12 #include "apic_ia32.h"
15 Private KERNEL IPI messages
17 #define IPI_NOP (APIC_EXCEPT_IPI_NOP - X86_CPU_EXCEPT_COUNT)
18 #define IPI_STOP (APIC_EXCEPT_IPI_STOP - X86_CPU_EXCEPT_COUNT)
19 #define IPI_RESUME (APIC_EXCEPT_IPI_RESUME - X86_CPU_EXCEPT_COUNT)
20 #define IPI_RESCHEDULE (APIC_EXCEPT_IPI_RESCHEDULE - X86_CPU_EXCEPT_COUNT)
21 #define IPI_CALL_HOOK (APIC_EXCEPT_IPI_CALL_HOOK - X86_CPU_EXCEPT_COUNT)
22 #define IPI_CAUSE (APIC_EXCEPT_IPI_CAUSE - X86_CPU_EXCEPT_COUNT)
24 int core_IPIHandle(struct ExceptionContext *regs, void *data1, struct KernelBase *KernelBase);
25 void core_DoIPI(uint8_t ipi_number, void *cpu_mask, struct KernelBase *KernelBase);
26 int core_DoCallIPI(struct Hook *hook, void *cpu_mask, int async, int nargs, IPTR *args, APTR _KB);
28 #define IPI_CALL_HOOK_MAX_ARGS 5
31 IPI Call hook
33 struct IPIHook
35 struct Hook ih_Hook;
36 IPTR ih_Args[IPI_CALL_HOOK_MAX_ARGS];
37 uint32_t * ih_CPUDone;
38 uint32_t * ih_CPURequested;
39 int ih_Async;
40 spinlock_t ih_Lock;
41 spinlock_t ih_SyncLock;
44 #endif /* __KERNEL_IPI_H_ */