x86: make x86_64 accept the max_cpus parameter
[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
14522076
GC
25/* Globals due to paravirt */
26extern void set_cpu_sibling_map(int cpu);
27
c76cb368
GC
28#ifdef CONFIG_SMP
29extern struct smp_ops smp_ops;
8678969e 30
377d6984
GC
31static inline void smp_send_stop(void)
32{
33 smp_ops.smp_send_stop();
34}
35
1e3fac83
GC
36static inline void smp_prepare_boot_cpu(void)
37{
38 smp_ops.smp_prepare_boot_cpu();
39}
40
7557da67
GC
41static inline void smp_prepare_cpus(unsigned int max_cpus)
42{
43 smp_ops.smp_prepare_cpus(max_cpus);
44}
45
c5597649
GC
46static inline void smp_cpus_done(unsigned int max_cpus)
47{
48 smp_ops.smp_cpus_done(max_cpus);
49}
50
71d19549
GC
51static inline int __cpu_up(unsigned int cpu)
52{
53 return smp_ops.cpu_up(cpu);
54}
55
8678969e
GC
56static inline void smp_send_reschedule(int cpu)
57{
58 smp_ops.smp_send_reschedule(cpu);
59}
64b1a21e
GC
60
61static inline int smp_call_function_mask(cpumask_t mask,
62 void (*func) (void *info), void *info,
63 int wait)
64{
65 return smp_ops.smp_call_function_mask(mask, func, info, wait);
66}
71d19549 67
1e3fac83 68void native_smp_prepare_boot_cpu(void);
7557da67 69void native_smp_prepare_cpus(unsigned int max_cpus);
c5597649 70void native_smp_cpus_done(unsigned int max_cpus);
71d19549 71int native_cpu_up(unsigned int cpunum);
93b016f8 72
69c18c15
GC
73extern int __cpu_disable(void);
74extern void __cpu_die(unsigned int cpu);
75
93b016f8 76extern unsigned disabled_cpus;
68a1c3f8 77extern void prefill_possible_map(void);
c76cb368 78#endif
16694024 79
96a388de
TG
80#ifdef CONFIG_X86_32
81# include "smp_32.h"
82#else
83# include "smp_64.h"
84#endif
c27cfeff 85
1dbb4726
GC
86#ifdef CONFIG_HOTPLUG_CPU
87extern void cpu_exit_clear(void);
88extern void cpu_uninit(void);
89extern void remove_siblinginfo(int cpu);
90#endif
91
639acb16
GC
92extern void smp_alloc_memory(void);
93extern void lock_ipi_call_lock(void);
94extern void unlock_ipi_call_lock(void);
c27cfeff
GC
95#endif /* __ASSEMBLY__ */
96#endif
This page took 0.112447 seconds and 5 git commands to generate.