s390/dasd: fix ioctl return value
[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
MS
17extern struct save_area *zfcpdump_save_areas[NR_CPUS + 1];
18
8239c25f 19extern int __cpu_up(unsigned int cpu, struct task_struct *tidle);
dbd70fb4 20
ca9fc75a 21extern void arch_send_call_function_single_ipi(int cpu);
630cd046 22extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
ca9fc75a 23
8b646bd7
MS
24extern void smp_call_online_cpu(void (*func)(void *), void *);
25extern void smp_call_ipl_cpu(void (*func)(void *), void *);
2c2df118 26
8b646bd7
MS
27extern int smp_find_processor_id(u16 address);
28extern int smp_store_status(int cpu);
29extern int smp_vcpu_scheduled(int cpu);
30extern void smp_yield_cpu(int cpu);
31extern void smp_yield(void);
32extern void smp_stop_cpu(void);
59b69787 33
2c2df118
HC
34#else /* CONFIG_SMP */
35
8b646bd7 36static inline void smp_call_ipl_cpu(void (*func)(void *), void *data)
2c2df118
HC
37{
38 func(data);
39}
40
8b646bd7 41static inline void smp_call_online_cpu(void (*func)(void *), void *data)
1943f53c 42{
8b646bd7 43 func(data);
1943f53c
MH
44}
45
8b646bd7
MS
46static inline int smp_find_processor_id(int address) { return 0; }
47static inline int smp_vcpu_scheduled(int cpu) { return 1; }
48static inline void smp_yield_cpu(int cpu) { }
49static inline void smp_yield(void) { }
50static inline void smp_stop_cpu(void) { }
59b69787 51
c20c89a6 52#endif /* CONFIG_SMP */
1da177e4 53
1e489518
HC
54#ifdef CONFIG_HOTPLUG_CPU
55extern int smp_rescan_cpus(void);
da7f51c1 56extern void __noreturn cpu_die(void);
8b646bd7
MS
57extern void __cpu_die(unsigned int cpu);
58extern int __cpu_disable(void);
1e489518
HC
59#else
60static inline int smp_rescan_cpus(void) { return 0; }
da7f51c1 61static inline void cpu_die(void) { }
1e489518
HC
62#endif
63
c20c89a6 64#endif /* __ASM_SMP_H */
This page took 0.686455 seconds and 5 git commands to generate.