diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-05-02 13:27:10 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:10 -0400 |
commit | ae1ee11be77f51cedb6c569887dddc70c163ab6d (patch) | |
tree | e579a6a6d10c6835cab9af47a2795bf40f669da6 /include/asm-i386/pda.h | |
parent | 8f9aeca7a081d81c4c9862be1e04f15b5ab5461f (diff) |
[PATCH] i386: Use per-cpu variables for GDT, PDA
Allocating PDA and GDT at boot is a pain. Using simple per-cpu variables adds
happiness (although we need the GDT page-aligned for Xen, which we do in a
followup patch).
[akpm@linux-foundation.org: build fix]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/asm-i386/pda.h')
-rw-r--r-- | include/asm-i386/pda.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/asm-i386/pda.h b/include/asm-i386/pda.h index b12d59a318b7..aef7f732f77e 100644 --- a/include/asm-i386/pda.h +++ b/include/asm-i386/pda.h | |||
@@ -8,6 +8,7 @@ | |||
8 | 8 | ||
9 | #include <linux/stddef.h> | 9 | #include <linux/stddef.h> |
10 | #include <linux/types.h> | 10 | #include <linux/types.h> |
11 | #include <asm/percpu.h> | ||
11 | 12 | ||
12 | struct i386_pda | 13 | struct i386_pda |
13 | { | 14 | { |
@@ -18,10 +19,8 @@ struct i386_pda | |||
18 | struct pt_regs *irq_regs; | 19 | struct pt_regs *irq_regs; |
19 | }; | 20 | }; |
20 | 21 | ||
21 | extern struct i386_pda *_cpu_pda[]; | 22 | DECLARE_PER_CPU(struct i386_pda, _cpu_pda); |
22 | 23 | #define cpu_pda(i) (&per_cpu(_cpu_pda, (i))) | |
23 | #define cpu_pda(i) (_cpu_pda[i]) | ||
24 | |||
25 | #define pda_offset(field) offsetof(struct i386_pda, field) | 24 | #define pda_offset(field) offsetof(struct i386_pda, field) |
26 | 25 | ||
27 | extern void __bad_pda_field(void); | 26 | extern void __bad_pda_field(void); |