x86: use disabled_cpus in i386
[deliverable/linux.git] / include / asm-x86 / smp.h
CommitLineData
c27cfeff
GC
1#ifndef _ASM_X86_SMP_H_
2#define _ASM_X86_SMP_H_
3#ifndef __ASSEMBLY__
53ebef49 4#include <linux/cpumask.h>
93b016f8 5#include <linux/init.h>
53ebef49
GC
6
7extern cpumask_t cpu_callout_map;
8
9extern int smp_num_siblings;
10extern unsigned int num_processors;
c27cfeff 11
16694024
GC
12struct smp_ops {
13 void (*smp_prepare_boot_cpu)(void);
14 void (*smp_prepare_cpus)(unsigned max_cpus);
15 int (*cpu_up)(unsigned cpu);
16 void (*smp_cpus_done)(unsigned max_cpus);
17
18 void (*smp_send_stop)(void);
19 void (*smp_send_reschedule)(int cpu);
20 int (*smp_call_function_mask)(cpumask_t mask,
21 void (*func)(void *info), void *info,
22 int wait);
23};
24
c76cb368
GC
25#ifdef CONFIG_SMP
26extern struct smp_ops smp_ops;
8678969e 27
1e3fac83
GC
28static inline void smp_prepare_boot_cpu(void)
29{
30 smp_ops.smp_prepare_boot_cpu();
31}
32
7557da67
GC
33static inline void smp_prepare_cpus(unsigned int max_cpus)
34{
35 smp_ops.smp_prepare_cpus(max_cpus);
36}
37
c5597649
GC
38static inline void smp_cpus_done(unsigned int max_cpus)
39{
40 smp_ops.smp_cpus_done(max_cpus);
41}
42
71d19549
GC
43static inline int __cpu_up(unsigned int cpu)
44{
45 return smp_ops.cpu_up(cpu);
46}
47
8678969e
GC
48static inline void smp_send_reschedule(int cpu)
49{
50 smp_ops.smp_send_reschedule(cpu);
51}
64b1a21e
GC
52
53static inline int smp_call_function_mask(cpumask_t mask,
54 void (*func) (void *info), void *info,
55 int wait)
56{
57 return smp_ops.smp_call_function_mask(mask, func, info, wait);
58}
71d19549 59
1e3fac83 60void native_smp_prepare_boot_cpu(void);
7557da67 61void native_smp_prepare_cpus(unsigned int max_cpus);
c5597649 62void native_smp_cpus_done(unsigned int max_cpus);
71d19549 63int native_cpu_up(unsigned int cpunum);
93b016f8
GC
64
65extern unsigned disabled_cpus;
c76cb368 66#endif
16694024 67
96a388de
TG
68#ifdef CONFIG_X86_32
69# include "smp_32.h"
70#else
71# include "smp_64.h"
72#endif
c27cfeff 73
639acb16
GC
74extern void smp_alloc_memory(void);
75extern void lock_ipi_call_lock(void);
76extern void unlock_ipi_call_lock(void);
c27cfeff
GC
77#endif /* __ASSEMBLY__ */
78#endif
This page took 0.117808 seconds and 5 git commands to generate.