Get rid of something that's been "XXX: Temporarily required" for more
years than I care to admit. (Kernel config files can generate the
required macro signals now.)
Re-factor delay() on m68k.
We've settled on a blend of the amiga version and the mvme68k version.
Specifically, the amiga flavor takes a usec arg and applies the scaling
factor in delay() itself, whereas the the mvme68k flavor scaled the argument
in a macro before calling _delay() to do the work. Presumably this was to
take advantage of constant-folding, because the argument to delay() is
often a constant.
We instead scale inside delay() because, hey, it's delay() executing a
couple of additional instructions isn't going to kill us. Also, it allows
for better diagnostic checking of delay values without exposing that in
the ABI.
We picked the 68060-friendly scaling factor of 1024 (shift-by-10) rather
than 256 (shift-by-8). Macros to estimate the delay_divisor for a given
CPU type (20/30, 40, 60) using the correct scaling factor are provided to
make everything easier, as is a "weighting" macro that can be used when
calibrating the delay_divisor against a known timing source (explained in
[5 lines not shown]
driver(9): fix cdevsw/bdevsw examples
Instead of a chimera that fuses structure definition and variable
definition with an initializer (syntactically incorrect), provide an
example of an actual variable definition with an initializer.
lint: do not warn about lossy cast from floating to integer
The check is intended to catch unintentional loss of accuracy. Having an
explicit cast in the code makes the intention clear enough.
From Rui-Xiang Guo in private email
According to the c906 user manual,
it uses sync.s to ensure completion of clean operations.
Change the fence rw,rw to sync.s in the thead cache operations.
Re-factor the trap description strings and provide a common function to
get said string for whoever might need it (a call to panic, DDB, etc.).
Remove all of the code that handles T_SSIR; it hasn't been used for
many years now.
Clean up / re-factor trace and trap15:
- Everyone now gets a shared implementatio of trace and trap15 trap
handlers, largely based on the sun2/sun3 versions.
- Have a single copy of trap_kdebug() that calls KGDB, DDB, and a
machine-specific fallback hook (to accommodate the sun2/sun3
"give PROM a chance").
- The new shared trap_kdebug() is slightly different in that it takes
the trapframe argument by reference rather than by value, making it
easier to use as the back-end of ...
- ... oh hey look, a new shared straytrap() that also invokes trap_kdebug().
vfs_attach: reject file system with non-unique fstype
while currently our fstype values are still unique, given the poor
hash function used by makefstype [1], it isn't too unlikely for a future
or out-of-tree file system to have a conflicting value. it's safer
to reject it explicitly. note that, we can't lightly change the hash
function because it's exposed as a part of nfs file handles.
[1] for example, makefstype("qa") == makefstype("uq") == 0x1a5.
the current list of fstype values used by the in-tree file systems:
0000064b zfs
000006a6 udf
0000070b nfs
0000072b lfs
0000073b mfs
0000076b hfs
0000078b ffs
[28 lines not shown]