Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern lwp0 needs l_proc set for panic->c...



details:   https://anonhg.NetBSD.org/src/rev/2e59217a550d
branches:  trunk
changeset: 326446:2e59217a550d
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Jan 29 18:42:14 2014 +0000

description:
lwp0 needs l_proc set for panic->cpu_reboot to dump core the right way

diffstat:

 sys/rump/librump/rumpkern/emul.c |  11 ++++++++---
 sys/rump/librump/rumpkern/rump.c |   6 ++----
 2 files changed, 10 insertions(+), 7 deletions(-)

diffs (67 lines):

diff -r f25ab190207a -r 2e59217a550d sys/rump/librump/rumpkern/emul.c
--- a/sys/rump/librump/rumpkern/emul.c  Wed Jan 29 15:59:11 2014 +0000
+++ b/sys/rump/librump/rumpkern/emul.c  Wed Jan 29 18:42:14 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emul.c,v 1.161 2014/01/17 01:32:53 pooka Exp $ */
+/*     $NetBSD: emul.c,v 1.162 2014/01/29 18:42:14 pooka Exp $ */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.161 2014/01/17 01:32:53 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: emul.c,v 1.162 2014/01/29 18:42:14 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/null.h>
@@ -40,6 +40,7 @@
 #include <sys/device.h>
 #include <sys/queue.h>
 #include <sys/file.h>
+#include <sys/filedesc.h>
 #include <sys/cpu.h>
 #include <sys/kmem.h>
 #include <sys/poll.h>
@@ -73,7 +74,11 @@
 int nkmempages = PHYSMEM/2; /* from le chapeau */
 #undef PHYSMEM
 
-struct lwp lwp0;
+struct lwp lwp0 = {
+       .l_lid = 1,
+       .l_proc = &proc0,
+       .l_fd = &filedesc0,
+};
 struct vnode *rootvp;
 dev_t rootdev = NODEV;
 
diff -r f25ab190207a -r 2e59217a550d sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c  Wed Jan 29 15:59:11 2014 +0000
+++ b/sys/rump/librump/rumpkern/rump.c  Wed Jan 29 18:42:14 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rump.c,v 1.283 2014/01/17 02:05:54 pooka Exp $ */
+/*     $NetBSD: rump.c,v 1.284 2014/01/29 18:42:14 pooka Exp $ */
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.283 2014/01/17 02:05:54 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.284 2014/01/29 18:42:14 pooka Exp $");
 
 #include <sys/systm.h>
 #define ELFSIZE ARCH_ELFSIZE
@@ -271,9 +271,7 @@
 
        /* init minimal lwp/cpu context */
        l = &lwp0;
-       l->l_lid = 1;
        l->l_cpu = l->l_target_cpu = rump_cpu;
-       l->l_fd = &filedesc0;
 
        /* lwp0 isn't created like other threads, so notify hypervisor here */
        rumpuser_curlwpop(RUMPUSER_LWP_CREATE, l);



Home | Main Index | Thread Index | Old Index