smp-up.c 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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(const struct cpumask *mask,
  20. unsigned int action)
  21. {
  22. panic(KERN_ERR "%s called", __func__);
  23. }
  24. /*
  25. * After we've done initial boot, this function is called to allow the
  26. * board code to clean up state, if needed
  27. */
  28. static void up_init_secondary(void)
  29. {
  30. }
  31. static void up_smp_finish(void)
  32. {
  33. }
  34. /*
  35. * Firmware CPU startup hook
  36. */
  37. static void up_boot_secondary(int cpu, struct task_struct *idle)
  38. {
  39. }
  40. static void __init up_smp_setup(void)
  41. {
  42. }
  43. static void __init up_prepare_cpus(unsigned int max_cpus)
  44. {
  45. }
  46. #ifdef CONFIG_HOTPLUG_CPU
  47. static int up_cpu_disable(void)
  48. {
  49. return -ENOSYS;
  50. }
  51. static void up_cpu_die(unsigned int cpu)
  52. {
  53. BUG();
  54. }
  55. #endif
  56. struct plat_smp_ops up_smp_ops = {
  57. .send_ipi_single = up_send_ipi_single,
  58. .send_ipi_mask = up_send_ipi_mask,
  59. .init_secondary = up_init_secondary,
  60. .smp_finish = up_smp_finish,
  61. .boot_secondary = up_boot_secondary,
  62. .smp_setup = up_smp_setup,
  63. .prepare_cpus = up_prepare_cpus,
  64. #ifdef CONFIG_HOTPLUG_CPU
  65. .cpu_disable = up_cpu_disable,
  66. .cpu_die = up_cpu_die,
  67. #endif
  68. };