Skip to content

Commit a5fd973

Browse files
committed
tick/powerclamp: Remove tick_nohz_idle abuse
commit 4dbd277 "tick: export nohz tick idle symbols for module use" was merged via the thermal tree without an explicit ack from the relevant maintainers. The exports are abused by the intel powerclamp driver which implements a fake idle state from a sched FIFO task. This causes all kinds of wreckage in the NOHZ core code which rightfully assumes that tick_nohz_idle_enter/exit() are only called from the idle task itself. Recent changes in the NOHZ core lead to a failure of the powerclamp driver and now people try to hack completely broken and backwards workarounds into the NOHZ core code. This is completely unacceptable and just papers over the real problem. There are way more subtle issues lurking around the corner. The real solution is to fix the powerclamp driver by rewriting it with a sane concept, but that's beyond the scope of this. So the only solution for now is to remove the calls into the core NOHZ code from the powerclamp trainwreck along with the exports. Fixes: d6d71ee "PM: Introduce Intel PowerClamp Driver" Signed-off-by: Thomas Gleixner <[email protected]> Cc: Preeti U Murthy <[email protected]> Cc: Viresh Kumar <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Fengguang Wu <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Pan Jacob jun <[email protected]> Cc: LKP <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Zhang Rui <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/alpine.DEB.2.11.1412181110110.17382@nanos Signed-off-by: Thomas Gleixner <[email protected]>
1 parent 3a5dc1f commit a5fd973

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

drivers/thermal/intel_powerclamp.c

-2
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,6 @@ static int clamp_thread(void *arg)
435435
* allowed. thus jiffies are updated properly.
436436
*/
437437
preempt_disable();
438-
tick_nohz_idle_enter();
439438
/* mwait until target jiffies is reached */
440439
while (time_before(jiffies, target_jiffies)) {
441440
unsigned long ecx = 1;
@@ -451,7 +450,6 @@ static int clamp_thread(void *arg)
451450
start_critical_timings();
452451
atomic_inc(&idle_wakeup_counter);
453452
}
454-
tick_nohz_idle_exit();
455453
preempt_enable();
456454
}
457455
del_timer_sync(&wakeup_timer);

kernel/time/tick-sched.c

-2
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,6 @@ void tick_nohz_idle_enter(void)
847847

848848
local_irq_enable();
849849
}
850-
EXPORT_SYMBOL_GPL(tick_nohz_idle_enter);
851850

852851
/**
853852
* tick_nohz_irq_exit - update next tick event from interrupt exit
@@ -974,7 +973,6 @@ void tick_nohz_idle_exit(void)
974973

975974
local_irq_enable();
976975
}
977-
EXPORT_SYMBOL_GPL(tick_nohz_idle_exit);
978976

979977
static int tick_nohz_reprogram(struct tick_sched *ts, ktime_t now)
980978
{

0 commit comments

Comments
 (0)