cpu.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. /* CPU control.
  2. * (C) 2001, 2002, 2003, 2004 Rusty Russell
  3. *
  4. * This code is licenced under the GPL.
  5. */
  6. #include <linux/proc_fs.h>
  7. #include <linux/smp.h>
  8. #include <linux/init.h>
  9. #include <linux/notifier.h>
  10. #include <linux/sched.h>
  11. #include <linux/unistd.h>
  12. #include <linux/cpu.h>
  13. #include <linux/module.h>
  14. #include <linux/kthread.h>
  15. #include <linux/stop_machine.h>
  16. #include <linux/mutex.h>
  17. #include <linux/gfp.h>
  18. #define CREATE_TRACE_POINTS
  19. #include <trace/events/cpu_hotplug.h>
  20. #ifdef CONFIG_SMP
  21. /* Serializes the updates to cpu_online_mask, cpu_present_mask */
  22. static DEFINE_MUTEX(cpu_add_remove_lock);
  23. /*
  24. * The following two API's must be used when attempting
  25. * to serialize the updates to cpu_online_mask, cpu_present_mask.
  26. */
  27. void cpu_maps_update_begin(void)
  28. {
  29. mutex_lock(&cpu_add_remove_lock);
  30. }
  31. void cpu_maps_update_done(void)
  32. {
  33. mutex_unlock(&cpu_add_remove_lock);
  34. }
  35. static RAW_NOTIFIER_HEAD(cpu_chain);
  36. /* If set, cpu_up and cpu_down will return -EBUSY and do nothing.
  37. * Should always be manipulated under cpu_add_remove_lock
  38. */
  39. static int cpu_hotplug_disabled;
  40. #ifdef CONFIG_HOTPLUG_CPU
  41. static struct {
  42. struct task_struct *active_writer;
  43. struct mutex lock; /* Synchronizes accesses to refcount, */
  44. /*
  45. * Also blocks the new readers during
  46. * an ongoing cpu hotplug operation.
  47. */
  48. int refcount;
  49. } cpu_hotplug = {
  50. .active_writer = NULL,
  51. .lock = __MUTEX_INITIALIZER(cpu_hotplug.lock),
  52. .refcount = 0,
  53. };
  54. void get_online_cpus(void)
  55. {
  56. might_sleep();
  57. if (cpu_hotplug.active_writer == current)
  58. return;
  59. mutex_lock(&cpu_hotplug.lock);
  60. cpu_hotplug.refcount++;
  61. mutex_unlock(&cpu_hotplug.lock);
  62. }
  63. EXPORT_SYMBOL_GPL(get_online_cpus);
  64. void put_online_cpus(void)
  65. {
  66. if (cpu_hotplug.active_writer == current)
  67. return;
  68. mutex_lock(&cpu_hotplug.lock);
  69. if (!--cpu_hotplug.refcount && unlikely(cpu_hotplug.active_writer))
  70. wake_up_process(cpu_hotplug.active_writer);
  71. mutex_unlock(&cpu_hotplug.lock);
  72. }
  73. EXPORT_SYMBOL_GPL(put_online_cpus);
  74. /*
  75. * This ensures that the hotplug operation can begin only when the
  76. * refcount goes to zero.
  77. *
  78. * Note that during a cpu-hotplug operation, the new readers, if any,
  79. * will be blocked by the cpu_hotplug.lock
  80. *
  81. * Since cpu_hotplug_begin() is always called after invoking
  82. * cpu_maps_update_begin(), we can be sure that only one writer is active.
  83. *
  84. * Note that theoretically, there is a possibility of a livelock:
  85. * - Refcount goes to zero, last reader wakes up the sleeping
  86. * writer.
  87. * - Last reader unlocks the cpu_hotplug.lock.
  88. * - A new reader arrives at this moment, bumps up the refcount.
  89. * - The writer acquires the cpu_hotplug.lock finds the refcount
  90. * non zero and goes to sleep again.
  91. *
  92. * However, this is very difficult to achieve in practice since
  93. * get_online_cpus() not an api which is called all that often.
  94. *
  95. */
  96. static void cpu_hotplug_begin(void)
  97. {
  98. cpu_hotplug.active_writer = current;
  99. for (;;) {
  100. mutex_lock(&cpu_hotplug.lock);
  101. if (likely(!cpu_hotplug.refcount))
  102. break;
  103. __set_current_state(TASK_UNINTERRUPTIBLE);
  104. mutex_unlock(&cpu_hotplug.lock);
  105. schedule();
  106. }
  107. }
  108. static void cpu_hotplug_done(void)
  109. {
  110. cpu_hotplug.active_writer = NULL;
  111. mutex_unlock(&cpu_hotplug.lock);
  112. }
  113. #else /* #if CONFIG_HOTPLUG_CPU */
  114. static void cpu_hotplug_begin(void) {}
  115. static void cpu_hotplug_done(void) {}
  116. #endif /* #else #if CONFIG_HOTPLUG_CPU */
  117. /* Need to know about CPUs going up/down? */
  118. int __ref register_cpu_notifier(struct notifier_block *nb)
  119. {
  120. int ret;
  121. cpu_maps_update_begin();
  122. ret = raw_notifier_chain_register(&cpu_chain, nb);
  123. cpu_maps_update_done();
  124. return ret;
  125. }
  126. static int __cpu_notify(unsigned long val, void *v, int nr_to_call,
  127. int *nr_calls)
  128. {
  129. int ret;
  130. ret = __raw_notifier_call_chain(&cpu_chain, val, v, nr_to_call,
  131. nr_calls);
  132. return notifier_to_errno(ret);
  133. }
  134. static int cpu_notify(unsigned long val, void *v)
  135. {
  136. return __cpu_notify(val, v, -1, NULL);
  137. }
  138. #ifdef CONFIG_HOTPLUG_CPU
  139. static void cpu_notify_nofail(unsigned long val, void *v)
  140. {
  141. BUG_ON(cpu_notify(val, v));
  142. }
  143. EXPORT_SYMBOL(register_cpu_notifier);
  144. void __ref unregister_cpu_notifier(struct notifier_block *nb)
  145. {
  146. cpu_maps_update_begin();
  147. raw_notifier_chain_unregister(&cpu_chain, nb);
  148. cpu_maps_update_done();
  149. }
  150. EXPORT_SYMBOL(unregister_cpu_notifier);
  151. static inline void check_for_tasks(int cpu)
  152. {
  153. struct task_struct *p;
  154. write_lock_irq(&tasklist_lock);
  155. for_each_process(p) {
  156. if (task_cpu(p) == cpu && p->state == TASK_RUNNING &&
  157. (!cputime_eq(p->utime, cputime_zero) ||
  158. !cputime_eq(p->stime, cputime_zero)))
  159. printk(KERN_WARNING "Task %s (pid = %d) is on cpu %d "
  160. "(state = %ld, flags = %x)\n",
  161. p->comm, task_pid_nr(p), cpu,
  162. p->state, p->flags);
  163. }
  164. write_unlock_irq(&tasklist_lock);
  165. }
  166. struct take_cpu_down_param {
  167. unsigned long mod;
  168. void *hcpu;
  169. };
  170. /* Take this CPU down. */
  171. static int __ref take_cpu_down(void *_param)
  172. {
  173. struct take_cpu_down_param *param = _param;
  174. unsigned int cpu = (unsigned int)(param->hcpu);
  175. int err;
  176. /* Ensure this CPU doesn't handle any more interrupts. */
  177. trace_cpu_hotplug_disable_start(cpu);
  178. err = __cpu_disable();
  179. trace_cpu_hotplug_disable_end(cpu);
  180. if (err < 0)
  181. return err;
  182. cpu_notify(CPU_DYING | param->mod, param->hcpu);
  183. return 0;
  184. }
  185. /* Requires cpu_add_remove_lock to be held */
  186. static int __ref _cpu_down(unsigned int cpu, int tasks_frozen)
  187. {
  188. int err, nr_calls = 0;
  189. void *hcpu = (void *)(long)cpu;
  190. unsigned long mod = tasks_frozen ? CPU_TASKS_FROZEN : 0;
  191. struct take_cpu_down_param tcd_param = {
  192. .mod = mod,
  193. .hcpu = hcpu,
  194. };
  195. if (num_online_cpus() == 1)
  196. return -EBUSY;
  197. if (!cpu_online(cpu))
  198. return -EINVAL;
  199. cpu_hotplug_begin();
  200. err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls);
  201. if (err) {
  202. nr_calls--;
  203. __cpu_notify(CPU_DOWN_FAILED | mod, hcpu, nr_calls, NULL);
  204. printk("%s: attempt to take down CPU %u failed\n",
  205. __func__, cpu);
  206. goto out_release;
  207. }
  208. err = __stop_machine(take_cpu_down, &tcd_param, cpumask_of(cpu));
  209. if (err) {
  210. /* CPU didn't die: tell everyone. Can't complain. */
  211. cpu_notify_nofail(CPU_DOWN_FAILED | mod, hcpu);
  212. goto out_release;
  213. }
  214. BUG_ON(cpu_online(cpu));
  215. /*
  216. * The migration_call() CPU_DYING callback will have removed all
  217. * runnable tasks from the cpu, there's only the idle task left now
  218. * that the migration thread is done doing the stop_machine thing.
  219. *
  220. * Wait for the stop thread to go away.
  221. */
  222. while (!idle_cpu(cpu))
  223. cpu_relax();
  224. /* This actually kills the CPU. */
  225. trace_cpu_hotplug_die_start(cpu);
  226. __cpu_die(cpu);
  227. trace_cpu_hotplug_die_end(cpu);
  228. /* CPU is completely dead: tell everyone. Too late to complain. */
  229. cpu_notify_nofail(CPU_DEAD | mod, hcpu);
  230. check_for_tasks(cpu);
  231. out_release:
  232. cpu_hotplug_done();
  233. if (!err)
  234. cpu_notify_nofail(CPU_POST_DEAD | mod, hcpu);
  235. return err;
  236. }
  237. int __ref cpu_down(unsigned int cpu)
  238. {
  239. int err;
  240. cpu_maps_update_begin();
  241. trace_cpu_hotplug_down_start(cpu);
  242. if (cpu_hotplug_disabled) {
  243. err = -EBUSY;
  244. goto out;
  245. }
  246. err = _cpu_down(cpu, 0);
  247. #ifdef CONFIG_MESON6_SMP_HOTPLUG
  248. extern void disable_cpu_fw();
  249. disable_cpu_fw();
  250. #endif
  251. out:
  252. trace_cpu_hotplug_down_end(cpu);
  253. cpu_maps_update_done();
  254. return err;
  255. }
  256. EXPORT_SYMBOL(cpu_down);
  257. #endif /*CONFIG_HOTPLUG_CPU*/
  258. /* Requires cpu_add_remove_lock to be held */
  259. static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
  260. {
  261. int ret, nr_calls = 0;
  262. void *hcpu = (void *)(long)cpu;
  263. unsigned long mod = tasks_frozen ? CPU_TASKS_FROZEN : 0;
  264. if (cpu_online(cpu) || !cpu_present(cpu))
  265. return -EINVAL;
  266. cpu_hotplug_begin();
  267. ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls);
  268. if (ret) {
  269. nr_calls--;
  270. printk(KERN_WARNING "%s: attempt to bring up CPU %u failed\n",
  271. __func__, cpu);
  272. goto out_notify;
  273. }
  274. #ifdef CONFIG_MESON6_SMP_HOTPLUG
  275. extern void restore_cpu_fw();
  276. restore_cpu_fw();
  277. #endif
  278. /* Arch-specific enabling code. */
  279. trace_cpu_hotplug_arch_up_start(cpu);
  280. ret = __cpu_up(cpu);
  281. trace_cpu_hotplug_arch_up_end(cpu);
  282. if (ret != 0)
  283. goto out_notify;
  284. BUG_ON(!cpu_online(cpu));
  285. /* Now call notifier in preparation. */
  286. cpu_notify(CPU_ONLINE | mod, hcpu);
  287. out_notify:
  288. if (ret != 0)
  289. __cpu_notify(CPU_UP_CANCELED | mod, hcpu, nr_calls, NULL);
  290. cpu_hotplug_done();
  291. return ret;
  292. }
  293. int __cpuinit cpu_up(unsigned int cpu)
  294. {
  295. int err = 0;
  296. #ifdef CONFIG_MEMORY_HOTPLUG
  297. int nid;
  298. pg_data_t *pgdat;
  299. #endif
  300. if (!cpu_possible(cpu)) {
  301. printk(KERN_ERR "can't online cpu %d because it is not "
  302. "configured as may-hotadd at boot time\n", cpu);
  303. #if defined(CONFIG_IA64)
  304. printk(KERN_ERR "please check additional_cpus= boot "
  305. "parameter\n");
  306. #endif
  307. return -EINVAL;
  308. }
  309. #ifdef CONFIG_MEMORY_HOTPLUG
  310. nid = cpu_to_node(cpu);
  311. if (!node_online(nid)) {
  312. err = mem_online_node(nid);
  313. if (err)
  314. return err;
  315. }
  316. pgdat = NODE_DATA(nid);
  317. if (!pgdat) {
  318. printk(KERN_ERR
  319. "Can't online cpu %d due to NULL pgdat\n", cpu);
  320. return -ENOMEM;
  321. }
  322. if (pgdat->node_zonelists->_zonerefs->zone == NULL) {
  323. mutex_lock(&zonelists_mutex);
  324. build_all_zonelists(NULL);
  325. mutex_unlock(&zonelists_mutex);
  326. }
  327. #endif
  328. cpu_maps_update_begin();
  329. trace_cpu_hotplug_up_start(cpu);
  330. if (cpu_hotplug_disabled) {
  331. err = -EBUSY;
  332. goto out;
  333. }
  334. err = _cpu_up(cpu, 0);
  335. out:
  336. trace_cpu_hotplug_up_end(cpu);
  337. cpu_maps_update_done();
  338. return err;
  339. }
  340. #ifdef CONFIG_PM_SLEEP_SMP
  341. static cpumask_var_t frozen_cpus;
  342. void __weak arch_disable_nonboot_cpus_begin(void)
  343. {
  344. }
  345. void __weak arch_disable_nonboot_cpus_end(void)
  346. {
  347. }
  348. int disable_nonboot_cpus(void)
  349. {
  350. int cpu, first_cpu, error = 0;
  351. cpu_maps_update_begin();
  352. first_cpu = cpumask_first(cpu_online_mask);
  353. /*
  354. * We take down all of the non-boot CPUs in one shot to avoid races
  355. * with the userspace trying to use the CPU hotplug at the same time
  356. */
  357. cpumask_clear(frozen_cpus);
  358. arch_disable_nonboot_cpus_begin();
  359. printk("Disabling non-boot CPUs ...\n");
  360. for_each_online_cpu(cpu) {
  361. if (cpu == first_cpu)
  362. continue;
  363. error = _cpu_down(cpu, 1);
  364. if (!error)
  365. cpumask_set_cpu(cpu, frozen_cpus);
  366. else {
  367. printk(KERN_ERR "Error taking CPU%d down: %d\n",
  368. cpu, error);
  369. break;
  370. }
  371. }
  372. arch_disable_nonboot_cpus_end();
  373. if (!error) {
  374. BUG_ON(num_online_cpus() > 1);
  375. /* Make sure the CPUs won't be enabled by someone else */
  376. cpu_hotplug_disabled = 1;
  377. } else {
  378. printk(KERN_ERR "Non-boot CPUs are not disabled\n");
  379. }
  380. cpu_maps_update_done();
  381. return error;
  382. }
  383. void __weak arch_enable_nonboot_cpus_begin(void)
  384. {
  385. }
  386. void __weak arch_enable_nonboot_cpus_end(void)
  387. {
  388. }
  389. void __ref enable_nonboot_cpus(void)
  390. {
  391. int cpu, error;
  392. /* Allow everyone to use the CPU hotplug again */
  393. cpu_maps_update_begin();
  394. cpu_hotplug_disabled = 0;
  395. if (cpumask_empty(frozen_cpus))
  396. goto out;
  397. printk(KERN_INFO "Enabling non-boot CPUs ...\n");
  398. arch_enable_nonboot_cpus_begin();
  399. for_each_cpu(cpu, frozen_cpus) {
  400. error = _cpu_up(cpu, 1);
  401. if (!error) {
  402. printk(KERN_INFO "CPU%d is up\n", cpu);
  403. continue;
  404. }
  405. printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
  406. }
  407. arch_enable_nonboot_cpus_end();
  408. cpumask_clear(frozen_cpus);
  409. out:
  410. cpu_maps_update_done();
  411. }
  412. static int alloc_frozen_cpus(void)
  413. {
  414. if (!alloc_cpumask_var(&frozen_cpus, GFP_KERNEL|__GFP_ZERO))
  415. return -ENOMEM;
  416. return 0;
  417. }
  418. core_initcall(alloc_frozen_cpus);
  419. #endif /* CONFIG_PM_SLEEP_SMP */
  420. /**
  421. * notify_cpu_starting(cpu) - call the CPU_STARTING notifiers
  422. * @cpu: cpu that just started
  423. *
  424. * This function calls the cpu_chain notifiers with CPU_STARTING.
  425. * It must be called by the arch code on the new cpu, before the new cpu
  426. * enables interrupts and before the "boot" cpu returns from __cpu_up().
  427. */
  428. void __cpuinit notify_cpu_starting(unsigned int cpu)
  429. {
  430. unsigned long val = CPU_STARTING;
  431. #ifdef CONFIG_PM_SLEEP_SMP
  432. if (frozen_cpus != NULL && cpumask_test_cpu(cpu, frozen_cpus))
  433. val = CPU_STARTING_FROZEN;
  434. #endif /* CONFIG_PM_SLEEP_SMP */
  435. cpu_notify(val, (void *)(long)cpu);
  436. }
  437. #endif /* CONFIG_SMP */
  438. /*
  439. * cpu_bit_bitmap[] is a special, "compressed" data structure that
  440. * represents all NR_CPUS bits binary values of 1<<nr.
  441. *
  442. * It is used by cpumask_of() to get a constant address to a CPU
  443. * mask value that has a single bit set only.
  444. */
  445. /* cpu_bit_bitmap[0] is empty - so we can back into it */
  446. #define MASK_DECLARE_1(x) [x+1][0] = (1UL << (x))
  447. #define MASK_DECLARE_2(x) MASK_DECLARE_1(x), MASK_DECLARE_1(x+1)
  448. #define MASK_DECLARE_4(x) MASK_DECLARE_2(x), MASK_DECLARE_2(x+2)
  449. #define MASK_DECLARE_8(x) MASK_DECLARE_4(x), MASK_DECLARE_4(x+4)
  450. const unsigned long cpu_bit_bitmap[BITS_PER_LONG+1][BITS_TO_LONGS(NR_CPUS)] = {
  451. MASK_DECLARE_8(0), MASK_DECLARE_8(8),
  452. MASK_DECLARE_8(16), MASK_DECLARE_8(24),
  453. #if BITS_PER_LONG > 32
  454. MASK_DECLARE_8(32), MASK_DECLARE_8(40),
  455. MASK_DECLARE_8(48), MASK_DECLARE_8(56),
  456. #endif
  457. };
  458. EXPORT_SYMBOL_GPL(cpu_bit_bitmap);
  459. const DECLARE_BITMAP(cpu_all_bits, NR_CPUS) = CPU_BITS_ALL;
  460. EXPORT_SYMBOL(cpu_all_bits);
  461. #ifdef CONFIG_INIT_ALL_POSSIBLE
  462. static DECLARE_BITMAP(cpu_possible_bits, CONFIG_NR_CPUS) __read_mostly
  463. = CPU_BITS_ALL;
  464. #else
  465. static DECLARE_BITMAP(cpu_possible_bits, CONFIG_NR_CPUS) __read_mostly;
  466. #endif
  467. const struct cpumask *const cpu_possible_mask = to_cpumask(cpu_possible_bits);
  468. EXPORT_SYMBOL(cpu_possible_mask);
  469. static DECLARE_BITMAP(cpu_online_bits, CONFIG_NR_CPUS) __read_mostly;
  470. const struct cpumask *const cpu_online_mask = to_cpumask(cpu_online_bits);
  471. EXPORT_SYMBOL(cpu_online_mask);
  472. static DECLARE_BITMAP(cpu_present_bits, CONFIG_NR_CPUS) __read_mostly;
  473. const struct cpumask *const cpu_present_mask = to_cpumask(cpu_present_bits);
  474. EXPORT_SYMBOL(cpu_present_mask);
  475. static DECLARE_BITMAP(cpu_active_bits, CONFIG_NR_CPUS) __read_mostly;
  476. const struct cpumask *const cpu_active_mask = to_cpumask(cpu_active_bits);
  477. EXPORT_SYMBOL(cpu_active_mask);
  478. void set_cpu_possible(unsigned int cpu, bool possible)
  479. {
  480. if (possible)
  481. cpumask_set_cpu(cpu, to_cpumask(cpu_possible_bits));
  482. else
  483. cpumask_clear_cpu(cpu, to_cpumask(cpu_possible_bits));
  484. }
  485. void set_cpu_present(unsigned int cpu, bool present)
  486. {
  487. if (present)
  488. cpumask_set_cpu(cpu, to_cpumask(cpu_present_bits));
  489. else
  490. cpumask_clear_cpu(cpu, to_cpumask(cpu_present_bits));
  491. }
  492. void set_cpu_online(unsigned int cpu, bool online)
  493. {
  494. if (online)
  495. cpumask_set_cpu(cpu, to_cpumask(cpu_online_bits));
  496. else
  497. cpumask_clear_cpu(cpu, to_cpumask(cpu_online_bits));
  498. }
  499. void set_cpu_active(unsigned int cpu, bool active)
  500. {
  501. if (active)
  502. cpumask_set_cpu(cpu, to_cpumask(cpu_active_bits));
  503. else
  504. cpumask_clear_cpu(cpu, to_cpumask(cpu_active_bits));
  505. }
  506. void init_cpu_present(const struct cpumask *src)
  507. {
  508. cpumask_copy(to_cpumask(cpu_present_bits), src);
  509. }
  510. void init_cpu_possible(const struct cpumask *src)
  511. {
  512. cpumask_copy(to_cpumask(cpu_possible_bits), src);
  513. }
  514. void init_cpu_online(const struct cpumask *src)
  515. {
  516. cpumask_copy(to_cpumask(cpu_online_bits), src);
  517. }
  518. static ATOMIC_NOTIFIER_HEAD(idle_notifier);
  519. void idle_notifier_register(struct notifier_block *n)
  520. {
  521. atomic_notifier_chain_register(&idle_notifier, n);
  522. }
  523. EXPORT_SYMBOL_GPL(idle_notifier_register);
  524. void idle_notifier_unregister(struct notifier_block *n)
  525. {
  526. atomic_notifier_chain_unregister(&idle_notifier, n);
  527. }
  528. EXPORT_SYMBOL_GPL(idle_notifier_unregister);
  529. void idle_notifier_call_chain(unsigned long val)
  530. {
  531. atomic_notifier_call_chain(&idle_notifier, val, NULL);
  532. }
  533. EXPORT_SYMBOL_GPL(idle_notifier_call_chain);