Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/include If using TPIDRPRW_IS_CURLWP and !MP and...



details:   https://anonhg.NetBSD.org/src/rev/4b33e7aa3878
branches:  trunk
changeset: 336982:4b33e7aa3878
user:      matt <matt%NetBSD.org@localhost>
date:      Sun Mar 29 09:49:54 2015 +0000

description:
If using TPIDRPRW_IS_CURLWP and !MP and ARMV7, use movw/movt to load address
of cpu_info_store

diffstat:

 sys/arch/arm/include/locore.h |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (23 lines):

diff -r 91de2f7f1903 -r 4b33e7aa3878 sys/arch/arm/include/locore.h
--- a/sys/arch/arm/include/locore.h     Sun Mar 29 09:47:48 2015 +0000
+++ b/sys/arch/arm/include/locore.h     Sun Mar 29 09:49:54 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.h,v 1.19 2015/02/25 13:52:42 joerg Exp $        */
+/*     $NetBSD: locore.h,v 1.20 2015/03/29 09:49:54 matt Exp $ */
 
 /*
  * Copyright (c) 1994-1996 Mark Brinicombe.
@@ -87,7 +87,13 @@
 #define GET_CURLWP(rX)         GET_CURCPU(rX); ldr rX, [rX, #CI_CURLWP]
 #elif defined (TPIDRPRW_IS_CURLWP)
 #define GET_CURLWP(rX)         mrc     p15, 0, rX, c13, c0, 4
+#if defined (MULTIPROCESSOR)
 #define GET_CURCPU(rX)         GET_CURLWP(rX); ldr rX, [rX, #L_CPU]
+#elif defined(_ARM_ARCH_7)
+#define GET_CURCPU(rX)         movw rX, #:lower16:cpu_info_store; movt rX, #:upper16:cpu_info_store
+#else 
+#define GET_CURCPU(rX)         ldr rX, =_C_LABEL(cpu_info_store)
+#endif
 #elif !defined(MULTIPROCESSOR)
 #define GET_CURCPU(rX)         ldr rX, =_C_LABEL(cpu_info_store)
 #define GET_CURLWP(rX)         GET_CURCPU(rX); ldr rX, [rX, #CI_CURLWP]



Home | Main Index | Thread Index | Old Index