x86: make early_per_cpu() a lvalue and use it
Make early_per_cpu() a lvalue as per_cpu() is and use it where applicable. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
7de6883faa
commit
f10fcd4712
3 changed files with 6 additions and 18 deletions
|
@ -195,9 +195,9 @@ do { \
|
|||
#define early_per_cpu_ptr(_name) (_name##_early_ptr)
|
||||
#define early_per_cpu_map(_name, _idx) (_name##_early_map[_idx])
|
||||
#define early_per_cpu(_name, _cpu) \
|
||||
(early_per_cpu_ptr(_name) ? \
|
||||
early_per_cpu_ptr(_name)[_cpu] : \
|
||||
per_cpu(_name, _cpu))
|
||||
*(early_per_cpu_ptr(_name) ? \
|
||||
&early_per_cpu_ptr(_name)[_cpu] : \
|
||||
&per_cpu(_name, _cpu))
|
||||
|
||||
#else /* !CONFIG_SMP */
|
||||
#define DEFINE_EARLY_PER_CPU(_type, _name, _initvalue) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue