smp-up.c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*
  2. * This file is subject to the terms and conditions of the GNU General Public
  3. * License. See the file "COPYING" in the main directory of this archive
  4. * for more details.
  5. *
  6. * Copyright (C) 2006, 07 by Ralf Baechle (ralf@linux-mips.org)
  7. *
  8. * Symmetric Uniprocessor (TM) Support
  9. */
  10. #include <linux/kernel.h>
  11. #include <linux/sched.h>
  12. /*
  13. * Send inter-processor interrupt
  14. */
  15. static void up_send_ipi_single(int cpu, unsigned int action)
  16. {
  17. panic(KERN_ERR "%s called", __func__);
  18. }
  19. static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action)
  20. {
  21. panic(KERN_ERR "%s called", __func__);
  22. }
  23. /*
  24. * After we've done initial boot, this function is called to allow the
  25. * board code to clean up state, if needed
  26. */
  27. static void __cpuinit up_init_secondary(void)
  28. {
  29. }
  30. static void __cpuinit up_smp_finish(void)
  31. {
  32. }
  33. /* Hook for after all CPUs are online */
  34. static void up_cpus_done(void)
  35. {
  36. }
  37. /*
  38. * Firmware CPU startup hook
  39. */
  40. static void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle)
  41. {
  42. }
  43. static void __init up_smp_setup(void)
  44. {
  45. }
  46. static void __init up_prepare_cpus(unsigned int max_cpus)
  47. {
  48. }
  49. #ifdef CONFIG_HOTPLUG_CPU
  50. static int up_cpu_disable(void)
  51. {
  52. return -ENOSYS;
  53. }
  54. static void up_cpu_die(unsigned int cpu)
  55. {
  56. BUG();
  57. }
  58. #endif
  59. struct plat_smp_ops up_smp_ops = {
  60. .send_ipi_single = up_send_ipi_single,
  61. .send_ipi_mask = up_send_ipi_mask,
  62. .init_secondary = up_init_secondary,
  63. .smp_finish = up_smp_finish,
  64. .cpus_done = up_cpus_done,
  65. .boot_secondary = up_boot_secondary,
  66. .smp_setup = up_smp_setup,
  67. .prepare_cpus = up_prepare_cpus,
  68. #ifdef CONFIG_HOTPLUG_CPU
  69. .cpu_disable = up_cpu_disable,
  70. .cpu_die = up_cpu_die,
  71. #endif
  72. };