diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 12:16:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-02-04 12:16:03 -0500 |
commit | d2fc0bacd5c438cb459fdf531eff00ab18422a00 (patch) | |
tree | d0ea52e4d2ad2fac12e19eaf6891c6af98353cfc /arch/x86/lib | |
parent | 93890b71a34f9490673a6edd56b61c2124215e46 (diff) | |
parent | 795d45b22c079946332bf3825afefe5a981a97b6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (78 commits)
x86: fix RTC lockdep warning: potential hardirq recursion
x86: cpa, micro-optimization
x86: cpa, clean up code flow
x86: cpa, eliminate CPA_ enum
x86: cpa, cleanups
x86: implement gbpages support in change_page_attr()
x86: support gbpages in pagetable dump
x86: add gbpages support to lookup_address
x86: add pgtable accessor functions for gbpages
x86: add PUD_PAGE_SIZE
x86: add feature macros for the gbpages cpuid bit
x86: switch direct mapping setup over to set_pte
x86: fix page-present check in cpa_flush_range
x86: remove cpa warning
x86: remove now unused clear_kernel_mapping
x86: switch pci-gart over to using set_memory_np() instead of clear_kernel_mapping()
x86: cpa selftest, skip non present entries
x86: CPA fix pagetable split
x86: rename LARGE_PAGE_SIZE to PMD_PAGE_SIZE
x86: cpa, fix lookup_address
...
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/mmx_32.c | 31 | ||||
-rw-r--r-- | arch/x86/lib/usercopy_32.c | 12 | ||||
-rw-r--r-- | arch/x86/lib/usercopy_64.c | 12 |
3 files changed, 13 insertions, 42 deletions
diff --git a/arch/x86/lib/mmx_32.c b/arch/x86/lib/mmx_32.c index 28084d2e8dd4..cc9b4a4450f3 100644 --- a/arch/x86/lib/mmx_32.c +++ b/arch/x86/lib/mmx_32.c | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/hardirq.h> | 4 | #include <linux/hardirq.h> |
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | 6 | ||
7 | #include <asm/asm.h> | ||
7 | #include <asm/i387.h> | 8 | #include <asm/i387.h> |
8 | 9 | ||
9 | 10 | ||
@@ -50,10 +51,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len) | |||
50 | "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ | 51 | "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ |
51 | " jmp 2b\n" | 52 | " jmp 2b\n" |
52 | ".previous\n" | 53 | ".previous\n" |
53 | ".section __ex_table,\"a\"\n" | 54 | _ASM_EXTABLE(1b,3b) |
54 | " .align 4\n" | ||
55 | " .long 1b, 3b\n" | ||
56 | ".previous" | ||
57 | : : "r" (from) ); | 55 | : : "r" (from) ); |
58 | 56 | ||
59 | 57 | ||
@@ -81,10 +79,7 @@ void *_mmx_memcpy(void *to, const void *from, size_t len) | |||
81 | "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ | 79 | "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ |
82 | " jmp 2b\n" | 80 | " jmp 2b\n" |
83 | ".previous\n" | 81 | ".previous\n" |
84 | ".section __ex_table,\"a\"\n" | 82 | _ASM_EXTABLE(1b,3b) |
85 | " .align 4\n" | ||
86 | " .long 1b, 3b\n" | ||
87 | ".previous" | ||
88 | : : "r" (from), "r" (to) : "memory"); | 83 | : : "r" (from), "r" (to) : "memory"); |
89 | from+=64; | 84 | from+=64; |
90 | to+=64; | 85 | to+=64; |
@@ -181,10 +176,7 @@ static void fast_copy_page(void *to, void *from) | |||
181 | "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ | 176 | "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ |
182 | " jmp 2b\n" | 177 | " jmp 2b\n" |
183 | ".previous\n" | 178 | ".previous\n" |
184 | ".section __ex_table,\"a\"\n" | 179 | _ASM_EXTABLE(1b,3b) |
185 | " .align 4\n" | ||
186 | " .long 1b, 3b\n" | ||
187 | ".previous" | ||
188 | : : "r" (from) ); | 180 | : : "r" (from) ); |
189 | 181 | ||
190 | for(i=0; i<(4096-320)/64; i++) | 182 | for(i=0; i<(4096-320)/64; i++) |
@@ -211,10 +203,7 @@ static void fast_copy_page(void *to, void *from) | |||
211 | "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ | 203 | "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ |
212 | " jmp 2b\n" | 204 | " jmp 2b\n" |
213 | ".previous\n" | 205 | ".previous\n" |
214 | ".section __ex_table,\"a\"\n" | 206 | _ASM_EXTABLE(1b,3b) |
215 | " .align 4\n" | ||
216 | " .long 1b, 3b\n" | ||
217 | ".previous" | ||
218 | : : "r" (from), "r" (to) : "memory"); | 207 | : : "r" (from), "r" (to) : "memory"); |
219 | from+=64; | 208 | from+=64; |
220 | to+=64; | 209 | to+=64; |
@@ -311,10 +300,7 @@ static void fast_copy_page(void *to, void *from) | |||
311 | "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ | 300 | "3: movw $0x1AEB, 1b\n" /* jmp on 26 bytes */ |
312 | " jmp 2b\n" | 301 | " jmp 2b\n" |
313 | ".previous\n" | 302 | ".previous\n" |
314 | ".section __ex_table,\"a\"\n" | 303 | _ASM_EXTABLE(1b,3b) |
315 | " .align 4\n" | ||
316 | " .long 1b, 3b\n" | ||
317 | ".previous" | ||
318 | : : "r" (from) ); | 304 | : : "r" (from) ); |
319 | 305 | ||
320 | for(i=0; i<4096/64; i++) | 306 | for(i=0; i<4096/64; i++) |
@@ -341,10 +327,7 @@ static void fast_copy_page(void *to, void *from) | |||
341 | "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ | 327 | "3: movw $0x05EB, 1b\n" /* jmp on 5 bytes */ |
342 | " jmp 2b\n" | 328 | " jmp 2b\n" |
343 | ".previous\n" | 329 | ".previous\n" |
344 | ".section __ex_table,\"a\"\n" | 330 | _ASM_EXTABLE(1b,3b) |
345 | " .align 4\n" | ||
346 | " .long 1b, 3b\n" | ||
347 | ".previous" | ||
348 | : : "r" (from), "r" (to) : "memory"); | 331 | : : "r" (from), "r" (to) : "memory"); |
349 | from+=64; | 332 | from+=64; |
350 | to+=64; | 333 | to+=64; |
diff --git a/arch/x86/lib/usercopy_32.c b/arch/x86/lib/usercopy_32.c index 9c4ffd5bedb2..e849b9998b0e 100644 --- a/arch/x86/lib/usercopy_32.c +++ b/arch/x86/lib/usercopy_32.c | |||
@@ -48,10 +48,7 @@ do { \ | |||
48 | "3: movl %5,%0\n" \ | 48 | "3: movl %5,%0\n" \ |
49 | " jmp 2b\n" \ | 49 | " jmp 2b\n" \ |
50 | ".previous\n" \ | 50 | ".previous\n" \ |
51 | ".section __ex_table,\"a\"\n" \ | 51 | _ASM_EXTABLE(0b,3b) \ |
52 | " .align 4\n" \ | ||
53 | " .long 0b,3b\n" \ | ||
54 | ".previous" \ | ||
55 | : "=d"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \ | 52 | : "=d"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \ |
56 | "=&D" (__d2) \ | 53 | "=&D" (__d2) \ |
57 | : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \ | 54 | : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \ |
@@ -132,11 +129,8 @@ do { \ | |||
132 | "3: lea 0(%2,%0,4),%0\n" \ | 129 | "3: lea 0(%2,%0,4),%0\n" \ |
133 | " jmp 2b\n" \ | 130 | " jmp 2b\n" \ |
134 | ".previous\n" \ | 131 | ".previous\n" \ |
135 | ".section __ex_table,\"a\"\n" \ | 132 | _ASM_EXTABLE(0b,3b) \ |
136 | " .align 4\n" \ | 133 | _ASM_EXTABLE(1b,2b) \ |
137 | " .long 0b,3b\n" \ | ||
138 | " .long 1b,2b\n" \ | ||
139 | ".previous" \ | ||
140 | : "=&c"(size), "=&D" (__d0) \ | 134 | : "=&c"(size), "=&D" (__d0) \ |
141 | : "r"(size & 3), "0"(size / 4), "1"(addr), "a"(0)); \ | 135 | : "r"(size & 3), "0"(size / 4), "1"(addr), "a"(0)); \ |
142 | } while (0) | 136 | } while (0) |
diff --git a/arch/x86/lib/usercopy_64.c b/arch/x86/lib/usercopy_64.c index 893d43f838cc..0c89d1bb0287 100644 --- a/arch/x86/lib/usercopy_64.c +++ b/arch/x86/lib/usercopy_64.c | |||
@@ -31,10 +31,7 @@ do { \ | |||
31 | "3: movq %5,%0\n" \ | 31 | "3: movq %5,%0\n" \ |
32 | " jmp 2b\n" \ | 32 | " jmp 2b\n" \ |
33 | ".previous\n" \ | 33 | ".previous\n" \ |
34 | ".section __ex_table,\"a\"\n" \ | 34 | _ASM_EXTABLE(0b,3b) \ |
35 | " .align 8\n" \ | ||
36 | " .quad 0b,3b\n" \ | ||
37 | ".previous" \ | ||
38 | : "=r"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \ | 35 | : "=r"(res), "=c"(count), "=&a" (__d0), "=&S" (__d1), \ |
39 | "=&D" (__d2) \ | 36 | "=&D" (__d2) \ |
40 | : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \ | 37 | : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \ |
@@ -87,11 +84,8 @@ unsigned long __clear_user(void __user *addr, unsigned long size) | |||
87 | "3: lea 0(%[size1],%[size8],8),%[size8]\n" | 84 | "3: lea 0(%[size1],%[size8],8),%[size8]\n" |
88 | " jmp 2b\n" | 85 | " jmp 2b\n" |
89 | ".previous\n" | 86 | ".previous\n" |
90 | ".section __ex_table,\"a\"\n" | 87 | _ASM_EXTABLE(0b,3b) |
91 | " .align 8\n" | 88 | _ASM_EXTABLE(1b,2b) |
92 | " .quad 0b,3b\n" | ||
93 | " .quad 1b,2b\n" | ||
94 | ".previous" | ||
95 | : [size8] "=c"(size), [dst] "=&D" (__d0) | 89 | : [size8] "=c"(size), [dst] "=&D" (__d0) |
96 | : [size1] "r"(size & 7), "[size8]" (size / 8), "[dst]"(addr), | 90 | : [size1] "r"(size & 7), "[size8]" (size / 8), "[dst]"(addr), |
97 | [zero] "r" (0UL), [eight] "r" (8UL)); | 91 | [zero] "r" (0UL), [eight] "r" (8UL)); |