diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 06:08:55 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-04-26 06:08:55 -0400 |
commit | 763142d1efb56effe614d71185781796c4b83c78 (patch) | |
tree | f886c239786fd4be028e3a45006c5cc5c1b3a3f2 /arch/sh/include/asm/smp-ops.h | |
parent | 8db2bc4559639680a94d4492ae4b7ce71298a74f (diff) |
sh: CPU hotplug support.
This adds preliminary support for CPU hotplug for SH SMP systems.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/include/asm/smp-ops.h')
-rw-r--r-- | arch/sh/include/asm/smp-ops.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/sh/include/asm/smp-ops.h b/arch/sh/include/asm/smp-ops.h index 0581b2a4c8c..c590f76856f 100644 --- a/arch/sh/include/asm/smp-ops.h +++ b/arch/sh/include/asm/smp-ops.h | |||
@@ -7,20 +7,27 @@ struct plat_smp_ops { | |||
7 | void (*prepare_cpus)(unsigned int max_cpus); | 7 | void (*prepare_cpus)(unsigned int max_cpus); |
8 | void (*start_cpu)(unsigned int cpu, unsigned long entry_point); | 8 | void (*start_cpu)(unsigned int cpu, unsigned long entry_point); |
9 | void (*send_ipi)(unsigned int cpu, unsigned int message); | 9 | void (*send_ipi)(unsigned int cpu, unsigned int message); |
10 | int (*cpu_disable)(unsigned int cpu); | ||
11 | void (*cpu_die)(unsigned int cpu); | ||
12 | void (*play_dead)(void); | ||
10 | }; | 13 | }; |
11 | 14 | ||
15 | extern struct plat_smp_ops *mp_ops; | ||
12 | extern struct plat_smp_ops shx3_smp_ops; | 16 | extern struct plat_smp_ops shx3_smp_ops; |
13 | 17 | ||
14 | #ifdef CONFIG_SMP | 18 | #ifdef CONFIG_SMP |
15 | 19 | ||
16 | static inline void plat_smp_setup(void) | 20 | static inline void plat_smp_setup(void) |
17 | { | 21 | { |
18 | extern struct plat_smp_ops *mp_ops; /* private */ | ||
19 | |||
20 | BUG_ON(!mp_ops); | 22 | BUG_ON(!mp_ops); |
21 | mp_ops->smp_setup(); | 23 | mp_ops->smp_setup(); |
22 | } | 24 | } |
23 | 25 | ||
26 | static inline void play_dead(void) | ||
27 | { | ||
28 | mp_ops->play_dead(); | ||
29 | } | ||
30 | |||
24 | extern void register_smp_ops(struct plat_smp_ops *ops); | 31 | extern void register_smp_ops(struct plat_smp_ops *ops); |
25 | 32 | ||
26 | #else | 33 | #else |
@@ -34,6 +41,11 @@ static inline void register_smp_ops(struct plat_smp_ops *ops) | |||
34 | { | 41 | { |
35 | } | 42 | } |
36 | 43 | ||
44 | static inline void play_dead(void) | ||
45 | { | ||
46 | BUG(); | ||
47 | } | ||
48 | |||
37 | #endif /* CONFIG_SMP */ | 49 | #endif /* CONFIG_SMP */ |
38 | 50 | ||
39 | #endif /* __ASM_SH_SMP_OPS_H */ | 51 | #endif /* __ASM_SH_SMP_OPS_H */ |