~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/s390/include/asm/smp.h

Version: ~ [ linux-4.17-rc6 ] ~ [ linux-4.16.10 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.42 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.101 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.132 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.51 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.109 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.56 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.101 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.39.4 ] ~ [ linux-2.6.38.8 ] ~ [ linux-2.6.37.6 ] ~ [ linux-2.6.36.4 ] ~ [ linux-2.6.35.14 ] ~ [ linux-2.6.34.15 ] ~ [ linux-2.6.33.20 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.27.62 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  *    Copyright IBM Corp. 1999, 2012
  4  *    Author(s): Denis Joseph Barrow,
  5  *               Martin Schwidefsky <schwidefsky@de.ibm.com>,
  6  *               Heiko Carstens <heiko.carstens@de.ibm.com>,
  7  */
  8 #ifndef __ASM_SMP_H
  9 #define __ASM_SMP_H
 10 
 11 #include <asm/sigp.h>
 12 
 13 #ifdef CONFIG_SMP
 14 
 15 #include <asm/lowcore.h>
 16 
 17 #define raw_smp_processor_id()  (S390_lowcore.cpu_nr)
 18 
 19 extern struct mutex smp_cpu_state_mutex;
 20 extern unsigned int smp_cpu_mt_shift;
 21 extern unsigned int smp_cpu_mtid;
 22 extern __vector128 __initdata boot_cpu_vector_save_area[__NUM_VXRS];
 23 
 24 extern int __cpu_up(unsigned int cpu, struct task_struct *tidle);
 25 
 26 extern void arch_send_call_function_single_ipi(int cpu);
 27 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
 28 
 29 extern void smp_call_online_cpu(void (*func)(void *), void *);
 30 extern void smp_call_ipl_cpu(void (*func)(void *), void *);
 31 extern void smp_emergency_stop(void);
 32 
 33 extern int smp_find_processor_id(u16 address);
 34 extern int smp_store_status(int cpu);
 35 extern void smp_save_dump_cpus(void);
 36 extern int smp_vcpu_scheduled(int cpu);
 37 extern void smp_yield_cpu(int cpu);
 38 extern void smp_cpu_set_polarization(int cpu, int val);
 39 extern int smp_cpu_get_polarization(int cpu);
 40 extern void smp_fill_possible_mask(void);
 41 extern void smp_detect_cpus(void);
 42 
 43 #else /* CONFIG_SMP */
 44 
 45 #define smp_cpu_mtid    0
 46 
 47 static inline void smp_call_ipl_cpu(void (*func)(void *), void *data)
 48 {
 49         func(data);
 50 }
 51 
 52 static inline void smp_call_online_cpu(void (*func)(void *), void *data)
 53 {
 54         func(data);
 55 }
 56 
 57 static inline void smp_emergency_stop(void)
 58 {
 59 }
 60 
 61 static inline int smp_find_processor_id(u16 address) { return 0; }
 62 static inline int smp_store_status(int cpu) { return 0; }
 63 static inline int smp_vcpu_scheduled(int cpu) { return 1; }
 64 static inline void smp_yield_cpu(int cpu) { }
 65 static inline void smp_fill_possible_mask(void) { }
 66 static inline void smp_detect_cpus(void) { }
 67 
 68 #endif /* CONFIG_SMP */
 69 
 70 static inline void smp_stop_cpu(void)
 71 {
 72         u16 pcpu = stap();
 73 
 74         for (;;) {
 75                 __pcpu_sigp(pcpu, SIGP_STOP, 0, NULL);
 76                 cpu_relax();
 77         }
 78 }
 79 
 80 /* Return thread 0 CPU number as base CPU */
 81 static inline int smp_get_base_cpu(int cpu)
 82 {
 83         return cpu - (cpu % (smp_cpu_mtid + 1));
 84 }
 85 
 86 #ifdef CONFIG_HOTPLUG_CPU
 87 extern int smp_rescan_cpus(void);
 88 extern void __noreturn cpu_die(void);
 89 extern void __cpu_die(unsigned int cpu);
 90 extern int __cpu_disable(void);
 91 #else
 92 static inline int smp_rescan_cpus(void) { return 0; }
 93 static inline void cpu_die(void) { }
 94 #endif
 95 
 96 #endif /* __ASM_SMP_H */
 97 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp