blob: 28f33c03d79382e36ed96b754f373b53e1f2e1c6 [file] [log] [blame]
Glauber Costac27cfef2008-03-03 14:12:29 -03001#ifndef _ASM_X86_SMP_H_
2#define _ASM_X86_SMP_H_
3#ifndef __ASSEMBLY__
Glauber Costa53ebef42008-03-03 14:12:31 -03004#include <linux/cpumask.h>
5
6extern cpumask_t cpu_callout_map;
7
8extern int smp_num_siblings;
9extern unsigned int num_processors;
Glauber Costac27cfef2008-03-03 14:12:29 -030010
Glauber Costa16694022008-03-03 14:12:32 -030011struct smp_ops {
12 void (*smp_prepare_boot_cpu)(void);
13 void (*smp_prepare_cpus)(unsigned max_cpus);
14 int (*cpu_up)(unsigned cpu);
15 void (*smp_cpus_done)(unsigned max_cpus);
16
17 void (*smp_send_stop)(void);
18 void (*smp_send_reschedule)(int cpu);
19 int (*smp_call_function_mask)(cpumask_t mask,
20 void (*func)(void *info), void *info,
21 int wait);
22};
23
Glauber Costac76cb362008-03-03 14:12:33 -030024#ifdef CONFIG_SMP
25extern struct smp_ops smp_ops;
Glauber Costa86789692008-03-03 14:12:34 -030026
27static inline void smp_send_reschedule(int cpu)
28{
29 smp_ops.smp_send_reschedule(cpu);
30}
Glauber Costac76cb362008-03-03 14:12:33 -030031#endif
Glauber Costa16694022008-03-03 14:12:32 -030032
Thomas Gleixner96a388d2007-10-11 11:20:03 +020033#ifdef CONFIG_X86_32
34# include "smp_32.h"
35#else
36# include "smp_64.h"
37#endif
Glauber Costac27cfef2008-03-03 14:12:29 -030038
Glauber Costa639acb12008-03-03 14:12:30 -030039extern void smp_alloc_memory(void);
40extern void lock_ipi_call_lock(void);
41extern void unlock_ipi_call_lock(void);
Glauber Costac27cfef2008-03-03 14:12:29 -030042#endif /* __ASSEMBLY__ */
43#endif