diff options
Diffstat (limited to 'arch/x86/lib')
-rw-r--r-- | arch/x86/lib/Makefile | 26 | ||||
-rw-r--r-- | arch/x86/lib/Makefile_32 | 11 | ||||
-rw-r--r-- | arch/x86/lib/Makefile_64 | 13 | ||||
-rw-r--r-- | arch/x86/lib/memcpy_32.c | 4 | ||||
-rw-r--r-- | arch/x86/lib/memmove_64.c | 4 | ||||
-rw-r--r-- | arch/x86/lib/semaphore_32.S | 22 | ||||
-rw-r--r-- | arch/x86/lib/thunk_64.S | 2 |
7 files changed, 40 insertions, 42 deletions
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 329da276c6f..4876182daf8 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -1,5 +1,27 @@ +# +# Makefile for x86 specific library files. +# + +obj-$(CONFIG_SMP) := msr-on-cpu.o + +lib-y := delay_$(BITS).o +lib-y += usercopy_$(BITS).o getuser_$(BITS).o putuser_$(BITS).o +lib-y += memcpy_$(BITS).o + ifeq ($(CONFIG_X86_32),y) -include ${srctree}/arch/x86/lib/Makefile_32 + lib-y += checksum_32.o + lib-y += strstr_32.o + lib-y += bitops_32.o semaphore_32.o string_32.o + + lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o else -include ${srctree}/arch/x86/lib/Makefile_64 + 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 += bitstr_64.o bitops_64.o + lib-y += memmove_64.o memset_64.o + lib-y += copy_user_64.o rwlock_64.o copy_user_nocache_64.o endif diff --git a/arch/x86/lib/Makefile_32 b/arch/x86/lib/Makefile_32 deleted file mode 100644 index 98d1f1e2e2e..00000000000 --- a/arch/x86/lib/Makefile_32 +++ /dev/null @@ -1,11 +0,0 @@ -# -# Makefile for i386-specific library files.. -# - - -lib-y = checksum_32.o delay_32.o usercopy_32.o getuser_32.o putuser_32.o memcpy_32.o strstr_32.o \ - bitops_32.o semaphore_32.o string_32.o - -lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o - -obj-$(CONFIG_SMP) += msr-on-cpu.o diff --git a/arch/x86/lib/Makefile_64 b/arch/x86/lib/Makefile_64 deleted file mode 100644 index bbabad3c933..00000000000 --- a/arch/x86/lib/Makefile_64 +++ /dev/null @@ -1,13 +0,0 @@ -# -# Makefile for x86_64-specific library files. -# - -CFLAGS_csum-partial_64.o := -funroll-loops - -obj-y := io_64.o iomap_copy_64.o -obj-$(CONFIG_SMP) += msr-on-cpu.o - -lib-y := csum-partial_64.o csum-copy_64.o csum-wrappers_64.o delay_64.o \ - usercopy_64.o getuser_64.o putuser_64.o \ - thunk_64.o clear_page_64.o copy_page_64.o bitstr_64.o bitops_64.o -lib-y += memcpy_64.o memmove_64.o memset_64.o copy_user_64.o rwlock_64.o copy_user_nocache_64.o diff --git a/arch/x86/lib/memcpy_32.c b/arch/x86/lib/memcpy_32.c index 8ac51b82a63..37756b6fb32 100644 --- a/arch/x86/lib/memcpy_32.c +++ b/arch/x86/lib/memcpy_32.c @@ -34,8 +34,8 @@ void *memmove(void *dest, const void *src, size_t n) "cld" : "=&c" (d0), "=&S" (d1), "=&D" (d2) :"0" (n), - "1" (n-1+(const char *)src), - "2" (n-1+(char *)dest) + "1" (n-1+src), + "2" (n-1+dest) :"memory"); } return dest; diff --git a/arch/x86/lib/memmove_64.c b/arch/x86/lib/memmove_64.c index 751ebae8ec4..80175e47b19 100644 --- a/arch/x86/lib/memmove_64.c +++ b/arch/x86/lib/memmove_64.c @@ -11,8 +11,8 @@ void *memmove(void * dest,const void *src,size_t count) if (dest < src) { return memcpy(dest,src,count); } else { - char *p = (char *) dest + count; - char *s = (char *) src + count; + char *p = dest + count; + const char *s = src + count; while (count--) *--p = *--s; } diff --git a/arch/x86/lib/semaphore_32.S b/arch/x86/lib/semaphore_32.S index 444fba40098..3899bd37fdf 100644 --- a/arch/x86/lib/semaphore_32.S +++ b/arch/x86/lib/semaphore_32.S @@ -29,7 +29,7 @@ * registers (%eax, %edx and %ecx) except %eax whish is either a return * value or just clobbered.. */ - .section .sched.text + .section .sched.text, "ax" ENTRY(__down_failed) CFI_STARTPROC FRAME @@ -49,7 +49,7 @@ ENTRY(__down_failed) ENDFRAME ret CFI_ENDPROC - END(__down_failed) + ENDPROC(__down_failed) ENTRY(__down_failed_interruptible) CFI_STARTPROC @@ -70,7 +70,7 @@ ENTRY(__down_failed_interruptible) ENDFRAME ret CFI_ENDPROC - END(__down_failed_interruptible) + ENDPROC(__down_failed_interruptible) ENTRY(__down_failed_trylock) CFI_STARTPROC @@ -91,7 +91,7 @@ ENTRY(__down_failed_trylock) ENDFRAME ret CFI_ENDPROC - END(__down_failed_trylock) + ENDPROC(__down_failed_trylock) ENTRY(__up_wakeup) CFI_STARTPROC @@ -112,7 +112,7 @@ ENTRY(__up_wakeup) ENDFRAME ret CFI_ENDPROC - END(__up_wakeup) + ENDPROC(__up_wakeup) /* * rw spinlock fallbacks @@ -132,7 +132,7 @@ ENTRY(__write_lock_failed) ENDFRAME ret CFI_ENDPROC - END(__write_lock_failed) + ENDPROC(__write_lock_failed) ENTRY(__read_lock_failed) CFI_STARTPROC @@ -148,7 +148,7 @@ ENTRY(__read_lock_failed) ENDFRAME ret CFI_ENDPROC - END(__read_lock_failed) + ENDPROC(__read_lock_failed) #endif @@ -170,7 +170,7 @@ ENTRY(call_rwsem_down_read_failed) CFI_ADJUST_CFA_OFFSET -4 ret CFI_ENDPROC - END(call_rwsem_down_read_failed) + ENDPROC(call_rwsem_down_read_failed) ENTRY(call_rwsem_down_write_failed) CFI_STARTPROC @@ -182,7 +182,7 @@ ENTRY(call_rwsem_down_write_failed) CFI_ADJUST_CFA_OFFSET -4 ret CFI_ENDPROC - END(call_rwsem_down_write_failed) + ENDPROC(call_rwsem_down_write_failed) ENTRY(call_rwsem_wake) CFI_STARTPROC @@ -196,7 +196,7 @@ ENTRY(call_rwsem_wake) CFI_ADJUST_CFA_OFFSET -4 1: ret CFI_ENDPROC - END(call_rwsem_wake) + ENDPROC(call_rwsem_wake) /* Fix up special calling conventions */ ENTRY(call_rwsem_downgrade_wake) @@ -214,6 +214,6 @@ ENTRY(call_rwsem_downgrade_wake) CFI_ADJUST_CFA_OFFSET -4 ret CFI_ENDPROC - END(call_rwsem_downgrade_wake) + ENDPROC(call_rwsem_downgrade_wake) #endif diff --git a/arch/x86/lib/thunk_64.S b/arch/x86/lib/thunk_64.S index 6ea73f3de56..8b92d428ab0 100644 --- a/arch/x86/lib/thunk_64.S +++ b/arch/x86/lib/thunk_64.S @@ -33,7 +33,7 @@ .endm - .section .sched.text + .section .sched.text, "ax" #ifdef CONFIG_RWSEM_XCHGADD_ALGORITHM thunk rwsem_down_read_failed_thunk,rwsem_down_read_failed thunk rwsem_down_write_failed_thunk,rwsem_down_write_failed |