smp.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. /*
  2. * This program is free software; you can redistribute it and/or
  3. * modify it under the terms of the GNU General Public License
  4. * as published by the Free Software Foundation; either version 2
  5. * of the License, or (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software
  14. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  15. *
  16. * Copyright (C) 2000, 2001 Kanoj Sarcar
  17. * Copyright (C) 2000, 2001 Ralf Baechle
  18. * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
  19. * Copyright (C) 2000, 2001, 2003 Broadcom Corporation
  20. */
  21. #include <linux/cache.h>
  22. #include <linux/delay.h>
  23. #include <linux/init.h>
  24. #include <linux/interrupt.h>
  25. #include <linux/smp.h>
  26. #include <linux/spinlock.h>
  27. #include <linux/threads.h>
  28. #include <linux/export.h>
  29. #include <linux/time.h>
  30. #include <linux/timex.h>
  31. #include <linux/sched.h>
  32. #include <linux/cpumask.h>
  33. #include <linux/cpu.h>
  34. #include <linux/err.h>
  35. #include <linux/ftrace.h>
  36. #include <linux/irqdomain.h>
  37. #include <linux/of.h>
  38. #include <linux/of_irq.h>
  39. #include <linux/atomic.h>
  40. #include <asm/cpu.h>
  41. #include <asm/processor.h>
  42. #include <asm/idle.h>
  43. #include <asm/r4k-timer.h>
  44. #include <asm/mips-cpc.h>
  45. #include <asm/mmu_context.h>
  46. #include <asm/time.h>
  47. #include <asm/setup.h>
  48. #include <asm/maar.h>
  49. cpumask_t cpu_callin_map; /* Bitmask of started secondaries */
  50. int __cpu_number_map[NR_CPUS]; /* Map physical to logical */
  51. EXPORT_SYMBOL(__cpu_number_map);
  52. int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */
  53. EXPORT_SYMBOL(__cpu_logical_map);
  54. /* Number of TCs (or siblings in Intel speak) per CPU core */
  55. int smp_num_siblings = 1;
  56. EXPORT_SYMBOL(smp_num_siblings);
  57. /* representing the TCs (or siblings in Intel speak) of each logical CPU */
  58. cpumask_t cpu_sibling_map[NR_CPUS] __read_mostly;
  59. EXPORT_SYMBOL(cpu_sibling_map);
  60. /* representing the core map of multi-core chips of each logical CPU */
  61. cpumask_t cpu_core_map[NR_CPUS] __read_mostly;
  62. EXPORT_SYMBOL(cpu_core_map);
  63. /*
  64. * A logcal cpu mask containing only one VPE per core to
  65. * reduce the number of IPIs on large MT systems.
  66. */
  67. cpumask_t cpu_foreign_map[NR_CPUS] __read_mostly;
  68. EXPORT_SYMBOL(cpu_foreign_map);
  69. /* representing cpus for which sibling maps can be computed */
  70. static cpumask_t cpu_sibling_setup_map;
  71. /* representing cpus for which core maps can be computed */
  72. static cpumask_t cpu_core_setup_map;
  73. cpumask_t cpu_coherent_mask;
  74. #ifdef CONFIG_GENERIC_IRQ_IPI
  75. static struct irq_desc *call_desc;
  76. static struct irq_desc *sched_desc;
  77. #endif
  78. static inline void set_cpu_sibling_map(int cpu)
  79. {
  80. int i;
  81. cpumask_set_cpu(cpu, &cpu_sibling_setup_map);
  82. if (smp_num_siblings > 1) {
  83. for_each_cpu(i, &cpu_sibling_setup_map) {
  84. if (cpu_data[cpu].package == cpu_data[i].package &&
  85. cpu_data[cpu].core == cpu_data[i].core) {
  86. cpumask_set_cpu(i, &cpu_sibling_map[cpu]);
  87. cpumask_set_cpu(cpu, &cpu_sibling_map[i]);
  88. }
  89. }
  90. } else
  91. cpumask_set_cpu(cpu, &cpu_sibling_map[cpu]);
  92. }
  93. static inline void set_cpu_core_map(int cpu)
  94. {
  95. int i;
  96. cpumask_set_cpu(cpu, &cpu_core_setup_map);
  97. for_each_cpu(i, &cpu_core_setup_map) {
  98. if (cpu_data[cpu].package == cpu_data[i].package) {
  99. cpumask_set_cpu(i, &cpu_core_map[cpu]);
  100. cpumask_set_cpu(cpu, &cpu_core_map[i]);
  101. }
  102. }
  103. }
  104. /*
  105. * Calculate a new cpu_foreign_map mask whenever a
  106. * new cpu appears or disappears.
  107. */
  108. void calculate_cpu_foreign_map(void)
  109. {
  110. int i, k, core_present;
  111. cpumask_t temp_foreign_map;
  112. /* Re-calculate the mask */
  113. cpumask_clear(&temp_foreign_map);
  114. for_each_online_cpu(i) {
  115. core_present = 0;
  116. for_each_cpu(k, &temp_foreign_map)
  117. if (cpu_data[i].package == cpu_data[k].package &&
  118. cpu_data[i].core == cpu_data[k].core)
  119. core_present = 1;
  120. if (!core_present)
  121. cpumask_set_cpu(i, &temp_foreign_map);
  122. }
  123. for_each_online_cpu(i)
  124. cpumask_andnot(&cpu_foreign_map[i],
  125. &temp_foreign_map, &cpu_sibling_map[i]);
  126. }
  127. struct plat_smp_ops *mp_ops;
  128. EXPORT_SYMBOL(mp_ops);
  129. void register_smp_ops(struct plat_smp_ops *ops)
  130. {
  131. if (mp_ops)
  132. printk(KERN_WARNING "Overriding previously set SMP ops\n");
  133. mp_ops = ops;
  134. }
  135. #ifdef CONFIG_GENERIC_IRQ_IPI
  136. void mips_smp_send_ipi_single(int cpu, unsigned int action)
  137. {
  138. mips_smp_send_ipi_mask(cpumask_of(cpu), action);
  139. }
  140. void mips_smp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
  141. {
  142. unsigned long flags;
  143. unsigned int core;
  144. int cpu;
  145. local_irq_save(flags);
  146. switch (action) {
  147. case SMP_CALL_FUNCTION:
  148. __ipi_send_mask(call_desc, mask);
  149. break;
  150. case SMP_RESCHEDULE_YOURSELF:
  151. __ipi_send_mask(sched_desc, mask);
  152. break;
  153. default:
  154. BUG();
  155. }
  156. if (mips_cpc_present()) {
  157. for_each_cpu(cpu, mask) {
  158. core = cpu_data[cpu].core;
  159. if (core == current_cpu_data.core)
  160. continue;
  161. while (!cpumask_test_cpu(cpu, &cpu_coherent_mask)) {
  162. mips_cm_lock_other(core, 0);
  163. mips_cpc_lock_other(core);
  164. write_cpc_co_cmd(CPC_Cx_CMD_PWRUP);
  165. mips_cpc_unlock_other();
  166. mips_cm_unlock_other();
  167. }
  168. }
  169. }
  170. local_irq_restore(flags);
  171. }
  172. static irqreturn_t ipi_resched_interrupt(int irq, void *dev_id)
  173. {
  174. scheduler_ipi();
  175. return IRQ_HANDLED;
  176. }
  177. static irqreturn_t ipi_call_interrupt(int irq, void *dev_id)
  178. {
  179. generic_smp_call_function_interrupt();
  180. return IRQ_HANDLED;
  181. }
  182. static struct irqaction irq_resched = {
  183. .handler = ipi_resched_interrupt,
  184. .flags = IRQF_PERCPU,
  185. .name = "IPI resched"
  186. };
  187. static struct irqaction irq_call = {
  188. .handler = ipi_call_interrupt,
  189. .flags = IRQF_PERCPU,
  190. .name = "IPI call"
  191. };
  192. static void smp_ipi_init_one(unsigned int virq,
  193. struct irqaction *action)
  194. {
  195. int ret;
  196. irq_set_handler(virq, handle_percpu_irq);
  197. ret = setup_irq(virq, action);
  198. BUG_ON(ret);
  199. }
  200. static unsigned int call_virq, sched_virq;
  201. int mips_smp_ipi_allocate(const struct cpumask *mask)
  202. {
  203. int virq;
  204. struct irq_domain *ipidomain;
  205. struct device_node *node;
  206. node = of_irq_find_parent(of_root);
  207. ipidomain = irq_find_matching_host(node, DOMAIN_BUS_IPI);
  208. /*
  209. * Some platforms have half DT setup. So if we found irq node but
  210. * didn't find an ipidomain, try to search for one that is not in the
  211. * DT.
  212. */
  213. if (node && !ipidomain)
  214. ipidomain = irq_find_matching_host(NULL, DOMAIN_BUS_IPI);
  215. /*
  216. * There are systems which only use IPI domains some of the time,
  217. * depending upon configuration we don't know until runtime. An
  218. * example is Malta where we may compile in support for GIC & the
  219. * MT ASE, but run on a system which has multiple VPEs in a single
  220. * core and doesn't include a GIC. Until all IPI implementations
  221. * have been converted to use IPI domains the best we can do here
  222. * is to return & hope some other code sets up the IPIs.
  223. */
  224. if (!ipidomain)
  225. return 0;
  226. virq = irq_reserve_ipi(ipidomain, mask);
  227. BUG_ON(!virq);
  228. if (!call_virq)
  229. call_virq = virq;
  230. virq = irq_reserve_ipi(ipidomain, mask);
  231. BUG_ON(!virq);
  232. if (!sched_virq)
  233. sched_virq = virq;
  234. if (irq_domain_is_ipi_per_cpu(ipidomain)) {
  235. int cpu;
  236. for_each_cpu(cpu, mask) {
  237. smp_ipi_init_one(call_virq + cpu, &irq_call);
  238. smp_ipi_init_one(sched_virq + cpu, &irq_resched);
  239. }
  240. } else {
  241. smp_ipi_init_one(call_virq, &irq_call);
  242. smp_ipi_init_one(sched_virq, &irq_resched);
  243. }
  244. return 0;
  245. }
  246. int mips_smp_ipi_free(const struct cpumask *mask)
  247. {
  248. struct irq_domain *ipidomain;
  249. struct device_node *node;
  250. node = of_irq_find_parent(of_root);
  251. ipidomain = irq_find_matching_host(node, DOMAIN_BUS_IPI);
  252. /*
  253. * Some platforms have half DT setup. So if we found irq node but
  254. * didn't find an ipidomain, try to search for one that is not in the
  255. * DT.
  256. */
  257. if (node && !ipidomain)
  258. ipidomain = irq_find_matching_host(NULL, DOMAIN_BUS_IPI);
  259. BUG_ON(!ipidomain);
  260. if (irq_domain_is_ipi_per_cpu(ipidomain)) {
  261. int cpu;
  262. for_each_cpu(cpu, mask) {
  263. remove_irq(call_virq + cpu, &irq_call);
  264. remove_irq(sched_virq + cpu, &irq_resched);
  265. }
  266. }
  267. irq_destroy_ipi(call_virq, mask);
  268. irq_destroy_ipi(sched_virq, mask);
  269. return 0;
  270. }
  271. static int __init mips_smp_ipi_init(void)
  272. {
  273. mips_smp_ipi_allocate(cpu_possible_mask);
  274. call_desc = irq_to_desc(call_virq);
  275. sched_desc = irq_to_desc(sched_virq);
  276. return 0;
  277. }
  278. early_initcall(mips_smp_ipi_init);
  279. #endif
  280. /*
  281. * First C code run on the secondary CPUs after being started up by
  282. * the master.
  283. */
  284. asmlinkage void start_secondary(void)
  285. {
  286. unsigned int cpu;
  287. cpu_probe();
  288. per_cpu_trap_init(false);
  289. mips_clockevent_init();
  290. mp_ops->init_secondary();
  291. cpu_report();
  292. maar_init();
  293. /*
  294. * XXX parity protection should be folded in here when it's converted
  295. * to an option instead of something based on .cputype
  296. */
  297. calibrate_delay();
  298. preempt_disable();
  299. cpu = smp_processor_id();
  300. cpu_data[cpu].udelay_val = loops_per_jiffy;
  301. cpumask_set_cpu(cpu, &cpu_coherent_mask);
  302. notify_cpu_starting(cpu);
  303. cpumask_set_cpu(cpu, &cpu_callin_map);
  304. synchronise_count_slave(cpu);
  305. set_cpu_online(cpu, true);
  306. set_cpu_sibling_map(cpu);
  307. set_cpu_core_map(cpu);
  308. calculate_cpu_foreign_map();
  309. /*
  310. * irq will be enabled in ->smp_finish(), enabling it too early
  311. * is dangerous.
  312. */
  313. WARN_ON_ONCE(!irqs_disabled());
  314. mp_ops->smp_finish();
  315. cpu_startup_entry(CPUHP_AP_ONLINE_IDLE);
  316. }
  317. static void stop_this_cpu(void *dummy)
  318. {
  319. /*
  320. * Remove this CPU:
  321. */
  322. set_cpu_online(smp_processor_id(), false);
  323. calculate_cpu_foreign_map();
  324. local_irq_disable();
  325. while (1);
  326. }
  327. void smp_send_stop(void)
  328. {
  329. smp_call_function(stop_this_cpu, NULL, 0);
  330. }
  331. void __init smp_cpus_done(unsigned int max_cpus)
  332. {
  333. }
  334. /* called from main before smp_init() */
  335. void __init smp_prepare_cpus(unsigned int max_cpus)
  336. {
  337. init_new_context(current, &init_mm);
  338. current_thread_info()->cpu = 0;
  339. mp_ops->prepare_cpus(max_cpus);
  340. set_cpu_sibling_map(0);
  341. set_cpu_core_map(0);
  342. calculate_cpu_foreign_map();
  343. #ifndef CONFIG_HOTPLUG_CPU
  344. init_cpu_present(cpu_possible_mask);
  345. #endif
  346. cpumask_copy(&cpu_coherent_mask, cpu_possible_mask);
  347. }
  348. /* preload SMP state for boot cpu */
  349. void smp_prepare_boot_cpu(void)
  350. {
  351. set_cpu_possible(0, true);
  352. set_cpu_online(0, true);
  353. cpumask_set_cpu(0, &cpu_callin_map);
  354. }
  355. int __cpu_up(unsigned int cpu, struct task_struct *tidle)
  356. {
  357. mp_ops->boot_secondary(cpu, tidle);
  358. /*
  359. * Trust is futile. We should really have timeouts ...
  360. */
  361. while (!cpumask_test_cpu(cpu, &cpu_callin_map)) {
  362. udelay(100);
  363. schedule();
  364. }
  365. synchronise_count_master(cpu);
  366. return 0;
  367. }
  368. /* Not really SMP stuff ... */
  369. int setup_profiling_timer(unsigned int multiplier)
  370. {
  371. return 0;
  372. }
  373. static void flush_tlb_all_ipi(void *info)
  374. {
  375. local_flush_tlb_all();
  376. }
  377. void flush_tlb_all(void)
  378. {
  379. on_each_cpu(flush_tlb_all_ipi, NULL, 1);
  380. }
  381. static void flush_tlb_mm_ipi(void *mm)
  382. {
  383. local_flush_tlb_mm((struct mm_struct *)mm);
  384. }
  385. /*
  386. * Special Variant of smp_call_function for use by TLB functions:
  387. *
  388. * o No return value
  389. * o collapses to normal function call on UP kernels
  390. * o collapses to normal function call on systems with a single shared
  391. * primary cache.
  392. */
  393. static inline void smp_on_other_tlbs(void (*func) (void *info), void *info)
  394. {
  395. smp_call_function(func, info, 1);
  396. }
  397. static inline void smp_on_each_tlb(void (*func) (void *info), void *info)
  398. {
  399. preempt_disable();
  400. smp_on_other_tlbs(func, info);
  401. func(info);
  402. preempt_enable();
  403. }
  404. /*
  405. * The following tlb flush calls are invoked when old translations are
  406. * being torn down, or pte attributes are changing. For single threaded
  407. * address spaces, a new context is obtained on the current cpu, and tlb
  408. * context on other cpus are invalidated to force a new context allocation
  409. * at switch_mm time, should the mm ever be used on other cpus. For
  410. * multithreaded address spaces, intercpu interrupts have to be sent.
  411. * Another case where intercpu interrupts are required is when the target
  412. * mm might be active on another cpu (eg debuggers doing the flushes on
  413. * behalf of debugees, kswapd stealing pages from another process etc).
  414. * Kanoj 07/00.
  415. */
  416. void flush_tlb_mm(struct mm_struct *mm)
  417. {
  418. preempt_disable();
  419. if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
  420. smp_on_other_tlbs(flush_tlb_mm_ipi, mm);
  421. } else {
  422. unsigned int cpu;
  423. for_each_online_cpu(cpu) {
  424. if (cpu != smp_processor_id() && cpu_context(cpu, mm))
  425. cpu_context(cpu, mm) = 0;
  426. }
  427. }
  428. local_flush_tlb_mm(mm);
  429. preempt_enable();
  430. }
  431. struct flush_tlb_data {
  432. struct vm_area_struct *vma;
  433. unsigned long addr1;
  434. unsigned long addr2;
  435. };
  436. static void flush_tlb_range_ipi(void *info)
  437. {
  438. struct flush_tlb_data *fd = info;
  439. local_flush_tlb_range(fd->vma, fd->addr1, fd->addr2);
  440. }
  441. void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
  442. {
  443. struct mm_struct *mm = vma->vm_mm;
  444. preempt_disable();
  445. if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) {
  446. struct flush_tlb_data fd = {
  447. .vma = vma,
  448. .addr1 = start,
  449. .addr2 = end,
  450. };
  451. smp_on_other_tlbs(flush_tlb_range_ipi, &fd);
  452. } else {
  453. unsigned int cpu;
  454. int exec = vma->vm_flags & VM_EXEC;
  455. for_each_online_cpu(cpu) {
  456. /*
  457. * flush_cache_range() will only fully flush icache if
  458. * the VMA is executable, otherwise we must invalidate
  459. * ASID without it appearing to has_valid_asid() as if
  460. * mm has been completely unused by that CPU.
  461. */
  462. if (cpu != smp_processor_id() && cpu_context(cpu, mm))
  463. cpu_context(cpu, mm) = !exec;
  464. }
  465. }
  466. local_flush_tlb_range(vma, start, end);
  467. preempt_enable();
  468. }
  469. static void flush_tlb_kernel_range_ipi(void *info)
  470. {
  471. struct flush_tlb_data *fd = info;
  472. local_flush_tlb_kernel_range(fd->addr1, fd->addr2);
  473. }
  474. void flush_tlb_kernel_range(unsigned long start, unsigned long end)
  475. {
  476. struct flush_tlb_data fd = {
  477. .addr1 = start,
  478. .addr2 = end,
  479. };
  480. on_each_cpu(flush_tlb_kernel_range_ipi, &fd, 1);
  481. }
  482. static void flush_tlb_page_ipi(void *info)
  483. {
  484. struct flush_tlb_data *fd = info;
  485. local_flush_tlb_page(fd->vma, fd->addr1);
  486. }
  487. void flush_tlb_page(struct vm_area_struct *vma, unsigned long page)
  488. {
  489. preempt_disable();
  490. if ((atomic_read(&vma->vm_mm->mm_users) != 1) || (current->mm != vma->vm_mm)) {
  491. struct flush_tlb_data fd = {
  492. .vma = vma,
  493. .addr1 = page,
  494. };
  495. smp_on_other_tlbs(flush_tlb_page_ipi, &fd);
  496. } else {
  497. unsigned int cpu;
  498. for_each_online_cpu(cpu) {
  499. /*
  500. * flush_cache_page() only does partial flushes, so
  501. * invalidate ASID without it appearing to
  502. * has_valid_asid() as if mm has been completely unused
  503. * by that CPU.
  504. */
  505. if (cpu != smp_processor_id() && cpu_context(cpu, vma->vm_mm))
  506. cpu_context(cpu, vma->vm_mm) = 1;
  507. }
  508. }
  509. local_flush_tlb_page(vma, page);
  510. preempt_enable();
  511. }
  512. static void flush_tlb_one_ipi(void *info)
  513. {
  514. unsigned long vaddr = (unsigned long) info;
  515. local_flush_tlb_one(vaddr);
  516. }
  517. void flush_tlb_one(unsigned long vaddr)
  518. {
  519. smp_on_each_tlb(flush_tlb_one_ipi, (void *) vaddr);
  520. }
  521. EXPORT_SYMBOL(flush_tlb_page);
  522. EXPORT_SYMBOL(flush_tlb_one);
  523. #if defined(CONFIG_KEXEC)
  524. void (*dump_ipi_function_ptr)(void *) = NULL;
  525. void dump_send_ipi(void (*dump_ipi_callback)(void *))
  526. {
  527. int i;
  528. int cpu = smp_processor_id();
  529. dump_ipi_function_ptr = dump_ipi_callback;
  530. smp_mb();
  531. for_each_online_cpu(i)
  532. if (i != cpu)
  533. mp_ops->send_ipi_single(i, SMP_DUMP);
  534. }
  535. EXPORT_SYMBOL(dump_send_ipi);
  536. #endif
  537. #ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
  538. static DEFINE_PER_CPU(atomic_t, tick_broadcast_count);
  539. static DEFINE_PER_CPU(struct call_single_data, tick_broadcast_csd);
  540. void tick_broadcast(const struct cpumask *mask)
  541. {
  542. atomic_t *count;
  543. struct call_single_data *csd;
  544. int cpu;
  545. for_each_cpu(cpu, mask) {
  546. count = &per_cpu(tick_broadcast_count, cpu);
  547. csd = &per_cpu(tick_broadcast_csd, cpu);
  548. if (atomic_inc_return(count) == 1)
  549. smp_call_function_single_async(cpu, csd);
  550. }
  551. }
  552. static void tick_broadcast_callee(void *info)
  553. {
  554. int cpu = smp_processor_id();
  555. tick_receive_broadcast();
  556. atomic_set(&per_cpu(tick_broadcast_count, cpu), 0);
  557. }
  558. static int __init tick_broadcast_init(void)
  559. {
  560. struct call_single_data *csd;
  561. int cpu;
  562. for (cpu = 0; cpu < NR_CPUS; cpu++) {
  563. csd = &per_cpu(tick_broadcast_csd, cpu);
  564. csd->func = tick_broadcast_callee;
  565. }
  566. return 0;
  567. }
  568. early_initcall(tick_broadcast_init);
  569. #endif /* CONFIG_GENERIC_CLOCKEVENTS_BROADCAST */