initial commit with v3.6.7
[linux-3.6.7-moxart.git] / arch / s390 / include / asm / smp.h
blobce26ac3cb162899a285e5812a39ea9b1b6ec0484
1 /*
2 * Copyright IBM Corp. 1999, 2012
3 * Author(s): Denis Joseph Barrow,
4 * Martin Schwidefsky <schwidefsky@de.ibm.com>,
5 * Heiko Carstens <heiko.carstens@de.ibm.com>,
6 */
7 #ifndef __ASM_SMP_H
8 #define __ASM_SMP_H
10 #ifdef CONFIG_SMP
12 #include <asm/lowcore.h>
14 #define raw_smp_processor_id() (S390_lowcore.cpu_nr)
16 extern struct mutex smp_cpu_state_mutex;
17 extern struct save_area *zfcpdump_save_areas[NR_CPUS + 1];
19 extern int __cpu_up(unsigned int cpu, struct task_struct *tidle);
21 extern void arch_send_call_function_single_ipi(int cpu);
22 extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
24 extern void smp_call_online_cpu(void (*func)(void *), void *);
25 extern void smp_call_ipl_cpu(void (*func)(void *), void *);
27 extern int smp_find_processor_id(u16 address);
28 extern int smp_store_status(int cpu);
29 extern int smp_vcpu_scheduled(int cpu);
30 extern void smp_yield_cpu(int cpu);
31 extern void smp_yield(void);
32 extern void smp_stop_cpu(void);
34 #else /* CONFIG_SMP */
36 static inline void smp_call_ipl_cpu(void (*func)(void *), void *data)
38 func(data);
41 static inline void smp_call_online_cpu(void (*func)(void *), void *data)
43 func(data);
46 static inline int smp_find_processor_id(int address) { return 0; }
47 static inline int smp_store_status(int cpu) { return 0; }
48 static inline int smp_vcpu_scheduled(int cpu) { return 1; }
49 static inline void smp_yield_cpu(int cpu) { }
50 static inline void smp_yield(void) { }
51 static inline void smp_stop_cpu(void) { }
53 #endif /* CONFIG_SMP */
55 #ifdef CONFIG_HOTPLUG_CPU
56 extern int smp_rescan_cpus(void);
57 extern void __noreturn cpu_die(void);
58 extern void __cpu_die(unsigned int cpu);
59 extern int __cpu_disable(void);
60 #else
61 static inline int smp_rescan_cpus(void) { return 0; }
62 static inline void cpu_die(void) { }
63 #endif
65 #endif /* __ASM_SMP_H */