svn commit: r271520 - projects/arm_intrng/sys/arm/arm
Ian Lepore
ian at FreeBSD.org
Sat Sep 13 15:49:52 UTC 2014
Author: ian
Date: Sat Sep 13 15:49:51 2014
New Revision: 271520
URL: http://svnweb.freebsd.org/changeset/base/271520
Log:
Allow the interrupt resource to be NULL for the root interrupt controller.
Modified:
projects/arm_intrng/sys/arm/arm/nexus.c
Modified: projects/arm_intrng/sys/arm/arm/nexus.c
==============================================================================
--- projects/arm_intrng/sys/arm/arm/nexus.c Sat Sep 13 15:48:24 2014 (r271519)
+++ projects/arm_intrng/sys/arm/arm/nexus.c Sat Sep 13 15:49:51 2014 (r271520)
@@ -279,6 +279,25 @@ nexus_setup_intr(device_t dev, device_t
{
int irq;
+ /*
+ * FDT data for a root interrupt controller may have set up interrupt
+ * resource data indicating nexus as the parent and irq 0, or it may
+ * have nothing. We handle the latter by allowing a NULL res pointer
+ * when the INTR_CONTROLLER flag is set.
+ */
+ if (res == NULL) {
+#if defined(ARM_INTRNG)
+ if (flags & INTR_CONTROLLER) {
+ arm_setup_irqhandler(child,
+ filt, intr, arg, 0, flags, cookiep);
+ return (0);
+ }
+#endif
+ device_printf(child, "NULL resource pointer "
+ "in nexus_setup_intr\n");
+ return (EDOOFUS);
+ }
+
if ((rman_get_flags(res) & RF_SHAREABLE) == 0)
flags |= INTR_EXCL;
More information about the svn-src-projects
mailing list