-queue_head_t tasks;
-queue_head_t terminated_tasks; /* To be used ONLY for stackshot. */
-queue_head_t corpse_tasks;
-int tasks_count;
-int terminated_tasks_count;
-queue_head_t threads;
-int threads_count;
-decl_lck_mtx_data(,tasks_threads_lock)
-decl_lck_mtx_data(,tasks_corpse_lock)
+queue_head_t tasks;
+queue_head_t terminated_tasks; /* To be used ONLY for stackshot. */
+queue_head_t corpse_tasks;
+int tasks_count;
+int terminated_tasks_count;
+queue_head_t threads;
+int threads_count;
+decl_lck_mtx_data(, tasks_threads_lock);
+decl_lck_mtx_data(, tasks_corpse_lock);
+
+processor_t processor_list;
+unsigned int processor_count;
+static processor_t processor_list_tail;
+decl_simple_lock_data(, processor_list_lock);
+
+uint32_t processor_avail_count;
+uint32_t processor_avail_count_user;
+
+processor_t master_processor;
+int master_cpu = 0;
+boolean_t sched_stats_active = FALSE;
+
+processor_t processor_array[MAX_SCHED_CPUS] = { 0 };
+
+#if defined(CONFIG_XNUPOST)
+kern_return_t ipi_test(void);
+extern void arm64_ipi_test(void);
+
+kern_return_t
+ipi_test()
+{
+#if __arm64__
+ processor_t p;
+
+ for (p = processor_list; p != NULL; p = p->processor_list) {
+ thread_bind(p);
+ thread_block(THREAD_CONTINUE_NULL);
+ kprintf("Running IPI test on cpu %d\n", p->cpu_id);
+ arm64_ipi_test();
+ }
+
+ /* unbind thread from specific cpu */
+ thread_bind(PROCESSOR_NULL);
+ thread_block(THREAD_CONTINUE_NULL);
+
+ T_PASS("Done running IPI tests");
+#else
+ T_PASS("Unsupported platform. Not running IPI tests");