Commit fdf8bee9 authored by Al Viro's avatar Al Viro

sparc64: propagate the calling convention changes down to __csum_partial_copy_...()

... and rename them into csum_and_copy_...() - the wrappers become pointless.
[braino fixed]
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2a5d2bd1
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#define ___ASM_SPARC_CHECKSUM_H #define ___ASM_SPARC_CHECKSUM_H
#define _HAVE_ARCH_CSUM_AND_COPY #define _HAVE_ARCH_CSUM_AND_COPY
#define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER #define _HAVE_ARCH_COPY_AND_CSUM_FROM_USER
#define HAVE_CSUM_COPY_USER
#if defined(__sparc__) && defined(__arch64__) #if defined(__sparc__) && defined(__arch64__)
#include <asm/checksum_64.h> #include <asm/checksum_64.h>
#else #else
......
...@@ -67,8 +67,6 @@ csum_and_copy_from_user(const void __user *src, void *dst, int len) ...@@ -67,8 +67,6 @@ csum_and_copy_from_user(const void __user *src, void *dst, int len)
return csum_partial_copy_nocheck((__force void *)src, dst, len); return csum_partial_copy_nocheck((__force void *)src, dst, len);
} }
#define HAVE_CSUM_COPY_USER
static inline __wsum static inline __wsum
csum_and_copy_to_user(const void *src, void __user *dst, int len) csum_and_copy_to_user(const void *src, void __user *dst, int len)
{ {
......
...@@ -38,44 +38,9 @@ __wsum csum_partial(const void * buff, int len, __wsum sum); ...@@ -38,44 +38,9 @@ __wsum csum_partial(const void * buff, int len, __wsum sum);
* here even more important to align src and dst on a 32-bit (or even * here even more important to align src and dst on a 32-bit (or even
* better 64-bit) boundary * better 64-bit) boundary
*/ */
__wsum __csum_partial_copy_nocheck(const void *src, void *dst, int len, __wsum sum); __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len);
__wsum csum_and_copy_from_user(const void __user *src, void *dst, int len);
static inline __wsum csum_partial_copy_nocheck(const void *src, void *dst, int len) __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len);
{
return __csum_partial_copy_nocheck(src, dst, len, 0);
}
long __csum_partial_copy_from_user(const void __user *src,
void *dst, int len,
__wsum sum);
static inline __wsum
csum_and_copy_from_user(const void __user *src,
void *dst, int len)
{
long ret = __csum_partial_copy_from_user(src, dst, len, ~0U);
if (ret < 0)
return 0;
return (__force __wsum) ret;
}
/*
* Copy and checksum to user
*/
#define HAVE_CSUM_COPY_USER
long __csum_partial_copy_to_user(const void *src,
void __user *dst, int len,
__wsum sum);
static inline __wsum
csum_and_copy_to_user(const void *src,
void __user *dst, int len)
{
long ret = __csum_partial_copy_to_user(src, dst, len, ~0U);
if (ret < 0)
return 0;
return (__force __wsum) ret;
}
/* ihl is always 5 or greater, almost always is 5, and iph is word aligned /* ihl is always 5 or greater, almost always is 5, and iph is word aligned
* the majority of the time. * the majority of the time.
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#endif #endif
#ifndef FUNC_NAME #ifndef FUNC_NAME
#define FUNC_NAME __csum_partial_copy_nocheck #define FUNC_NAME csum_partial_copy_nocheck
#endif #endif
.register %g2, #scratch .register %g2, #scratch
...@@ -68,9 +68,10 @@ ...@@ -68,9 +68,10 @@
.globl FUNC_NAME .globl FUNC_NAME
.type FUNC_NAME,#function .type FUNC_NAME,#function
EXPORT_SYMBOL(FUNC_NAME) EXPORT_SYMBOL(FUNC_NAME)
FUNC_NAME: /* %o0=src, %o1=dst, %o2=len, %o3=sum */ FUNC_NAME: /* %o0=src, %o1=dst, %o2=len */
LOAD(prefetch, %o0 + 0x000, #n_reads) LOAD(prefetch, %o0 + 0x000, #n_reads)
xor %o0, %o1, %g1 xor %o0, %o1, %g1
mov 1, %o3
clr %o4 clr %o4
andcc %g1, 0x3, %g0 andcc %g1, 0x3, %g0
bne,pn %icc, 95f bne,pn %icc, 95f
......
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
.section .fixup, "ax"; \ .section .fixup, "ax"; \
.align 4; \ .align 4; \
99: retl; \ 99: retl; \
mov -1, %o0; \ mov 0, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, 99b; \
.text; \ .text; \
.align 4; .align 4;
#define FUNC_NAME __csum_partial_copy_from_user #define FUNC_NAME csum_and_copy_from_user
#define LOAD(type,addr,dest) type##a [addr] %asi, dest #define LOAD(type,addr,dest) type##a [addr] %asi, dest
#include "csum_copy.S" #include "csum_copy.S"
...@@ -9,14 +9,14 @@ ...@@ -9,14 +9,14 @@
.section .fixup,"ax"; \ .section .fixup,"ax"; \
.align 4; \ .align 4; \
99: retl; \ 99: retl; \
mov -1, %o0; \ mov 0, %o0; \
.section __ex_table,"a";\ .section __ex_table,"a";\
.align 4; \ .align 4; \
.word 98b, 99b; \ .word 98b, 99b; \
.text; \ .text; \
.align 4; .align 4;
#define FUNC_NAME __csum_partial_copy_to_user #define FUNC_NAME csum_and_copy_to_user
#define STORE(type,src,addr) type##a src, [addr] %asi #define STORE(type,src,addr) type##a src, [addr] %asi
#include "csum_copy.S" #include "csum_copy.S"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment