Module Name: src
Committed By: jym
Date: Sun Aug 28 22:36:17 UTC 2011
Modified Files:
src/sys/arch/xen/xen: evtchn.c xennetback_xenbus.c
Log Message:
KNF, white spaces and comment typo fixes.
To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/xen/xen/evtchn.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/xen/xen/xennetback_xenbus.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/arch/xen/xen/evtchn.c
diff -u src/sys/arch/xen/xen/evtchn.c:1.51 src/sys/arch/xen/xen/evtchn.c:1.52
--- src/sys/arch/xen/xen/evtchn.c:1.51 Sat Aug 13 17:23:42 2011
+++ src/sys/arch/xen/xen/evtchn.c Sun Aug 28 22:36:17 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: evtchn.c,v 1.51 2011/08/13 17:23:42 cherry Exp $ */
+/* $NetBSD: evtchn.c,v 1.52 2011/08/28 22:36:17 jym Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -54,7 +54,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.51 2011/08/13 17:23:42 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: evtchn.c,v 1.52 2011/08/28 22:36:17 jym Exp $");
#include "opt_xen.h"
#include "isa.h"
@@ -249,7 +249,7 @@
evtch >> LONG_SHIFT,
evtch & LONG_MASK);
- if (evtsource[evtch]->ev_cpu != ci) {
+ if (evtsource[evtch]->ev_cpu != ci) {
/* facilitate spllower() on remote cpu */
struct cpu_info *rci = evtsource[evtch]->ev_cpu;
if (xen_send_ipi(rci, XEN_IPI_KICK) != 0) {
@@ -257,7 +257,7 @@
}
}
- /* leave masked */
+ /* leave masked */
return 0;
}
ci->ci_ilevel = evtsource[evtch]->ev_maxlevel;
@@ -353,7 +353,7 @@
evtch_bindcount[evtchn]++;
mutex_spin_exit(&evtchn_lock);
-
+
return evtchn;
}
@@ -365,9 +365,9 @@
mutex_spin_enter(&evtchn_lock);
- /*
- * XXX: The only per-cpu VIRQ we currently use is VIRQ_TIMER.
- * Please re-visit this implementation when others are used.
+ /*
+ * XXX: The only per-cpu VIRQ we currently use is VIRQ_TIMER.
+ * Please re-visit this implementation when others are used.
* Note: VIRQ_DEBUG is special-cased, and not used or bound on APs.
* XXX: event->virq/ipi can be unified in a linked-list
* implementation.
@@ -381,10 +381,11 @@
if (virq == VIRQ_TIMER) {
evtchn = virq_timer_to_evtch[ci->ci_cpuid];
- }
- else {
+ } else {
evtchn = virq_to_evtch[virq];
}
+
+ /* Allocate a channel if there is none already allocated */
if (evtchn == -1) {
op.cmd = EVTCHNOP_bind_virq;
op.u.bind_virq.virq = virq;
@@ -399,7 +400,7 @@
evtch_bindcount[evtchn]++;
mutex_spin_exit(&evtchn_lock);
-
+
return evtchn;
}
@@ -470,7 +471,7 @@
evtch_bindcount[evtchn]++;
mutex_spin_exit(&evtchn_lock);
-
+
return evtchn;
}
@@ -632,13 +633,13 @@
panic("can't allocate fixed interrupt source");
evts->ev_handlers = ih;
- /*
+ /*
* XXX: We're assuming here that ci is the same cpu as
* the one on which this event/port is bound on. The
* api needs to be reshuffled so that this assumption
* is more explicitly implemented.
*/
- evts->ev_cpu = ci;
+ evts->ev_cpu = ci;
mutex_init(&evtlock[evtch], MUTEX_DEFAULT, IPL_HIGH);
evtsource[evtch] = evts;
if (evname)
Index: src/sys/arch/xen/xen/xennetback_xenbus.c
diff -u src/sys/arch/xen/xen/xennetback_xenbus.c:1.46 src/sys/arch/xen/xen/xennetback_xenbus.c:1.47
--- src/sys/arch/xen/xen/xennetback_xenbus.c:1.46 Mon May 30 14:34:58 2011
+++ src/sys/arch/xen/xen/xennetback_xenbus.c Sun Aug 28 22:36:17 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: xennetback_xenbus.c,v 1.46 2011/05/30 14:34:58 joerg Exp $ */
+/* $NetBSD: xennetback_xenbus.c,v 1.47 2011/08/28 22:36:17 jym Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.46 2011/05/30 14:34:58 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xennetback_xenbus.c,v 1.47 2011/08/28 22:36:17 jym Exp $");
#include "opt_xen.h"
@@ -933,7 +933,7 @@
* schedule batch of packets for the domain. To achieve this, we
* schedule a soft interrupt, and just return. This way, the network
* stack will enqueue all pending mbufs in the interface's send queue
- * before it is processed by the soft inetrrupt handler().
+ * before it is processed by the soft interrupt handler().
*/
softint_schedule(xneti->xni_softintr);
}