diff options
author | Anton Altaparmakov <aia21@cantab.net> | 2005-10-31 05:06:46 -0500 |
---|---|---|
committer | Anton Altaparmakov <aia21@cantab.net> | 2005-10-31 05:06:46 -0500 |
commit | 1f04c0a24b2f3cfe89c802a24396263623e3512d (patch) | |
tree | d7e2216b6e65b833c0c2b79b478d13ce17dbf296 /include/asm-i386/desc.h | |
parent | 07b188ab773e183871e57b33ae37bf635c9f12ba (diff) | |
parent | e2f2e58e7968f8446b1078a20a18bf8ea12b4fbc (diff) |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'include/asm-i386/desc.h')
-rw-r--r-- | include/asm-i386/desc.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index 6df1a53c190e..29b851a18c6e 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h | |||
@@ -17,6 +17,8 @@ | |||
17 | extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; | 17 | extern struct desc_struct cpu_gdt_table[GDT_ENTRIES]; |
18 | DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); | 18 | DECLARE_PER_CPU(struct desc_struct, cpu_gdt_table[GDT_ENTRIES]); |
19 | 19 | ||
20 | #define get_cpu_gdt_table(_cpu) (per_cpu(cpu_gdt_table,_cpu)) | ||
21 | |||
20 | DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); | 22 | DECLARE_PER_CPU(unsigned char, cpu_16bit_stack[CPU_16BIT_STACK_SIZE]); |
21 | 23 | ||
22 | struct Xgt_desc_struct { | 24 | struct Xgt_desc_struct { |
@@ -60,7 +62,7 @@ __asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ | |||
60 | 62 | ||
61 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) | 63 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) |
62 | { | 64 | { |
63 | _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu)[entry], (int)addr, | 65 | _set_tssldt_desc(&get_cpu_gdt_table(cpu)[entry], (int)addr, |
64 | offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); | 66 | offsetof(struct tss_struct, __cacheline_filler) - 1, 0x89); |
65 | } | 67 | } |
66 | 68 | ||
@@ -68,7 +70,7 @@ static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *ad | |||
68 | 70 | ||
69 | static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) | 71 | static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) |
70 | { | 72 | { |
71 | _set_tssldt_desc(&per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); | 73 | _set_tssldt_desc(&get_cpu_gdt_table(cpu)[GDT_ENTRY_LDT], (int)addr, ((size << 3)-1), 0x82); |
72 | } | 74 | } |
73 | 75 | ||
74 | #define LDT_entry_a(info) \ | 76 | #define LDT_entry_a(info) \ |
@@ -109,7 +111,7 @@ static inline void write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 en | |||
109 | 111 | ||
110 | static inline void load_TLS(struct thread_struct *t, unsigned int cpu) | 112 | static inline void load_TLS(struct thread_struct *t, unsigned int cpu) |
111 | { | 113 | { |
112 | #define C(i) per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] | 114 | #define C(i) get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN + i] = t->tls_array[i] |
113 | C(0); C(1); C(2); | 115 | C(0); C(1); C(2); |
114 | #undef C | 116 | #undef C |
115 | } | 117 | } |