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 Initialize cpu_softcpu before crea...
details: https://anonhg.NetBSD.org/src/rev/642ede5664f6
branches: trunk
changeset: 330093:642ede5664f6
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Jun 22 20:09:19 2014 +0000
description:
Initialize cpu_softcpu before creating softint threads. Fixes things
with rump kernel hypervisors which wrap the thread creation hypercall.
pointed out by Justin Cormack
diffstat:
sys/rump/librump/rumpkern/intr.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diffs (48 lines):
diff -r 7e44350cb530 -r 642ede5664f6 sys/rump/librump/rumpkern/intr.c
--- a/sys/rump/librump/rumpkern/intr.c Sun Jun 22 19:09:39 2014 +0000
+++ b/sys/rump/librump/rumpkern/intr.c Sun Jun 22 20:09:19 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.45 2014/06/09 13:03:16 rmind Exp $ */
+/* $NetBSD: intr.c,v 1.46 2014/06/22 20:09:19 pooka Exp $ */
/*
* Copyright (c) 2008-2010 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.45 2014/06/09 13:03:16 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.46 2014/06/22 20:09:19 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -242,7 +242,15 @@
if (!rump_threads)
return;
+ slev = kmem_alloc(sizeof(struct softint_lev) * SOFTINT_COUNT, KM_SLEEP);
+ for (i = 0; i < SOFTINT_COUNT; i++) {
+ rumpuser_cv_init(&slev[i].si_cv);
+ LIST_INIT(&slev[i].si_pending);
+ }
+ cd->cpu_softcpu = slev;
+
/* overloaded global init ... */
+ /* XXX: should be done the last time we are called */
if (ci->ci_index == 0) {
int sithr_swap;
@@ -261,13 +269,6 @@
}
}
- slev = kmem_alloc(sizeof(struct softint_lev) * SOFTINT_COUNT, KM_SLEEP);
- for (i = 0; i < SOFTINT_COUNT; i++) {
- rumpuser_cv_init(&slev[i].si_cv);
- LIST_INIT(&slev[i].si_pending);
- }
- cd->cpu_softcpu = slev;
-
/* well, not really a "soft" interrupt ... */
if ((rv = kthread_create(PRI_NONE, KTHREAD_MPSAFE,
ci, doclock, NULL, NULL, "rumpclk%d", ci->ci_index)) != 0)
Home |
Main Index |
Thread Index |
Old Index