Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86/build changes from Ingo Molnar: "Misc smaller improvements" * 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, boot: Move intcall() to the .inittext section x86, boot: Use .code16 instead of .code16gcc x86, sparse: Do not force removal of __user when calling copy_to/from_user_nocheck()
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/* -----------------------------------------------------------------------
|
/* -----------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
* Copyright 2009 Intel Corporation; author H. Peter Anvin
|
* Copyright 2009-2014 Intel Corporation; author H. Peter Anvin
|
||||||
*
|
*
|
||||||
* This file is part of the Linux kernel, and is made available under
|
* This file is part of the Linux kernel, and is made available under
|
||||||
* the terms of the GNU General Public License version 2 or (at your
|
* the terms of the GNU General Public License version 2 or (at your
|
||||||
@@ -13,8 +13,8 @@
|
|||||||
* touching registers they shouldn't be.
|
* touching registers they shouldn't be.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.code16gcc
|
.code16
|
||||||
.text
|
.section ".inittext","ax"
|
||||||
.globl intcall
|
.globl intcall
|
||||||
.type intcall, @function
|
.type intcall, @function
|
||||||
intcall:
|
intcall:
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
* Memory copy routines
|
* Memory copy routines
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.code16gcc
|
.code16
|
||||||
.text
|
.text
|
||||||
|
|
||||||
GLOBAL(memcpy)
|
GLOBAL(memcpy)
|
||||||
@@ -30,7 +30,7 @@ GLOBAL(memcpy)
|
|||||||
rep; movsb
|
rep; movsb
|
||||||
popw %di
|
popw %di
|
||||||
popw %si
|
popw %si
|
||||||
ret
|
retl
|
||||||
ENDPROC(memcpy)
|
ENDPROC(memcpy)
|
||||||
|
|
||||||
GLOBAL(memset)
|
GLOBAL(memset)
|
||||||
@@ -45,25 +45,25 @@ GLOBAL(memset)
|
|||||||
andw $3, %cx
|
andw $3, %cx
|
||||||
rep; stosb
|
rep; stosb
|
||||||
popw %di
|
popw %di
|
||||||
ret
|
retl
|
||||||
ENDPROC(memset)
|
ENDPROC(memset)
|
||||||
|
|
||||||
GLOBAL(copy_from_fs)
|
GLOBAL(copy_from_fs)
|
||||||
pushw %ds
|
pushw %ds
|
||||||
pushw %fs
|
pushw %fs
|
||||||
popw %ds
|
popw %ds
|
||||||
call memcpy
|
calll memcpy
|
||||||
popw %ds
|
popw %ds
|
||||||
ret
|
retl
|
||||||
ENDPROC(copy_from_fs)
|
ENDPROC(copy_from_fs)
|
||||||
|
|
||||||
GLOBAL(copy_to_fs)
|
GLOBAL(copy_to_fs)
|
||||||
pushw %es
|
pushw %es
|
||||||
pushw %fs
|
pushw %fs
|
||||||
popw %es
|
popw %es
|
||||||
call memcpy
|
calll memcpy
|
||||||
popw %es
|
popw %es
|
||||||
ret
|
retl
|
||||||
ENDPROC(copy_to_fs)
|
ENDPROC(copy_to_fs)
|
||||||
|
|
||||||
#if 0 /* Not currently used, but can be enabled as needed */
|
#if 0 /* Not currently used, but can be enabled as needed */
|
||||||
@@ -71,17 +71,17 @@ GLOBAL(copy_from_gs)
|
|||||||
pushw %ds
|
pushw %ds
|
||||||
pushw %gs
|
pushw %gs
|
||||||
popw %ds
|
popw %ds
|
||||||
call memcpy
|
calll memcpy
|
||||||
popw %ds
|
popw %ds
|
||||||
ret
|
retl
|
||||||
ENDPROC(copy_from_gs)
|
ENDPROC(copy_from_gs)
|
||||||
|
|
||||||
GLOBAL(copy_to_gs)
|
GLOBAL(copy_to_gs)
|
||||||
pushw %es
|
pushw %es
|
||||||
pushw %gs
|
pushw %gs
|
||||||
popw %es
|
popw %es
|
||||||
call memcpy
|
calll memcpy
|
||||||
popw %es
|
popw %es
|
||||||
ret
|
retl
|
||||||
ENDPROC(copy_to_gs)
|
ENDPROC(copy_to_gs)
|
||||||
#endif
|
#endif
|
||||||
|
@@ -204,13 +204,13 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
|
|||||||
static __must_check __always_inline int
|
static __must_check __always_inline int
|
||||||
__copy_from_user_inatomic(void *dst, const void __user *src, unsigned size)
|
__copy_from_user_inatomic(void *dst, const void __user *src, unsigned size)
|
||||||
{
|
{
|
||||||
return __copy_from_user_nocheck(dst, (__force const void *)src, size);
|
return __copy_from_user_nocheck(dst, src, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static __must_check __always_inline int
|
static __must_check __always_inline int
|
||||||
__copy_to_user_inatomic(void __user *dst, const void *src, unsigned size)
|
__copy_to_user_inatomic(void __user *dst, const void *src, unsigned size)
|
||||||
{
|
{
|
||||||
return __copy_to_user_nocheck((__force void *)dst, src, size);
|
return __copy_to_user_nocheck(dst, src, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
extern long __copy_user_nocache(void *dst, const void __user *src,
|
extern long __copy_user_nocache(void *dst, const void __user *src,
|
||||||
|
Reference in New Issue
Block a user