Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2006 19:26:24 GMT
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 95515 for review
Message-ID:  <200604181926.k3IJQOCf025367@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95515

Change 95515 by marcel@marcel_nfs on 2006/04/18 19:25:40

	Keep a bitmask of ports that use the serdev I/F. We use that
	in the interrupt handler to quickly assess pending interrupt
	status for those ports and service them in priority order.
	The bitmask is u_long on purpose. It allows for 32 ports on
	ILP32 machines and 64 ports on LP64 machines. The reason is
	to avoid 64-bit operations on ILP32 machines and given that
	puc(4) used to hardcode a limit of 16 ports before and PCI
	bus width is still mostly 32-bit in most cases so that
	interrupt latch registers (ILRs) are typically 32-bit wide
	it is not expected to be a problem on ILP32 machines, let
	alone LP64 machines. This may need to be revisited when
	cards with more than 32 ports become common (unlikely) and
	may need a revamp if boards with more than 64 ports need
	to be handled by puc(4).

Affected files ...

.. //depot/projects/uart/dev/puc/puc.c#27 edit
.. //depot/projects/uart/dev/puc/puc_bfe.h#1 add

Differences ...

==== //depot/projects/uart/dev/puc/puc.c#27 (text+ko) ====

@@ -494,8 +494,10 @@
 		i = 0, isrc = SER_INT_OVERRUN;
 		while (i < PUC_ISRCCNT) {
 			port->p_ihsrc[i] = SERDEV_IHAND(originator, isrc);
-			if (port->p_ihsrc[i] != NULL)
+			if (port->p_ihsrc[i] != NULL) {
+				sc->sc_serdevs |= 1UL << (port->p_nr - 1);
 				port->p_ih = NULL;
+			}
 			i++, isrc <<= 1;
 		}
 	}



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