smp.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * linux/include/asm-arm/smp.h
  3. *
  4. * Copyright (C) 2004-2005 ARM Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License version 2 as
  8. * published by the Free Software Foundation.
  9. */
  10. #ifndef __ASM_ARM_SMP_H
  11. #define __ASM_ARM_SMP_H
  12. #include <linux/config.h>
  13. #include <linux/threads.h>
  14. #include <linux/cpumask.h>
  15. #include <linux/thread_info.h>
  16. #include <asm/arch/smp.h>
  17. #ifndef CONFIG_SMP
  18. # error "<asm-arm/smp.h> included in non-SMP build"
  19. #endif
  20. #define raw_smp_processor_id() (current_thread_info()->cpu)
  21. /*
  22. * at the moment, there's not a big penalty for changing CPUs
  23. * (the >big< penalty is running SMP in the first place)
  24. */
  25. #define PROC_CHANGE_PENALTY 15
  26. struct seq_file;
  27. /*
  28. * generate IPI list text
  29. */
  30. extern void show_ipi_list(struct seq_file *p);
  31. /*
  32. * Called from assembly code, this handles an IPI.
  33. */
  34. asmlinkage void do_IPI(struct pt_regs *regs);
  35. /*
  36. * Move global data into per-processor storage.
  37. */
  38. extern void smp_store_cpu_info(unsigned int cpuid);
  39. /*
  40. * Raise an IPI cross call on CPUs in callmap.
  41. */
  42. extern void smp_cross_call(cpumask_t callmap);
  43. /*
  44. * Broadcast a timer interrupt to the other CPUs.
  45. */
  46. extern void smp_send_timer(void);
  47. /*
  48. * Boot a secondary CPU, and assign it the specified idle task.
  49. * This also gives us the initial stack to use for this CPU.
  50. */
  51. extern int boot_secondary(unsigned int cpu, struct task_struct *);
  52. /*
  53. * Called from platform specific assembly code, this is the
  54. * secondary CPU entry point.
  55. */
  56. asmlinkage void secondary_start_kernel(void);
  57. /*
  58. * Perform platform specific initialisation of the specified CPU.
  59. */
  60. extern void platform_secondary_init(unsigned int cpu);
  61. /*
  62. * Initial data for bringing up a secondary CPU.
  63. */
  64. struct secondary_data {
  65. unsigned long pgdir;
  66. void *stack;
  67. };
  68. extern struct secondary_data secondary_data;
  69. extern int __cpu_disable(void);
  70. extern int mach_cpu_disable(unsigned int cpu);
  71. extern void __cpu_die(unsigned int cpu);
  72. extern void cpu_die(void);
  73. extern void platform_cpu_die(unsigned int cpu);
  74. extern int platform_cpu_kill(unsigned int cpu);
  75. extern void platform_cpu_enable(unsigned int cpu);
  76. #endif /* ifndef __ASM_ARM_SMP_H */