aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/include/asm/smp.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/include/asm/smp.h')
-rw-r--r--arch/sh/include/asm/smp.h41
1 files changed, 32 insertions, 9 deletions
diff --git a/arch/sh/include/asm/smp.h b/arch/sh/include/asm/smp.h
index ca64f43abe67..9070d943ddde 100644
--- a/arch/sh/include/asm/smp.h
+++ b/arch/sh/include/asm/smp.h
@@ -3,15 +3,16 @@
3 3
4#include <linux/bitops.h> 4#include <linux/bitops.h>
5#include <linux/cpumask.h> 5#include <linux/cpumask.h>
6#include <asm/smp-ops.h>
6 7
7#ifdef CONFIG_SMP 8#ifdef CONFIG_SMP
8 9
9#include <linux/spinlock.h> 10#include <linux/spinlock.h>
10#include <asm/atomic.h> 11#include <asm/atomic.h>
11#include <asm/current.h> 12#include <asm/current.h>
13#include <asm/percpu.h>
12 14
13#define raw_smp_processor_id() (current_thread_info()->cpu) 15#define raw_smp_processor_id() (current_thread_info()->cpu)
14#define hard_smp_processor_id() plat_smp_processor_id()
15 16
16/* Map from cpu id to sequential logical cpu number. */ 17/* Map from cpu id to sequential logical cpu number. */
17extern int __cpu_number_map[NR_CPUS]; 18extern int __cpu_number_map[NR_CPUS];
@@ -30,21 +31,43 @@ enum {
30 SMP_MSG_NR, /* must be last */ 31 SMP_MSG_NR, /* must be last */
31}; 32};
32 33
34DECLARE_PER_CPU(int, cpu_state);
35
33void smp_message_recv(unsigned int msg); 36void smp_message_recv(unsigned int msg);
34void smp_timer_broadcast(const struct cpumask *mask); 37void smp_timer_broadcast(const struct cpumask *mask);
35 38
36void local_timer_interrupt(void); 39void local_timer_interrupt(void);
37void local_timer_setup(unsigned int cpu); 40void local_timer_setup(unsigned int cpu);
38 41void local_timer_stop(unsigned int cpu);
39void plat_smp_setup(void);
40void plat_prepare_cpus(unsigned int max_cpus);
41int plat_smp_processor_id(void);
42void plat_start_cpu(unsigned int cpu, unsigned long entry_point);
43void plat_send_ipi(unsigned int cpu, unsigned int message);
44 42
45void arch_send_call_function_single_ipi(int cpu); 43void arch_send_call_function_single_ipi(int cpu);
46extern void arch_send_call_function_ipi_mask(const struct cpumask *mask); 44void arch_send_call_function_ipi_mask(const struct cpumask *mask);
47#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask 45
46void native_play_dead(void);
47void native_cpu_die(unsigned int cpu);
48int native_cpu_disable(unsigned int cpu);
49
50#ifdef CONFIG_HOTPLUG_CPU
51void play_dead_common(void);
52extern int __cpu_disable(void);
53
54static inline void __cpu_die(unsigned int cpu)
55{
56 extern struct plat_smp_ops *mp_ops; /* private */
57
58 mp_ops->cpu_die(cpu);
59}
60#endif
61
62static inline int hard_smp_processor_id(void)
63{
64 extern struct plat_smp_ops *mp_ops; /* private */
65
66 if (!mp_ops)
67 return 0; /* boot CPU */
68
69 return mp_ops->smp_processor_id();
70}
48 71
49#else 72#else
50 73