smp.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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. extern cpumask_t cpu_present_mask;
  22. #define cpu_possible_map cpu_present_mask
  23. /*
  24. * at the moment, there's not a big penalty for changing CPUs
  25. * (the >big< penalty is running SMP in the first place)
  26. */
  27. #define PROC_CHANGE_PENALTY 15
  28. struct seq_file;
  29. /*
  30. * generate IPI list text
  31. */
  32. extern void show_ipi_list(struct seq_file *p);
  33. /*
  34. * Move global data into per-processor storage.
  35. */
  36. extern void smp_store_cpu_info(unsigned int cpuid);
  37. /*
  38. * Raise an IPI cross call on CPUs in callmap.
  39. */
  40. extern void smp_cross_call(cpumask_t callmap);
  41. /*
  42. * Boot a secondary CPU, and assign it the specified idle task.
  43. * This also gives us the initial stack to use for this CPU.
  44. */
  45. extern int boot_secondary(unsigned int cpu, struct task_struct *);
  46. /*
  47. * Perform platform specific initialisation of the specified CPU.
  48. */
  49. extern void platform_secondary_init(unsigned int cpu);
  50. /*
  51. * Initial data for bringing up a secondary CPU.
  52. */
  53. struct secondary_data {
  54. unsigned long pgdir;
  55. void *stack;
  56. };
  57. extern struct secondary_data secondary_data;
  58. #endif /* ifndef __ASM_ARM_SMP_H */