Commit | Line | Data |
---|---|---|
1da177e4 | 1 | /* |
c20c89a6 HC |
2 | * Copyright IBM Corp. 1999,2009 |
3 | * Author(s): Denis Joseph Barrow, | |
4 | * Martin Schwidefsky <schwidefsky@de.ibm.com>, | |
5 | * Heiko Carstens <heiko.carstens@de.ibm.com>, | |
1da177e4 LT |
6 | */ |
7 | #ifndef __ASM_SMP_H | |
8 | #define __ASM_SMP_H | |
9 | ||
c20c89a6 | 10 | #ifdef CONFIG_SMP |
1da177e4 | 11 | |
2e5061e4 | 12 | #include <asm/system.h> |
c20c89a6 | 13 | #include <asm/sigp.h> |
1da177e4 | 14 | |
2b67fc46 HC |
15 | extern void machine_restart_smp(char *); |
16 | extern void machine_halt_smp(void); | |
17 | extern void machine_power_off_smp(void); | |
18 | ||
7b468488 | 19 | #define raw_smp_processor_id() (S390_lowcore.cpu_nr) |
1da177e4 LT |
20 | |
21 | extern int __cpu_disable (void); | |
22 | extern void __cpu_die (unsigned int cpu); | |
23 | extern void cpu_die (void) __attribute__ ((noreturn)); | |
24 | extern int __cpu_up (unsigned int cpu); | |
25 | ||
dbd70fb4 | 26 | extern struct mutex smp_cpu_state_mutex; |
c10fde0d | 27 | extern int smp_cpu_polarization[]; |
dbd70fb4 | 28 | |
ca9fc75a | 29 | extern void arch_send_call_function_single_ipi(int cpu); |
630cd046 | 30 | extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); |
ca9fc75a | 31 | |
f64ca217 | 32 | extern struct save_area *zfcpdump_save_areas[NR_CPUS + 1]; |
c20c89a6 | 33 | |
2c2df118 HC |
34 | extern void smp_switch_to_ipl_cpu(void (*func)(void *), void *); |
35 | extern void smp_switch_to_cpu(void (*)(void *), void *, unsigned long sp, | |
36 | int from, int to); | |
37 | extern void smp_restart_cpu(void); | |
38 | ||
39 | #else /* CONFIG_SMP */ | |
40 | ||
41 | static inline void smp_switch_to_ipl_cpu(void (*func)(void *), void *data) | |
42 | { | |
43 | func(data); | |
44 | } | |
45 | ||
c20c89a6 | 46 | #endif /* CONFIG_SMP */ |
1da177e4 | 47 | |
1e489518 HC |
48 | #ifdef CONFIG_HOTPLUG_CPU |
49 | extern int smp_rescan_cpus(void); | |
50 | #else | |
51 | static inline int smp_rescan_cpus(void) { return 0; } | |
52 | #endif | |
53 | ||
c20c89a6 | 54 | #endif /* __ASM_SMP_H */ |