diff options
Diffstat (limited to 'arch/m32r/lib')
| -rw-r--r-- | arch/m32r/lib/Makefile | 4 | ||||
| -rw-r--r-- | arch/m32r/lib/ashxdi3.S | 4 | ||||
| -rw-r--r-- | arch/m32r/lib/checksum.S | 4 | ||||
| -rw-r--r-- | arch/m32r/lib/csum_partial_copy.c | 12 | ||||
| -rw-r--r-- | arch/m32r/lib/delay.c | 9 | ||||
| -rw-r--r-- | arch/m32r/lib/getuser.S | 88 | ||||
| -rw-r--r-- | arch/m32r/lib/memcpy.S | 3 | ||||
| -rw-r--r-- | arch/m32r/lib/memset.S | 3 | ||||
| -rw-r--r-- | arch/m32r/lib/putuser.S | 84 | ||||
| -rw-r--r-- | arch/m32r/lib/strlen.S | 3 | ||||
| -rw-r--r-- | arch/m32r/lib/usercopy.c | 9 |
11 files changed, 18 insertions, 205 deletions
diff --git a/arch/m32r/lib/Makefile b/arch/m32r/lib/Makefile index e632d10c7d7..d16b4e40d1a 100644 --- a/arch/m32r/lib/Makefile +++ b/arch/m32r/lib/Makefile @@ -2,6 +2,6 @@ # Makefile for M32R-specific library files.. # -lib-y := checksum.o ashxdi3.o memset.o memcpy.o getuser.o \ - putuser.o delay.o strlen.o usercopy.o csum_partial_copy.o +lib-y := checksum.o ashxdi3.o memset.o memcpy.o \ + delay.o strlen.o usercopy.o csum_partial_copy.o diff --git a/arch/m32r/lib/ashxdi3.S b/arch/m32r/lib/ashxdi3.S index 78effca9d97..7fc0c19801b 100644 --- a/arch/m32r/lib/ashxdi3.S +++ b/arch/m32r/lib/ashxdi3.S @@ -4,9 +4,6 @@ * Copyright (C) 2001,2002 Hiroyuki Kondo, and Hirokazu Takata * */ -/* $Id$ */ - -#include <linux/config.h> ; ; input (r0,r1) src @@ -294,4 +291,3 @@ __lshrdi3: #endif /* not CONFIG_ISA_DUAL_ISSUE */ .end - diff --git a/arch/m32r/lib/checksum.S b/arch/m32r/lib/checksum.S index f6fc1bdb87e..0af0360c76d 100644 --- a/arch/m32r/lib/checksum.S +++ b/arch/m32r/lib/checksum.S @@ -25,10 +25,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ -/* $Id$ */ - -#include <linux/config.h> #include <linux/linkage.h> #include <asm/assembler.h> #include <asm/errno.h> @@ -320,3 +317,4 @@ ENTRY(csum_partial_copy_generic) nop nop + .end diff --git a/arch/m32r/lib/csum_partial_copy.c b/arch/m32r/lib/csum_partial_copy.c index 3d5f0614585..5596f3df833 100644 --- a/arch/m32r/lib/csum_partial_copy.c +++ b/arch/m32r/lib/csum_partial_copy.c @@ -27,9 +27,8 @@ /* * Copy while checksumming, otherwise like csum_partial */ -unsigned int -csum_partial_copy_nocheck (const unsigned char *src, unsigned char *dst, - int len, unsigned int sum) +__wsum +csum_partial_copy_nocheck (const void *src, void *dst, int len, __wsum sum) { sum = csum_partial(src, len, sum); memcpy(dst, src, len); @@ -42,10 +41,9 @@ EXPORT_SYMBOL(csum_partial_copy_nocheck); * Copy from userspace and compute checksum. If we catch an exception * then zero the rest of the buffer. */ -unsigned int -csum_partial_copy_from_user (const unsigned char __user *src, - unsigned char *dst, - int len, unsigned int sum, int *err_ptr) +__wsum +csum_partial_copy_from_user (const void __user *src, void *dst, + int len, __wsum sum, int *err_ptr) { int missing; diff --git a/arch/m32r/lib/delay.c b/arch/m32r/lib/delay.c index fb29632c7ea..940f4837e42 100644 --- a/arch/m32r/lib/delay.c +++ b/arch/m32r/lib/delay.c @@ -5,10 +5,8 @@ * Copyright (c) 2004 Hirokazu Takata */ -/* $Id$ */ - -#include <linux/config.h> #include <linux/param.h> +#include <linux/module.h> #ifdef CONFIG_SMP #include <linux/sched.h> #include <asm/current.h> @@ -124,3 +122,8 @@ void __ndelay(unsigned long nsecs) { __const_udelay(nsecs * 0x00005); /* 2**32 / 1000000000 (rounded up) */ } + +EXPORT_SYMBOL(__delay); +EXPORT_SYMBOL(__const_udelay); +EXPORT_SYMBOL(__udelay); +EXPORT_SYMBOL(__ndelay); diff --git a/arch/m32r/lib/getuser.S b/arch/m32r/lib/getuser.S deleted file mode 100644 index 58a0db055c5..00000000000 --- a/arch/m32r/lib/getuser.S +++ /dev/null @@ -1,88 +0,0 @@ -/* - * __get_user functions. - * - * (C) Copyright 2001 Hirokazu Takata - * - * These functions have a non-standard call interface - * to make them more efficient, especially as they - * return an error value in addition to the "real" - * return value. - */ - -#include <linux/config.h> - -/* - * __get_user_X - * - * Inputs: r0 contains the address - * - * Outputs: r0 is error code (0 or -EFAULT) - * r1 contains zero-extended value - * - * These functions should not modify any other registers, - * as they get called from within inline assembly. - */ - -#ifdef CONFIG_ISA_DUAL_ISSUE - - .text - .balign 4 - .globl __get_user_1 -__get_user_1: -1: ldub r1, @r0 || ldi r0, #0 - jmp r14 - - .balign 4 - .globl __get_user_2 -__get_user_2: -2: lduh r1, @r0 || ldi r0, #0 - jmp r14 - - .balign 4 - .globl __get_user_4 -__get_user_4: -3: ld r1, @r0 || ldi r0, #0 - jmp r14 - -bad_get_user: - ldi r1, #0 || ldi r0, #-14 - jmp r14 - -#else /* not CONFIG_ISA_DUAL_ISSUE */ - - .text - .balign 4 - .globl __get_user_1 -__get_user_1: -1: ldub r1, @r0 - ldi r0, #0 - jmp r14 - - .balign 4 - .globl __get_user_2 -__get_user_2: -2: lduh r1, @r0 - ldi r0, #0 - jmp r14 - - .balign 4 - .globl __get_user_4 -__get_user_4: -3: ld r1, @r0 - ldi r0, #0 - jmp r14 - -bad_get_user: - ldi r1, #0 - ldi r0, #-14 - jmp r14 - -#endif /* not CONFIG_ISA_DUAL_ISSUE */ - -.section __ex_table,"a" - .long 1b,bad_get_user - .long 2b,bad_get_user - .long 3b,bad_get_user -.previous - - .end diff --git a/arch/m32r/lib/memcpy.S b/arch/m32r/lib/memcpy.S index 800898a2d2e..05987cd639e 100644 --- a/arch/m32r/lib/memcpy.S +++ b/arch/m32r/lib/memcpy.S @@ -10,11 +10,8 @@ * src: r1 * n : r2 */ -/* $Id$ */ - .text -#include <linux/config.h> #include <linux/linkage.h> #include <asm/assembler.h> diff --git a/arch/m32r/lib/memset.S b/arch/m32r/lib/memset.S index 6e26df120ac..2b2831a3792 100644 --- a/arch/m32r/lib/memset.S +++ b/arch/m32r/lib/memset.S @@ -12,9 +12,6 @@ * ret: r0 * */ -/* $Id$ */ - -#include <linux/config.h> .text .global memset diff --git a/arch/m32r/lib/putuser.S b/arch/m32r/lib/putuser.S deleted file mode 100644 index 218154cc389..00000000000 --- a/arch/m32r/lib/putuser.S +++ /dev/null @@ -1,84 +0,0 @@ -/* - * __put_user functions. - * - * (C) Copyright 1998 Linus Torvalds - * (C) Copyright 2001 Hirokazu Takata - * - * These functions have a non-standard call interface - * to make them more efficient. - */ - -#include <linux/config.h> - -/* - * __put_user_X - * - * Inputs: r0 contains the address - * r1 contains the value - * - * Outputs: r0 is error code (0 or -EFAULT) - * r1 is corrupted (will contain "current_task"). - * - * These functions should not modify any other registers, - * as they get called from within inline assembly. - */ - -#ifdef CONFIG_ISA_DUAL_ISSUE - - .text - .balign 4 - .globl __put_user_1 -__put_user_1: -1: stb r1, @r0 || ldi r0, #0 - jmp r14 - - .balign 4 - .globl __put_user_2 -__put_user_2: -2: sth r1, @r0 || ldi r0, #0 - jmp r14 - - .balign 4 - .globl __put_user_4 -__put_user_4: -3: st r1, @r0 || ldi r0, #0 - jmp r14 - -bad_put_user: - ldi r0, #-14 || jmp r14 - -#else /* not CONFIG_ISA_DUAL_ISSUE */ - - .text - .balign 4 - .globl __put_user_1 -__put_user_1: -1: stb r1, @r0 - ldi r0, #0 - jmp r14 - - .balign 4 - .globl __put_user_2 -__put_user_2: -2: sth r1, @r0 - ldi r0, #0 - jmp r14 - - .balign 4 - .globl __put_user_4 -__put_user_4: -3: st r1, @r0 - ldi r0, #0 - jmp r14 - -bad_put_user: - ldi r0, #-14 - jmp r14 - -#endif /* not CONFIG_ISA_DUAL_ISSUE */ - -.section __ex_table,"a" - .long 1b,bad_put_user - .long 2b,bad_put_user - .long 3b,bad_put_user -.previous diff --git a/arch/m32r/lib/strlen.S b/arch/m32r/lib/strlen.S index 8d23cfbd600..916de9e8f80 100644 --- a/arch/m32r/lib/strlen.S +++ b/arch/m32r/lib/strlen.S @@ -6,10 +6,7 @@ * size_t strlen(const char *s); * */ -/* $Id$ */ - -#include <linux/config.h> #include <linux/linkage.h> #include <asm/assembler.h> diff --git a/arch/m32r/lib/usercopy.c b/arch/m32r/lib/usercopy.c index ce16bbe26a5..82abd159dbe 100644 --- a/arch/m32r/lib/usercopy.c +++ b/arch/m32r/lib/usercopy.c @@ -6,7 +6,6 @@ * Copyright 1997 Linus Torvalds * Copyright 2001, 2002, 2004 Hirokazu Takata */ -#include <linux/config.h> #include <linux/prefetch.h> #include <linux/string.h> #include <linux/thread_info.h> @@ -64,7 +63,7 @@ do { \ " .balign 4\n" \ " .long 0b,3b\n" \ ".previous" \ - : "=r"(res), "=r"(count), "=&r" (__d0), "=&r" (__d1), \ + : "=&r"(res), "=&r"(count), "=&r" (__d0), "=&r" (__d1), \ "=&r" (__d2) \ : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), \ "4"(dst) \ @@ -101,7 +100,7 @@ do { \ " .balign 4\n" \ " .long 0b,3b\n" \ ".previous" \ - : "=r"(res), "=r"(count), "=&r" (__d0), "=&r" (__d1), \ + : "=&r"(res), "=&r"(count), "=&r" (__d0), "=&r" (__d1), \ "=&r" (__d2) \ : "i"(-EFAULT), "0"(count), "1"(count), "3"(src), \ "4"(dst) \ @@ -294,7 +293,7 @@ long strnlen_user(const char __user *s, long n) : "0" (n), "1" (s), "r" (n & 3), "r" (mask), "r"(0x01010101) : "r0", "r1", "cbit"); - /* NOTE: strnlen_user() algorism: + /* NOTE: strnlen_user() algorithm: * { * char *p; * for (p = s; n-- && *p != '\0'; ++p) @@ -370,7 +369,7 @@ long strnlen_user(const char __user *s, long n) : "0" (n), "1" (s), "r" (n & 3), "r" (mask), "r"(0x01010101) : "r0", "r1", "r2", "r3", "cbit"); - /* NOTE: strnlen_user() algorism: + /* NOTE: strnlen_user() algorithm: * { * char *p; * for (p = s; n-- && *p != '\0'; ++p) |
