Source-Changes-HG archive

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

[src/trunk]: src/sys/arch fix hppa and vax builds.



details:   https://anonhg.NetBSD.org/src/rev/b9cded06ccf5
branches:  trunk
changeset: 377449:b9cded06ccf5
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Jul 12 06:45:24 2023 +0000

description:
fix hppa and vax builds.

machine/lock.h isn't necessary for __cpu_simple_lock_t, it's in
sys/types.h.  avoids cpu_data.h vs sched.h include order issues.

move the hppa ipl_t typedef with the moved usage of it.

diffstat:

 sys/arch/hppa/include/intr.h  |  5 ++---
 sys/arch/hppa/include/mutex.h |  6 +++---
 sys/arch/vax/include/mutex.h  |  3 +--
 3 files changed, 6 insertions(+), 8 deletions(-)

diffs (70 lines):

diff -r d09946351da1 -r b9cded06ccf5 sys/arch/hppa/include/intr.h
--- a/sys/arch/hppa/include/intr.h      Wed Jul 12 05:16:42 2023 +0000
+++ b/sys/arch/hppa/include/intr.h      Wed Jul 12 06:45:24 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.h,v 1.3 2023/07/11 11:05:09 riastradh Exp $       */
+/*     $NetBSD: intr.h,v 1.4 2023/07/12 06:45:24 mrg Exp $     */
 /*     $OpenBSD: intr.h,v 1.26 2009/12/29 13:11:40 jsing Exp $ */
 
 /*-
@@ -41,6 +41,7 @@
 #ifndef _LOCORE
 
 #if defined(_KERNEL) || defined(_KMEMUSER)
+typedef int ipl_t;
 typedef struct {
        ipl_t _ipl;
 } ipl_cookie_t;
@@ -162,8 +163,6 @@ void spllower(int);
 #define        spl0()          spllower(0)
 #define        splx(x)         spllower(x)
 
-typedef int ipl_t;
-
 static inline ipl_cookie_t
 makeiplcookie(ipl_t ipl)
 {
diff -r d09946351da1 -r b9cded06ccf5 sys/arch/hppa/include/mutex.h
--- a/sys/arch/hppa/include/mutex.h     Wed Jul 12 05:16:42 2023 +0000
+++ b/sys/arch/hppa/include/mutex.h     Wed Jul 12 06:45:24 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mutex.h,v 1.16 2023/07/09 17:03:09 riastradh Exp $     */
+/*     $NetBSD: mutex.h,v 1.17 2023/07/12 06:45:24 mrg Exp $   */
 
 /*-
  * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@ struct kmutex {
 #define        MUTEX_SPIN_FLAG                 0xffffff10
 #define        MUTEX_UNOWNED_OR_SPIN(x)        (((x) & 0xffffffef) == 0xffffff00)
 
-#ifndef __ASSEMBLER__
+#if !defined(__ASSEMBLER__) && defined(_KERNEL)
 
 static inline uintptr_t
 MUTEX_OWNER(uintptr_t owner)
@@ -180,7 +180,7 @@ MUTEX_CLEAR_WAITERS(struct kmutex *mtx)
        mtx->mtx_waiters = 0;
 }
 
-#endif /* __ASSEMBLER__ */
+#endif /* !__ASSEMBLER__ && _KERNEL */
 
 #endif /* __MUTEX_PRIVATE */
 
diff -r d09946351da1 -r b9cded06ccf5 sys/arch/vax/include/mutex.h
--- a/sys/arch/vax/include/mutex.h      Wed Jul 12 05:16:42 2023 +0000
+++ b/sys/arch/vax/include/mutex.h      Wed Jul 12 06:45:24 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mutex.h,v 1.18 2023/07/09 17:03:10 riastradh Exp $     */
+/*     $NetBSD: mutex.h,v 1.19 2023/07/12 06:45:24 mrg Exp $   */
 
 /*-
  * Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -49,7 +49,6 @@ struct kmutex {
 #else  /* __MUTEX_PRIVATE */
 
 #include <machine/intr.h>
-#include <machine/lock.h>
 
 struct kmutex {
        union {



Home | Main Index | Thread Index | Old Index