History log of /src/sys/arch/amiga/dev/par.c |
Revision | | Date | Author | Comments |
1.41 |
| 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.40 |
| 25-Jul-2014 |
dholland | branches: 1.40.26; 1.40.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.39 |
| 16-Mar-2014 |
dholland | branches: 1.39.2; 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.38 |
| 27-Oct-2012 |
chs | branches: 1.38.2; split device_t/softc for all remaining drivers. replace "struct device *" with "device_t". use device_xname(), device_unit(), etc.
|
1.37 |
| 31-May-2009 |
phx | branches: 1.37.12; 1.37.22; Fixed format string from %x to %llx for dev_t.
|
1.36 |
| 17-Oct-2007 |
garbled | branches: 1.36.20; 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.35 |
| 09-Jul-2007 |
ad | branches: 1.35.10; Merge some of the less invasive changes from the vmlocking branch:
- kthread, callout, devsw API changes - select()/poll() improvements - miscellaneous MT safety improvements
|
1.34 |
| 04-Mar-2007 |
christos | branches: 1.34.2; 1.34.4; 1.34.10; Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
1.33 |
| 16-Feb-2007 |
ad | branches: 1.33.2; More spllowersoftclock() fallout.
|
1.32 |
| 26-Mar-2006 |
thorpej | Use device_unit().
|
1.31 |
| 11-Dec-2005 |
christos | branches: 1.31.4; 1.31.6; 1.31.8; 1.31.10; 1.31.12; merge ktrace-lwp.
|
1.30 |
| 07-Aug-2003 |
agc | branches: 1.30.16; Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22364, verified by myself.
|
1.29 |
| 23-Oct-2002 |
jdolecek | branches: 1.29.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.28 |
| 02-Oct-2002 |
thorpej | Use CFATTACH_DECL().
|
1.27 |
| 27-Sep-2002 |
thorpej | Declare all cfattach structures const.
|
1.26 |
| 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.25 |
| 28-Jan-2002 |
aymeric | branches: 1.25.8; add __KERNEL_RCSID as suggested by Luke Mewburn
|
1.24 |
| 26-Jan-2002 |
aymeric | - ANSIfy - remove some trailing spaces/tabs - minor style nits
|
1.23 |
| 27-Aug-2000 |
is | branches: 1.23.2; 1.23.4; 1.23.8; Replace one callout handler by using a timeout in tsleep(). 1.4.x version of it submitted by Ingolf Koch; translated to 1.5-ish by myself.
|
1.22 |
| 23-Apr-2000 |
mhitch | Long term bug finally reared its head: size of device softc was specified as sizeof(struct device) when amiga switched to new config, and recent additions of callout structures and a long missing struct device to the soft structure resulted in kernel panics when attempting to open the builtin serial port. The callout structure initialization was clearing the serial port softc data! Fixed by using sizeof(struct par_softc).
|
1.21 |
| 26-Mar-2000 |
frueauf | Add "struct device sc_dev;" to struct par_softc.
Reviewed by Ignatios Souvatzis.
|
1.20 |
| 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.19 |
| 16-Mar-2000 |
kleink | Kill more broken cf_unit bogons.
|
1.18 |
| 05-Aug-1999 |
thorpej | branches: 1.18.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.17 |
| 12-Jan-1998 |
thorpej | Adjust for changes to config.
|
1.16 |
| 23-Dec-1996 |
veego | Get rid of __BROKEN_INDIRECT_CONFIG.
|
1.15 |
| 13-Oct-1996 |
christos | backout previous kprintf change
|
1.14 |
| 10-Oct-1996 |
christos | printf -> kprintf, sprintf -> ksprintf
|
1.13 |
| 21-Apr-1996 |
veego | - Cleanup for -Wall and -Wstrict-prototypes - Added support for multiple floppy drives - CyberVision64: - has now a real console mode - another bugfix for boards with the new S3 chip - Ariadne: - fixed crashes with aeput (mbuf failure)
|
1.12 |
| 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.11 |
| 01-Dec-1994 |
chopps | bring up to current. change sun to sunos. handle changes in device open params and autoconf match function params.
|
1.10 |
| 26-Oct-1994 |
cgd | new RCS ID format.
|
1.9 |
| 26-Oct-1994 |
cgd | new RCS ID format.
|
1.8 |
| 31-May-1994 |
chopps | MIN/MAX->min/max
|
1.7 |
| 08-May-1994 |
chopps | resistance is futile, you will be assimilated. amiga goes: config.new *and* /sys/scsi. clock code coerced into a single .c file adding an accurate usec delay(). disklabel.c updated to DTRT, code to write RDB's to be added soon. sbic (old scsi) converted over to new scsi and config this covers about 90% of users. Other drivers soon.
|
1.6 |
| 13-Feb-1994 |
chopps | cleaned up include's relocated grf/* stuf to grfabs*.
|
1.5 |
| 11-Feb-1994 |
chopps | ioctl's always pass proc.
|
1.4 |
| 01-Feb-1994 |
chopps | SCSI re-org, and misc. cleanup of compiler warnings.
|
1.3 |
| 26-Jan-1994 |
mw | Integrate recent changes done to the amiga branch. Includes support for the '40. Support for more scsi controllers (zeus, magnum) Support for more tapes (in st.c) New custom chip console code integrated.
|
1.2 |
| 30-Oct-1993 |
mw | new tree for amiga, replacing the bogous previous one. SunOS support works for a lot of executables now (static and dynamic).
|
1.1 |
| 02-Sep-1993 |
mw | branches: 1.1.1; Initial revision
|
1.1.1.1 |
| 02-Sep-1993 |
mw | Update of arch/amiga tree, includes - realtime clock support for a2k and a3k - scsi drivers for a2091 and gvp-II controllers in a2k - working ethernet driver for a2065/ameristar lance-controllers
|
1.18.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.
I updated the amiga SCSI drivers, but completely untested yet (may not even compile)
|
1.23.8.4 |
| 11-Nov-2002 |
nathanw | Catch up to -current
|
1.23.8.3 |
| 18-Oct-2002 |
nathanw | Catch up to -current.
|
1.23.8.2 |
| 17-Sep-2002 |
nathanw | Catch up to -current.
|
1.23.8.1 |
| 28-Feb-2002 |
nathanw | Catch up to -current.
|
1.23.4.2 |
| 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.23.4.1 |
| 11-Feb-2002 |
jdolecek | Sync w/ -current.
|
1.23.2.1 |
| 10-Oct-2001 |
fvdl | Convert all remaining devices.
|
1.25.8.1 |
| 16-May-2002 |
gehenna | Add the character device switch.
|
1.29.6.4 |
| 21-Nov-2004 |
skrll | Adapt to branch.
|
1.29.6.3 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.29.6.2 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.29.6.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.30.16.3 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.30.16.2 |
| 26-Feb-2007 |
yamt | sync with head.
|
1.30.16.1 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.31.12.1 |
| 28-Mar-2006 |
tron | Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
|
1.31.10.1 |
| 19-Apr-2006 |
elad | sync with head - hopefully this will work
|
1.31.8.1 |
| 01-Apr-2006 |
yamt | sync with head.
|
1.31.6.1 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.31.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.33.2.1 |
| 12-Mar-2007 |
rmind | Sync with HEAD.
|
1.34.10.1 |
| 03-Oct-2007 |
garbled | Sync with HEAD
|
1.34.4.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.34.2.1 |
| 15-Jul-2007 |
ad | Sync with head.
|
1.35.10.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.36.20.1 |
| 20-Jun-2009 |
yamt | sync with head
|
1.37.22.2 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.37.22.1 |
| 20-Nov-2012 |
tls | Resync to 2012-11-19 00:00:00 UTC
|
1.37.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.37.12.1 |
| 30-Oct-2012 |
yamt | sync with head
|
1.38.2.1 |
| 18-May-2014 |
rmind | sync with head
|
1.39.2.1 |
| 10-Aug-2014 |
tls | Rebase.
|
1.40.28.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.40.26.1 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|