smp.h 930 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _ASM_X86_SMP_H_
  2. #define _ASM_X86_SMP_H_
  3. #ifndef __ASSEMBLY__
  4. #include <linux/cpumask.h>
  5. extern cpumask_t cpu_callout_map;
  6. extern int smp_num_siblings;
  7. extern unsigned int num_processors;
  8. struct smp_ops {
  9. void (*smp_prepare_boot_cpu)(void);
  10. void (*smp_prepare_cpus)(unsigned max_cpus);
  11. int (*cpu_up)(unsigned cpu);
  12. void (*smp_cpus_done)(unsigned max_cpus);
  13. void (*smp_send_stop)(void);
  14. void (*smp_send_reschedule)(int cpu);
  15. int (*smp_call_function_mask)(cpumask_t mask,
  16. void (*func)(void *info), void *info,
  17. int wait);
  18. };
  19. #ifdef CONFIG_SMP
  20. extern struct smp_ops smp_ops;
  21. static inline void smp_send_reschedule(int cpu)
  22. {
  23. smp_ops.smp_send_reschedule(cpu);
  24. }
  25. #endif
  26. #ifdef CONFIG_X86_32
  27. # include "smp_32.h"
  28. #else
  29. # include "smp_64.h"
  30. #endif
  31. extern void smp_alloc_memory(void);
  32. extern void lock_ipi_call_lock(void);
  33. extern void unlock_ipi_call_lock(void);
  34. #endif /* __ASSEMBLY__ */
  35. #endif