Module Name: src Committed By: martin Date: Tue Feb 19 11:20:17 UTC 2013
Modified Files: src/sys/kern: subr_xcall.c Log Message: Oops, accidently did not commit this part of pooka's change. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/kern/subr_xcall.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/kern/subr_xcall.c diff -u src/sys/kern/subr_xcall.c:1.13 src/sys/kern/subr_xcall.c:1.14 --- src/sys/kern/subr_xcall.c:1.13 Fri May 13 22:16:44 2011 +++ src/sys/kern/subr_xcall.c Tue Feb 19 11:20:17 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: subr_xcall.c,v 1.13 2011/05/13 22:16:44 rmind Exp $ */ +/* $NetBSD: subr_xcall.c,v 1.14 2013/02/19 11:20:17 martin Exp $ */ /*- * Copyright (c) 2007-2010 The NetBSD Foundation, Inc. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.13 2011/05/13 22:16:44 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_xcall.c,v 1.14 2013/02/19 11:20:17 martin Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -85,6 +85,10 @@ __KERNEL_RCSID(0, "$NetBSD: subr_xcall.c #include <sys/kthread.h> #include <sys/cpu.h> +#ifdef _RUMPKERNEL +#include "rump_private.h" +#endif + /* Cross-call state box. */ typedef struct { kmutex_t xc_lock; @@ -113,7 +117,6 @@ static struct evcnt xc_broadcast_ev __ca static void xc_init(void); static void xc_thread(void *); -static void xc_highpri_intr(void *); static inline uint64_t xc_highpri(xcfunc_t, void *, void *, struct cpu_info *); static inline uint64_t xc_lowpri(xcfunc_t, void *, void *, struct cpu_info *); @@ -137,7 +140,7 @@ xc_init(void) mutex_init(&xchi->xc_lock, MUTEX_DEFAULT, IPL_SOFTCLOCK); cv_init(&xchi->xc_busy, "xchicv"); xc_sih = softint_establish(SOFTINT_CLOCK | SOFTINT_MPSAFE, - xc_highpri_intr, NULL); + xc__highpri_intr, NULL); KASSERT(xc_sih != NULL); evcnt_attach_dynamic(&xc_unicast_ev, EVCNT_TYPE_MISC, NULL, @@ -329,23 +332,23 @@ xc_thread(void *cookie) void xc_ipi_handler(void) { - /* Executes xc_highpri_intr() via software interrupt. */ + /* Executes xc__highpri_intr() via software interrupt. */ softint_schedule(xc_sih); } /* - * xc_highpri_intr: + * xc__highpri_intr: * * A software interrupt handler for high priority calls. */ -static void -xc_highpri_intr(void *dummy) +void +xc__highpri_intr(void *dummy) { xc_state_t *xc = &xc_high_pri; void *arg1, *arg2; xcfunc_t func; - KASSERT(cpu_softintr_p()); + KASSERT(!cpu_intr_p()); /* * Lock-less fetch of function and its arguments. * Safe since it cannot change at this point. @@ -396,6 +399,9 @@ xc_highpri(xcfunc_t func, void *arg1, vo * Note: it will handle the local CPU case. */ +#ifdef _RUMPKERNEL + rump_xc_highpri(ci); +#else #ifdef MULTIPROCESSOR kpreempt_disable(); if (curcpu() == ci) { @@ -414,6 +420,7 @@ xc_highpri(xcfunc_t func, void *arg1, vo KASSERT(curcpu() == ci); xc_ipi_handler(); #endif +#endif /* Indicate a high priority ticket. */ return (where | XC_PRI_BIT);