aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-11 00:10:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-11 00:10:48 -0400
commit3e1b83ab3912a6f583897635bee0a2e0cd1545f7 (patch)
treece89473abe12bd31664ee302a098a46a2079ce95 /include
parent8e3e076c5a78519a9f64cd384e8f18bc21882ce0 (diff)
parent82fd866701881623d69fe280dbac06ddff1fdef9 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: x86: rdc: leds build/config fix x86: sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system) x86: revert commit 709f744 ("x86: bitops asm constraint fixes") x86: restrict keyboard io ports reservation to make ipmi driver work x86: fix fpu restore from sig return x86: remove spew print out about bus to node mapping x86: revert printk format warning change which is for linux-next x86: cleanup PAT cpu validation x86: geode: define geode_has_vsa2() even if CONFIG_MGEODE_LX is not set x86: GEODE: cache results from geode_has_vsa2() and uninline x86: revert geode config dependency
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/bitops.h37
-rw-r--r--include/asm-x86/geode.h12
-rw-r--r--include/asm-x86/i387.h10
-rw-r--r--include/asm-x86/pat.h8
-rw-r--r--include/asm-x86/topology.h18
5 files changed, 49 insertions, 36 deletions
diff --git a/include/asm-x86/bitops.h b/include/asm-x86/bitops.h
index b81a4d4d3337..ee4b3ead6a43 100644
--- a/include/asm-x86/bitops.h
+++ b/include/asm-x86/bitops.h
@@ -23,13 +23,10 @@
23#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) 23#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1)
24/* Technically wrong, but this avoids compilation errors on some gcc 24/* Technically wrong, but this avoids compilation errors on some gcc
25 versions. */ 25 versions. */
26#define ADDR "=m" (*(volatile long *)addr) 26#define ADDR "=m" (*(volatile long *) addr)
27#define BIT_ADDR "=m" (((volatile int *)addr)[nr >> 5])
28#else 27#else
29#define ADDR "+m" (*(volatile long *) addr) 28#define ADDR "+m" (*(volatile long *) addr)
30#define BIT_ADDR "+m" (((volatile int *)addr)[nr >> 5])
31#endif 29#endif
32#define BASE_ADDR "m" (*(volatile int *)addr)
33 30
34/** 31/**
35 * set_bit - Atomically set a bit in memory 32 * set_bit - Atomically set a bit in memory
@@ -77,7 +74,7 @@ static inline void __set_bit(int nr, volatile void *addr)
77 */ 74 */
78static inline void clear_bit(int nr, volatile void *addr) 75static inline void clear_bit(int nr, volatile void *addr)
79{ 76{
80 asm volatile(LOCK_PREFIX "btr %1,%2" : BIT_ADDR : "Ir" (nr), BASE_ADDR); 77 asm volatile(LOCK_PREFIX "btr %1,%0" : ADDR : "Ir" (nr));
81} 78}
82 79
83/* 80/*
@@ -96,7 +93,7 @@ static inline void clear_bit_unlock(unsigned nr, volatile void *addr)
96 93
97static inline void __clear_bit(int nr, volatile void *addr) 94static inline void __clear_bit(int nr, volatile void *addr)
98{ 95{
99 asm volatile("btr %1,%2" : BIT_ADDR : "Ir" (nr), BASE_ADDR); 96 asm volatile("btr %1,%0" : ADDR : "Ir" (nr));
100} 97}
101 98
102/* 99/*
@@ -131,7 +128,7 @@ static inline void __clear_bit_unlock(unsigned nr, volatile void *addr)
131 */ 128 */
132static inline void __change_bit(int nr, volatile void *addr) 129static inline void __change_bit(int nr, volatile void *addr)
133{ 130{
134 asm volatile("btc %1,%2" : BIT_ADDR : "Ir" (nr), BASE_ADDR); 131 asm volatile("btc %1,%0" : ADDR : "Ir" (nr));
135} 132}
136 133
137/** 134/**
@@ -145,7 +142,7 @@ static inline void __change_bit(int nr, volatile void *addr)
145 */ 142 */
146static inline void change_bit(int nr, volatile void *addr) 143static inline void change_bit(int nr, volatile void *addr)
147{ 144{
148 asm volatile(LOCK_PREFIX "btc %1,%2" : BIT_ADDR : "Ir" (nr), BASE_ADDR); 145 asm volatile(LOCK_PREFIX "btc %1,%0" : ADDR : "Ir" (nr));
149} 146}
150 147
151/** 148/**
@@ -191,9 +188,10 @@ static inline int __test_and_set_bit(int nr, volatile void *addr)
191{ 188{
192 int oldbit; 189 int oldbit;
193 190
194 asm volatile("bts %2,%3\n\t" 191 asm("bts %2,%1\n\t"
195 "sbb %0,%0" 192 "sbb %0,%0"
196 : "=r" (oldbit), BIT_ADDR : "Ir" (nr), BASE_ADDR); 193 : "=r" (oldbit), ADDR
194 : "Ir" (nr));
197 return oldbit; 195 return oldbit;
198} 196}
199 197
@@ -229,9 +227,10 @@ static inline int __test_and_clear_bit(int nr, volatile void *addr)
229{ 227{
230 int oldbit; 228 int oldbit;
231 229
232 asm volatile("btr %2,%3\n\t" 230 asm volatile("btr %2,%1\n\t"
233 "sbb %0,%0" 231 "sbb %0,%0"
234 : "=r" (oldbit), BIT_ADDR : "Ir" (nr), BASE_ADDR); 232 : "=r" (oldbit), ADDR
233 : "Ir" (nr));
235 return oldbit; 234 return oldbit;
236} 235}
237 236
@@ -240,9 +239,10 @@ static inline int __test_and_change_bit(int nr, volatile void *addr)
240{ 239{
241 int oldbit; 240 int oldbit;
242 241
243 asm volatile("btc %2,%3\n\t" 242 asm volatile("btc %2,%1\n\t"
244 "sbb %0,%0" 243 "sbb %0,%0"
245 : "=r" (oldbit), BIT_ADDR : "Ir" (nr), BASE_ADDR); 244 : "=r" (oldbit), ADDR
245 : "Ir" (nr) : "memory");
246 246
247 return oldbit; 247 return oldbit;
248} 248}
@@ -276,11 +276,10 @@ static inline int variable_test_bit(int nr, volatile const void *addr)
276{ 276{
277 int oldbit; 277 int oldbit;
278 278
279 asm volatile("bt %2,%3\n\t" 279 asm volatile("bt %2,%1\n\t"
280 "sbb %0,%0" 280 "sbb %0,%0"
281 : "=r" (oldbit) 281 : "=r" (oldbit)
282 : "m" (((volatile const int *)addr)[nr >> 5]), 282 : "m" (*(unsigned long *)addr), "Ir" (nr));
283 "Ir" (nr), BASE_ADDR);
284 283
285 return oldbit; 284 return oldbit;
286} 285}
@@ -397,8 +396,6 @@ static inline int fls(int x)
397} 396}
398#endif /* __KERNEL__ */ 397#endif /* __KERNEL__ */
399 398
400#undef BASE_ADDR
401#undef BIT_ADDR
402#undef ADDR 399#undef ADDR
403 400
404static inline void set_bit_string(unsigned long *bitmap, 401static inline void set_bit_string(unsigned long *bitmap,
diff --git a/include/asm-x86/geode.h b/include/asm-x86/geode.h
index 7154dc4de951..6e6458853a36 100644
--- a/include/asm-x86/geode.h
+++ b/include/asm-x86/geode.h
@@ -185,16 +185,14 @@ static inline int is_geode(void)
185 return (is_geode_gx() || is_geode_lx()); 185 return (is_geode_gx() || is_geode_lx());
186} 186}
187 187
188/* 188#ifdef CONFIG_MGEODE_LX
189 * The VSA has virtual registers that we can query for a signature. 189extern int geode_has_vsa2(void);
190 */ 190#else
191static inline int geode_has_vsa2(void) 191static inline int geode_has_vsa2(void)
192{ 192{
193 outw(VSA_VR_UNLOCK, VSA_VRC_INDEX); 193 return 0;
194 outw(VSA_VR_SIGNATURE, VSA_VRC_INDEX);
195
196 return (inw(VSA_VRC_DATA) == VSA_SIG);
197} 194}
195#endif
198 196
199/* MFGPTs */ 197/* MFGPTs */
200 198
diff --git a/include/asm-x86/i387.h b/include/asm-x86/i387.h
index da2adb45f6e3..6b722d315936 100644
--- a/include/asm-x86/i387.h
+++ b/include/asm-x86/i387.h
@@ -175,7 +175,15 @@ static inline int save_i387(struct _fpstate __user *buf)
175 */ 175 */
176static inline int restore_i387(struct _fpstate __user *buf) 176static inline int restore_i387(struct _fpstate __user *buf)
177{ 177{
178 set_used_math(); 178 struct task_struct *tsk = current;
179 int err;
180
181 if (!used_math()) {
182 err = init_fpu(tsk);
183 if (err)
184 return err;
185 }
186
179 if (!(task_thread_info(current)->status & TS_USEDFPU)) { 187 if (!(task_thread_info(current)->status & TS_USEDFPU)) {
180 clts(); 188 clts();
181 task_thread_info(current)->status |= TS_USEDFPU; 189 task_thread_info(current)->status |= TS_USEDFPU;
diff --git a/include/asm-x86/pat.h b/include/asm-x86/pat.h
index 8b822b5a1786..88f60cc6a227 100644
--- a/include/asm-x86/pat.h
+++ b/include/asm-x86/pat.h
@@ -4,7 +4,13 @@
4 4
5#include <linux/types.h> 5#include <linux/types.h>
6 6
7#ifdef CONFIG_X86_PAT
7extern int pat_wc_enabled; 8extern int pat_wc_enabled;
9extern void validate_pat_support(struct cpuinfo_x86 *c);
10#else
11static const int pat_wc_enabled = 0;
12static inline void validate_pat_support(struct cpuinfo_x86 *c) { }
13#endif
8 14
9extern void pat_init(void); 15extern void pat_init(void);
10 16
@@ -12,5 +18,7 @@ extern int reserve_memtype(u64 start, u64 end,
12 unsigned long req_type, unsigned long *ret_type); 18 unsigned long req_type, unsigned long *ret_type);
13extern int free_memtype(u64 start, u64 end); 19extern int free_memtype(u64 start, u64 end);
14 20
21extern void pat_disable(char *reason);
22
15#endif 23#endif
16 24
diff --git a/include/asm-x86/topology.h b/include/asm-x86/topology.h
index 4f35a0fb4f22..dcf3f8131d6b 100644
--- a/include/asm-x86/topology.h
+++ b/include/asm-x86/topology.h
@@ -25,6 +25,16 @@
25#ifndef _ASM_X86_TOPOLOGY_H 25#ifndef _ASM_X86_TOPOLOGY_H
26#define _ASM_X86_TOPOLOGY_H 26#define _ASM_X86_TOPOLOGY_H
27 27
28#ifdef CONFIG_X86_32
29# ifdef CONFIG_X86_HT
30# define ENABLE_TOPO_DEFINES
31# endif
32#else
33# ifdef CONFIG_SMP
34# define ENABLE_TOPO_DEFINES
35# endif
36#endif
37
28#ifdef CONFIG_NUMA 38#ifdef CONFIG_NUMA
29#include <linux/cpumask.h> 39#include <linux/cpumask.h>
30#include <asm/mpspec.h> 40#include <asm/mpspec.h>
@@ -130,10 +140,6 @@ extern unsigned long node_end_pfn[];
130extern unsigned long node_remap_size[]; 140extern unsigned long node_remap_size[];
131#define node_has_online_mem(nid) (node_start_pfn[nid] != node_end_pfn[nid]) 141#define node_has_online_mem(nid) (node_start_pfn[nid] != node_end_pfn[nid])
132 142
133# ifdef CONFIG_X86_HT
134# define ENABLE_TOPO_DEFINES
135# endif
136
137# define SD_CACHE_NICE_TRIES 1 143# define SD_CACHE_NICE_TRIES 1
138# define SD_IDLE_IDX 1 144# define SD_IDLE_IDX 1
139# define SD_NEWIDLE_IDX 2 145# define SD_NEWIDLE_IDX 2
@@ -141,10 +147,6 @@ extern unsigned long node_remap_size[];
141 147
142#else 148#else
143 149
144# ifdef CONFIG_SMP
145# define ENABLE_TOPO_DEFINES
146# endif
147
148# define SD_CACHE_NICE_TRIES 2 150# define SD_CACHE_NICE_TRIES 2
149# define SD_IDLE_IDX 2 151# define SD_IDLE_IDX 2
150# define SD_NEWIDLE_IDX 2 152# define SD_NEWIDLE_IDX 2