CVS commit: src/sys/rump/librump/rumpkern

2023-10-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Oct 15 11:11:38 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: emul.c lwproc.c

Log Message:
rump: Sprinkle sys/syncobj.h here too.


To generate a diff of this commit:
cvs rdiff -u -r1.200 -r1.201 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.57 -r1.58 src/sys/rump/librump/rumpkern/lwproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.200 src/sys/rump/librump/rumpkern/emul.c:1.201
--- src/sys/rump/librump/rumpkern/emul.c:1.200	Thu Sep 28 15:50:24 2023
+++ src/sys/rump/librump/rumpkern/emul.c	Sun Oct 15 11:11:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.200 2023/09/28 15:50:24 manu Exp $	*/
+/*	$NetBSD: emul.c,v 1.201 2023/10/15 11:11:37 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.200 2023/09/28 15:50:24 manu Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.201 2023/10/15 11:11:37 riastradh Exp $");
 
 #include 
 #include 
@@ -40,6 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.2
 #ifdef LOCKDEBUG
 #include 
 #endif
+#include 
 
 #include 
 

Index: src/sys/rump/librump/rumpkern/lwproc.c
diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.57 src/sys/rump/librump/rumpkern/lwproc.c:1.58
--- src/sys/rump/librump/rumpkern/lwproc.c:1.57	Thu Oct  5 19:41:07 2023
+++ src/sys/rump/librump/rumpkern/lwproc.c	Sun Oct 15 11:11:37 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: lwproc.c,v 1.57 2023/10/05 19:41:07 ad Exp $	*/
+/*  $NetBSD: lwproc.c,v 1.58 2023/10/15 11:11:37 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #define RUMP__CURLWP_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.57 2023/10/05 19:41:07 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.58 2023/10/15 11:11:37 riastradh Exp $");
 
 #include 
 #include 
@@ -44,6 +44,7 @@ __KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1
 #include 
 #include 
 #include 
+#include 
 
 #include 
 



CVS commit: src/sys/rump/librump/rumpkern

2023-10-15 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Oct 15 11:11:38 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: emul.c lwproc.c

Log Message:
rump: Sprinkle sys/syncobj.h here too.


To generate a diff of this commit:
cvs rdiff -u -r1.200 -r1.201 src/sys/rump/librump/rumpkern/emul.c
cvs rdiff -u -r1.57 -r1.58 src/sys/rump/librump/rumpkern/lwproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:23:54 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: sleepq.c

Log Message:
Rump: sleepq_remove(): don't unlock the sleepq.  Spotted by hannken@.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/sleepq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/sleepq.c
diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.27 src/sys/rump/librump/rumpkern/sleepq.c:1.28
--- src/sys/rump/librump/rumpkern/sleepq.c:1.27	Sun Oct  8 13:23:05 2023
+++ src/sys/rump/librump/rumpkern/sleepq.c	Fri Oct 13 18:23:54 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.c,v 1.27 2023/10/08 13:23:05 ad Exp $	*/
+/*	$NetBSD: sleepq.c,v 1.28 2023/10/13 18:23:54 ad Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.27 2023/10/08 13:23:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.28 2023/10/13 18:23:54 ad Exp $");
 
 #include 
 #include 
@@ -150,7 +150,7 @@ void
 sleepq_remove(sleepq_t *sq, struct lwp *l, bool wakeup)
 {
 
-	sleepq_unsleep(l, true);
+	sleepq_unsleep(l, false);
 }
 
 /*



CVS commit: src/sys/rump/librump/rumpkern

2023-10-13 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Fri Oct 13 18:23:54 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: sleepq.c

Log Message:
Rump: sleepq_remove(): don't unlock the sleepq.  Spotted by hannken@.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/sleepq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 21:56:16 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: threads.c

Log Message:
rump now needs lwp_need_userret()


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/threads.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/threads.c
diff -u src/sys/rump/librump/rumpkern/threads.c:1.27 src/sys/rump/librump/rumpkern/threads.c:1.28
--- src/sys/rump/librump/rumpkern/threads.c:1.27	Sat Aug  1 22:30:57 2020
+++ src/sys/rump/librump/rumpkern/threads.c	Wed Oct  4 21:56:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: threads.c,v 1.27 2020/08/01 22:30:57 riastradh Exp $	*/
+/*	$NetBSD: threads.c,v 1.28 2023/10/04 21:56:15 ad Exp $	*/
 
 /*
  * Copyright (c) 2007-2009 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.27 2020/08/01 22:30:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.28 2023/10/04 21:56:15 ad Exp $");
 
 #include 
 #include 
@@ -377,3 +377,10 @@ lwp_userret(struct lwp *l)
 	rump_unschedule();
 	rumpuser_thread_exit();
 }
+
+void
+lwp_need_userret(struct lwp *l)
+{
+
+	/* do what? */
+}



CVS commit: src/sys/rump/librump/rumpkern

2023-10-04 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Wed Oct  4 21:56:16 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: threads.c

Log Message:
rump now needs lwp_need_userret()


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/rump/librump/rumpkern/threads.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-08-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug  5 11:51:48 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
Revert "rump: Set mp_online = true and start threads _after_ cold = 0."

This breaks some tests, e.g. dev/scsipi/t_cd:noisyeject, which relies
on config_finalize to wait for driver threads.  Trouble is, the
actual setting of cold=0 happens near the call to config_finalize in
RUMP__FACTION_DEV.  Need to think harder about this.


To generate a diff of this commit:
cvs rdiff -u -r1.356 -r1.357 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.356 src/sys/rump/librump/rumpkern/rump.c:1.357
--- src/sys/rump/librump/rumpkern/rump.c:1.356	Sat Aug  5 08:05:57 2023
+++ src/sys/rump/librump/rumpkern/rump.c	Sat Aug  5 11:51:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.356 2023/08/05 08:05:57 riastradh Exp $	*/
+/*	$NetBSD: rump.c,v 1.357 2023/08/05 11:51:47 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.356 2023/08/05 08:05:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.357 2023/08/05 11:51:47 riastradh Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -391,9 +391,14 @@ rump_init_callback(void (*cpuinit_callba
 	cprng_init();
 	cprng_fast_init();
 
+	mp_online = true;
+
 	if (cpuinit_callback)
 		(*cpuinit_callback)();
 
+	/* CPUs are up.  allow kernel threads to run */
+	rump_thread_allow(NULL);
+
 	rnd_init_softint();
 
 	kqueue_init();
@@ -447,11 +452,6 @@ rump_init_callback(void (*cpuinit_callba
 
 	cold = 0;
 
-	mp_online = true;
-
-	/* CPUs are up.  allow kernel threads to run */
-	rump_thread_allow(NULL);
-
 	sysctl_finalize();
 
 	module_init_class(MODULE_CLASS_ANY);



CVS commit: src/sys/rump/librump/rumpkern

2023-08-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug  5 11:51:48 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
Revert "rump: Set mp_online = true and start threads _after_ cold = 0."

This breaks some tests, e.g. dev/scsipi/t_cd:noisyeject, which relies
on config_finalize to wait for driver threads.  Trouble is, the
actual setting of cold=0 happens near the call to config_finalize in
RUMP__FACTION_DEV.  Need to think harder about this.


To generate a diff of this commit:
cvs rdiff -u -r1.356 -r1.357 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-08-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug  5 08:05:58 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
rump: Set mp_online = true and start threads _after_ cold = 0.

Otherwise we may have threads running while cold, which is a
contradiction in terms.

Deferring mp_online = true is necessary because things like xcall(9)
use rely on it to decide whether to wait for threads on other CPUs.


To generate a diff of this commit:
cvs rdiff -u -r1.355 -r1.356 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.355 src/sys/rump/librump/rumpkern/rump.c:1.356
--- src/sys/rump/librump/rumpkern/rump.c:1.355	Mon Mar 28 20:49:32 2022
+++ src/sys/rump/librump/rumpkern/rump.c	Sat Aug  5 08:05:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.355 2022/03/28 20:49:32 christos Exp $	*/
+/*	$NetBSD: rump.c,v 1.356 2023/08/05 08:05:57 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.355 2022/03/28 20:49:32 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.356 2023/08/05 08:05:57 riastradh Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -391,14 +391,9 @@ rump_init_callback(void (*cpuinit_callba
 	cprng_init();
 	cprng_fast_init();
 
-	mp_online = true;
-
 	if (cpuinit_callback)
 		(*cpuinit_callback)();
 
-	/* CPUs are up.  allow kernel threads to run */
-	rump_thread_allow(NULL);
-
 	rnd_init_softint();
 
 	kqueue_init();
@@ -452,6 +447,11 @@ rump_init_callback(void (*cpuinit_callba
 
 	cold = 0;
 
+	mp_online = true;
+
+	/* CPUs are up.  allow kernel threads to run */
+	rump_thread_allow(NULL);
+
 	sysctl_finalize();
 
 	module_init_class(MODULE_CLASS_ANY);



CVS commit: src/sys/rump/librump/rumpkern

2023-08-05 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Aug  5 08:05:58 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
rump: Set mp_online = true and start threads _after_ cold = 0.

Otherwise we may have threads running while cold, which is a
contradiction in terms.

Deferring mp_online = true is necessary because things like xcall(9)
use rely on it to decide whether to wait for threads on other CPUs.


To generate a diff of this commit:
cvs rdiff -u -r1.355 -r1.356 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jul 16 23:12:17 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: locks.c

Log Message:
rump: Fix comment to reflect l_private -> l_sched.info.

Comment was misspelled `l->private', hence didn't come up in grep.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/rump/librump/rumpkern/locks.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/locks.c
diff -u src/sys/rump/librump/rumpkern/locks.c:1.85 src/sys/rump/librump/rumpkern/locks.c:1.86
--- src/sys/rump/librump/rumpkern/locks.c:1.85	Sun Jul 16 23:05:53 2023
+++ src/sys/rump/librump/rumpkern/locks.c	Sun Jul 16 23:12:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locks.c,v 1.85 2023/07/16 23:05:53 riastradh Exp $	*/
+/*	$NetBSD: locks.c,v 1.86 2023/07/16 23:12:17 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.85 2023/07/16 23:05:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locks.c,v 1.86 2023/07/16 23:12:17 riastradh Exp $");
 
 #include 
 #include 
@@ -425,7 +425,7 @@ docvwait(kcondvar_t *cv, kmutex_t *mtx, 
 		KASSERT(p->p_sflag & PS_RUMP_LWPEXIT);
 		mutex_exit(p->p_lock);
 
-		/* ok, we can exit and remove "reference" to l->private */
+		/* ok, we can exit and remove "reference" to l->l_sched.info */
 
 		mutex_enter(mtx);
 		rv = EINTR;



CVS commit: src/sys/rump/librump/rumpkern

2023-07-16 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Jul 16 23:12:17 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: locks.c

Log Message:
rump: Fix comment to reflect l_private -> l_sched.info.

Comment was misspelled `l->private', hence didn't come up in grep.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/rump/librump/rumpkern/locks.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-06-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jun 23 21:09:45 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: klock.c

Log Message:
rump: KASSERT(x && y) -> KASSERT(x); KASSERT(y)

Add some KASSERTMSG while here.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpkern/klock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/klock.c
diff -u src/sys/rump/librump/rumpkern/klock.c:1.10 src/sys/rump/librump/rumpkern/klock.c:1.11
--- src/sys/rump/librump/rumpkern/klock.c:1.10	Thu Jul  7 06:55:44 2016
+++ src/sys/rump/librump/rumpkern/klock.c	Fri Jun 23 21:09:44 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: klock.c,v 1.10 2016/07/07 06:55:44 msaitoh Exp $	*/
+/*	$NetBSD: klock.c,v 1.11 2023/06/23 21:09:44 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007-2010 Antti Kantee.  All Rights Reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: klock.c,v 1.10 2016/07/07 06:55:44 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: klock.c,v 1.11 2023/06/23 21:09:44 riastradh Exp $");
 
 #include 
 #include 
@@ -67,7 +67,9 @@ void
 rump_kernel_bigwrap(int *nlocks)
 {
 
-	KASSERT(giantcnt > 0 && curlwp == giantowner);
+	KASSERTMSG(giantcnt > 0, "giantcnt=%d", giantcnt);
+	KASSERTMSG(curlwp == giantowner, "curlwp=%p giantowner=%p",
+	curlwp, giantowner);
 	giantowner = NULL;
 	*nlocks = giantcnt;
 	giantcnt = 0;



CVS commit: src/sys/rump/librump/rumpkern

2023-06-23 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jun 23 21:09:45 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: klock.c

Log Message:
rump: KASSERT(x && y) -> KASSERT(x); KASSERT(y)

Add some KASSERTMSG while here.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpkern/klock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-04-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 22 13:53:44 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
rumpkern: Provide stub pnbuf_cache weak alias.

Needed only by sys_module.c handle_modctl_load, which won't work if
there's no rumpvfs linked in anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/rump/librump/rumpkern/emul.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-04-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 22 13:53:44 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
rumpkern: Provide stub pnbuf_cache weak alias.

Needed only by sys_module.c handle_modctl_load, which won't work if
there's no rumpvfs linked in anyway.


To generate a diff of this commit:
cvs rdiff -u -r1.198 -r1.199 src/sys/rump/librump/rumpkern/emul.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.198 src/sys/rump/librump/rumpkern/emul.c:1.199
--- src/sys/rump/librump/rumpkern/emul.c:1.198	Sat Apr 22 13:53:29 2023
+++ src/sys/rump/librump/rumpkern/emul.c	Sat Apr 22 13:53:44 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.198 2023/04/22 13:53:29 riastradh Exp $	*/
+/*	$NetBSD: emul.c,v 1.199 2023/04/22 13:53:44 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.198 2023/04/22 13:53:29 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.199 2023/04/22 13:53:44 riastradh Exp $");
 
 #include 
 #include 
@@ -337,6 +337,9 @@ struct filterops rump_fs_filtops = {
 };
 __weak_alias(fs_filtops,rump_fs_filtops);
 
+struct pool_cache *rump_pnbuf_cache;
+__weak_alias(pnbuf_cache,rump_pnbuf_cache);
+
 /*
  * Provide weak aliases for tty routines used by printf.
  * They will be used unless the rumpkern_tty component is present.



CVS commit: src/sys/rump/librump/rumpkern

2023-04-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 22 13:53:37 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: vm.c

Log Message:
rumpkern: Provide stub uvm_vnodeops weak alias.

Needed for UVM_OBJ_IS_VNODE, but not for anything else in rumpkern
without rumpvfs.


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/sys/rump/librump/rumpkern/vm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.194 src/sys/rump/librump/rumpkern/vm.c:1.195
--- src/sys/rump/librump/rumpkern/vm.c:1.194	Wed Oct 26 23:22:07 2022
+++ src/sys/rump/librump/rumpkern/vm.c	Sat Apr 22 13:53:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.194 2022/10/26 23:22:07 riastradh Exp $	*/
+/*	$NetBSD: vm.c,v 1.195 2023/04/22 13:53:37 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.194 2022/10/26 23:22:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.195 2023/04/22 13:53:37 riastradh Exp $");
 
 #include 
 #include 
@@ -163,6 +163,10 @@ pgdtor(void *arg, void *obj)
 
 static struct pool_cache pagecache;
 
+/* stub for UVM_OBJ_IS_VNODE */
+struct uvm_pagerops rump_uvm_vnodeops;
+__weak_alias(uvm_vnodeops,rump_uvm_vnodeops);
+
 /*
  * Called with the object locked.  We don't support anons.
  */



CVS commit: src/sys/rump/librump/rumpkern

2023-04-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 22 13:53:37 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: vm.c

Log Message:
rumpkern: Provide stub uvm_vnodeops weak alias.

Needed for UVM_OBJ_IS_VNODE, but not for anything else in rumpkern
without rumpvfs.


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/sys/rump/librump/rumpkern/vm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-04-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 22 13:53:30 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
rumpkern: Provide fs_filtops weak alias.

We should introduce a link set for sys_kfilters, but this works
around the problem for now -- librump's dependency on librumpvfs
symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/rump/librump/rumpkern/emul.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-04-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr 22 13:53:30 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
rumpkern: Provide fs_filtops weak alias.

We should introduce a link set for sys_kfilters, but this works
around the problem for now -- librump's dependency on librumpvfs
symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.197 -r1.198 src/sys/rump/librump/rumpkern/emul.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.197 src/sys/rump/librump/rumpkern/emul.c:1.198
--- src/sys/rump/librump/rumpkern/emul.c:1.197	Sun Feb 26 07:27:14 2023
+++ src/sys/rump/librump/rumpkern/emul.c	Sat Apr 22 13:53:29 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.197 2023/02/26 07:27:14 skrll Exp $	*/
+/*	$NetBSD: emul.c,v 1.198 2023/04/22 13:53:29 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.197 2023/02/26 07:27:14 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.198 2023/04/22 13:53:29 riastradh Exp $");
 
 #include 
 #include 
@@ -325,6 +325,18 @@ rump_fstrans_lwp_dtor(struct lwp *l)
 }
 __weak_alias(fstrans_lwp_dtor,rump_fstrans_lwp_dtor);
 
+static int
+rump_filt_fsattach(struct knote *kn)
+{
+
+	return EOPNOTSUPP;
+}
+
+struct filterops rump_fs_filtops = {
+	.f_attach = rump_filt_fsattach,
+};
+__weak_alias(fs_filtops,rump_fs_filtops);
+
 /*
  * Provide weak aliases for tty routines used by printf.
  * They will be used unless the rumpkern_tty component is present.



CVS commit: src/sys/rump/librump/rumpkern

2023-02-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 22 21:44:45 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: lwproc.c

Log Message:
rump: Nix membar_enter/exit after/before RUMPUSER_LWP_CREATE/DESTROY.

These make no sense and are obviously not needed for any of the
rumpuser implementations in-tree.  (For single-threaded fiber and
pth_dummy, no barriers needed; for pth, RUMPUSER_LWP_CREATE/DESTROY
use pthread_mutex so don't need any barriers.)

It _might_ make sense to do membar_release/acquire around just
RUMPUSER_LWP_DESTROY, perhaps if there's some reference-counting
business involved.  But if a rumpuser implementation really needs
that it can do it itself.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/rump/librump/rumpkern/lwproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/lwproc.c
diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.53 src/sys/rump/librump/rumpkern/lwproc.c:1.54
--- src/sys/rump/librump/rumpkern/lwproc.c:1.53	Wed Feb 22 21:44:33 2023
+++ src/sys/rump/librump/rumpkern/lwproc.c	Wed Feb 22 21:44:45 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: lwproc.c,v 1.53 2023/02/22 21:44:33 riastradh Exp $	*/
+/*  $NetBSD: lwproc.c,v 1.54 2023/02/22 21:44:45 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #define RUMP__CURLWP_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.53 2023/02/22 21:44:33 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.54 2023/02/22 21:44:45 riastradh Exp $");
 
 #include 
 #include 
@@ -334,7 +334,6 @@ lwproc_freelwp(struct lwp *l)
 	lwp_finispecific(l);
 
 	lwproc_curlwpop(RUMPUSER_LWP_DESTROY, l);
-	membar_exit();
 	kmem_free(l, sizeof(*l));
 
 	if (p->p_stat == SDEAD)
@@ -379,7 +378,6 @@ lwproc_makelwp(struct proc *p, bool dosw
 	lwp_initspecific(l);
 	PSREF_DEBUG_INIT_LWP(l);
 
-	membar_enter();
 	lwproc_curlwpop(RUMPUSER_LWP_CREATE, l);
 	if (doswitch) {
 		rump_lwproc_switch(l);



CVS commit: src/sys/rump/librump/rumpkern

2023-02-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 22 21:44:45 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: lwproc.c

Log Message:
rump: Nix membar_enter/exit after/before RUMPUSER_LWP_CREATE/DESTROY.

These make no sense and are obviously not needed for any of the
rumpuser implementations in-tree.  (For single-threaded fiber and
pth_dummy, no barriers needed; for pth, RUMPUSER_LWP_CREATE/DESTROY
use pthread_mutex so don't need any barriers.)

It _might_ make sense to do membar_release/acquire around just
RUMPUSER_LWP_DESTROY, perhaps if there's some reference-counting
business involved.  But if a rumpuser implementation really needs
that it can do it itself.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/rump/librump/rumpkern/lwproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2023-02-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 22 21:44:34 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: lwproc.c

Log Message:
rumpkern/lwproc.c: Nix trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/rump/librump/rumpkern/lwproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/lwproc.c
diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.52 src/sys/rump/librump/rumpkern/lwproc.c:1.53
--- src/sys/rump/librump/rumpkern/lwproc.c:1.52	Wed Nov  2 09:01:42 2022
+++ src/sys/rump/librump/rumpkern/lwproc.c	Wed Feb 22 21:44:33 2023
@@ -1,4 +1,4 @@
-/*  $NetBSD: lwproc.c,v 1.52 2022/11/02 09:01:42 ozaki-r Exp $	*/
+/*  $NetBSD: lwproc.c,v 1.53 2023/02/22 21:44:33 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #define RUMP__CURLWP_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.52 2022/11/02 09:01:42 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.53 2023/02/22 21:44:33 riastradh Exp $");
 
 #include 
 #include 
@@ -73,7 +73,7 @@ lwp_unsleep(lwp_t *l, bool cleanup)
 
 /*
  * Look up a live LWP within the specified process.
- * 
+ *
  * Must be called with p->p_lock held.
  */
 struct lwp *
@@ -338,7 +338,7 @@ lwproc_freelwp(struct lwp *l)
 	kmem_free(l, sizeof(*l));
 
 	if (p->p_stat == SDEAD)
-		lwproc_proc_free(p);	
+		lwproc_proc_free(p);
 }
 
 extern kmutex_t unruntime_lock;



CVS commit: src/sys/rump/librump/rumpkern

2023-02-22 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Feb 22 21:44:34 UTC 2023

Modified Files:
src/sys/rump/librump/rumpkern: lwproc.c

Log Message:
rumpkern/lwproc.c: Nix trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/rump/librump/rumpkern/lwproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2022-11-02 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Nov  2 09:01:42 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: lwproc.c

Log Message:
rump: don't touch p_nlwps without holding p_lock

There was a race condition on p_nlwps.  Heavy thread switching could
cause a kernel panic like:
  panic: kernel diagnostic assertion "LIST_EMPTY(>p_lwps)" failed:
  file "(hidden)/src/lib/librump/../../sys/rump/librump/rumpkern/lwproc.c", 
line 177


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/rump/librump/rumpkern/lwproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2022-11-02 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Wed Nov  2 09:01:42 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: lwproc.c

Log Message:
rump: don't touch p_nlwps without holding p_lock

There was a race condition on p_nlwps.  Heavy thread switching could
cause a kernel panic like:
  panic: kernel diagnostic assertion "LIST_EMPTY(>p_lwps)" failed:
  file "(hidden)/src/lib/librump/../../sys/rump/librump/rumpkern/lwproc.c", 
line 177


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/rump/librump/rumpkern/lwproc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/lwproc.c
diff -u src/sys/rump/librump/rumpkern/lwproc.c:1.51 src/sys/rump/librump/rumpkern/lwproc.c:1.52
--- src/sys/rump/librump/rumpkern/lwproc.c:1.51	Sat May 30 19:16:53 2020
+++ src/sys/rump/librump/rumpkern/lwproc.c	Wed Nov  2 09:01:42 2022
@@ -1,4 +1,4 @@
-/*  $NetBSD: lwproc.c,v 1.51 2020/05/30 19:16:53 ad Exp $	*/
+/*  $NetBSD: lwproc.c,v 1.52 2022/11/02 09:01:42 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
 #define RUMP__CURLWP_PRIVATE
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.51 2020/05/30 19:16:53 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.52 2022/11/02 09:01:42 ozaki-r Exp $");
 
 #include 
 #include 
@@ -348,6 +348,14 @@ lwproc_makelwp(struct proc *p, bool dosw
 {
 	struct lwp *l = kmem_zalloc(sizeof(*l), KM_SLEEP);
 
+	l->l_refcnt = 1;
+	l->l_proc = p;
+	l->l_stat = LSIDL;
+	l->l_mutex = _lock;
+
+	proc_alloc_lwpid(p, l);
+
+	mutex_enter(p->p_lock);
 	/*
 	 * Account the new lwp to the owner of the process.
 	 * For some reason, NetBSD doesn't count the first lwp
@@ -357,14 +365,6 @@ lwproc_makelwp(struct proc *p, bool dosw
 		chglwpcnt(kauth_cred_getuid(p->p_cred), 1);
 	}
 
-	l->l_refcnt = 1;
-	l->l_proc = p;
-	l->l_stat = LSIDL;
-	l->l_mutex = _lock;
-
-	proc_alloc_lwpid(p, l);
-
-	mutex_enter(p->p_lock);
 	KASSERT((p->p_sflag & PS_RUMP_LWPEXIT) == 0);
 	LIST_INSERT_HEAD(>p_lwps, l, l_sibling);
 



CVS commit: src/sys/rump/librump/rumpkern/arch/generic

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 22:28:26 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern/arch/generic: rump_generic_pmap.c

Log Message:
rump: Define pmap_resident_count, pmap_wired_count conditionally.

These definitions will not be used by anything yet because on every
architecture except x86 as of yeterday, pmap_resident_count and
pmap_wired_count are defined as macros anyway.  But if more struct
pmaps are made private these definitions will get used.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c
diff -u src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c:1.6 src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c:1.7
--- src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c:1.6	Sun Aug 21 16:55:14 2022
+++ src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c	Sun Aug 21 22:28:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_generic_pmap.c,v 1.6 2022/08/21 16:55:14 mlelstv Exp $	*/
+/*	$NetBSD: rump_generic_pmap.c,v 1.7 2022/08/21 22:28:26 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.6 2022/08/21 16:55:14 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.7 2022/08/21 22:28:26 riastradh Exp $");
 
 #include 
 
@@ -89,16 +89,20 @@ pmap_clear_modify(struct vm_page *pg)
 	return false;
 }
 
+#ifndef pmap_resident_count
 long
 pmap_resident_count(struct pmap *pmap)
 
 {
 	return 0;
 }
+#endif
 
+#ifndef pmap_wired_count
 long
 pmap_wired_count(struct pmap *pmap)
 {
 
 	return 0;
 }
+#endif



CVS commit: src/sys/rump/librump/rumpkern/arch/generic

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 22:28:26 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern/arch/generic: rump_generic_pmap.c

Log Message:
rump: Define pmap_resident_count, pmap_wired_count conditionally.

These definitions will not be used by anything yet because on every
architecture except x86 as of yeterday, pmap_resident_count and
pmap_wired_count are defined as macros anyway.  But if more struct
pmaps are made private these definitions will get used.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern/arch/generic

2022-08-21 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Aug 21 16:55:14 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern/arch/generic: rump_generic_pmap.c

Log Message:
Add stubs for pmap_resident_count, pmap_wired_count.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c
diff -u src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c:1.5 src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c:1.6
--- src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c:1.5	Tue Jan 26 23:12:18 2016
+++ src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c	Sun Aug 21 16:55:14 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_generic_pmap.c,v 1.5 2016/01/26 23:12:18 pooka Exp $	*/
+/*	$NetBSD: rump_generic_pmap.c,v 1.6 2022/08/21 16:55:14 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.5 2016/01/26 23:12:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_generic_pmap.c,v 1.6 2022/08/21 16:55:14 mlelstv Exp $");
 
 #include 
 
@@ -88,3 +88,17 @@ pmap_clear_modify(struct vm_page *pg)
 
 	return false;
 }
+
+long
+pmap_resident_count(struct pmap *pmap)
+
+{
+	return 0;
+}
+
+long
+pmap_wired_count(struct pmap *pmap)
+{
+
+	return 0;
+}



CVS commit: src/sys/rump/librump/rumpkern/arch/generic

2022-08-21 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Aug 21 16:55:14 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern/arch/generic: rump_generic_pmap.c

Log Message:
Add stubs for pmap_resident_count, pmap_wired_count.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/sys/rump/librump/rumpkern/arch/generic/rump_generic_pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern/arch/x86

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 12:08:12 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern/arch/x86: rump_x86_pmap.c

Log Message:
rump/x86: Add stubs for pmap_resident_count, pmap_wired_count.

These are no longer static inlines, now that struct pmap is private.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c
diff -u src/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c:1.4 src/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c:1.5
--- src/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c:1.4	Tue Jan 26 23:12:18 2016
+++ src/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c	Sun Aug 21 12:08:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_x86_pmap.c,v 1.4 2016/01/26 23:12:18 pooka Exp $	*/
+/*	$NetBSD: rump_x86_pmap.c,v 1.5 2022/08/21 12:08:12 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump_x86_pmap.c,v 1.4 2016/01/26 23:12:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_x86_pmap.c,v 1.5 2022/08/21 12:08:12 riastradh Exp $");
 
 #include 
 
@@ -107,3 +107,17 @@ void
 pmap_write_protect(pmap_t pmap, vaddr_t sva, vaddr_t eva, vm_prot_t prot)
 {
 }
+
+long
+pmap_resident_count(struct pmap *pmap)
+
+{
+	return 0;
+}
+
+long
+pmap_wired_count(struct pmap *pmap)
+{
+
+	return 0;
+}



CVS commit: src/sys/rump/librump/rumpkern/arch/x86

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 12:08:12 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern/arch/x86: rump_x86_pmap.c

Log Message:
rump/x86: Add stubs for pmap_resident_count, pmap_wired_count.

These are no longer static inlines, now that struct pmap is private.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/rump/librump/rumpkern/arch/x86/rump_x86_pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:18:20 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: vm.c

Log Message:
rumpkern: Abusing struct pmap internals now requires extra effort.

(as it should)


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/rump/librump/rumpkern/vm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/vm.c
diff -u src/sys/rump/librump/rumpkern/vm.c:1.192 src/sys/rump/librump/rumpkern/vm.c:1.193
--- src/sys/rump/librump/rumpkern/vm.c:1.192	Thu Sep 16 21:29:42 2021
+++ src/sys/rump/librump/rumpkern/vm.c	Sun Aug 21 10:18:20 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm.c,v 1.192 2021/09/16 21:29:42 andvar Exp $	*/
+/*	$NetBSD: vm.c,v 1.193 2022/08/21 10:18:20 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.192 2021/09/16 21:29:42 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.193 2022/08/21 10:18:20 riastradh Exp $");
 
 #include 
 #include 
@@ -56,6 +56,19 @@ __KERNEL_RCSID(0, "$NetBSD: vm.c,v 1.192
 
 #include 
 
+#if defined(__i386__) || defined(__x86_64__)
+/*
+ * This file abuses the pmap abstraction to create its own statically
+ * allocated struct pmap object, even though it can't do anything
+ * useful with such a thing from userland.  On x86 the struct pmap
+ * definition is private, so we have to go to extra effort to abuse it
+ * there.  This should be fixed -- all of the struct pmap definitions
+ * should be private, and then rump can furnish its own fake struct
+ * pmap without clashing with anything.
+ */
+#include 
+#endif
+
 #include 
 #include 
 #include 



CVS commit: src/sys/rump/librump/rumpkern

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:18:20 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: vm.c

Log Message:
rumpkern: Abusing struct pmap internals now requires extra effort.

(as it should)


To generate a diff of this commit:
cvs rdiff -u -r1.192 -r1.193 src/sys/rump/librump/rumpkern/vm.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern/arch/x86

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:18:11 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern/arch/x86: rump_x86_cpu.c

Log Message:
rump/x86: Need x86/cpufunc.h for declaration of wbinvd.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c
diff -u src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c:1.4 src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c:1.5
--- src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c:1.4	Tue Jan 26 23:12:18 2016
+++ src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c	Sun Aug 21 10:18:11 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump_x86_cpu.c,v 1.4 2016/01/26 23:12:18 pooka Exp $	*/
+/*	$NetBSD: rump_x86_cpu.c,v 1.5 2022/08/21 10:18:11 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -29,13 +29,15 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump_x86_cpu.c,v 1.4 2016/01/26 23:12:18 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_x86_cpu.c,v 1.5 2022/08/21 10:18:11 riastradh Exp $");
 
 #include 
 #include 
 
 #include 
 
+#include 
+
 #include 
 
 #include "rump_curlwp.h"



CVS commit: src/sys/rump/librump/rumpkern/arch/x86

2022-08-21 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sun Aug 21 10:18:11 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern/arch/x86: rump_x86_cpu.c

Log Message:
rump/x86: Need x86/cpufunc.h for declaration of wbinvd.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/sys/rump/librump/rumpkern/arch/x86/rump_x86_cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2022-06-30 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Jun 30 07:47:07 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: sleepq.c

Log Message:
Fix rump build failure after sleepq.h:r1.35.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/rump/librump/rumpkern/sleepq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2022-06-30 Thread Kengo NAKAHARA
Module Name:src
Committed By:   knakahara
Date:   Thu Jun 30 07:47:07 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: sleepq.c

Log Message:
Fix rump build failure after sleepq.h:r1.35.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/rump/librump/rumpkern/sleepq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/sleepq.c
diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.22 src/sys/rump/librump/rumpkern/sleepq.c:1.23
--- src/sys/rump/librump/rumpkern/sleepq.c:1.22	Sat Apr  9 23:45:23 2022
+++ src/sys/rump/librump/rumpkern/sleepq.c	Thu Jun 30 07:47:07 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.c,v 1.22 2022/04/09 23:45:23 riastradh Exp $	*/
+/*	$NetBSD: sleepq.c,v 1.23 2022/06/30 07:47:07 knakahara Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.22 2022/04/09 23:45:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.23 2022/06/30 07:47:07 knakahara Exp $");
 
 #include 
 #include 
@@ -69,7 +69,7 @@ sleepq_enqueue(sleepq_t *sq, wchan_t wc,
 }
 
 int
-sleepq_block(int timo, bool catch)
+sleepq_block(int timo, bool catch, struct syncobj *syncobj __unused)
 {
 	struct lwp *l = curlwp;
 	int error = 0;



CVS commit: src/sys/rump/librump/rumpkern

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:45:23 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: sleepq.c

Log Message:
rumpkern/sleepq: Convert membar_exit/store to atomic_store_release.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/rump/librump/rumpkern/sleepq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/sleepq.c
diff -u src/sys/rump/librump/rumpkern/sleepq.c:1.21 src/sys/rump/librump/rumpkern/sleepq.c:1.22
--- src/sys/rump/librump/rumpkern/sleepq.c:1.21	Sun Nov  1 20:58:38 2020
+++ src/sys/rump/librump/rumpkern/sleepq.c	Sat Apr  9 23:45:23 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.c,v 1.21 2020/11/01 20:58:38 christos Exp $	*/
+/*	$NetBSD: sleepq.c,v 1.22 2022/04/09 23:45:23 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2008 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.21 2020/11/01 20:58:38 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sleepq.c,v 1.22 2022/04/09 23:45:23 riastradh Exp $");
 
 #include 
 #include 
@@ -163,7 +163,6 @@ lwp_unlock_to(struct lwp *l, kmutex_t *n
 	KASSERT(mutex_owned(l->l_mutex));
 
 	old = l->l_mutex;
-	membar_exit();
-	l->l_mutex = new;
+	atomic_store_release(>l_mutex, new);
 	mutex_spin_exit(old);
 }



CVS commit: src/sys/rump/librump/rumpkern

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:45:23 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: sleepq.c

Log Message:
rumpkern/sleepq: Convert membar_exit/store to atomic_store_release.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/rump/librump/rumpkern/sleepq.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:45:14 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: scheduler.c

Log Message:
rumpkern/scheduler: Use membar_release.

...but add an XXX comment asking for clarity on what it pairs with.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/rump/librump/rumpkern/scheduler.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/scheduler.c
diff -u src/sys/rump/librump/rumpkern/scheduler.c:1.52 src/sys/rump/librump/rumpkern/scheduler.c:1.53
--- src/sys/rump/librump/rumpkern/scheduler.c:1.52	Sun Nov  1 20:58:38 2020
+++ src/sys/rump/librump/rumpkern/scheduler.c	Sat Apr  9 23:45:14 2022
@@ -1,4 +1,4 @@
-/*  $NetBSD: scheduler.c,v 1.52 2020/11/01 20:58:38 christos Exp $	*/
+/*  $NetBSD: scheduler.c,v 1.53 2022/04/09 23:45:14 riastradh Exp $	*/
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.52 2020/11/01 20:58:38 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.53 2022/04/09 23:45:14 riastradh Exp $");
 
 #include 
 #include 
@@ -473,7 +473,7 @@ rump_unschedule_cpu1(struct lwp *l, void
 	if (interlock == rcpu->rcpu_mtx)
 		rumpuser_mutex_enter_nowrap(rcpu->rcpu_mtx);
 	else
-		membar_exit();
+		membar_release(); /* XXX what does this pair with? */
 
 	/* Release the CPU. */
 	old = atomic_swap_ptr(>rcpu_prevlwp, l);



CVS commit: src/sys/rump/librump/rumpkern

2022-04-09 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Sat Apr  9 23:45:14 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: scheduler.c

Log Message:
rumpkern/scheduler: Use membar_release.

...but add an XXX comment asking for clarity on what it pairs with.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/rump/librump/rumpkern/scheduler.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2022-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 28 20:49:52 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern

Log Message:
include the extensions secmodel


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/rump/librump/rumpkern/Makefile.rumpkern

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2022-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 28 20:49:52 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern

Log Message:
include the extensions secmodel


To generate a diff of this commit:
cvs rdiff -u -r1.187 -r1.188 src/sys/rump/librump/rumpkern/Makefile.rumpkern

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/Makefile.rumpkern
diff -u src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.187 src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.188
--- src/sys/rump/librump/rumpkern/Makefile.rumpkern:1.187	Thu Aug 27 10:11:57 2020
+++ src/sys/rump/librump/rumpkern/Makefile.rumpkern	Mon Mar 28 16:49:52 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.rumpkern,v 1.187 2020/08/27 14:11:57 riastradh Exp $
+#	$NetBSD: Makefile.rumpkern,v 1.188 2022/03/28 20:49:52 christos Exp $
 #
 
 IOCONFDIR:=	${.PARSEDIR}
@@ -20,6 +20,7 @@ MAN=		rump.3 rump_lwproc.3
 	${RUMPTOP}/../crypto/cprng_fast\
 	${RUMPTOP}/../crypto/nist_hash_drbg			\
 	${RUMPTOP}/../secmodel	\
+	${RUMPTOP}/../secmodel/extensions			\
 	${RUMPTOP}/../secmodel/suser\
 	${RUMPTOP}/../compat/common
 
@@ -145,6 +146,7 @@ SRCS+=	uvm_page_array.c uvm_page_status.
 # 4.4BSD secmodel.  selection is hardcoded for now
 SRCS+=	secmodel.c
 SRCS+=	secmodel_suser.c
+SRCS+=	secmodel_extensions.c
 
 # the funny bit.  this doesn't really belong here, but helps with the
 # needs of kern_descrip.c.  And since it's a fully dynamic interface,



CVS commit: src/sys/rump/librump/rumpkern

2022-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 28 20:49:32 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
no need to include suser; it gets autoloaded as a module.


To generate a diff of this commit:
cvs rdiff -u -r1.354 -r1.355 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2022-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 28 20:49:32 UTC 2022

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
no need to include suser; it gets autoloaded as a module.


To generate a diff of this commit:
cvs rdiff -u -r1.354 -r1.355 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.354 src/sys/rump/librump/rumpkern/rump.c:1.355
--- src/sys/rump/librump/rumpkern/rump.c:1.354	Mon Mar 28 08:38:59 2022
+++ src/sys/rump/librump/rumpkern/rump.c	Mon Mar 28 16:49:32 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.354 2022/03/28 12:38:59 riastradh Exp $	*/
+/*	$NetBSD: rump.c,v 1.355 2022/03/28 20:49:32 christos Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.354 2022/03/28 12:38:59 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.355 2022/03/28 20:49:32 christos Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -85,8 +85,6 @@ __KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.3
 
 #include 
 
-#include 
-
 #include 
 
 #include 



CVS commit: src/sys/rump/librump/rumpkern

2019-10-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 15 18:36:38 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
Add a function cast for enosys


To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.334 src/sys/rump/librump/rumpkern/rump.c:1.335
--- src/sys/rump/librump/rumpkern/rump.c:1.334	Thu May 16 23:34:26 2019
+++ src/sys/rump/librump/rumpkern/rump.c	Tue Oct 15 14:36:38 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.334 2019/05/17 03:34:26 ozaki-r Exp $	*/
+/*	$NetBSD: rump.c,v 1.335 2019/10/15 18:36:38 christos Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.334 2019/05/17 03:34:26 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.335 2019/10/15 18:36:38 christos Exp $");
 
 #include 
 #define ELFSIZE ARCH_ELFSIZE
@@ -807,7 +807,7 @@ rump_syscall_boot_establish(const struct
 	for (i = 0; i < ncall; i++) {
 		callp = rump_sysent + calls[i].ros_num;
 		KASSERT(bootlwp != NULL
-		&& callp->sy_call == (sy_call_t *)enosys);
+		&& callp->sy_call == (sy_call_t *)(void *)enosys);
 		callp->sy_call = calls[i].ros_handler;
 	}
 }



CVS commit: src/sys/rump/librump/rumpkern

2019-10-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 15 18:36:38 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
Add a function cast for enosys


To generate a diff of this commit:
cvs rdiff -u -r1.334 -r1.335 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2019-10-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct  9 01:43:35 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: rump_syscalls.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sys/rump/librump/rumpkern/rump_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/rump_syscalls.c
diff -u src/sys/rump/librump/rumpkern/rump_syscalls.c:1.142 src/sys/rump/librump/rumpkern/rump_syscalls.c:1.143
--- src/sys/rump/librump/rumpkern/rump_syscalls.c:1.142	Sun Sep 22 19:03:21 2019
+++ src/sys/rump/librump/rumpkern/rump_syscalls.c	Tue Oct  8 21:43:35 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: rump_syscalls.c,v 1.142 2019/09/22 23:03:21 christos Exp $ */
+/* $NetBSD: rump_syscalls.c,v 1.143 2019/10/09 01:43:35 christos Exp $ */
 
 /*
  * System call vector and marshalling for rump.
@@ -15,7 +15,7 @@
 
 #ifdef __NetBSD__
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.142 2019/09/22 23:03:21 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.143 2019/10/09 01:43:35 christos Exp $");
 
 #include 
 #include 
@@ -6553,1999 +6553,1999 @@ int rumpns_enosys(void);
 
 struct sysent rump_sysent[] = {
 	{
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 },		/* 0 = syscall */
 	{
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 },		/* 1 = exit */
 	{
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 },		/* 2 = fork */
 	{
 		ns(struct sys_read_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 3 = read */
 	{
 		ns(struct sys_write_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 4 = write */
 	{
 		ns(struct sys_open_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 5 = open */
 	{
 		ns(struct sys_close_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 6 = close */
 	{
 		.sy_flags = SYCALL_NOSYS,
-		.sy_call = (sy_call_t *)rumpns_sys_nomodule,
+		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
 },		/* 7 = wait4 */
 	{
 		.sy_flags = SYCALL_NOSYS,
-		.sy_call = (sy_call_t *)rumpns_sys_nomodule,
+		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
 },		/* 8 = ocreat */
 	{
 		ns(struct sys_link_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 9 = link */
 	{
 		ns(struct sys_unlink_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 10 = unlink */
 	{
 		.sy_flags = SYCALL_NOSYS,
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 11 = filler */
 	{
 		ns(struct sys_chdir_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 12 = chdir */
 	{
 		ns(struct sys_fchdir_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 13 = fchdir */
 	{
 		ns(struct compat_50_sys_mknod_args),
-		.sy_call = (sy_call_t *)rumpns_sys_nomodule,
+		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
 	},		/* 14 = compat_50_mknod */
 	{
 		ns(struct sys_chmod_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 15 = chmod */
 	{
 		ns(struct sys_chown_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 16 = chown */
 	{
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 },		/* 17 = break */
 	{
 		.sy_flags = SYCALL_NOSYS,
-		.sy_call = (sy_call_t *)rumpns_sys_nomodule,
+		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
 },		/* 18 = getfsstat */
 	{
 		.sy_flags = SYCALL_NOSYS,
-		.sy_call = (sy_call_t *)rumpns_sys_nomodule,
+		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
 },		/* 19 = olseek */
 	{
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 20 = getpid */
 	{
 		.sy_flags = SYCALL_NOSYS,
-		.sy_call = (sy_call_t *)rumpns_sys_nomodule,
+		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
 },		/* 21 = mount */
 	{
 		ns(struct sys_unmount_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 22 = unmount */
 	{
 		ns(struct sys_setuid_args),
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 23 = setuid */
 	{
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
 	},		/* 24 = getuid */
 	{
-		.sy_call = (sy_call_t *)rumpns_enosys,
+		.sy_call = 

CVS commit: src/sys/rump/librump/rumpkern

2019-10-08 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Oct  9 01:43:35 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: rump_syscalls.c

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.142 -r1.143 src/sys/rump/librump/rumpkern/rump_syscalls.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 17:52:51 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
Provide a weak alias for vnode_to_path to be used unless librumpvfs is present.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/rump/librump/rumpkern/emul.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2019-09-26 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Sep 26 17:52:51 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
Provide a weak alias for vnode_to_path to be used unless librumpvfs is present.


To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/sys/rump/librump/rumpkern/emul.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.191 src/sys/rump/librump/rumpkern/emul.c:1.192
--- src/sys/rump/librump/rumpkern/emul.c:1.191	Sun Jun  2 19:41:51 2019
+++ src/sys/rump/librump/rumpkern/emul.c	Thu Sep 26 17:52:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.191 2019/06/02 19:41:51 kre Exp $	*/
+/*	$NetBSD: emul.c,v 1.192 2019/09/26 17:52:50 bad Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.191 2019/06/02 19:41:51 kre Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.192 2019/09/26 17:52:50 bad Exp $");
 
 #include 
 #include 
@@ -269,6 +269,20 @@ rump_getcwd_common(struct vnode *lvp, st
 }
 __weak_alias(getcwd_common,rump_getcwd_common);
 
+/* Weak alias for vnode_to_path to be used unless librumpvfs is present. */
+
+int rump_vnode_to_path(char *, size_t, struct vnode *, struct lwp *,
+struct proc *);
+int
+rump_vnode_to_path(char *path, size_t len, struct vnode *vp, struct lwp *curl,
+struct proc *p)
+{
+
+	return ENOENT; /* pretend getcwd_common() failed. */
+}
+__weak_alias(vnode_to_path,rump_vnode_to_path);
+
+
 /* Weak aliases for fstrans to be used unless librumpvfs is present. */
 
 void rump_fstrans_start(struct mount *);



CVS commit: src/sys/rump/librump/rumpkern

2019-06-02 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sun Jun  2 19:41:51 UTC 2019

Modified Files:
src/sys/rump/librump/rumpkern: emul.c

Log Message:
Apply a patch from hannken@ which adds a weak alias for rump_getcwd_common()
allowing -lrump to be used without -lrumpvfs.

This is an alternate fix to the earluer one which added -lrumvfs to
many rump based tests (and the rump server) which might be undone soon.

This also fixes the sun2 build.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/rump/librump/rumpkern/emul.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/emul.c
diff -u src/sys/rump/librump/rumpkern/emul.c:1.190 src/sys/rump/librump/rumpkern/emul.c:1.191
--- src/sys/rump/librump/rumpkern/emul.c:1.190	Sat Mar  9 09:02:38 2019
+++ src/sys/rump/librump/rumpkern/emul.c	Sun Jun  2 19:41:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: emul.c,v 1.190 2019/03/09 09:02:38 hannken Exp $	*/
+/*	$NetBSD: emul.c,v 1.191 2019/06/02 19:41:51 kre Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.190 2019/03/09 09:02:38 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.191 2019/06/02 19:41:51 kre Exp $");
 
 #include 
 #include 
@@ -256,6 +256,19 @@ void (*delay_func)(unsigned int) = rump_
 __strong_alias(delay,rump_delay);
 __strong_alias(_delay,rump_delay);
 
+/* Weak alias for getcwd_common to be used unless librumpvfs is present. */
+
+int rump_getcwd_common(struct vnode *, struct vnode *, char **, char *,
+int, int, struct lwp *);
+int
+rump_getcwd_common(struct vnode *lvp, struct vnode *rvp, char **bpp, char *bufp,
+int limit, int flags, struct lwp *l)
+{
+
+	return ENOENT;
+}
+__weak_alias(getcwd_common,rump_getcwd_common);
+
 /* Weak aliases for fstrans to be used unless librumpvfs is present. */
 
 void rump_fstrans_start(struct mount *);



Re: CVS commit: src/sys/rump/librump/rumpkern

2017-07-25 Thread Paul Goyette

pullup to 8.0?

On Tue, 25 Jul 2017, Ryota Ozaki wrote:


Module Name:src
Committed By:   ozaki-r
Date:   Tue Jul 25 05:01:25 UTC 2017

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern

Log Message:
Add localcount to rump kernels


To generate a diff of this commit:
cvs rdiff -u -r1.169 -r1.170 src/sys/rump/librump/rumpkern/Makefile.rumpkern

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.


!DSPAM:5976d0ab241195299513085!




+--+--++
| Paul Goyette | PGP Key fingerprint: | E-mail addresses:  |
| (Retired)| FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+--+--++


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-11-22 Thread Nick Hudson
On Sunday 21 November 2010 21:46:43 Antti Kantee wrote:
 Module Name:  src
 Committed By: pooka
 Date: Sun Nov 21 21:46:43 UTC 2010
 
 Modified Files:
   src/sys/rump/librump/rumpkern: Makefile.rumpkern
 Added Files:
   src/sys/rump/librump/rumpkern: atomic_cas_up.c
 
 Log Message:
 Add a lockless uniprocessor version of atomic_cas_generic.c, which
 is currently used by all the archs that previously used cas_generic.

This break arm platform builds.

/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/arm/atomic/atomic_cas_up.S:
 
Assembler messages:   
/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/arm/atomic/atomic_cas_up.S:38:
 
Error: bad instruction `ras_start_asm_hidden(_atomic_cas)'  

  
/usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/libc/arch/arm/atomic/atomic_cas_up.S:42:
 
Error: bad instruction `ras_end_asm_hidden(_atomic_cas)'

  
*** [atomic_cas_up.pico] Error code 1   

   

Nick


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-11-22 Thread Nick Hudson
On Monday 22 November 2010 10:51:03 Antti Kantee wrote:
 On Mon Nov 22 2010 at 10:35:00 +, Nick Hudson wrote:
  On Sunday 21 November 2010 21:46:43 Antti Kantee wrote:
   Module Name:  src
   Committed By: pooka
   Date: Sun Nov 21 21:46:43 UTC 2010
  
   Modified Files:
 src/sys/rump/librump/rumpkern: Makefile.rumpkern
   Added Files:
 src/sys/rump/librump/rumpkern: atomic_cas_up.c
  
   Log Message:
   Add a lockless uniprocessor version of atomic_cas_generic.c, which
   is currently used by all the archs that previously used cas_generic.
 
  This break arm platform builds.
 
  /usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/li
 bc/arch/arm/atomic/atomic_cas_up.S: Assembler messages:
  /usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/li
 bc/arch/arm/atomic/atomic_cas_up.S:38: Error: bad instruction
  `ras_start_asm_hidden(_atomic_cas)'
  /usr/src/lib/librump/../../sys/rump/../lib/libkern/../../../common/lib/li
 bc/arch/arm/atomic/atomic_cas_up.S:42: Error: bad instruction
  `ras_end_asm_hidden(_atomic_cas)'
  *** [atomic_cas_up.pico] Error code 1
 
 Fixed.  I'll run a build just to make sure.
 

Thanks for the quick response.

Nick


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-23 Thread Mindaugas Rasiukevicius
 Module Name:src
 Committed By:   pooka
 Date:   Wed Jun 23 08:36:03 UTC 2010
 
 Modified Files:
 src/sys/rump/librump/rumpkern: emul.c
 
 Log Message:
 As normal, fix breakage from untested commits by rmind.

Well, when I tried ./build.sh rumptest, it gave me this:

--- dependall-dev ---
WARNING: pseudo-root is an experimental feature
/home/netbsd/src/sys/rump/dev/lib/libaudio/AUDIO.ioconf:8: audiobus*: unknown 
device `audiobus'
/home/netbsd/src/sys/rump/dev/lib/libaudio/AUDIO.ioconf:10: `audio* at 
audiobus?' is orphaned (nothing matching `audiobus?' found)
*** Stop.
*** [ioconf.c] Error code 1
1 error

nbmake: stopped in /home/netbsd/src/sys/rump/dev/lib/libaudio
*** [dependall-libaudio] Error code 2
1 error

Can you elaborate why, and how to get it working?
Other than rump, it was tested.

-- 
Mindaugas


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-23 Thread Antti Kantee
On Wed Jun 23 2010 at 12:39:17 +0100, Mindaugas Rasiukevicius wrote:
 Well, when I tried ./build.sh rumptest, it gave me this:
 
 --- dependall-dev ---
 WARNING: pseudo-root is an experimental feature
 /home/netbsd/src/sys/rump/dev/lib/libaudio/AUDIO.ioconf:8: audiobus*: unknown 
 device `audiobus'
 /home/netbsd/src/sys/rump/dev/lib/libaudio/AUDIO.ioconf:10: `audio* at 
 audiobus?' is orphaned (nothing matching `audiobus?' found)
 *** Stop.
 *** [ioconf.c] Error code 1
 1 error
 
 nbmake: stopped in /home/netbsd/src/sys/rump/dev/lib/libaudio
 *** [dependall-libaudio] Error code 2
 1 error
 
 Can you elaborate why, and how to get it working?

I suspect your config(1) is too old and config should whine about it.
At least my nb5 config displays the appropriate error for -current
sources:

WARNING: ioconf is an experimental feature
/sys/conf/files:4: your sources require a newer version of config(1) -- please 
rebuild it.
/sys/conf/majors:12: syntax error
/sys/conf/majors:13: syntax error
/sys/conf/majors:15: syntax error
/sys/conf/majors:18: syntax error
/sys/conf/majors:19: syntax error
/sys/conf/majors:21: syntax error
/sys/conf/majors:25: syntax error
/sys/conf/majors:26: syntax error
/sys/conf/majors:27: syntax error
/sys/conf/majors:28: syntax error
/sys/conf/majors:29: syntax error
/sys/conf/majors:30: syntax error
/sys/conf/majors:33: syntax error
/sys/conf/majors:37: syntax error
/sys/conf/majors:41: syntax error
/sys/conf/majors:43: syntax error
WARNING: pseudo-root is an experimental feature
AUDIO.ioconf:8: audiobus*: unknown device `audiobus'
AUDIO.ioconf:10: `audio* at audiobus?' is orphaned (nothing matching 
`audiobus?' found)
*** Stop.

Guessing from the log you pasted and that the bottom matches my too-old
config's error reportable, you were bit by -j output and did not see
the real error message.

Try upgrading your tools and if the problem persists, let me know.

 Other than rump, it was tested.

The point was more that you did not make an effort to run the regression
test suite.  (anyway, it's done now, and the commits come out clean.
thanks for the features)


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-16 Thread Alistair Crooks
On Tue, Jun 15, 2010 at 04:40:24PM +1000, matthew green wrote:
 
  On Mon, Jun 14, 2010 at 09:40:37AM -0600, M. Warner Losh wrote:
On i386, that's true.  amd64 expands to '0', as does sun3.  This makes
the first one true.  The second one, i386 expands to '1', so the
second one would be false.
  
  Arguably we shouhld fix our gcc to only define __i386__, not i386,
  which conflicts with the user namespace...
 
 i agree.
 
 i was going to reply to an earlier message on this that it was the
 kernel Makefile's that define $MACHINE, but upon looking at them i
 noticed that only a few do, and that i486--netbsdelf-gcc defines
 i386 all the time so i didn't send any email.
 
 we should audit all of our gcc configs and kernel configs to deal.

Yes, I agree, too.

Quite some time ago, we stopped defining unix, which mainly
caused issues in pkgsrc and not in src, but nothing we couldn't
overcome given time and bulk builds.

Now's not the time, though, please leave it 2 weeks :-)

Best,
Alistair


re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-15 Thread matthew green

 On Mon, Jun 14, 2010 at 09:40:37AM -0600, M. Warner Losh wrote:
   On i386, that's true.  amd64 expands to '0', as does sun3.  This makes
   the first one true.  The second one, i386 expands to '1', so the
   second one would be false.
 
 Arguably we shouhld fix our gcc to only define __i386__, not i386,
 which conflicts with the user namespace...

i agree.

i was going to reply to an earlier message on this that it was the
kernel Makefile's that define $MACHINE, but upon looking at them i
noticed that only a few do, and that i486--netbsdelf-gcc defines
i386 all the time so i didn't send any email.

we should audit all of our gcc configs and kernel configs to deal.


.mrg.


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread David Holland
On Sun, Jun 13, 2010 at 03:17:02PM +, Antti Kantee wrote:
  Fix previous in emul.c -- only numbers are operands for cpp comparisons.
  Apparently non-numbers logically produce arch-dependent behaviour.

Not at all.

C99 6.10.1 #4:

  [...] After all replacements due to macro expansion and the defined
  unary operator have been performed, all remaining identifiers
  (including those lexically identical to keywords) are replaced with
  the pp-number 0, and then each preprocessing token is converted into
  a token. The resulting tokens compose the controlling constant
  expression which is evaluated according to the rules of 6.6. [...]

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread Antti Kantee
On Mon Jun 14 2010 at 07:00:05 +, David Holland wrote:
 On Sun, Jun 13, 2010 at 03:17:02PM +, Antti Kantee wrote:
   Fix previous in emul.c -- only numbers are operands for cpp comparisons.
   Apparently non-numbers logically produce arch-dependent behaviour.
 
 Not at all.
 
 C99 6.10.1 #4:
 
   [...] After all replacements due to macro expansion and the defined
   unary operator have been performed, all remaining identifiers
   (including those lexically identical to keywords) are replaced with
   the pp-number 0, and then each preprocessing token is converted into
   a token. The resulting tokens compose the controlling constant
   expression which is evaluated according to the rules of 6.6. [...]

So, you being the person who attempted to write cpp with sed, what
comparison does amd64 == sun3 actually result in?  What about
i386 == sun3 (the former returned true, the latter didn't).


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread Martin Husemann
On Mon, Jun 14, 2010 at 11:34:24AM +0300, Antti Kantee wrote:
 So, you being the person who attempted to write cpp with sed, what
 comparison does amd64 == sun3 actually result in?  What about
 i386 == sun3 (the former returned true, the latter didn't).

For me both end up as 0==0 and return true ;-)

Martin


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread David Holland
On Mon, Jun 14, 2010 at 11:34:24AM +0300, Antti Kantee wrote:
  So, you being the person who attempted to write cpp with sed, what
  comparison does amd64 == sun3 actually result in?  What about
  i386 == sun3 (the former returned true, the latter didn't).

What were you compiling on? Whether it should or not, our i386 gcc
predefines i386, so you probably got 0 == 0 and 1 == 0 respectively.

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread Antti Kantee
On Mon Jun 14 2010 at 11:13:23 +0200, Martin Husemann wrote:
 On Mon, Jun 14, 2010 at 11:34:24AM +0300, Antti Kantee wrote:
  So, you being the person who attempted to write cpp with sed, what
  comparison does amd64 == sun3 actually result in?  What about
  i386 == sun3 (the former returned true, the latter didn't).
 
 For me both end up as 0==0 and return true ;-)

How can you tell what they end up as?  I can only see that the line
wrapped in the #if is missing from output of cc -E (still on/targetting
i386).


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread Antti Kantee
On Mon Jun 14 2010 at 09:17:43 +, David Holland wrote:
 On Mon, Jun 14, 2010 at 11:34:24AM +0300, Antti Kantee wrote:
   So, you being the person who attempted to write cpp with sed, what
   comparison does amd64 == sun3 actually result in?  What about
   i386 == sun3 (the former returned true, the latter didn't).
 
 What were you compiling on? Whether it should or not, our i386 gcc
 predefines i386, so you probably got 0 == 0 and 1 == 0 respectively.

Ah, ok, now I see what happened.

thanks


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread Martin Husemann
On Mon, Jun 14, 2010 at 12:27:43PM +0300, Antti Kantee wrote:
 How can you tell what they end up as?  I can only see that the line
 wrapped in the #if is missing from output of cc -E (still on/targetting
 i386).

Well, knowing the standard (as David cited) and checking with

  cc -dM -E -  /dev/null

what is defined on your arch you can make an educated guess. But sure,
you can't realy tell whether someone did a #define sun3 1 somewhere
in the code.

Martin


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread M. Warner Losh
In message: 20100614083424.gc16...@cs.hut.fi
Antti Kantee po...@cs.hut.fi writes:
: On Mon Jun 14 2010 at 07:00:05 +, David Holland wrote:
:  On Sun, Jun 13, 2010 at 03:17:02PM +, Antti Kantee wrote:
:Fix previous in emul.c -- only numbers are operands for cpp comparisons.
:Apparently non-numbers logically produce arch-dependent behaviour.
:  
:  Not at all.
:  
:  C99 6.10.1 #4:
:  
:[...] After all replacements due to macro expansion and the defined
:unary operator have been performed, all remaining identifiers
:(including those lexically identical to keywords) are replaced with
:the pp-number 0, and then each preprocessing token is converted into
:a token. The resulting tokens compose the controlling constant
:expression which is evaluated according to the rules of 6.6. [...]
: 
: So, you being the person who attempted to write cpp with sed, what
: comparison does amd64 == sun3 actually result in?  What about
: i386 == sun3 (the former returned true, the latter didn't).

On i386, that's true.  amd64 expands to '0', as does sun3.  This makes
the first one true.  The second one, i386 expands to '1', so the
second one would be false.

Warner


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread David Holland
On Mon, Jun 14, 2010 at 09:40:37AM -0600, M. Warner Losh wrote:
  On i386, that's true.  amd64 expands to '0', as does sun3.  This makes
  the first one true.  The second one, i386 expands to '1', so the
  second one would be false.

Arguably we shouhld fix our gcc to only define __i386__, not i386,
which conflicts with the user namespace...

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-06-14 Thread M. Warner Losh
In message: 20100615052154.gb16...@netbsd.org
David Holland dholland-sourcechan...@netbsd.org writes:
: On Mon, Jun 14, 2010 at 09:40:37AM -0600, M. Warner Losh wrote:
:   On i386, that's true.  amd64 expands to '0', as does sun3.  This makes
:   the first one true.  The second one, i386 expands to '1', so the
:   second one would be false.
: 
: Arguably we shouhld fix our gcc to only define __i386__, not i386,
: which conflicts with the user namespace...

True, but doing so would likely break applications that have depended
on this define.  Which is worse?

Warner


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-05-20 Thread David Holland
On Tue, May 18, 2010 at 04:29:36PM +, Antti Kantee wrote:
  It's pretty obvious that in terms of scalability simple workload
  partitioning and replication into multiple kernels wins hands down
  over complicated locking or locklessing algorithms which depend on
  globally atomic state.

...in other breaking news, the sky is blue.

:-p :-)

-- 
David A. Holland
dholl...@netbsd.org


Re: CVS commit: src/sys/rump/librump/rumpkern

2010-05-20 Thread Antti Kantee
On Thu May 20 2010 at 02:47:16 +, David Holland wrote:
 On Tue, May 18, 2010 at 04:29:36PM +, Antti Kantee wrote:
   It's pretty obvious that in terms of scalability simple workload
   partitioning and replication into multiple kernels wins hands down
   over complicated locking or locklessing algorithms which depend on
   globally atomic state.
 
 ...in other breaking news, the sky is blue.

Yet it is not possible everywhere to observe the sky being blue due to
various layers of unnecessary crap.

 :-p :-)

?:-% ('\/)


CVS commit: src/sys/rump/librump/rumpkern

2010-02-09 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Tue Feb  9 16:53:13 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: rump.c threads.c

Log Message:
Store l_name for kernel threads.


To generate a diff of this commit:
cvs rdiff -u -r1.151 -r1.152 src/sys/rump/librump/rumpkern/rump.c
cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpkern/threads.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2010-01-31 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Sun Jan 31 15:12:42 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: Makefile.rumpkern emul.c

Log Message:
Include newly-created subr_device.c and remove few special case
device accessor copypastes.  This makes it possible to link static
binaries which use -lrumpdev.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/rump/librump/rumpkern/Makefile.rumpkern
cvs rdiff -u -r1.120 -r1.121 src/sys/rump/librump/rumpkern/emul.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2010-01-30 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Jan 31 00:54:22 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: locks.c

Log Message:
Some might argue that it is benefi_c_ial to spell words correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/rump/librump/rumpkern/locks.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2010-01-27 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jan 27 20:16:17 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: threads.c

Log Message:
ignore pmf threads if RUMP_THREADS == 0


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/rump/librump/rumpkern/threads.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2010-01-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Mon Jan 25 18:37:51 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: scheduler.c

Log Message:
Set attached cpus as running, otherwise (evil) state-probing code
will not execute properly.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/rump/librump/rumpkern/scheduler.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2010-01-15 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Jan 15 20:39:46 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
Accomplish messy stack with slightly less messy code.


To generate a diff of this commit:
cvs rdiff -u -r1.150 -r1.151 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2010-01-12 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Wed Jan 13 00:07:40 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: rump.c

Log Message:
If RUMP_VERBOSE is set in the env, set boothowto to AB_VERBOSE.


To generate a diff of this commit:
cvs rdiff -u -r1.148 -r1.149 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sys/rump/librump/rumpkern

2010-01-11 Thread Arnaud Ysmal
Module Name:src
Committed By:   stacktic
Date:   Mon Jan 11 19:19:58 UTC 2010

Modified Files:
src/sys/rump/librump/rumpkern: memalloc.c

Log Message:
Fixed typo.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/rump/librump/rumpkern/memalloc.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



Re: CVS commit: src/sys/rump/librump/rumpkern

2009-11-07 Thread Christoph Egger
David Laight wrote:
 Module Name:  src
 Committed By: dsl
 Date: Sat Nov  7 12:08:35 UTC 2009
 
 Modified Files:
   src/sys/rump/librump/rumpkern: pmap_stub.c
 
 Log Message:
 Fix stub prototype
 

Doh! rump is not build as part of any kernel.
Hence gcc didn't catch it.

Thanks for fixing.

Christoph



re: CVS commit: src/sys/rump/librump/rumpkern

2009-11-07 Thread matthew green


   David Laight wrote:
Module Name:   src
Committed By:  dsl
Date:  Sat Nov  7 12:08:35 UTC 2009

Modified Files:
   src/sys/rump/librump/rumpkern: pmap_stub.c

Log Message:
Fix stub prototype

   
   Doh! rump is not build as part of any kernel.
   Hence gcc didn't catch it.
   
   Thanks for fixing.
   
when you make a big change like your pmap change you should *ALWAYS* full
release before checking in.  just one platform would be sufficient.


.mrg.