pmLockCPUTopology(int lock)
{
if (lock) {
- simple_lock(&x86_topo_lock);
+ mp_safe_spin_lock(&x86_topo_lock);
} else {
simple_unlock(&x86_topo_lock);
}
}
/*
- * Set the maximum delay time allowed for snoop on the bus.
- *
- * Note that this value will be compared to the amount of time that it takes
- * to transition from a non-snooping power state (C4) to a snooping state (C2).
- * If maxBusDelay is less than C4C2SnoopDelay,
- * we will not enter the lowest power state.
+ * Advertise a memory access latency tolerance of "mdelay" ns
*/
void
ml_set_maxbusdelay(uint32_t mdelay)
saved_run_count = count;
}
-boolean_t
-machine_processor_is_inactive(processor_t processor)
-{
- int cpu = processor->cpu_id;
-
- if (pmDispatch != NULL
- && pmDispatch->pmIsCPUUnAvailable != NULL)
- return(pmDispatch->pmIsCPUUnAvailable(cpu_to_lcpu(cpu)));
- else
- return(FALSE);
-}
-
processor_t
machine_choose_processor(processor_set_t pset,
processor_t preferred)
*rt_deadline = arg2;
}
- KERNEL_DEBUG(MACHDBG_CODE(DBG_MACH_SCHED, MACH_SCHED_GET_URGENCY), urgency, arg1, arg2, 0, 0);
-
return(urgency);
}
thread_tell_urgency(int urgency,
uint64_t rt_period,
uint64_t rt_deadline,
+ uint64_t sched_latency,
thread_t nthread)
{
- uint64_t urgency_notification_time_start, delta;
+ uint64_t urgency_notification_time_start = 0, delta;
boolean_t urgency_assert = (urgency_notification_assert_abstime_threshold != 0);
assert(get_preemption_level() > 0 || ml_get_interrupts_enabled() == FALSE);
#if DEBUG
|| pmDispatch->pmThreadTellUrgency == NULL)
return;
- KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED,MACH_URGENCY) | DBG_FUNC_START, urgency, rt_period, rt_deadline, 0, 0);
+ SCHED_DEBUG_PLATFORM_KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED,MACH_URGENCY) | DBG_FUNC_START, urgency, rt_period, rt_deadline, sched_latency, 0);
if (__improbable((urgency_assert == TRUE)))
urgency_notification_time_start = mach_absolute_time();
}
}
- KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED,MACH_URGENCY) | DBG_FUNC_END, urgency, rt_period, rt_deadline, 0, 0);
+ SCHED_DEBUG_PLATFORM_KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_SCHED,MACH_URGENCY) | DBG_FUNC_END, urgency, rt_period, rt_deadline, 0, 0);
+}
+
+void
+machine_thread_going_on_core(__unused thread_t new_thread,
+ __unused int urgency,
+ __unused uint64_t sched_latency,
+ __unused uint64_t same_pri_latency,
+ __unused uint64_t dispatch_time)
+{
+}
+
+void
+machine_thread_going_off_core(__unused thread_t old_thread, __unused boolean_t thread_terminating, __unused uint64_t last_dispatch)
+{
+}
+
+void
+machine_max_runnable_latency(__unused uint64_t bg_max_latency,
+ __unused uint64_t default_max_latency,
+ __unused uint64_t realtime_max_latency)
+{
+}
+
+void
+machine_work_interval_notify(__unused thread_t thread,
+ __unused struct kern_work_interval_args* kwi_args)
+{
+}
+
+
+void machine_switch_perfcontrol_context(__unused perfcontrol_event event,
+ __unused uint64_t timestamp,
+ __unused uint32_t flags,
+ __unused uint64_t new_thread_same_pri_latency,
+ __unused thread_t old,
+ __unused thread_t new)
+{
+}
+
+void machine_switch_perfcontrol_state_update(__unused perfcontrol_event event,
+ __unused uint64_t timestamp,
+ __unused uint32_t flags,
+ __unused thread_t thread)
+{
}
void