blob: 2ab1141eeb50b4e8849441551e6167ce96f33549 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
Heiko Carstensc20c89a2009-12-07 12:52:07 +01002 * 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>,
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 */
7#ifndef __ASM_SMP_H
8#define __ASM_SMP_H
9
Heiko Carstensc20c89a2009-12-07 12:52:07 +010010#ifdef CONFIG_SMP
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Heiko Carstens2e5061e2008-04-30 13:38:45 +020012#include <asm/system.h>
Heiko Carstensc20c89a2009-12-07 12:52:07 +010013#include <asm/sigp.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
Heiko Carstens2b67fc42007-02-05 21:16:47 +010015extern void machine_restart_smp(char *);
16extern void machine_halt_smp(void);
17extern void machine_power_off_smp(void);
18
Martin Schwidefsky7b468482009-03-26 15:24:42 +010019#define raw_smp_processor_id() (S390_lowcore.cpu_nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -070020
21extern int __cpu_disable (void);
22extern void __cpu_die (unsigned int cpu);
23extern void cpu_die (void) __attribute__ ((noreturn));
24extern int __cpu_up (unsigned int cpu);
25
Heiko Carstensdbd70fb2008-04-17 07:46:12 +020026extern struct mutex smp_cpu_state_mutex;
Heiko Carstensc10fde02008-04-17 07:46:13 +020027extern int smp_cpu_polarization[];
Heiko Carstensdbd70fb2008-04-17 07:46:12 +020028
Heiko Carstensca9fc752008-12-25 13:38:39 +010029extern void arch_send_call_function_single_ipi(int cpu);
Rusty Russell630cd042009-09-24 09:34:45 -060030extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
Heiko Carstensca9fc752008-12-25 13:38:39 +010031
Heiko Carstensc20c89a2009-12-07 12:52:07 +010032extern union save_area *zfcpdump_save_areas[NR_CPUS + 1];
33
34#endif /* CONFIG_SMP */
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
Heiko Carstens1e489512008-04-30 13:38:37 +020036#ifdef CONFIG_HOTPLUG_CPU
37extern int smp_rescan_cpus(void);
38#else
39static inline int smp_rescan_cpus(void) { return 0; }
40#endif
41
Heiko Carstensc20c89a2009-12-07 12:52:07 +010042#endif /* __ASM_SMP_H */