smp.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * include/asm-s390/smp.h
  3. *
  4. * S390 version
  5. * Copyright (C) 1999 IBM Deutschland Entwicklung GmbH, IBM Corporation
  6. * Author(s): Denis Joseph Barrow (djbarrow@de.ibm.com,barrow_dj@yahoo.com),
  7. * Martin Schwidefsky (schwidefsky@de.ibm.com)
  8. * Heiko Carstens (heiko.carstens@de.ibm.com)
  9. */
  10. #ifndef __ASM_SMP_H
  11. #define __ASM_SMP_H
  12. #include <linux/threads.h>
  13. #include <linux/cpumask.h>
  14. #include <linux/bitops.h>
  15. #if defined(__KERNEL__) && defined(CONFIG_SMP) && !defined(__ASSEMBLY__)
  16. #include <asm/lowcore.h>
  17. #include <asm/sigp.h>
  18. #include <asm/ptrace.h>
  19. #include <asm/system.h>
  20. /*
  21. s390 specific smp.c headers
  22. */
  23. typedef struct
  24. {
  25. int intresting;
  26. sigp_ccode ccode;
  27. __u32 status;
  28. __u16 cpu;
  29. } sigp_info;
  30. extern void machine_restart_smp(char *);
  31. extern void machine_halt_smp(void);
  32. extern void machine_power_off_smp(void);
  33. #define NO_PROC_ID 0xFF /* No processor magic marker */
  34. /*
  35. * This magic constant controls our willingness to transfer
  36. * a process across CPUs. Such a transfer incurs misses on the L1
  37. * cache, and on a P6 or P5 with multiple L2 caches L2 hits. My
  38. * gut feeling is this will vary by board in value. For a board
  39. * with separate L2 cache it probably depends also on the RSS, and
  40. * for a board with shared L2 cache it ought to decay fast as other
  41. * processes are run.
  42. */
  43. #define PROC_CHANGE_PENALTY 20 /* Schedule penalty */
  44. #define raw_smp_processor_id() (S390_lowcore.cpu_nr)
  45. #define cpu_logical_map(cpu) (cpu)
  46. extern int __cpu_disable (void);
  47. extern void __cpu_die (unsigned int cpu);
  48. extern void cpu_die (void) __attribute__ ((noreturn));
  49. extern int __cpu_up (unsigned int cpu);
  50. extern struct mutex smp_cpu_state_mutex;
  51. extern int smp_cpu_polarization[];
  52. extern void arch_send_call_function_single_ipi(int cpu);
  53. extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
  54. #endif
  55. #ifdef CONFIG_HOTPLUG_CPU
  56. extern int smp_rescan_cpus(void);
  57. #else
  58. static inline int smp_rescan_cpus(void) { return 0; }
  59. #endif
  60. extern union save_area *zfcpdump_save_areas[NR_CPUS + 1];
  61. #endif