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 Fix TPIDRPRW_IS_CURLWP builds.



details:   https://anonhg.NetBSD.org/src/rev/2da49711f9ac
branches:  trunk
changeset: 804089:2da49711f9ac
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun Nov 23 09:05:23 2014 +0000

description:
Fix TPIDRPRW_IS_CURLWP builds.

A MULTIPROCESSOR kernel requires TPIDRPRW_IS_CURCPU.

diffstat:

 sys/arch/arm/include/cpu.h |  13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diffs (37 lines):

diff -r 85189edb1332 -r 2da49711f9ac sys/arch/arm/include/cpu.h
--- a/sys/arch/arm/include/cpu.h        Sun Nov 23 02:15:52 2014 +0000
+++ b/sys/arch/arm/include/cpu.h        Sun Nov 23 09:05:23 2014 +0000
@@ -179,6 +179,9 @@
 extern struct cpu_info cpu_info_store;
 
 #if defined(TPIDRPRW_IS_CURLWP)
+#if defined(MULTIPROCESSOR)
+#error MULTIPROCESSOR requires TPIDRPRW_IS_CURCPU not TPIDRPRW_IS_CURLWP
+#else
 static inline struct lwp *
 _curlwp(void)
 {
@@ -191,12 +194,8 @@
        armreg_tpidrprw_write((uintptr_t)l);
 }
 
-#define        curlwp          (_curlwp())
-static inline struct cpu_info *
-curcpu(void)
-{
-       return curlwp->l_cpu;
-}
+#define        curcpu()        (&cpu_info_store)
+#endif
 #elif defined(TPIDRPRW_IS_CURCPU)
 static inline struct cpu_info *
 curcpu(void)
@@ -206,7 +205,7 @@
 #elif !defined(MULTIPROCESSOR)
 #define        curcpu()        (&cpu_info_store)
 #else
-#error MULTIPROCESSOR requires TPIDRPRW_IS_CURLWP or TPIDRPRW_IS_CURCPU
+#error MULTIPROCESSOR requires TPIDRPRW_IS_CURCPU
 #endif /* !TPIDRPRW_IS_CURCPU && !TPIDRPRW_IS_CURLWP */
 
 #ifndef curlwp



Home | Main Index | Thread Index | Old Index