svn commit: r358322 - in head/sys: contrib/ncsw/inc contrib/ncsw/user/env dev/dpaa

Brandon Bergren bdragon at FreeBSD.org
Tue Feb 25 22:03:31 UTC 2020


Author: bdragon
Date: Tue Feb 25 22:03:30 2020
New Revision: 358322
URL: https://svnweb.freebsd.org/changeset/base/358322

Log:
  [PowerPC] [Book-E] Remove obsolete interrupt binding workaround
  
  Remove an old workaround that is no longer necessary since rS343824.
  
  There used to be a problem with FMan interrupts firing on multiple CPUS
  at the same time.
  
  This ended up being due to multicast interrupts being unsupported in the
  Freescale PIC (so instead of using a selection algorithm, it would do some
  unspecified action, such as interrupting multiple cpus at random.)
  
  Reviewed by:	jhibbits
  Sponsored by:	Tag1 Consulting, Inc.
  Differential Revision:	https://reviews.freebsd.org/D23829

Modified:
  head/sys/contrib/ncsw/inc/xx_ext.h
  head/sys/contrib/ncsw/user/env/xx.c
  head/sys/dev/dpaa/fman.c

Modified: head/sys/contrib/ncsw/inc/xx_ext.h
==============================================================================
--- head/sys/contrib/ncsw/inc/xx_ext.h	Tue Feb 25 21:02:52 2020	(r358321)
+++ head/sys/contrib/ncsw/inc/xx_ext.h	Tue Feb 25 22:03:30 2020	(r358322)
@@ -794,5 +794,4 @@ t_Error XX_IpcSendMessage(t_Handle           h_Session
 
 
 void XX_PortalSetInfo(device_t dev);
-void XX_FmanFixIntr(int irq);
 #endif /* __XX_EXT_H */

Modified: head/sys/contrib/ncsw/user/env/xx.c
==============================================================================
--- head/sys/contrib/ncsw/user/env/xx.c	Tue Feb 25 21:02:52 2020	(r358321)
+++ head/sys/contrib/ncsw/user/env/xx.c	Tue Feb 25 22:03:30 2020	(r358322)
@@ -95,7 +95,6 @@ MTX_SYSINIT(XX_MallocTrackLockInit, &XX_MallocTrackLoc
 
 /* Interrupt info */
 #define XX_INTR_FLAG_PREALLOCATED	(1 << 0)
-#define XX_INTR_FLAG_FMAN_FIX		(1 << 1)
 
 struct XX_IntrInfo {
 	driver_intr_t	*handler;
@@ -295,23 +294,6 @@ XX_IsPortalIntr(uintptr_t irq)
 	return (0);
 }
 
-void
-XX_FmanFixIntr(int irq)
-{
-
-	XX_IntrInfo[irq].flags |= XX_INTR_FLAG_FMAN_FIX;
-}
-
-static bool
-XX_FmanNeedsIntrFix(int irq)
-{
-
-	if (XX_IntrInfo[irq].flags & XX_INTR_FLAG_FMAN_FIX)
-		return (1);
-
-	return (0);
-}
-
 static void
 XX_Dispatch(void *arg)
 {
@@ -398,21 +380,7 @@ XX_SetIntr(uintptr_t irq, t_Isr *f_Isr, t_Handle handl
 
 	err = bus_setup_intr(dev, r, flags, NULL, f_Isr, handle,
 		    &XX_IntrInfo[irq].cookie);
-	if (err)
-		goto finish;
 
-	/*
-	 * XXX: Bind FMan IRQ to CPU0. Current interrupt subsystem directs each
-	 * interrupt to all CPUs. Race between an interrupt assertion and
-	 * masking may occur and interrupt handler may be called multiple times
-	 * per one interrupt. FMan doesn't support such a situation. Workaround
-	 * is to bind FMan interrupt to one CPU0 only.
-	 */
-#ifdef SMP
-	if (XX_FmanNeedsIntrFix(irq))
-		err = powerpc_bind_intr(irq, 0);
-#endif
-finish:
 	return (err);
 }
 

Modified: head/sys/dev/dpaa/fman.c
==============================================================================
--- head/sys/dev/dpaa/fman.c	Tue Feb 25 21:02:52 2020	(r358321)
+++ head/sys/dev/dpaa/fman.c	Tue Feb 25 22:03:30 2020	(r358322)
@@ -455,13 +455,6 @@ fman_attach(device_t dev)
 		goto err;
 	}
 
-	/*
-	 * XXX: Fix FMan interrupt. This is workaround for the issue with
-	 * interrupts directed to multiple CPUs by the interrupts subsystem.
-	 * Workaround is to bind the interrupt to only one CPU0.
-	 */
-	XX_FmanFixIntr(rman_get_start(sc->irq_res));
-
 	sc->err_irq_rid = 1;
 	sc->err_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ,
 	    &sc->err_irq_rid, RF_ACTIVE | RF_SHAREABLE);


More information about the svn-src-all mailing list