aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86_64/pda.h4
-rw-r--r--include/asm-x86_64/percpu.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-x86_64/pda.h b/include/asm-x86_64/pda.h
index 431a909fbec9..dc33d28a72dd 100644
--- a/include/asm-x86_64/pda.h
+++ b/include/asm-x86_64/pda.h
@@ -27,7 +27,9 @@ struct x8664_pda {
27 unsigned apic_timer_irqs; 27 unsigned apic_timer_irqs;
28} ____cacheline_aligned_in_smp; 28} ____cacheline_aligned_in_smp;
29 29
30extern struct x8664_pda cpu_pda[]; 30extern struct x8664_pda _cpu_pda[];
31
32#define cpu_pda(i) (&_cpu_pda[i])
31 33
32/* 34/*
33 * There is no fast way to get the base address of the PDA, all the accesses 35 * There is no fast way to get the base address of the PDA, all the accesses
diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h
index 9c71855736fb..29a6b0408f75 100644
--- a/include/asm-x86_64/percpu.h
+++ b/include/asm-x86_64/percpu.h
@@ -11,7 +11,7 @@
11 11
12#include <asm/pda.h> 12#include <asm/pda.h>
13 13
14#define __per_cpu_offset(cpu) (cpu_pda[cpu].data_offset) 14#define __per_cpu_offset(cpu) (cpu_pda(cpu)->data_offset)
15#define __my_cpu_offset() read_pda(data_offset) 15#define __my_cpu_offset() read_pda(data_offset)
16 16
17/* Separate out the type, so (int[3], foo) works. */ 17/* Separate out the type, so (int[3], foo) works. */