aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lib
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2013-12-12 11:21:00 -0500
committerRalf Baechle <ralf@linux-mips.org>2014-03-26 18:09:17 -0400
commitac85227f7637cfb0d811519b8253c454d0d0a159 (patch)
tree7f9da2f3f1efa1c7b46310c658b1f0679d35984e /arch/mips/lib
parentc1771216ab48bb077cee30e6d197a5a55f707101 (diff)
MIPS: checksum: Split the 'copy_user' symbol
The 'copy_user' symbol can be used to copy from or to userland so we will use two different symbols for these operations. This makes no difference in the existing code, but when the core is operating in EVA mode, different instructions need to be used to read and write to userland address space. The old function has also been renamed to 'copy_kernel' to denote that it is suitable for copy data to and from kernel space. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Diffstat (limited to 'arch/mips/lib')
-rw-r--r--arch/mips/lib/csum_partial.S9
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/mips/lib/csum_partial.S b/arch/mips/lib/csum_partial.S
index a6adffbb4e5f..5d73d0d704a3 100644
--- a/arch/mips/lib/csum_partial.S
+++ b/arch/mips/lib/csum_partial.S
@@ -8,6 +8,7 @@
8 * Copyright (C) 1998, 1999 Ralf Baechle 8 * Copyright (C) 1998, 1999 Ralf Baechle
9 * Copyright (C) 1999 Silicon Graphics, Inc. 9 * Copyright (C) 1999 Silicon Graphics, Inc.
10 * Copyright (C) 2007 Maciej W. Rozycki 10 * Copyright (C) 2007 Maciej W. Rozycki
11 * Copyright (C) 2014 Imagination Technologies Ltd.
11 */ 12 */
12#include <linux/errno.h> 13#include <linux/errno.h>
13#include <asm/asm.h> 14#include <asm/asm.h>
@@ -296,7 +297,7 @@ LEAF(csum_partial)
296 * checksum and copy routines based on memcpy.S 297 * checksum and copy routines based on memcpy.S
297 * 298 *
298 * csum_partial_copy_nocheck(src, dst, len, sum) 299 * csum_partial_copy_nocheck(src, dst, len, sum)
299 * __csum_partial_copy_user(src, dst, len, sum, errp) 300 * __csum_partial_copy_kernel(src, dst, len, sum, errp)
300 * 301 *
301 * See "Spec" in memcpy.S for details. Unlike __copy_user, all 302 * See "Spec" in memcpy.S for details. Unlike __copy_user, all
302 * function in this file use the standard calling convention. 303 * function in this file use the standard calling convention.
@@ -396,7 +397,9 @@ LEAF(csum_partial)
396 .set at=v1 397 .set at=v1
397#endif 398#endif
398 399
399LEAF(__csum_partial_copy_user) 400LEAF(__csum_partial_copy_kernel)
401FEXPORT(__csum_partial_copy_to_user)
402FEXPORT(__csum_partial_copy_from_user)
400 PTR_ADDU AT, src, len /* See (1) above. */ 403 PTR_ADDU AT, src, len /* See (1) above. */
401#ifdef CONFIG_64BIT 404#ifdef CONFIG_64BIT
402 move errptr, a4 405 move errptr, a4
@@ -757,4 +760,4 @@ EXC( lbu t1, 0(src), .Ll_exc)
757 jr ra 760 jr ra
758 sw v1, (errptr) 761 sw v1, (errptr)
759 .set pop 762 .set pop
760 END(__csum_partial_copy_user) 763 END(__csum_partial_copy_kernel)