* See LICENSE for details.
*/
-#ifndef ROS_INC_SMP_H
-#define ROS_INC_SMP_H
+#pragma once
/* SMP related functions */
#include <syscall.h>
#include <alarm.h>
#include <trace.h>
+#include <core_set.h>
#define CPU_STATE_IRQ 0
#define CPU_STATE_KERNEL 1
#ifdef CONFIG_X86
uintptr_t stacktop; /* must be first */
int coreid; /* must be second */
- struct vmcs *vmxarea;
- pseudodesc_t host_gdt;
+ int nmi_status;
+ uintptr_t nmi_worker_stacktop;
int vmx_enabled;
- void *local_vcpu;
+ int guest_pcoreid;
#endif
spinlock_t lock;
/* Process management */
#define current_ctx per_cpu_info[core_id()].cur_ctx
typedef struct per_cpu_info per_cpu_info_t;
-
-extern per_cpu_info_t per_cpu_info[MAX_NUM_CPUS];
-extern volatile uint32_t num_cpus;
+extern per_cpu_info_t per_cpu_info[MAX_NUM_CORES];
/* SMP bootup functions */
void smp_boot(void);
#endif /* CONFIG_TRACE_LOCKS */
+void smp_do_in_cores(const struct core_set *cset, void (*func)(void *),
+ void *opaque);
+
/* Run the handlers for all events in a pcpui ring. Can run on all cores, or
* just one core. 'type' selects which event type is handled (0 for all). */
void pcpui_tr_foreach(int coreid, int type);
void pcpui_tr_foreach_all(int type);
void pcpui_tr_reset_all(void);
void pcpui_tr_reset_and_clear_all(void);
-
-#endif /* ROS_INC_SMP_H */