Loading arch/x86/kernel/process.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -381,6 +381,8 @@ void default_idle(void) else else local_irq_enable(); local_irq_enable(); current_thread_info()->status |= TS_POLLING; current_thread_info()->status |= TS_POLLING; trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); } else { } else { local_irq_enable(); local_irq_enable(); /* loop is done by the caller */ /* loop is done by the caller */ Loading Loading @@ -438,8 +440,6 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait); */ */ void mwait_idle_with_hints(unsigned long ax, unsigned long cx) void mwait_idle_with_hints(unsigned long ax, unsigned long cx) { { trace_power_start(POWER_CSTATE, (ax>>4)+1, smp_processor_id()); trace_cpu_idle((ax>>4)+1, smp_processor_id()); if (!need_resched()) { if (!need_resched()) { if (cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLUSH_MONITOR)) if (cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLUSH_MONITOR)) clflush((void *)¤t_thread_info()->flags); clflush((void *)¤t_thread_info()->flags); Loading @@ -466,6 +466,8 @@ static void mwait_idle(void) __sti_mwait(0, 0); __sti_mwait(0, 0); else else local_irq_enable(); local_irq_enable(); trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); } else } else local_irq_enable(); local_irq_enable(); } } Loading arch/x86/kernel/process_32.c +0 −4 Original line number Original line Diff line number Diff line Loading @@ -57,8 +57,6 @@ #include <asm/syscalls.h> #include <asm/syscalls.h> #include <asm/debugreg.h> #include <asm/debugreg.h> #include <trace/events/power.h> asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); /* /* Loading Loading @@ -113,8 +111,6 @@ void cpu_idle(void) stop_critical_timings(); stop_critical_timings(); pm_idle(); pm_idle(); start_critical_timings(); start_critical_timings(); trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); } } tick_nohz_restart_sched_tick(); tick_nohz_restart_sched_tick(); preempt_enable_no_resched(); preempt_enable_no_resched(); Loading arch/x86/kernel/process_64.c +0 −6 Original line number Original line Diff line number Diff line Loading @@ -51,8 +51,6 @@ #include <asm/syscalls.h> #include <asm/syscalls.h> #include <asm/debugreg.h> #include <asm/debugreg.h> #include <trace/events/power.h> asmlinkage extern void ret_from_fork(void); asmlinkage extern void ret_from_fork(void); DEFINE_PER_CPU(unsigned long, old_rsp); DEFINE_PER_CPU(unsigned long, old_rsp); Loading Loading @@ -141,10 +139,6 @@ void cpu_idle(void) pm_idle(); pm_idle(); start_critical_timings(); start_critical_timings(); trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); /* In many cases the interrupt that ended idle /* In many cases the interrupt that ended idle has already called exit_idle. But some idle has already called exit_idle. But some idle loops can be woken up without interrupt. */ loops can be woken up without interrupt. */ Loading drivers/cpuidle/cpuidle.c +8 −2 Original line number Original line Diff line number Diff line Loading @@ -96,7 +96,15 @@ static void cpuidle_idle_call(void) /* enter the state and update stats */ /* enter the state and update stats */ dev->last_state = target_state; dev->last_state = target_state; trace_power_start(POWER_CSTATE, next_state, dev->cpu); trace_cpu_idle(next_state, dev->cpu); dev->last_residency = target_state->enter(dev, target_state); dev->last_residency = target_state->enter(dev, target_state); trace_power_end(dev->cpu); trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu); if (dev->last_state) if (dev->last_state) target_state = dev->last_state; target_state = dev->last_state; Loading @@ -106,8 +114,6 @@ static void cpuidle_idle_call(void) /* give the governor an opportunity to reflect on the outcome */ /* give the governor an opportunity to reflect on the outcome */ if (cpuidle_curr_governor->reflect) if (cpuidle_curr_governor->reflect) cpuidle_curr_governor->reflect(dev); cpuidle_curr_governor->reflect(dev); trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); } } /** /** Loading drivers/idle/intel_idle.c +0 −2 Original line number Original line Diff line number Diff line Loading @@ -231,8 +231,6 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state) kt_before = ktime_get_real(); kt_before = ktime_get_real(); stop_critical_timings(); stop_critical_timings(); trace_power_start(POWER_CSTATE, (eax >> 4) + 1, cpu); trace_cpu_idle((eax >> 4) + 1, cpu); if (!need_resched()) { if (!need_resched()) { __monitor((void *)¤t_thread_info()->flags, 0, 0); __monitor((void *)¤t_thread_info()->flags, 0, 0); Loading Loading
arch/x86/kernel/process.c +4 −2 Original line number Original line Diff line number Diff line Loading @@ -381,6 +381,8 @@ void default_idle(void) else else local_irq_enable(); local_irq_enable(); current_thread_info()->status |= TS_POLLING; current_thread_info()->status |= TS_POLLING; trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); } else { } else { local_irq_enable(); local_irq_enable(); /* loop is done by the caller */ /* loop is done by the caller */ Loading Loading @@ -438,8 +440,6 @@ EXPORT_SYMBOL_GPL(cpu_idle_wait); */ */ void mwait_idle_with_hints(unsigned long ax, unsigned long cx) void mwait_idle_with_hints(unsigned long ax, unsigned long cx) { { trace_power_start(POWER_CSTATE, (ax>>4)+1, smp_processor_id()); trace_cpu_idle((ax>>4)+1, smp_processor_id()); if (!need_resched()) { if (!need_resched()) { if (cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLUSH_MONITOR)) if (cpu_has(__this_cpu_ptr(&cpu_info), X86_FEATURE_CLFLUSH_MONITOR)) clflush((void *)¤t_thread_info()->flags); clflush((void *)¤t_thread_info()->flags); Loading @@ -466,6 +466,8 @@ static void mwait_idle(void) __sti_mwait(0, 0); __sti_mwait(0, 0); else else local_irq_enable(); local_irq_enable(); trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); } else } else local_irq_enable(); local_irq_enable(); } } Loading
arch/x86/kernel/process_32.c +0 −4 Original line number Original line Diff line number Diff line Loading @@ -57,8 +57,6 @@ #include <asm/syscalls.h> #include <asm/syscalls.h> #include <asm/debugreg.h> #include <asm/debugreg.h> #include <trace/events/power.h> asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); asmlinkage void ret_from_fork(void) __asm__("ret_from_fork"); /* /* Loading Loading @@ -113,8 +111,6 @@ void cpu_idle(void) stop_critical_timings(); stop_critical_timings(); pm_idle(); pm_idle(); start_critical_timings(); start_critical_timings(); trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); } } tick_nohz_restart_sched_tick(); tick_nohz_restart_sched_tick(); preempt_enable_no_resched(); preempt_enable_no_resched(); Loading
arch/x86/kernel/process_64.c +0 −6 Original line number Original line Diff line number Diff line Loading @@ -51,8 +51,6 @@ #include <asm/syscalls.h> #include <asm/syscalls.h> #include <asm/debugreg.h> #include <asm/debugreg.h> #include <trace/events/power.h> asmlinkage extern void ret_from_fork(void); asmlinkage extern void ret_from_fork(void); DEFINE_PER_CPU(unsigned long, old_rsp); DEFINE_PER_CPU(unsigned long, old_rsp); Loading Loading @@ -141,10 +139,6 @@ void cpu_idle(void) pm_idle(); pm_idle(); start_critical_timings(); start_critical_timings(); trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); /* In many cases the interrupt that ended idle /* In many cases the interrupt that ended idle has already called exit_idle. But some idle has already called exit_idle. But some idle loops can be woken up without interrupt. */ loops can be woken up without interrupt. */ Loading
drivers/cpuidle/cpuidle.c +8 −2 Original line number Original line Diff line number Diff line Loading @@ -96,7 +96,15 @@ static void cpuidle_idle_call(void) /* enter the state and update stats */ /* enter the state and update stats */ dev->last_state = target_state; dev->last_state = target_state; trace_power_start(POWER_CSTATE, next_state, dev->cpu); trace_cpu_idle(next_state, dev->cpu); dev->last_residency = target_state->enter(dev, target_state); dev->last_residency = target_state->enter(dev, target_state); trace_power_end(dev->cpu); trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu); if (dev->last_state) if (dev->last_state) target_state = dev->last_state; target_state = dev->last_state; Loading @@ -106,8 +114,6 @@ static void cpuidle_idle_call(void) /* give the governor an opportunity to reflect on the outcome */ /* give the governor an opportunity to reflect on the outcome */ if (cpuidle_curr_governor->reflect) if (cpuidle_curr_governor->reflect) cpuidle_curr_governor->reflect(dev); cpuidle_curr_governor->reflect(dev); trace_power_end(smp_processor_id()); trace_cpu_idle(PWR_EVENT_EXIT, smp_processor_id()); } } /** /** Loading
drivers/idle/intel_idle.c +0 −2 Original line number Original line Diff line number Diff line Loading @@ -231,8 +231,6 @@ static int intel_idle(struct cpuidle_device *dev, struct cpuidle_state *state) kt_before = ktime_get_real(); kt_before = ktime_get_real(); stop_critical_timings(); stop_critical_timings(); trace_power_start(POWER_CSTATE, (eax >> 4) + 1, cpu); trace_cpu_idle((eax >> 4) + 1, cpu); if (!need_resched()) { if (!need_resched()) { __monitor((void *)¤t_thread_info()->flags, 0, 0); __monitor((void *)¤t_thread_info()->flags, 0, 0); Loading