Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/mac68k/dev/mac68k5380.c
RevisionDateAuthorComments
 1.50  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.49  25-Oct-2013  martin branches: 1.49.28; 1.49.30;
Simplify
 1.48  06-Dec-2012  hauke branches: 1.48.2;
Remove the R1 syntactic sugar, since it collides with a #define in
<m68k/regs.h>, breaking the build.

The R1s serve to bring the buffer pointer to a 4 byte boundary, but
that should be clear from the context.
 1.47  27-Oct-2012  chs split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.46  17-Jul-2011  joerg branches: 1.46.2; 1.46.12;
Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.45  09-Jul-2011  mrg avoid inconsistent inline usage to appease gcc 4.5.
 1.44  24-Dec-2005  perry __asm__ -> __asm
__const__ -> const
__inline__ -> inline
__volatile__ -> volatile
 1.43  11-Dec-2005  christos merge ktrace-lwp.
 1.42  16-Jun-2005  jmc branches: 1.42.2;
Fixes for volatile problems
 1.41  15-Jan-2005  chs de-__P, remove register, ansify, b* -> mem*.
 1.40  15-Jul-2003  lukem __KERNEL_RCSID()
 1.39  18-Jun-2003  drochner branches: 1.39.2;
don't #include <sys/dkstat.h> where it is (appearently) unused
 1.38  02-Apr-2003  thorpej Use PAGE_SIZE rather than NBPG.
 1.37  27-Sep-2002  provos remove trailing \n in panic(). approved perry.
 1.36  14-Feb-2000  scottr branches: 1.36.8; 1.36.12;
Merge wscons work onto the main development branch.
 1.35  22-Dec-1998  scottr branches: 1.35.2; 1.35.10;
vm_offset_t -> {paddr_t, vaddr_t}
 1.34  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.33  11-Aug-1997  scottr Make #include directives consistent. All MD headers are of the form:

#include <mac68k/{dev,mac68k}/foo.h>
 1.32  29-Jun-1997  scottr branches: 1.32.2; 1.32.4;
Update for mac68k_buserr_addr -> m68k_fault_addr change.
 1.31  27-Apr-1997  briggs What was I thinking?
 1.30  15-Apr-1997  briggs Take a stab at making this more reliable.
 1.29  28-Feb-1997  scottr Convert to generalized VIA interrupt registration
 1.28  19-Dec-1996  scottr branches: 1.28.6;
Clean up a few bogons+typos introduced in the removal of the broken indirect
config code.
 1.27  13-Oct-1996  christos backout previous kprintf change
 1.26  11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.25  07-Jun-1996  briggs Fix a typo.
 1.24  25-May-1996  briggs Clean up the interrupt handling somewhat.
 1.23  05-May-1996  briggs branches: 1.23.4;
Prototype for -Wall -Wstrict-prototypes -Wmissing-prototypes -Wno-uninitialized
Also change the device probing scheme to use something a bit more rational.
A current side-effect is that nubus cards are double-mapped. I expect
to fix that shortly.
Also change splclock() to block everything but serial hardware interrupts.
 1.22  29-Mar-1996  briggs via.h -> machine/viareg.h.
 1.21  20-Mar-1996  scottr Fix a long-standing bug uncovered by the new device attachment
model. Thanks to Jason Thorpe for the fix (fixed PR 2235).
 1.20  17-Mar-1996  thorpej New device attachment scheme:

- split softc size and match/attach out from cfdriver into
a new struct cfattach.

- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
 1.19  19-Feb-1996  briggs Update to latest Atari driver, but with some local modifications.
 1.18  03-Feb-1996  briggs Move debugging defines, etc. into mac68k5380.c and use them instead of
something similar but different. Make a few cosmetic changes.
 1.17  24-Jan-1996  briggs Patch a few of the holes in the machine-dependent part of this driver.
Sync the m.i. part with the Atari.
 1.16  11-Jan-1996  briggs Keep two states for pdma debugging. Turn debugging back on. Sigh.
 1.15  01-Nov-1995  briggs Fixup error/debugging message.
 1.14  01-Oct-1995  briggs Finally get this right... Final fix from Paul Goyette paul@pgoyette.bdt.com
 1.13  30-Sep-1995  briggs Yet another error in the (next-to) last changes.
 1.12  30-Sep-1995  briggs Fix stupid error in one of my last changes here.
 1.11  27-Sep-1995  briggs Bullet-proof a little.
Make some more pdma code conditional on USE_PDMA.
Handle transfers of size > MIN_PHYS.
 1.10  23-Sep-1995  briggs Much improved pdma transfers.
Still not nearly as fast as FWB's drivers under the MacOS.
Uses the "blind" transfer method instead of polled pdma.
 1.9  16-Sep-1995  briggs Only use PIO instead of PDMA if DRIVER_NOINT.
 1.8  16-Sep-1995  briggs Rename scsi_main_irq() to pdma_ready().
Missed a few ATNs in last patch. (pointed out by Leo).
Raise timeout from 100 to 1000. From Leo.
 1.7  12-Sep-1995  briggs Update for Leo's changes.
 1.6  04-Sep-1995  briggs Get softc as parameter in interrupt function, using new changes from
via.[ch]
 1.5  03-Sep-1995  briggs Make a local copy of the atari m.i. scsi driver sources for the time
being. Some people aren't supping arch/atari and this allows those
people to get the sources.
 1.4  02-Sep-1995  briggs Optimize this some. Still seems slower than it ought to be.
Register interrupt functions with via.c.
Clean up somewhat. Turn off DEBUG.
 1.3  02-Sep-1995  briggs Rearrange a bit.
 1.2  02-Sep-1995  briggs DTRT. This should be considered the base version of the file.
 1.1  01-Sep-1995  briggs A first pass at a scsi driver based on the Atari ncr5380{reg.h,.c} code.
 1.23.4.2  07-Jun-1996  briggs Bring in fix for a typo from -current.
 1.23.4.1  01-Jun-1996  scottr Pull up version 1.24 from the main branch (fix interrupt handling)
 1.28.6.1  12-Mar-1997  is Merge in changes from The Trunk, partially just reimplementing newarp.
 1.32.4.2  27-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.32.4.1  23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.32.2.2  14-Aug-1997  bouyer Sync with trunk.
 1.32.2.1  01-Jul-1997  bouyer Updates for new scsipi subsystem. Actally known to work on i386 and sparc.
 1.35.10.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.35.2.1  14-Feb-2000  scottr Make this compile (we lost cpu.h somewhere along the line).
 1.36.12.1  18-Oct-2002  nathanw Catch up to -current.
 1.36.8.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.39.2.5  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.39.2.4  17-Jan-2005  skrll Sync with HEAD.
 1.39.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.39.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.39.2.1  03-Aug-2004  skrll Sync with HEAD
 1.42.2.1  21-Jun-2006  yamt sync with head.
 1.46.12.3  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.46.12.2  25-Feb-2013  tls resync with head
 1.46.12.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.46.2.3  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.46.2.2  16-Jan-2013  yamt sync with (a bit old) head
 1.46.2.1  30-Oct-2012  yamt sync with head
 1.48.2.1  18-May-2014  rmind sync with head
 1.49.30.1  10-Jun-2019  christos Sync with HEAD
 1.49.28.1  06-Sep-2018  pgoyette Sync with HEAD

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

RSS XML Feed