-#define PROCESSOR_RUNNING 1 /* Normal execution */
-#define PROCESSOR_IDLE 2 /* Idle */
-#define PROCESSOR_DISPATCHING 3 /* Dispatching (idle -> running) */
-#define PROCESSOR_SHUTDOWN 4 /* Going off-line */
-#define PROCESSOR_START 5 /* Being started */
-
-/*
- * Use processor ptr array to find current processor's data structure.
- * This replaces a multiplication (index into processor_array) with
- * an array lookup and a memory reference. It also allows us to save
- * space if processor numbering gets too sparse.
- */
-
-extern processor_t processor_ptr[NCPUS];
-
-#define cpu_to_processor(i) (processor_ptr[i])
-
-#define current_processor() (processor_ptr[cpu_number()])
-
-/* Compatibility -- will go away */
-
-#define cpu_state(slot_num) (processor_ptr[slot_num]->state)
-#define cpu_idle(slot_num) (cpu_state(slot_num) == PROCESSOR_IDLE)
-
-/* Useful lock macros */
-
-#define pset_lock(pset) mutex_lock(&(pset)->lock)
-#define pset_lock_try(pset) mutex_try(&(pset)->lock)
-#define pset_unlock(pset) mutex_unlock(&(pset)->lock)
-
-#define processor_lock(pr) simple_lock(&(pr)->lock)
-#define processor_unlock(pr) simple_unlock(&(pr)->lock)
-
-extern void pset_sys_bootstrap(void);
-
-#define timeshare_quanta_update(pset) \
-MACRO_BEGIN \
- int proc_count = (pset)->processor_count; \
- int runq_count = (pset)->runq.count; \
- \
- (pset)->timeshare_quanta = (pset)->quantum_factors[ \
- (runq_count > proc_count)? \
- proc_count: runq_count]; \
-MACRO_END
-
-#define pset_run_incr(pset) \
- hw_atomic_add(&(pset)->run_count, 1)
-
-#define pset_run_decr(pset) \
- hw_atomic_sub(&(pset)->run_count, 1)
-
-#define pset_share_incr(pset) \
- hw_atomic_add(&(pset)->share_count, 1)
-
-#define pset_share_decr(pset) \
- hw_atomic_sub(&(pset)->share_count, 1)
-
-extern void cpu_up(
- int cpu);
+#define PROCESSOR_SHUTDOWN 1 /* Going off-line */
+#define PROCESSOR_START 2 /* Being started */
+/* 3 Formerly Inactive (unavailable) */
+#define PROCESSOR_IDLE 4 /* Idle (available) */
+#define PROCESSOR_DISPATCHING 5 /* Dispatching (idle -> active) */
+#define PROCESSOR_RUNNING 6 /* Normal execution */
+
+extern processor_t current_processor(void);
+
+/* Lock macros, always acquired and released with interrupts disabled (splsched()) */
+
+#if __SMP__
+#define pset_lock(p) simple_lock(&(p)->sched_lock)
+#define pset_unlock(p) simple_unlock(&(p)->sched_lock)
+#define pset_lock_init(p) simple_lock_init(&(p)->sched_lock, 0)
+#else
+#define pset_lock(p) do { (void)p; } while(0)
+#define pset_unlock(p) do { (void)p; } while(0)
+#define pset_lock_init(p) do { (void)p; } while(0)
+#endif
+
+extern void processor_bootstrap(void);
+
+extern void processor_init(
+ processor_t processor,
+ int cpu_id,
+ processor_set_t processor_set);
+
+extern void processor_set_primary(
+ processor_t processor,
+ processor_t primary);