blob: e4507938d8cfa948a502632e12796feeca1d816f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __UM_SMP_H
2#define __UM_SMP_H
3
4#ifdef CONFIG_SMP
5
Al Viro37185b32012-10-08 03:27:32 +01006#include <linux/bitops.h>
7#include <asm/current.h>
8#include <linux/cpumask.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07009
Ingo Molnar39c715b2005-06-21 17:14:34 -070010#define raw_smp_processor_id() (current_thread->cpu)
11
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#define cpu_logical_map(n) (n)
13#define cpu_number_map(n) (n)
Linus Torvalds1da177e2005-04-16 15:20:36 -070014extern int hard_smp_processor_id(void);
15#define NO_PROC_ID -1
16
17extern int ncpus;
18
19
Jeff Dikeb21d4b02007-10-16 01:27:10 -070020static inline void smp_cpus_done(unsigned int maxcpus)
Linus Torvalds1da177e2005-04-16 15:20:36 -070021{
22}
23
Paolo 'Blaisorblade' Giarrusso72e55252006-02-01 03:06:29 -080024extern struct task_struct *idle_threads[NR_CPUS];
25
Fernando Luis Vazquez Cao2f4dfe22007-05-09 02:33:25 -070026#else
27
28#define hard_smp_processor_id() 0
29
Linus Torvalds1da177e2005-04-16 15:20:36 -070030#endif
31
32#endif