···52#include "sigframe.h"5354void (*ia64_mark_idle)(int);05556unsigned long boot_option_idle_override = 0;57EXPORT_SYMBOL(boot_option_idle_override);···254}255#endif /* CONFIG_HOTPLUG_CPU */256257+static void do_nothing(void *unused)258+{259+}260+261+/*262+ * cpu_idle_wait - Used to ensure that all the CPUs discard old value of263+ * pm_idle and update to new pm_idle value. Required while changing pm_idle264+ * handler on SMP systems.265+ *266+ * Caller must have changed pm_idle to the new value before the call. Old267+ * pm_idle value will not be used by any CPU after the return of this function.268+ */269void cpu_idle_wait(void)270{271+ smp_mb();272+ /* kick all the CPUs so that they exit out of pm_idle */273+ smp_call_function(do_nothing, NULL, 0, 1);0000000000000000000000274}275EXPORT_SYMBOL_GPL(cpu_idle_wait);276···308#ifdef CONFIG_SMP309 min_xtp();310#endif000311 rmb();312 if (mark_idle)313 (*mark_idle)(1);