Home | History | Annotate | Download | only in dev
History log of /src/sys/arch/x68k/dev/par.c
RevisionDateAuthorComments
 1.45  07-Jan-2024  isaki TAB/space/indent cleanup.
 1.44  26-May-2022  tsutsui Explicitly include "ioconf.h" for struct cfdriver.
 1.43  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.42  25-Jul-2014  dholland branches: 1.42.26; 1.42.28;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.41  26-Mar-2014  christos branches: 1.41.2;
kill sprintf, fix unused.
 1.40  16-Mar-2014  dholland Change (mostly mechanically) every cdevsw/bdevsw I can find to use
designated initializers.

I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
 1.39  13-Oct-2012  tsutsui branches: 1.39.2;
Normalize autoconf(9) function arg names (parent, self, and aux)
for clarification. from chs@.
 1.38  09-Jan-2010  isaki branches: 1.38.12; 1.38.22;
Make compile with DEBUG.
 1.37  25-Jun-2008  isaki Split device_t/softc. Use aprint*() and device_xname().
 1.36  08-Jun-2008  tsutsui branches: 1.36.2;
Use device_private() and device_lookup_private() to get softc.
 1.35  17-Oct-2007  garbled branches: 1.35.16; 1.35.18; 1.35.20; 1.35.22;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.34  14-Jul-2007  isaki branches: 1.34.10;
Make it compilable after the merge of some vmlocking branch.
OK'ed by ad@.
 1.33  14-Jul-2007  ad - Restore com.c 1.45, par.c 1.31. They were trashed due to file system
corruption on my machine.
- Adjust to match callout_init signature change.
 1.32  09-Jul-2007  ad Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.31  12-May-2007  isaki Clean up white spaces and tabs.
 1.30  11-Mar-2007  isaki branches: 1.30.2; 1.30.8;
Include appropriate header file.
 1.29  11-Mar-2007  isaki white space, indent and KNF.
 1.28  11-Mar-2007  isaki Remove an extra white space.
 1.27  04-Mar-2007  christos branches: 1.27.2;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.26  16-Feb-2007  ad branches: 1.26.2;
More spllowersoftclock() fallout.
 1.25  28-Mar-2006  thorpej Use device_unit().
 1.24  11-Dec-2005  christos branches: 1.24.4; 1.24.6; 1.24.8; 1.24.10; 1.24.12;
merge ktrace-lwp.
 1.23  18-Jan-2005  chs branches: 1.23.8;
de-__P, remove register, ansify.
 1.22  13-Dec-2004  chs branches: 1.22.2;
for drivers that support only one instance, use a global variable to ensure
that only one instance is configured rather than requiring that its
unit number be zero.
 1.21  01-Nov-2003  jdolecek shutup one bogus -Wunitialized warning, and fix one correct

XXX parrw() routine looks like not actually correct for transfers
XXX larger than sc_burst - someone with the hardware should check & fix this
 1.20  01-Nov-2003  jdolecek drop register qualifiers
 1.19  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.18  15-Jul-2003  lukem rcsid
 1.17  23-Oct-2002  jdolecek branches: 1.17.6;
merge kqueue branch into -current

kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
 1.16  02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.15  01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.14  27-Sep-2002  thorpej Declare all cfattach structures const.
 1.13  06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.12  11-Jun-2000  minoura branches: 1.12.4; 1.12.6; 1.12.10; 1.12.18;
G/C of unused interrupt stubs, and other cleanups.
 1.11  27-Mar-2000  minoura branches: 1.11.2;
Move par under intio.
 1.10  23-Mar-2000  thorpej New callout mechanism with two major improvements over the old
timeout()/untimeout() API:
- Clients supply callout handle storage, thus eliminating problems of
resource allocation.
- Insertion and removal of callouts is constant time, important as
this facility is used quite a lot in the kernel.

The old timeout()/untimeout() API has been removed from the kernel.
 1.9  05-Aug-1999  thorpej branches: 1.9.2;
Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.
 1.8  05-May-1999  minoura Shut up gcc -Wall.
 1.7  07-Aug-1998  minoura branches: 1.7.10;
Moved parioctl.h to the system header directory.
 1.6  12-Jan-1998  thorpej Update for changes to config.
 1.5  12-Oct-1997  oki Added prototype.
 1.4  13-Oct-1996  christos branches: 1.4.10;
backout previous kprintf change
 1.3  11-Oct-1996  christos printf -> kprintf, sprintf -> ksprintf
 1.2  21-May-1996  oki Some cleanup.
- Add missing return-type of function.
- Add missing prototype.
- some gcc -Wall printf warning.
 1.1  05-May-1996  oki branches: 1.1.1;
Initial revision
 1.1.1.1  05-May-1996  oki NetBSD/x68k, by Masaru Oki.
 1.4.10.1  14-Oct-1997  thorpej Update marc-pcmcia branch from trunk.
 1.7.10.1  21-Jun-1999  thorpej Sync w/ -current.
 1.9.2.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.11.2.1  22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.12.18.1  17-May-2002  gehenna Add device switch.
 1.12.10.3  11-Nov-2002  nathanw Catch up to -current
 1.12.10.2  18-Oct-2002  nathanw Catch up to -current.
 1.12.10.1  17-Sep-2002  nathanw Catch up to -current.
 1.12.6.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.12.4.1  10-Oct-2001  fvdl Convert all remaining devices.
 1.17.6.6  04-Feb-2005  skrll Adapt to branch.
 1.17.6.5  24-Jan-2005  skrll Sync with HEAD.
 1.17.6.4  18-Dec-2004  skrll Sync with HEAD.
 1.17.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.17.6.1  03-Aug-2004  skrll Sync with HEAD
 1.22.2.1  29-Apr-2005  kent sync with -current
 1.23.8.3  03-Sep-2007  yamt sync with head.
 1.23.8.2  26-Feb-2007  yamt sync with head.
 1.23.8.1  21-Jun-2006  yamt sync with head.
 1.24.12.1  31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.24.10.1  19-Apr-2006  elad sync with head - hopefully this will work
 1.24.8.1  01-Apr-2006  yamt sync with head.
 1.24.6.1  22-Apr-2006  simonb Sync with head.
 1.24.4.1  09-Sep-2006  rpaulo sync with head
 1.26.2.2  17-May-2007  yamt sync with head.
 1.26.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.27.2.3  15-Jul-2007  ad Sync with head.
 1.27.2.2  27-May-2007  ad Sync with head.
 1.27.2.1  13-Mar-2007  ad Sync with head.
 1.30.8.2  03-Oct-2007  garbled Sync with HEAD
 1.30.8.1  22-May-2007  matt Update to HEAD.
 1.30.2.1  11-Jul-2007  mjf Sync with head.
 1.34.10.1  06-Nov-2007  matt sync with HEAD
 1.35.22.2  18-Sep-2008  wrstuden Sync with wrstuden-revivesa-base-2.
 1.35.22.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.35.20.2  11-Mar-2010  yamt sync with head
 1.35.20.1  04-May-2009  yamt sync with head.
 1.35.18.1  17-Jun-2008  yamt sync with head.
 1.35.16.1  29-Jun-2008  mjf Sync with HEAD.
 1.36.2.1  27-Jun-2008  simonb Sync with head.
 1.38.22.2  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.38.22.1  20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.38.12.2  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.38.12.1  30-Oct-2012  yamt sync with head
 1.39.2.1  18-May-2014  rmind sync with head
 1.41.2.1  10-Aug-2014  tls Rebase.
 1.42.28.1  10-Jun-2019  christos Sync with HEAD
 1.42.26.1  06-Sep-2018  pgoyette Sync with HEAD

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

RSS XML Feed