svn commit: r202266 - stable/7/sys/sparc64/sparc64

Marius Strobl marius at FreeBSD.org
Wed Jan 13 21:23:29 UTC 2010


Author: marius
Date: Wed Jan 13 21:23:29 2010
New Revision: 202266
URL: http://svn.freebsd.org/changeset/base/202266

Log:
  MFC: r200938
  
  - Don't check for a valid interrupt controller on every interrupt
    in intr_execute_handlers(). If we managed to get here without an
    associated interrupt controller we have way bigger problems.
    While at it predict stray vector interrupts as false as they are
    rather unlikely.
  - Don't blindly call the clear function of an interrupt controller
    when adding a handler in inthand_add() as interrupt controllers
    like the one driven by upa(4) are auto-clearing and thus provide
    NULL instead.

Modified:
  stable/7/sys/sparc64/sparc64/intr_machdep.c
Directory Properties:
  stable/7/sys/   (props changed)
  stable/7/sys/cddl/contrib/opensolaris/   (props changed)
  stable/7/sys/contrib/dev/acpica/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)

Modified: stable/7/sys/sparc64/sparc64/intr_machdep.c
==============================================================================
--- stable/7/sys/sparc64/sparc64/intr_machdep.c	Wed Jan 13 21:23:27 2010	(r202265)
+++ stable/7/sys/sparc64/sparc64/intr_machdep.c	Wed Jan 13 21:23:29 2010	(r202266)
@@ -277,7 +277,7 @@ intr_execute_handlers(void *cookie)
 	struct intr_vector *iv;
 
 	iv = cookie;
-	if (iv->iv_ic == NULL || intr_event_handle(iv->iv_event, NULL) != 0)
+	if (__predict_false(intr_event_handle(iv->iv_event, NULL) != 0))
 		intr_stray_vector(iv);
 }
 
@@ -378,7 +378,8 @@ inthand_add(const char *name, int vec, d
 #endif
 	ic->ic_enable(iv);
 	/* Ensure the interrupt is cleared, it might have triggered before. */
-	ic->ic_clear(iv);
+	if (ic->ic_clear != NULL)
+		ic->ic_clear(iv);
 	sx_xunlock(&intr_table_lock);
 	return (0);
 }


More information about the svn-src-stable-7 mailing list