diff options
-rw-r--r-- | arch/sparc64/lib/NGcopy_to_user.S | 2 | ||||
-rw-r--r-- | arch/sparc64/lib/NGmemcpy.S | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/arch/sparc64/lib/NGcopy_to_user.S b/arch/sparc64/lib/NGcopy_to_user.S index 4a12395b4502..34112d5054ef 100644 --- a/arch/sparc64/lib/NGcopy_to_user.S +++ b/arch/sparc64/lib/NGcopy_to_user.S | |||
@@ -37,4 +37,4 @@ | |||
37 | nop | 37 | nop |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | #include "U3memcpy.S" | 40 | #include "NGmemcpy.S" |
diff --git a/arch/sparc64/lib/NGmemcpy.S b/arch/sparc64/lib/NGmemcpy.S index a39aa3bd4345..8e522b3dc095 100644 --- a/arch/sparc64/lib/NGmemcpy.S +++ b/arch/sparc64/lib/NGmemcpy.S | |||
@@ -5,11 +5,15 @@ | |||
5 | 5 | ||
6 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
7 | #include <asm/asi.h> | 7 | #include <asm/asi.h> |
8 | #include <asm/thread_info.h> | ||
8 | #define GLOBAL_SPARE %g7 | 9 | #define GLOBAL_SPARE %g7 |
9 | #define RESTORE_ASI wr %g0, ASI_AIUS, %asi | 10 | #define RESTORE_ASI(TMP) \ |
11 | ldub [%g6 + TI_CURRENT_DS], TMP; \ | ||
12 | wr TMP, 0x0, %asi; | ||
10 | #else | 13 | #else |
11 | #define GLOBAL_SPARE %g5 | 14 | #define GLOBAL_SPARE %g5 |
12 | #define RESTORE_ASI | 15 | #define RESTORE_ASI(TMP) \ |
16 | wr %g0, ASI_PNF, %asi | ||
13 | #endif | 17 | #endif |
14 | 18 | ||
15 | #ifndef STORE_ASI | 19 | #ifndef STORE_ASI |
@@ -246,7 +250,7 @@ FUNC_NAME: /* %o0=dst, %o1=src, %o2=len */ | |||
246 | /* %o2 contains any final bytes still needed to be copied | 250 | /* %o2 contains any final bytes still needed to be copied |
247 | * over. If anything is left, we copy it one byte at a time. | 251 | * over. If anything is left, we copy it one byte at a time. |
248 | */ | 252 | */ |
249 | RESTORE_ASI | 253 | RESTORE_ASI(%o3) |
250 | brz,pt %o2, 85f | 254 | brz,pt %o2, 85f |
251 | sub %o0, %o1, %o3 | 255 | sub %o0, %o1, %o3 |
252 | ba,a,pt %XCC, 90f | 256 | ba,a,pt %XCC, 90f |