Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cpuidle: Annotate poll_idle()

The __cpuidle functions will become a noinstr class, as such they need
explicit annotations.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/r/20230112195540.312601331@infradead.org

authored by

Peter Zijlstra and committed by
Ingo Molnar
00717eb8 8ce78470

+5 -1
+5 -1
drivers/cpuidle/poll_state.c
··· 13 13 static int __cpuidle poll_idle(struct cpuidle_device *dev, 14 14 struct cpuidle_driver *drv, int index) 15 15 { 16 - u64 time_start = local_clock(); 16 + u64 time_start; 17 + 18 + instrumentation_begin(); 19 + time_start = local_clock(); 17 20 18 21 dev->poll_time_limit = false; 19 22 ··· 42 39 raw_local_irq_disable(); 43 40 44 41 current_clr_polling(); 42 + instrumentation_end(); 45 43 46 44 return index; 47 45 }