Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/sun3/dev/dma.c
RevisionDateAuthorComments
 1.25  20-Dec-2024  tsutsui Remove trailing whitespace.
 1.24  20-Dec-2023  thorpej Remove unnecessary <sys/malloc.h>.
 1.23  03-Sep-2018  riastradh Rename min/max -> uimin/uimax for better honesty.

These functions are defined on unsigned int. The generic name
min/max should not silently truncate to 32 bits on 64-bit systems.
This is purely a name change -- no functional change intended.

HOWEVER! Some subsystems have

#define min(a, b) ((a) < (b) ? (a) : (b))
#define max(a, b) ((a) > (b) ? (a) : (b))

even though our standard name for that is MIN/MAX. Although these
may invite multiple evaluation bugs, these do _not_ cause integer
truncation.

To avoid `fixing' these cases, I first changed the name in libkern,
and then compile-tested every file where min/max occurred in order to
confirm that it failed -- and thus confirm that nothing shadowed
min/max -- before changing it.

I have left a handful of bootloaders that are too annoying to
compile-test, and some dead code:

cobalt ews4800mips hp300 hppa ia64 luna68k vax
acorn32/if_ie.c (not included in any kernels)
macppc/if_gm.c (superseded by gem(4))

It should be easy to fix the fallout once identified -- this way of
doing things fails safe, and the goal here, after all, is to _avoid_
silent integer truncations, not introduce them.

Maybe one day we can reintroduce min/max as type-generic things that
never silently truncate. But we should avoid doing that for a while,
so that existing code has a chance to be detected by the compiler for
conversion to uimin/uimax without changing the semantics until we can
properly audit it all. (Who knows, maybe in some cases integer
truncation is actually intended!)
 1.22  13-Oct-2012  tsutsui branches: 1.22.36; 1.22.38;
Fix botch on device_t/softc split in #if 0'ed debug printf. from chs@
 1.21  16-Dec-2008  christos branches: 1.21.14; 1.21.24;
replace bitmask_snprintf(9) with snprintb(3)
 1.20  13-Apr-2008  tsutsui branches: 1.20.4; 1.20.12;
Split device_t/softc for MI ncr53c9x and some related devices,
with various cleanup.
 1.19  04-Mar-2007  tsutsui branches: 1.19.40;
Add (char *) casts on pointer arith.
 1.18  04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.17  03-Feb-2007  tsutsui branches: 1.17.2;
Make esp and its dma on 3/80 use bus_dma(9).

XXX: Maybe we should consider to use MI sys/dev/ic/lsi64854.c.
 1.16  11-Dec-2005  christos branches: 1.16.20;
merge ktrace-lwp.
 1.15  22-Jan-2005  chs branches: 1.15.8;
de-__P, remove register, ansify, b* -> mem*, u_int*_t -> uint*_t.
 1.14  15-Jul-2003  lukem branches: 1.14.8;
__KERNEL_RCSID()
 1.13  02-Oct-2002  thorpej branches: 1.13.6;
Add trailing ; to CFATTACH_DECL.
 1.12  01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.11  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.10  08-Apr-1999  gwr branches: 1.10.2; 1.10.22; 1.10.26;
Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.9  13-Dec-1998  kleink Printf format warning cleanup.
 1.8  05-Feb-1998  gwr Merge arch/sun3x into arch/sun3
 1.7  07-Oct-1997  gwr branches: 1.7.4;
fix warnings
 1.6  27-Aug-1997  bouyer Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
 1.5  26-Jun-1997  jeremy branches: 1.5.2; 1.5.4;
Duplicate changes recently made to the SPARC version of this file:
Do not print warnings if selection of a target via DMA was interrupted
by another target.
 1.4  20-Mar-1997  gwr Now using dev/ic/ncr53c9x.c
 1.3  15-Mar-1997  is New ARP system, supports IPv4 over any hardware link.

Some of the stuff (e.g., rarpd, bootpd, dhcpd etc., libsa) still will
only support Ethernet. Tcpdump itself should be ok, but libpcap needs
lot of work.

For the detailed change history, look at the commit log entries for
the is-newarp branch.
 1.2  24-Feb-1997  gwr branches: 1.2.2;
No need for dma_cd, so move it into the #if 0 section too.
 1.1  24-Feb-1997  jeremy branches: 1.1.1;
Initial revision
 1.1.1.1  24-Feb-1997  jeremy Initial import from SPARC port.
 1.2.2.1  12-Mar-1997  is Merge in Changes from The Trunk.
 1.5.4.2  14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.4.1  27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.5.2.1  01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.7.4.1  27-Jan-1998  gwr Merged Sun3 and Sun3X kernel sources.
 1.10.26.1  18-Oct-2002  nathanw Catch up to -current.
 1.10.22.1  10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.10.2.2  08-Apr-1999  gwr Make "dma" a real device so it can attach before esp.
Also pull in some changes from the sparc version.
 1.10.2.1  08-Apr-1999  gwr file dma.c was added on branch netbsd-1-4 on 1999-04-08 04:46:42 +0000
 1.13.6.4  24-Jan-2005  skrll Sync with HEAD.
 1.13.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.13.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.13.6.1  03-Aug-2004  skrll Sync with HEAD
 1.14.8.1  29-Apr-2005  kent sync with -current
 1.15.8.2  03-Sep-2007  yamt sync with head.
 1.15.8.1  26-Feb-2007  yamt sync with head.
 1.16.20.1  09-Feb-2007  ad Sync with HEAD.
 1.17.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.19.40.2  17-Jan-2009  mjf Sync with HEAD.
 1.19.40.1  02-Jun-2008  mjf Sync with HEAD.
 1.20.12.1  19-Jan-2009  skrll Sync with HEAD.
 1.20.4.1  04-May-2009  yamt sync with head.
 1.21.24.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.21.14.1  30-Oct-2012  yamt sync with head
 1.22.38.1  10-Jun-2019  christos Sync with HEAD
 1.22.36.1  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)

RSS XML Feed