Merge commit 'v2.6.28-rc2' into core/locking
Conflicts: arch/um/include/asm/system.h
This commit is contained in:
@@ -17,9 +17,6 @@ ifeq ($(CONFIG_X86_32),y)
|
||||
lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
|
||||
else
|
||||
obj-y += io_64.o iomap_copy_64.o
|
||||
|
||||
CFLAGS_csum-partial_64.o := -funroll-loops
|
||||
|
||||
lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o
|
||||
lib-y += thunk_64.o clear_page_64.o copy_page_64.o
|
||||
lib-y += memmove_64.o memset_64.o
|
||||
|
@@ -16,37 +16,46 @@ static void __rdmsr_on_cpu(void *info)
|
||||
rdmsr(rv->msr_no, rv->l, rv->h);
|
||||
}
|
||||
|
||||
static void __rdmsr_safe_on_cpu(void *info)
|
||||
static void __wrmsr_on_cpu(void *info)
|
||||
{
|
||||
struct msr_info *rv = info;
|
||||
|
||||
rv->err = rdmsr_safe(rv->msr_no, &rv->l, &rv->h);
|
||||
wrmsr(rv->msr_no, rv->l, rv->h);
|
||||
}
|
||||
|
||||
static int _rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h, int safe)
|
||||
int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
|
||||
{
|
||||
int err = 0;
|
||||
int err;
|
||||
struct msr_info rv;
|
||||
|
||||
rv.msr_no = msr_no;
|
||||
if (safe) {
|
||||
err = smp_call_function_single(cpu, __rdmsr_safe_on_cpu,
|
||||
&rv, 1);
|
||||
err = err ? err : rv.err;
|
||||
} else {
|
||||
err = smp_call_function_single(cpu, __rdmsr_on_cpu, &rv, 1);
|
||||
}
|
||||
err = smp_call_function_single(cpu, __rdmsr_on_cpu, &rv, 1);
|
||||
*l = rv.l;
|
||||
*h = rv.h;
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static void __wrmsr_on_cpu(void *info)
|
||||
int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
|
||||
{
|
||||
int err;
|
||||
struct msr_info rv;
|
||||
|
||||
rv.msr_no = msr_no;
|
||||
rv.l = l;
|
||||
rv.h = h;
|
||||
err = smp_call_function_single(cpu, __wrmsr_on_cpu, &rv, 1);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/* These "safe" variants are slower and should be used when the target MSR
|
||||
may not actually exist. */
|
||||
static void __rdmsr_safe_on_cpu(void *info)
|
||||
{
|
||||
struct msr_info *rv = info;
|
||||
|
||||
wrmsr(rv->msr_no, rv->l, rv->h);
|
||||
rv->err = rdmsr_safe(rv->msr_no, &rv->l, &rv->h);
|
||||
}
|
||||
|
||||
static void __wrmsr_safe_on_cpu(void *info)
|
||||
@@ -56,45 +65,30 @@ static void __wrmsr_safe_on_cpu(void *info)
|
||||
rv->err = wrmsr_safe(rv->msr_no, rv->l, rv->h);
|
||||
}
|
||||
|
||||
static int _wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h, int safe)
|
||||
int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
|
||||
{
|
||||
int err = 0;
|
||||
int err;
|
||||
struct msr_info rv;
|
||||
|
||||
rv.msr_no = msr_no;
|
||||
err = smp_call_function_single(cpu, __rdmsr_safe_on_cpu, &rv, 1);
|
||||
*l = rv.l;
|
||||
*h = rv.h;
|
||||
|
||||
return err ? err : rv.err;
|
||||
}
|
||||
|
||||
int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
|
||||
{
|
||||
int err;
|
||||
struct msr_info rv;
|
||||
|
||||
rv.msr_no = msr_no;
|
||||
rv.l = l;
|
||||
rv.h = h;
|
||||
if (safe) {
|
||||
err = smp_call_function_single(cpu, __wrmsr_safe_on_cpu,
|
||||
&rv, 1);
|
||||
err = err ? err : rv.err;
|
||||
} else {
|
||||
err = smp_call_function_single(cpu, __wrmsr_on_cpu, &rv, 1);
|
||||
}
|
||||
err = smp_call_function_single(cpu, __wrmsr_safe_on_cpu, &rv, 1);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int wrmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
|
||||
{
|
||||
return _wrmsr_on_cpu(cpu, msr_no, l, h, 0);
|
||||
}
|
||||
|
||||
int rdmsr_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
|
||||
{
|
||||
return _rdmsr_on_cpu(cpu, msr_no, l, h, 0);
|
||||
}
|
||||
|
||||
/* These "safe" variants are slower and should be used when the target MSR
|
||||
may not actually exist. */
|
||||
int wrmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 l, u32 h)
|
||||
{
|
||||
return _wrmsr_on_cpu(cpu, msr_no, l, h, 1);
|
||||
}
|
||||
|
||||
int rdmsr_safe_on_cpu(unsigned int cpu, u32 msr_no, u32 *l, u32 *h)
|
||||
{
|
||||
return _rdmsr_on_cpu(cpu, msr_no, l, h, 1);
|
||||
return err ? err : rv.err;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(rdmsr_on_cpu);
|
||||
|
@@ -22,7 +22,7 @@ char *strcpy(char *dest, const char *src)
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2)
|
||||
:"0" (src), "1" (dest) : "memory");
|
||||
: "0" (src), "1" (dest) : "memory");
|
||||
return dest;
|
||||
}
|
||||
EXPORT_SYMBOL(strcpy);
|
||||
@@ -42,7 +42,7 @@ char *strncpy(char *dest, const char *src, size_t count)
|
||||
"stosb\n"
|
||||
"2:"
|
||||
: "=&S" (d0), "=&D" (d1), "=&c" (d2), "=&a" (d3)
|
||||
:"0" (src), "1" (dest), "2" (count) : "memory");
|
||||
: "0" (src), "1" (dest), "2" (count) : "memory");
|
||||
return dest;
|
||||
}
|
||||
EXPORT_SYMBOL(strncpy);
|
||||
@@ -60,7 +60,7 @@ char *strcat(char *dest, const char *src)
|
||||
"testb %%al,%%al\n\t"
|
||||
"jne 1b"
|
||||
: "=&S" (d0), "=&D" (d1), "=&a" (d2), "=&c" (d3)
|
||||
: "0" (src), "1" (dest), "2" (0), "3" (0xffffffffu): "memory");
|
||||
: "0" (src), "1" (dest), "2" (0), "3" (0xffffffffu) : "memory");
|
||||
return dest;
|
||||
}
|
||||
EXPORT_SYMBOL(strcat);
|
||||
@@ -105,9 +105,9 @@ int strcmp(const char *cs, const char *ct)
|
||||
"2:\tsbbl %%eax,%%eax\n\t"
|
||||
"orb $1,%%al\n"
|
||||
"3:"
|
||||
:"=a" (res), "=&S" (d0), "=&D" (d1)
|
||||
:"1" (cs), "2" (ct)
|
||||
:"memory");
|
||||
: "=a" (res), "=&S" (d0), "=&D" (d1)
|
||||
: "1" (cs), "2" (ct)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strcmp);
|
||||
@@ -130,9 +130,9 @@ int strncmp(const char *cs, const char *ct, size_t count)
|
||||
"3:\tsbbl %%eax,%%eax\n\t"
|
||||
"orb $1,%%al\n"
|
||||
"4:"
|
||||
:"=a" (res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
|
||||
:"1" (cs), "2" (ct), "3" (count)
|
||||
:"memory");
|
||||
: "=a" (res), "=&S" (d0), "=&D" (d1), "=&c" (d2)
|
||||
: "1" (cs), "2" (ct), "3" (count)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strncmp);
|
||||
@@ -152,9 +152,9 @@ char *strchr(const char *s, int c)
|
||||
"movl $1,%1\n"
|
||||
"2:\tmovl %1,%0\n\t"
|
||||
"decl %0"
|
||||
:"=a" (res), "=&S" (d0)
|
||||
:"1" (s), "0" (c)
|
||||
:"memory");
|
||||
: "=a" (res), "=&S" (d0)
|
||||
: "1" (s), "0" (c)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strchr);
|
||||
@@ -169,9 +169,9 @@ size_t strlen(const char *s)
|
||||
"scasb\n\t"
|
||||
"notl %0\n\t"
|
||||
"decl %0"
|
||||
:"=c" (res), "=&D" (d0)
|
||||
:"1" (s), "a" (0), "0" (0xffffffffu)
|
||||
:"memory");
|
||||
: "=c" (res), "=&D" (d0)
|
||||
: "1" (s), "a" (0), "0" (0xffffffffu)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strlen);
|
||||
@@ -189,9 +189,9 @@ void *memchr(const void *cs, int c, size_t count)
|
||||
"je 1f\n\t"
|
||||
"movl $1,%0\n"
|
||||
"1:\tdecl %0"
|
||||
:"=D" (res), "=&c" (d0)
|
||||
:"a" (c), "0" (cs), "1" (count)
|
||||
:"memory");
|
||||
: "=D" (res), "=&c" (d0)
|
||||
: "a" (c), "0" (cs), "1" (count)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(memchr);
|
||||
@@ -228,9 +228,9 @@ size_t strnlen(const char *s, size_t count)
|
||||
"cmpl $-1,%1\n\t"
|
||||
"jne 1b\n"
|
||||
"3:\tsubl %2,%0"
|
||||
:"=a" (res), "=&d" (d0)
|
||||
:"c" (s), "1" (count)
|
||||
:"memory");
|
||||
: "=a" (res), "=&d" (d0)
|
||||
: "c" (s), "1" (count)
|
||||
: "memory");
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strnlen);
|
||||
|
@@ -23,9 +23,9 @@ __asm__ __volatile__(
|
||||
"jne 1b\n\t"
|
||||
"xorl %%eax,%%eax\n\t"
|
||||
"2:"
|
||||
:"=a" (__res), "=&c" (d0), "=&S" (d1)
|
||||
:"0" (0), "1" (0xffffffff), "2" (cs), "g" (ct)
|
||||
:"dx", "di");
|
||||
: "=a" (__res), "=&c" (d0), "=&S" (d1)
|
||||
: "0" (0), "1" (0xffffffff), "2" (cs), "g" (ct)
|
||||
: "dx", "di");
|
||||
return __res;
|
||||
}
|
||||
|
||||
|
@@ -14,6 +14,13 @@
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/mmx.h>
|
||||
|
||||
#ifdef CONFIG_X86_INTEL_USERCOPY
|
||||
/*
|
||||
* Alignment at which movsl is preferred for bulk memory copies.
|
||||
*/
|
||||
struct movsl_mask movsl_mask __read_mostly;
|
||||
#endif
|
||||
|
||||
static inline int __movsl_is_ok(unsigned long a1, unsigned long a2, unsigned long n)
|
||||
{
|
||||
#ifdef CONFIG_X86_INTEL_USERCOPY
|
||||
|
Reference in New Issue
Block a user