Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef __UM_SMP_H |
| 2 | #define __UM_SMP_H |
| 3 | |
| 4 | #ifdef CONFIG_SMP |
| 5 | |
Al Viro | 37185b3 | 2012-10-08 03:27:32 +0100 | [diff] [blame] | 6 | #include <linux/bitops.h> |
| 7 | #include <asm/current.h> |
| 8 | #include <linux/cpumask.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | |
Ingo Molnar | 39c715b | 2005-06-21 17:14:34 -0700 | [diff] [blame] | 10 | #define raw_smp_processor_id() (current_thread->cpu) |
| 11 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #define cpu_logical_map(n) (n) |
| 13 | #define cpu_number_map(n) (n) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | extern int hard_smp_processor_id(void); |
| 15 | #define NO_PROC_ID -1 |
| 16 | |
| 17 | extern int ncpus; |
| 18 | |
| 19 | |
Jeff Dike | b21d4b0 | 2007-10-16 01:27:10 -0700 | [diff] [blame] | 20 | static inline void smp_cpus_done(unsigned int maxcpus) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 21 | { |
| 22 | } |
| 23 | |
Paolo 'Blaisorblade' Giarrusso | 72e5525 | 2006-02-01 03:06:29 -0800 | [diff] [blame] | 24 | extern struct task_struct *idle_threads[NR_CPUS]; |
| 25 | |
Fernando Luis Vazquez Cao | 2f4dfe2 | 2007-05-09 02:33:25 -0700 | [diff] [blame] | 26 | #else |
| 27 | |
| 28 | #define hard_smp_processor_id() 0 |
| 29 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | #endif |
| 31 | |
| 32 | #endif |