From 15dba00e0329a4c3ab4235ccdfda4ce63b7fd812 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 19 Feb 2000 00:33:10 +0000 Subject: Fix copy_from_user() in modules and 64-bit kernel. --- include/asm-mips/uaccess.h | 10 +++++++--- include/asm-mips64/uaccess.h | 14 +++++++++----- 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 62432d9b4..a6521630d 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h @@ -1,4 +1,4 @@ -/* $Id: uaccess.h,v 1.9 1999/10/09 00:01:43 ralf Exp $ +/* $Id: uaccess.h,v 1.10 1999/12/04 03:59:12 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -323,10 +323,12 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); "move\t$4, %1\n\t" \ "move\t$5, %2\n\t" \ "move\t$6, %3\n\t" \ + ".set\tnoreorder\n\t" \ ".set\tnoat\n\t" \ + __MODULE_JAL(__copy_user) \ "addu\t$1, %2, %3\n\t" \ ".set\tat\n\t" \ - __MODULE_JAL(__copy_user) \ + ".set\treorder\n\t" \ "move\t%0, $6" \ : "=r" (__cu_len) \ : "r" (__cu_to), "r" (__cu_from), "r" (__cu_len) \ @@ -370,10 +372,12 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); "move\t$4, %1\n\t" \ "move\t$5, %2\n\t" \ "move\t$6, %3\n\t" \ + ".set\tnoreorder\n\t" \ ".set\tnoat\n\t" \ + __MODULE_JAL(__copy_user) \ "addu\t$1, %2, %3\n\t" \ ".set\tat\n\t" \ - __MODULE_JAL(__copy_user) \ + ".set\treorder\n\t" \ "move\t%0, $6" \ : "=r" (__cu_len) \ : "r" (__cu_to), "r" (__cu_from), "r" (__cu_len) \ diff --git a/include/asm-mips64/uaccess.h b/include/asm-mips64/uaccess.h index a1950af06..861ac3efb 100644 --- a/include/asm-mips64/uaccess.h +++ b/include/asm-mips64/uaccess.h @@ -1,4 +1,4 @@ -/* $Id: uaccess.h,v 1.2 1999/08/19 22:56:35 ralf Exp $ +/* $Id: uaccess.h,v 1.3 1999/12/04 03:59:12 ralf Exp $ * * This file is subject to the terms and conditions of the GNU General Public * License. See the file "COPYING" in the main directory of this archive @@ -261,10 +261,12 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); "move\t$4, %1\n\t" \ "move\t$5, %2\n\t" \ "move\t$6, %3\n\t" \ + ".set\tnoreorder\n\t" \ ".set\tnoat\n\t" \ - "addu\t$1, %2, %3\n\t" \ - ".set\tat\n\t" \ __MODULE_JAL(__copy_user) \ + "daddu\t$1, %2, %3\n\t" \ + ".set\tat\n\t" \ + ".set\treorder\n\t" \ "move\t%0, $6" \ : "=r" (__cu_len) \ : "r" (__cu_to), "r" (__cu_from), "r" (__cu_len) \ @@ -308,10 +310,12 @@ extern size_t __copy_user(void *__to, const void *__from, size_t __n); "move\t$4, %1\n\t" \ "move\t$5, %2\n\t" \ "move\t$6, %3\n\t" \ + ".set\tnoreorder\n\t" \ ".set\tnoat\n\t" \ - "addu\t$1, %2, %3\n\t" \ - ".set\tat\n\t" \ __MODULE_JAL(__copy_user) \ + "daddu\t$1, %2, %3\n\t" \ + ".set\tat\n\t" \ + ".set\treorder\n\t" \ "move\t%0, $6" \ : "=r" (__cu_len) \ : "r" (__cu_to), "r" (__cu_from), "r" (__cu_len) \ -- cgit v1.2.3