Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 2009 14:30:08 +0000 (UTC)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r192197 - projects/pnet/sys/kern
Message-ID:  <200905161430.n4GEU83l061455@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rwatson
Date: Sat May 16 14:30:08 2009
New Revision: 192197
URL: http://svn.freebsd.org/changeset/base/192197

Log:
  Binding interrupts to a CPU consists of two parts: setting up CPU
  affinity for the interrupt thread, and requesting that underlying
  hardware direct interrupts to the CPU.  For software interrupt
  threads, implement a no-op interrupt event binder that returns
  success, so that the interrupt management code will just set the
  ithread's affinity and succeed.

Modified:
  projects/pnet/sys/kern/kern_intr.c

Modified: projects/pnet/sys/kern/kern_intr.c
==============================================================================
--- projects/pnet/sys/kern/kern_intr.c	Sat May 16 12:12:31 2009	(r192196)
+++ projects/pnet/sys/kern/kern_intr.c	Sat May 16 14:30:08 2009	(r192197)
@@ -968,6 +968,18 @@ intr_event_schedule_thread(struct intr_e
 #endif
 
 /*
+ * Allow interrupt event binding for software interrupt handlers -- a no-op,
+ * since interrupts are generated in software rather than being directed by
+ * a PIC.
+ */
+static int
+swi_assign_cpu(void *arg, u_char cpu)
+{
+
+	return (0);
+}
+
+/*
  * Add a software interrupt handler to a specified event.  If a given event
  * is not specified, then a new event is created.
  */
@@ -988,7 +1000,7 @@ swi_add(struct intr_event **eventp, cons
 			return (EINVAL);
 	} else {
 		error = intr_event_create(&ie, NULL, IE_SOFT, 0,
-		    NULL, NULL, NULL, NULL, "swi%d:", pri);
+		    NULL, NULL, NULL, swi_assign_cpu, "swi%d:", pri);
 		if (error)
 			return (error);
 		if (eventp != NULL)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905161430.n4GEU83l061455>