smp.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. * Move global data into per-processor storage.
  33. */
  34. extern void smp_store_cpu_info(unsigned int cpuid);
  35. /*
  36. * Raise an IPI cross call on CPUs in callmap.
  37. */
  38. extern void smp_cross_call(cpumask_t callmap);
  39. /*
  40. * Boot a secondary CPU, and assign it the specified idle task.
  41. * This also gives us the initial stack to use for this CPU.
  42. */
  43. extern int boot_secondary(unsigned int cpu, struct task_struct *);
  44. /*
  45. * Perform platform specific initialisation of the specified CPU.
  46. */
  47. extern void platform_secondary_init(unsigned int cpu);
  48. /*
  49. * Initial data for bringing up a secondary CPU.
  50. */
  51. struct secondary_data {
  52. unsigned long pgdir;
  53. void *stack;
  54. };
  55. extern struct secondary_data secondary_data;
  56. #endif /* ifndef __ASM_ARM_SMP_H */