aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/mpspec.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asm-x86/mpspec.h b/include/asm-x86/mpspec.h
index 57a991b9c053..b69e7ba7bf1d 100644
--- a/include/asm-x86/mpspec.h
+++ b/include/asm-x86/mpspec.h
@@ -101,6 +101,7 @@ typedef struct physid_mask physid_mask_t;
101 __physid_mask; \ 101 __physid_mask; \
102 }) 102 })
103 103
104/* Note: will create very large stack frames if physid_mask_t is big */
104#define physid_mask_of_physid(physid) \ 105#define physid_mask_of_physid(physid) \
105 ({ \ 106 ({ \
106 physid_mask_t __physid_mask = PHYSID_MASK_NONE; \ 107 physid_mask_t __physid_mask = PHYSID_MASK_NONE; \
@@ -108,6 +109,12 @@ typedef struct physid_mask physid_mask_t;
108 __physid_mask; \ 109 __physid_mask; \
109 }) 110 })
110 111
112static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map)
113{
114 physids_clear(*map);
115 physid_set(physid, *map);
116}
117
111#define PHYSID_MASK_ALL { {[0 ... PHYSID_ARRAY_SIZE-1] = ~0UL} } 118#define PHYSID_MASK_ALL { {[0 ... PHYSID_ARRAY_SIZE-1] = ~0UL} }
112#define PHYSID_MASK_NONE { {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} } 119#define PHYSID_MASK_NONE { {[0 ... PHYSID_ARRAY_SIZE-1] = 0UL} }
113 120