Linux 3.13-rc4
[deliverable/linux.git] / arch / s390 / include / asm / smp.h
CommitLineData
1da177e4 1/*
a53c8fab 2 * Copyright IBM Corp. 1999, 2012
c20c89a6
HC
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
a0616cde 12#include <asm/lowcore.h>
2b67fc46 13
7b468488 14#define raw_smp_processor_id() (S390_lowcore.cpu_nr)
1da177e4 15
dbd70fb4 16extern struct mutex smp_cpu_state_mutex;
8b646bd7 17
8239c25f 18extern int __cpu_up(unsigned int cpu, struct task_struct *tidle);
dbd70fb4 19
ca9fc75a 20extern void arch_send_call_function_single_ipi(int cpu);
630cd046 21extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
ca9fc75a 22
8b646bd7
MS
23extern void smp_call_online_cpu(void (*func)(void *), void *);
24extern void smp_call_ipl_cpu(void (*func)(void *), void *);
2c2df118 25
8b646bd7
MS
26extern int smp_find_processor_id(u16 address);
27extern int smp_store_status(int cpu);
28extern int smp_vcpu_scheduled(int cpu);
29extern void smp_yield_cpu(int cpu);
30extern void smp_yield(void);
31extern void smp_stop_cpu(void);
50ab9a9a
HC
32extern void smp_cpu_set_polarization(int cpu, int val);
33extern int smp_cpu_get_polarization(int cpu);
59b69787 34
2c2df118
HC
35#else /* CONFIG_SMP */
36
8b646bd7 37static inline void smp_call_ipl_cpu(void (*func)(void *), void *data)
2c2df118
HC
38{
39 func(data);
40}
41
8b646bd7 42static inline void smp_call_online_cpu(void (*func)(void *), void *data)
1943f53c 43{
8b646bd7 44 func(data);
1943f53c
MH
45}
46
0d0e471b 47static inline int smp_find_processor_id(u16 address) { return 0; }
29a877fa 48static inline int smp_store_status(int cpu) { return 0; }
8b646bd7
MS
49static inline int smp_vcpu_scheduled(int cpu) { return 1; }
50static inline void smp_yield_cpu(int cpu) { }
51static inline void smp_yield(void) { }
52static inline void smp_stop_cpu(void) { }
59b69787 53
c20c89a6 54#endif /* CONFIG_SMP */
1da177e4 55
1e489518
HC
56#ifdef CONFIG_HOTPLUG_CPU
57extern int smp_rescan_cpus(void);
da7f51c1 58extern void __noreturn cpu_die(void);
8b646bd7
MS
59extern void __cpu_die(unsigned int cpu);
60extern int __cpu_disable(void);
1e489518
HC
61#else
62static inline int smp_rescan_cpus(void) { return 0; }
da7f51c1 63static inline void cpu_die(void) { }
1e489518
HC
64#endif
65
c20c89a6 66#endif /* __ASM_SMP_H */
This page took 0.684367 seconds and 5 git commands to generate.