16 #ifndef _ASM_POWERPC_SMP_H
17 #define _ASM_POWERPC_SMP_H
22 #include <linux/kernel.h>
30 #include <asm/percpu.h>
41 #ifdef CONFIG_PPC_SMP_MUXED_IPI
45 int (*kick_cpu)(
int nr);
52 int (*cpu_bootable)(
unsigned int nr);
55 extern void smp_send_debugger_break(
void);
56 extern void start_secondary_resume(
void);
62 #ifdef CONFIG_HOTPLUG_CPU
64 int generic_cpu_disable(
void);
65 void generic_cpu_die(
unsigned int cpu);
66 void generic_mach_cpu_die(
void);
67 void generic_set_cpu_dead(
unsigned int cpu);
68 void generic_set_cpu_up(
unsigned int cpu);
69 int generic_check_cpu_restart(
unsigned int cpu);
73 #define raw_smp_processor_id() (local_paca->paca_index)
74 #define hard_smp_processor_id() (get_paca()->hw_cpu_id)
79 #define raw_smp_processor_id() (current_thread_info()->cpu)
80 #define hard_smp_processor_id() (smp_hw_index[smp_processor_id()])
82 static inline int get_hard_smp_processor_id(
int cpu)
87 static inline void set_hard_smp_processor_id(
int cpu,
int phys)
96 static inline struct cpumask *cpu_sibling_mask(
int cpu)
98 return per_cpu(cpu_sibling_map, cpu);
101 static inline struct cpumask *cpu_core_mask(
int cpu)
112 #define PPC_MSG_CALL_FUNCTION 0
113 #define PPC_MSG_RESCHEDULE 1
114 #define PPC_MSG_CALL_FUNC_SINGLE 2
115 #define PPC_MSG_DEBUGGER_BREAK 3
122 extern void smp_muxed_ipi_set_data(
int cpu,
unsigned long data);
123 extern void smp_muxed_ipi_message_pass(
int cpu,
int msg);
126 void smp_init_pSeries(
void);
128 void smp_init_celleb(
void);
129 void smp_setup_cpu_maps(
void);
136 #define hard_smp_processor_id() get_hard_smp_processor_id(0)
137 #define smp_setup_cpu_maps()
142 static inline int get_hard_smp_processor_id(
int cpu)
147 static inline void set_hard_smp_processor_id(
int cpu,
int phys)
152 extern void smp_release_cpus(
void);
158 static inline int get_hard_smp_processor_id(
int cpu)
163 static inline void set_hard_smp_processor_id(
int cpu,
int phys)
172 extern int smp_mpic_probe(
void);
173 extern void smp_mpic_setup_cpu(
int cpu);
174 extern int smp_generic_kick_cpu(
int nr);
179 extern struct smp_ops_t *
smp_ops;
188 extern void generic_secondary_smp_init(
void);
189 extern void generic_secondary_thread_init(
void);
190 extern unsigned long __secondary_hold_spinloop;
191 extern unsigned long __secondary_hold_acknowledge;
192 extern char __secondary_hold;
194 extern void __early_start(
void);