]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86/mpspec.h
Merge branch 'linus' into x86/core
[linux-2.6-omap-h63xx.git] / include / asm-x86 / mpspec.h
index 6ec1a5453b3ed8178e749637ec601bd16bd69564..118da365e371cf3415410fd902fd9ec85f537361 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef _AM_X86_MPSPEC_H
-#define _AM_X86_MPSPEC_H
+#ifndef ASM_X86__MPSPEC_H
+#define ASM_X86__MPSPEC_H
 
 #include <linux/init.h>
 
@@ -122,6 +122,7 @@ typedef struct physid_mask physid_mask_t;
                __physid_mask;                                          \
        })
 
+/* Note: will create very large stack frames if physid_mask_t is big */
 #define physid_mask_of_physid(physid)                                  \
        ({                                                              \
                physid_mask_t __physid_mask = PHYSID_MASK_NONE;         \
@@ -129,9 +130,15 @@ typedef struct physid_mask physid_mask_t;
                __physid_mask;                                          \
        })
 
+static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map)
+{
+       physids_clear(*map);
+       physid_set(physid, *map);
+}
+
 #define PHYSID_MASK_ALL                { {[0 ... PHYSID_ARRAY_SIZE-1] = ~0UL} }
 #define PHYSID_MASK_NONE       { {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} }
 
 extern physid_mask_t phys_cpu_present_map;
 
-#endif
+#endif /* ASM_X86__MPSPEC_H */