aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386')
-rw-r--r--include/asm-i386/apic.h1
-rw-r--r--include/asm-i386/bug.h5
-rw-r--r--include/asm-i386/checksum.h2
-rw-r--r--include/asm-i386/cpufeature.h4
-rw-r--r--include/asm-i386/e820.h2
-rw-r--r--include/asm-i386/hpet.h1
-rw-r--r--include/asm-i386/pgtable.h4
-rw-r--r--include/asm-i386/setup.h2
-rw-r--r--include/asm-i386/signal.h14
-rw-r--r--include/asm-i386/string.h89
-rw-r--r--include/asm-i386/system.h6
11 files changed, 75 insertions, 55 deletions
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h
index e1de67483f38..a5810cf7b578 100644
--- a/include/asm-i386/apic.h
+++ b/include/asm-i386/apic.h
@@ -109,7 +109,6 @@ extern int APIC_init_uniprocessor (void);
109extern void disable_APIC_timer(void); 109extern void disable_APIC_timer(void);
110extern void enable_APIC_timer(void); 110extern void enable_APIC_timer(void);
111 111
112extern int check_nmi_watchdog (void);
113extern void enable_NMI_through_LVT0 (void * dummy); 112extern void enable_NMI_through_LVT0 (void * dummy);
114 113
115extern unsigned int nmi_watchdog; 114extern unsigned int nmi_watchdog;
diff --git a/include/asm-i386/bug.h b/include/asm-i386/bug.h
index 706eb511c330..8f79de19eb94 100644
--- a/include/asm-i386/bug.h
+++ b/include/asm-i386/bug.h
@@ -9,6 +9,8 @@
9 * undefined" opcode for parsing in the trap handler. 9 * undefined" opcode for parsing in the trap handler.
10 */ 10 */
11 11
12#ifdef CONFIG_BUG
13#define HAVE_ARCH_BUG
12#ifdef CONFIG_DEBUG_BUGVERBOSE 14#ifdef CONFIG_DEBUG_BUGVERBOSE
13#define BUG() \ 15#define BUG() \
14 __asm__ __volatile__( "ud2\n" \ 16 __asm__ __volatile__( "ud2\n" \
@@ -18,8 +20,7 @@
18#else 20#else
19#define BUG() __asm__ __volatile__("ud2\n") 21#define BUG() __asm__ __volatile__("ud2\n")
20#endif 22#endif
23#endif
21 24
22#define HAVE_ARCH_BUG
23#include <asm-generic/bug.h> 25#include <asm-generic/bug.h>
24
25#endif 26#endif
diff --git a/include/asm-i386/checksum.h b/include/asm-i386/checksum.h
index d76a5f081c91..641342002bcd 100644
--- a/include/asm-i386/checksum.h
+++ b/include/asm-i386/checksum.h
@@ -33,7 +33,7 @@ asmlinkage unsigned int csum_partial_copy_generic(const unsigned char *src, unsi
33 * passed in an incorrect kernel address to one of these functions. 33 * passed in an incorrect kernel address to one of these functions.
34 * 34 *
35 * If you use these functions directly please don't forget the 35 * If you use these functions directly please don't forget the
36 * verify_area(). 36 * access_ok().
37 */ 37 */
38static __inline__ 38static __inline__
39unsigned int csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst, 39unsigned int csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst,
diff --git a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h
index e147cabd3bfe..ff1187e80c32 100644
--- a/include/asm-i386/cpufeature.h
+++ b/include/asm-i386/cpufeature.h
@@ -87,8 +87,8 @@
87#define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */ 87#define X86_FEATURE_XCRYPT_EN (5*32+ 7) /* on-CPU crypto enabled */
88 88
89/* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */ 89/* More extended AMD flags: CPUID level 0x80000001, ecx, word 6 */
90#define X86_FEATURE_LAHF_LM (5*32+ 0) /* LAHF/SAHF in long mode */ 90#define X86_FEATURE_LAHF_LM (6*32+ 0) /* LAHF/SAHF in long mode */
91#define X86_FEATURE_CMP_LEGACY (5*32+ 1) /* If yes HyperThreading not valid */ 91#define X86_FEATURE_CMP_LEGACY (6*32+ 1) /* If yes HyperThreading not valid */
92 92
93#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability) 93#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability)
94#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability) 94#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability)
diff --git a/include/asm-i386/e820.h b/include/asm-i386/e820.h
index 5c285aee7294..edf65be21a92 100644
--- a/include/asm-i386/e820.h
+++ b/include/asm-i386/e820.h
@@ -13,7 +13,7 @@
13#define __E820_HEADER 13#define __E820_HEADER
14 14
15#define E820MAP 0x2d0 /* our map */ 15#define E820MAP 0x2d0 /* our map */
16#define E820MAX 32 /* number of entries in E820MAP */ 16#define E820MAX 128 /* number of entries in E820MAP */
17#define E820NR 0x1e8 /* # entries in E820MAP */ 17#define E820NR 0x1e8 /* # entries in E820MAP */
18 18
19#define E820_RAM 1 19#define E820_RAM 1
diff --git a/include/asm-i386/hpet.h b/include/asm-i386/hpet.h
index 6e20b079f1d3..16ef9f996e3f 100644
--- a/include/asm-i386/hpet.h
+++ b/include/asm-i386/hpet.h
@@ -92,6 +92,7 @@
92 92
93extern unsigned long hpet_tick; /* hpet clks count per tick */ 93extern unsigned long hpet_tick; /* hpet clks count per tick */
94extern unsigned long hpet_address; /* hpet memory map physical address */ 94extern unsigned long hpet_address; /* hpet memory map physical address */
95extern int hpet_use_timer;
95 96
96extern int hpet_rtc_timer_init(void); 97extern int hpet_rtc_timer_init(void);
97extern int hpet_enable(void); 98extern int hpet_enable(void);
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h
index 5c725425d863..8d60c2b4b003 100644
--- a/include/asm-i386/pgtable.h
+++ b/include/asm-i386/pgtable.h
@@ -193,9 +193,9 @@ extern unsigned long long __PAGE_KERNEL, __PAGE_KERNEL_EXEC;
193/* 193/*
194 * Define this if things work differently on an i386 and an i486: 194 * Define this if things work differently on an i386 and an i486:
195 * it will (on an i486) warn about kernel memory accesses that are 195 * it will (on an i486) warn about kernel memory accesses that are
196 * done without a 'verify_area(VERIFY_WRITE,..)' 196 * done without a 'access_ok(VERIFY_WRITE,..)'
197 */ 197 */
198#undef TEST_VERIFY_AREA 198#undef TEST_ACCESS_OK
199 199
200/* The boot page tables (all created as a single array) */ 200/* The boot page tables (all created as a single array) */
201extern unsigned long pg0[]; 201extern unsigned long pg0[];
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h
index 8814b54c75d4..7a32184d54bf 100644
--- a/include/asm-i386/setup.h
+++ b/include/asm-i386/setup.h
@@ -16,7 +16,7 @@
16#define MAXMEM_PFN PFN_DOWN(MAXMEM) 16#define MAXMEM_PFN PFN_DOWN(MAXMEM)
17#define MAX_NONPAE_PFN (1 << 20) 17#define MAX_NONPAE_PFN (1 << 20)
18 18
19#define PARAM_SIZE 2048 19#define PARAM_SIZE 4096
20#define COMMAND_LINE_SIZE 256 20#define COMMAND_LINE_SIZE 256
21 21
22#define OLD_CL_MAGIC_ADDR 0x90020 22#define OLD_CL_MAGIC_ADDR 0x90020
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h
index 7ef343b6812d..0f082bd1c455 100644
--- a/include/asm-i386/signal.h
+++ b/include/asm-i386/signal.h
@@ -110,20 +110,6 @@ typedef unsigned long sigset_t;
110#define MINSIGSTKSZ 2048 110#define MINSIGSTKSZ 2048
111#define SIGSTKSZ 8192 111#define SIGSTKSZ 8192
112 112
113#ifdef __KERNEL__
114
115/*
116 * These values of sa_flags are used only by the kernel as part of the
117 * irq handling routines.
118 *
119 * SA_INTERRUPT is also used by the irq handling routines.
120 * SA_SHIRQ is for shared interrupt support on PCI and EISA.
121 */
122#define SA_PROBE SA_ONESHOT
123#define SA_SAMPLE_RANDOM SA_RESTART
124#define SA_SHIRQ 0x04000000
125#endif
126
127#define SIG_BLOCK 0 /* for blocking signals */ 113#define SIG_BLOCK 0 /* for blocking signals */
128#define SIG_UNBLOCK 1 /* for unblocking signals */ 114#define SIG_UNBLOCK 1 /* for unblocking signals */
129#define SIG_SETMASK 2 /* for setting the signal mask */ 115#define SIG_SETMASK 2 /* for setting the signal mask */
diff --git a/include/asm-i386/string.h b/include/asm-i386/string.h
index 1679983d053f..6a78ac58c194 100644
--- a/include/asm-i386/string.h
+++ b/include/asm-i386/string.h
@@ -198,47 +198,80 @@ static inline void * __memcpy(void * to, const void * from, size_t n)
198int d0, d1, d2; 198int d0, d1, d2;
199__asm__ __volatile__( 199__asm__ __volatile__(
200 "rep ; movsl\n\t" 200 "rep ; movsl\n\t"
201 "testb $2,%b4\n\t" 201 "movl %4,%%ecx\n\t"
202 "je 1f\n\t" 202 "andl $3,%%ecx\n\t"
203 "movsw\n" 203#if 1 /* want to pay 2 byte penalty for a chance to skip microcoded rep? */
204 "1:\ttestb $1,%b4\n\t" 204 "jz 1f\n\t"
205 "je 2f\n\t" 205#endif
206 "movsb\n" 206 "rep ; movsb\n\t"
207 "2:" 207 "1:"
208 : "=&c" (d0), "=&D" (d1), "=&S" (d2) 208 : "=&c" (d0), "=&D" (d1), "=&S" (d2)
209 :"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from) 209 : "0" (n/4), "g" (n), "1" ((long) to), "2" ((long) from)
210 : "memory"); 210 : "memory");
211return (to); 211return (to);
212} 212}
213 213
214/* 214/*
215 * This looks horribly ugly, but the compiler can optimize it totally, 215 * This looks ugly, but the compiler can optimize it totally,
216 * as the count is constant. 216 * as the count is constant.
217 */ 217 */
218static inline void * __constant_memcpy(void * to, const void * from, size_t n) 218static inline void * __constant_memcpy(void * to, const void * from, size_t n)
219{ 219{
220 if (n <= 128) 220 long esi, edi;
221 return __builtin_memcpy(to, from, n); 221 if (!n) return to;
222 222#if 1 /* want to do small copies with non-string ops? */
223#define COMMON(x) \ 223 switch (n) {
224__asm__ __volatile__( \ 224 case 1: *(char*)to = *(char*)from; return to;
225 "rep ; movsl" \ 225 case 2: *(short*)to = *(short*)from; return to;
226 x \ 226 case 4: *(int*)to = *(int*)from; return to;
227 : "=&c" (d0), "=&D" (d1), "=&S" (d2) \ 227#if 1 /* including those doable with two moves? */
228 : "0" (n/4),"1" ((long) to),"2" ((long) from) \ 228 case 3: *(short*)to = *(short*)from;
229 : "memory"); 229 *((char*)to+2) = *((char*)from+2); return to;
230{ 230 case 5: *(int*)to = *(int*)from;
231 int d0, d1, d2; 231 *((char*)to+4) = *((char*)from+4); return to;
232 case 6: *(int*)to = *(int*)from;
233 *((short*)to+2) = *((short*)from+2); return to;
234 case 8: *(int*)to = *(int*)from;
235 *((int*)to+1) = *((int*)from+1); return to;
236#endif
237 }
238#endif
239 esi = (long) from;
240 edi = (long) to;
241 if (n >= 5*4) {
242 /* large block: use rep prefix */
243 int ecx;
244 __asm__ __volatile__(
245 "rep ; movsl"
246 : "=&c" (ecx), "=&D" (edi), "=&S" (esi)
247 : "0" (n/4), "1" (edi),"2" (esi)
248 : "memory"
249 );
250 } else {
251 /* small block: don't clobber ecx + smaller code */
252 if (n >= 4*4) __asm__ __volatile__("movsl"
253 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
254 if (n >= 3*4) __asm__ __volatile__("movsl"
255 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
256 if (n >= 2*4) __asm__ __volatile__("movsl"
257 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
258 if (n >= 1*4) __asm__ __volatile__("movsl"
259 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
260 }
232 switch (n % 4) { 261 switch (n % 4) {
233 case 0: COMMON(""); return to; 262 /* tail */
234 case 1: COMMON("\n\tmovsb"); return to; 263 case 0: return to;
235 case 2: COMMON("\n\tmovsw"); return to; 264 case 1: __asm__ __volatile__("movsb"
236 default: COMMON("\n\tmovsw\n\tmovsb"); return to; 265 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
266 return to;
267 case 2: __asm__ __volatile__("movsw"
268 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
269 return to;
270 default: __asm__ __volatile__("movsw\n\tmovsb"
271 :"=&D"(edi),"=&S"(esi):"0"(edi),"1"(esi):"memory");
272 return to;
237 } 273 }
238} 274}
239
240#undef COMMON
241}
242 275
243#define __HAVE_ARCH_MEMCPY 276#define __HAVE_ARCH_MEMCPY
244 277
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h
index 6f74d4c44a0e..3db717a244f0 100644
--- a/include/asm-i386/system.h
+++ b/include/asm-i386/system.h
@@ -81,7 +81,7 @@ static inline unsigned long _get_base(char * addr)
81#define loadsegment(seg,value) \ 81#define loadsegment(seg,value) \
82 asm volatile("\n" \ 82 asm volatile("\n" \
83 "1:\t" \ 83 "1:\t" \
84 "movl %0,%%" #seg "\n" \ 84 "mov %0,%%" #seg "\n" \
85 "2:\n" \ 85 "2:\n" \
86 ".section .fixup,\"ax\"\n" \ 86 ".section .fixup,\"ax\"\n" \
87 "3:\t" \ 87 "3:\t" \
@@ -93,13 +93,13 @@ static inline unsigned long _get_base(char * addr)
93 ".align 4\n\t" \ 93 ".align 4\n\t" \
94 ".long 1b,3b\n" \ 94 ".long 1b,3b\n" \
95 ".previous" \ 95 ".previous" \
96 : :"m" (*(unsigned int *)&(value))) 96 : :"m" (value))
97 97
98/* 98/*
99 * Save a segment register away 99 * Save a segment register away
100 */ 100 */
101#define savesegment(seg, value) \ 101#define savesegment(seg, value) \
102 asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value))) 102 asm volatile("mov %%" #seg ",%0":"=m" (value))
103 103
104/* 104/*
105 * Clear and set 'TS' bit respectively 105 * Clear and set 'TS' bit respectively