Home | History | Annotate | only in /src/sys/dev/hpc
History log of /src/sys/dev/hpc
RevisionDateAuthorComments
 1.3 11-Apr-2001  jdolecek Put back all header files defining ioctls
 1.2 11-Apr-2001  jdolecek Only install headers which are actually used by our userland. This
saves about 2.2MB under /usr/include/dev/. Discussed on tech-kern@
recently.

I HOPE to get the list right. The headers I left in are ones
used for MI tools and those whose usage I discovered by grep over tree sources.
Feel free to put needed includes back in if you encounter anything which
should not be removed from lists.
 1.1 23-Feb-2001  uch branches: 1.1.2; 1.1.4;
I forgot to move Makefile.
 1.1.4.3 21-Apr-2001  bouyer Sync with HEAD
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 23-Feb-2001  bouyer file Makefile was added on branch thorpej_scsipi on 2001-03-12 13:30:02 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.1 03-Apr-2009  uwe branches: 1.1.2; 1.1.4; 1.1.6;
Attachment glue to attach apm0 at hpcapm0.
Tested on Jornada 690.
 1.1.6.2 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.1.6.1 03-Apr-2009  jym file apm_apmdevif.c was added on branch jym-xensuspend on 2009-05-13 17:19:20 +0000
 1.1.4.2 04-May-2009  yamt sync with head.
 1.1.4.1 03-Apr-2009  yamt file apm_apmdevif.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:38 +0000
 1.1.2.2 28-Apr-2009  skrll Sync with HEAD.
 1.1.2.1 03-Apr-2009  skrll file apm_apmdevif.c was added on branch nick-hppapmap on 2009-04-28 07:35:25 +0000
 1.14 17-Jul-2011  joerg 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.13 25-Dec-2007  perry Convert many of the uses of __attribute__ to equivalent
__packed, __unused and __dead macros from cdefs.h
 1.12 19-Oct-2007  ad branches: 1.12.2; 1.12.4; 1.12.8;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.11 31-Aug-2006  matt branches: 1.11.12; 1.11.26; 1.11.28; 1.11.32;
Appease GCC4 by making /* NOTREACHED */ code return 0.
 1.10 11-Dec-2005  christos branches: 1.10.4; 1.10.8;
merge ktrace-lwp.
 1.9 02-Jun-2005  uwe branches: 1.9.2;
Constify.
 1.8 27-Feb-2005  perry nuke trailing whitespace
 1.7 22-Oct-2003  agc branches: 1.7.8; 1.7.10;
Don't use NULL when an integer is needed.
 1.6 06-Sep-2002  gehenna branches: 1.6.6;
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.5 02-Jan-2002  uch branches: 1.5.8;
when bootinfo has no framebuffer information, don't attach bicons.
 1.4 13-Nov-2001  lukem add RCSID
 1.3 15-Sep-2001  uch remove unused font_clB8x8_data[].
 1.2 09-Feb-2001  uch branches: 1.2.2; 1.2.4; 1.2.6; 1.2.8;
I forgot to initialize bicons for hpcmips.
 1.1 09-Feb-2001  uch add hpcmips/hpcsh common device directory
put bicons. (builtin console driver that don't require actual device driver)
 1.2.8.1 01-Oct-2001  fvdl Catch up with -current.
 1.2.6.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.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.5 17-Sep-2002  nathanw Catch up to -current.
 1.2.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.3 11-Jan-2002  nathanw More catchup.
 1.2.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.2.4.1 21-Sep-2001  nathanw Catch up to -current.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 09-Feb-2001  bouyer file bicons.c was added on branch thorpej_scsipi on 2001-02-11 19:15:21 +0000
 1.5.8.1 16-May-2002  gehenna Use devsw API instead of accessing to devsw table.
 1.6.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.6.6.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.6.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.6.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.6.6.1 03-Aug-2004  skrll Sync with HEAD
 1.7.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.8.1 29-Apr-2005  kent sync with -current
 1.9.2.3 21-Jan-2008  yamt sync with head
 1.9.2.2 27-Oct-2007  yamt sync with head.
 1.9.2.1 30-Dec-2006  yamt sync with head.
 1.10.8.1 03-Sep-2006  yamt sync with head.
 1.10.4.1 09-Sep-2006  rpaulo sync with head
 1.11.32.1 25-Oct-2007  bouyer Sync with HEAD.
 1.11.28.2 09-Jan-2008  matt sync with HEAD
 1.11.28.1 06-Nov-2007  matt sync with HEAD
 1.11.26.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.11.12.1 23-Oct-2007  ad Sync with head.
 1.12.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.12.4.1 26-Dec-2007  ad Sync with head.
 1.12.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.3 02-Jan-2002  uch when bootinfo has no framebuffer information, don't attach bicons.
 1.2 09-Feb-2001  uch branches: 1.2.2; 1.2.4; 1.2.6;
I forgot to initialize bicons for hpcmips.
 1.1 09-Feb-2001  uch add hpcmips/hpcsh common device directory
put bicons. (builtin console driver that don't require actual device driver)
 1.2.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.2 28-Feb-2002  nathanw Catch up to -current.
 1.2.4.1 11-Jan-2002  nathanw More catchup.
 1.2.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.2.2.1 09-Feb-2001  bouyer file bicons.h was added on branch thorpej_scsipi on 2001-02-11 19:15:21 +0000
 1.23 20-Aug-2015  christos include "ioconf.h" to get the 'void <driver>attach(int count);' prototype.
 1.22 25-Jul-2014  dholland branches: 1.22.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.21 16-Mar-2014  dholland branches: 1.21.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.20 19-Nov-2007  ad branches: 1.20.52; 1.20.62; 1.20.68;
- Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
 1.19 18-Oct-2007  joerg branches: 1.19.2;
Initialise the callbacks for tty.t_rstrt_ch in ttymalloc
as all drivers but Sun/SPARC's kd.c use the same arguments.
Separate callout_reset into callout_schedule and the initial
callout_setfunc using that.
 1.18 04-Mar-2007  christos branches: 1.18.2; 1.18.14; 1.18.16; 1.18.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.17 01-Oct-2006  elad branches: 1.17.4;
Adapt MD code to KAUTH_DEVICE_TTY_OPEN, batch #2 from Matt Fleming, thanks!

Also, add forgotten splx() calls in some places.
 1.16 21-Jul-2006  ad branches: 1.16.4; 1.16.6;
- Use the LWP cached credentials where sane.
- Minor cosmetic changes.
 1.15 15-May-2006  yamt - include kauth.h for kauth_authorize_generic.
- whitespace.
 1.14 14-May-2006  elad integrate kauth.
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
merge ktrace-lwp.
 1.12 27-Nov-2005  thorpej Overhaul how TTY line disciplines are handled:
- Replace references to linesw[0] with a ttyldisc_default() function
that returns the default ("termios") line discipline.
- The linesw[] array is gone, replaced by a linked list.
- ttyldisc_add() and ttyldisc_remove() have been replaced by
ttyldisc_attach() and ttyldisc_detach().
- Things that provide line disciplines are now responsible for
registering those disciplines with the system. The linesw
structures are no longer declared in tty_conf.c
- Line disciplines are now refcounted; a lookup causes a reference to
be held. ttyldisc_release() releases the reference. Attempts to
detach an in-use line discipline result in EBUSY.
- Fix function signature lossage in if_sl.c, if_strip.c, and tty_tb.c
that was masked by the old tty_conf.c
- tty_init() is no longer necessary; delete it and its call from main().
 1.11 06-Sep-2005  kleink branches: 1.11.6;
Change the driver open function's conditional for overriding exclusive tty
use from checking the proc's uid to suser(9), and account for the use of
privileges. Noted by David Holland in PR kern/31126.
 1.10 07-Aug-2003  agc branches: 1.10.16;
Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22364, verified by myself.
 1.9 29-Jun-2003  fvdl branches: 1.9.2;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.8 29-Jun-2003  ichiro struct proc * -> struct lwp *
 1.7 23-Oct-2002  jdolecek 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.6 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.5 17-Mar-2002  atatat branches: 1.5.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.4 02-Jan-2002  uch when bootinfo has no framebuffer information, don't attach bicons.
 1.3 13-Nov-2001  lukem add RCSID
 1.2 02-May-2001  scw branches: 1.2.2; 1.2.4;
Add `l_poll' to `struct linesw' and provide an xxxpoll() entry point
in each tty driver to indirect through it.

This allows tty line-disciplines to handle poll(2) system calls.
 1.1 09-Feb-2001  uch branches: 1.1.2; 1.1.4;
add hpcmips/hpcsh common device directory
put bicons. (builtin console driver that don't require actual device driver)
 1.1.4.7 11-Nov-2002  nathanw Catch up to -current
 1.1.4.6 17-Sep-2002  nathanw Catch up to -current.
 1.1.4.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.4.4 28-Feb-2002  nathanw Catch up to -current.
 1.1.4.3 11-Jan-2002  nathanw More catchup.
 1.1.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 09-Feb-2001  bouyer file biconsdev.c was added on branch thorpej_scsipi on 2001-02-11 19:15:21 +0000
 1.2.4.2 13-Oct-2001  fvdl Revert the t_dev -> t_devvp change in struct tty. The way that tty
structs are currently used (especially by console ttys) aren't
ready for it, and this will require quite a few changes.
 1.2.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.2.2.3 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.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.1 16-May-2002  gehenna Add the character device switch.
Replace the direct-access to devsw table with calling devsw API.
 1.9.2.6 11-Dec-2005  christos Sync with head.
 1.9.2.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.9.2.4 24-Jan-2005  skrll Adapt to branch.
 1.9.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.9.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.9.2.1 03-Aug-2004  skrll Sync with HEAD
 1.10.16.5 07-Dec-2007  yamt sync with head
 1.10.16.4 27-Oct-2007  yamt sync with head.
 1.10.16.3 03-Sep-2007  yamt sync with head.
 1.10.16.2 30-Dec-2006  yamt sync with head.
 1.10.16.1 21-Jun-2006  yamt sync with head.
 1.11.6.1 29-Nov-2005  yamt sync with head.
 1.13.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.13.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.13.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.13.8.2 11-Aug-2006  yamt sync with head
 1.13.8.1 24-May-2006  yamt sync with head.
 1.13.6.1 01-Jun-2006  kardel Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.16.6.1 22-Oct-2006  yamt sync with head
 1.16.4.1 18-Nov-2006  ad Sync with head.
 1.17.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.18.20.2 21-Nov-2007  bouyer Sync with HEAD
 1.18.20.1 25-Oct-2007  bouyer Sync with HEAD.
 1.18.16.2 09-Jan-2008  matt sync with HEAD
 1.18.16.1 06-Nov-2007  matt sync with HEAD
 1.18.14.2 21-Nov-2007  joerg Sync with HEAD.
 1.18.14.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.18.2.1 23-Oct-2007  ad Sync with head.
 1.19.2.1 08-Dec-2007  mjf Sync with HEAD.
 1.20.68.1 18-May-2014  rmind sync with head
 1.20.62.2 03-Dec-2017  jdolecek update from HEAD
 1.20.62.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.20.52.1 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.21.2.1 10-Aug-2014  tls Rebase.
 1.22.4.1 22-Sep-2015  skrll Sync with HEAD
 1.1 09-Feb-2001  uch branches: 1.1.2;
add hpcmips/hpcsh common device directory
put bicons. (builtin console driver that don't require actual device driver)
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 09-Feb-2001  bouyer file biconsvar.h was added on branch thorpej_scsipi on 2001-02-11 19:15:22 +0000
 1.3 13-Nov-2001  lukem add RCSID
 1.2 15-Sep-2001  uch remove unused font_clB8x8_data[].
 1.1 09-Feb-2001  uch branches: 1.1.2; 1.1.4; 1.1.6; 1.1.8;
add hpcmips/hpcsh common device directory
put bicons. (builtin console driver that don't require actual device driver)
 1.1.8.1 01-Oct-2001  fvdl Catch up with -current.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 14-Nov-2001  nathanw Catch up to -current.
 1.1.4.1 21-Sep-2001  nathanw Catch up to -current.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 09-Feb-2001  bouyer file bifont.c was added on branch thorpej_scsipi on 2001-02-11 19:15:22 +0000
 1.37 28-May-2022  andvar fix various typos, mainly in comments.
 1.36 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.35 24-Apr-2021  thorpej branches: 1.35.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.34 13-Jun-2017  spz branches: 1.34.22;
correct size checks so they cannot be circumvented by integer overflows

reported by CTurt, thanks for the notification
 1.33 27-Oct-2012  chs branches: 1.33.12; 1.33.14; 1.33.16; 1.33.24; 1.33.30;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.32 13-Nov-2010  uebayasi branches: 1.32.8; 1.32.14; 1.32.18; 1.32.20; 1.32.22;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.
 1.31 01-Aug-2010  tsutsui Replace powerhook_establish(9) with pmf(9).
 1.30 12-May-2009  cegger branches: 1.30.2; 1.30.4;
struct device * -> device_t, no functional changes intended.
 1.29 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.28 06-Apr-2008  cegger branches: 1.28.4; 1.28.18;
use aprint_*_dev and device_xname
 1.27 19-Oct-2007  ad branches: 1.27.16;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.26 04-Mar-2007  christos branches: 1.26.2; 1.26.14; 1.26.16; 1.26.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.25 10-Oct-2006  he branches: 1.25.4;
The use of a local variable is conditional on FBDEBUG, so make the
declaration too. Makes this build without FBDEBUG defined.
 1.24 09-Oct-2006  peter Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.23 24-Sep-2006  jmcneill Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.22 29-Mar-2006  thorpej branches: 1.22.8; 1.22.10;
Use device_private().
 1.21 11-Dec-2005  christos branches: 1.21.4; 1.21.6; 1.21.8; 1.21.10; 1.21.12;
merge ktrace-lwp.
 1.20 27-Feb-2005  perry branches: 1.20.4;
nuke trailing whitespace
 1.19 12-Dec-2004  abs branches: 1.19.2; 1.19.4;
Fix comments regarding configration bounaries
 1.18 13-Nov-2003  chs eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
 1.17 02-Oct-2002  thorpej branches: 1.17.6;
Add trailing ; to CFATTACH_DECL.
 1.16 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.15 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.14 27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.13 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.12 13-Nov-2001  lukem add RCSID
 1.11 22-Jul-2001  takemura You must set 'HPCFB_SWAP_*' if bytes are stored in reverse order, i.e.
little endian like order, however, usage of 'HPCFB_SWAP_*' was widely
misunderstood because it reminded you of 'RI_BSWAP' in raster operation.
Please note that 'RI_BSWAP' indicate that frame buffer byte order is different
from natural order of system while 'HPCFB_REVORDER_*' is independent of
system byte order.
 1.10 17-Jul-2001  toshii "infomation" -> "information"
 1.9 07-Jul-2001  toshii branches: 1.9.2;
bcopy -> memcpy, bzero -> memset.
 1.8 11-Jun-2001  sato not set HPCFB_SWAP_BYTE
 1.7 08-May-2001  uch fix RCS Id.
 1.6 26-Mar-2001  sato o Change initialization for config_hook() base lcd control.
o Fix backlight control in case that light is controlable but not be
able to get status.
o change some verbose prints.
 1.5 12-Mar-2001  sato branches: 1.5.2;
* assume backlight is on if backlight value cannot get.
* move the lcd control codes used config_hook_call()
in *_hardpower() to *_power().
 1.4 09-Mar-2001  sato support WSDISPLAYIO_SVIDEO/WSDISPLAYIO_GVIDEO.
lcd on/off
 1.3 27-Feb-2001  sato branches: 1.3.2;
* add WSDISPLAYIO_PARAM_BACKLIGHT, WSDISPLAYIO_PARAM_CONTRAST,
WSDISPLAYIO_PARAM_BRIGHTNESS supports.
 1.2 24-Feb-2001  uch replace mips_btop, mips_ptob with mips, sh, arm common define.
ANSIfy and de-__P()
 1.1 22-Feb-2001  uch hpc common files are moved to dev/hpc.
 1.3.2.6 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.5 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.3.2.4 14-Nov-2001  nathanw Catch up to -current.
 1.3.2.3 24-Aug-2001  nathanw Catch up with -current.
 1.3.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.5.2.3 27-Mar-2001  bouyer Sync with HEAD.
 1.5.2.2 12-Mar-2001  bouyer Sync with HEAD.
 1.5.2.1 12-Mar-2001  bouyer file bivideo.c was added on branch thorpej_scsipi on 2001-03-12 13:30:03 +0000
 1.9.2.4 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.9.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.9.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.1 03-Aug-2001  lukem update to -current
 1.17.6.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.17.6.5 24-Jan-2005  skrll Adapt to branch.
 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.19.4.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.19.2.1 29-Apr-2005  kent sync with -current
 1.20.4.4 27-Oct-2007  yamt sync with head.
 1.20.4.3 03-Sep-2007  yamt sync with head.
 1.20.4.2 30-Dec-2006  yamt sync with head.
 1.20.4.1 21-Jun-2006  yamt sync with head.
 1.21.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.21.10.1 19-Apr-2006  elad sync with head.
 1.21.8.1 01-Apr-2006  yamt sync with head.
 1.21.6.1 22-Apr-2006  simonb Sync with head.
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.22.10.1 22-Oct-2006  yamt sync with head
 1.22.8.1 18-Nov-2006  ad Sync with head.
 1.25.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.26.20.1 25-Oct-2007  bouyer Sync with HEAD.
 1.26.16.1 06-Nov-2007  matt sync with HEAD
 1.26.14.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.26.2.1 23-Oct-2007  ad Sync with head.
 1.27.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.28.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.28.4.2 11-Aug-2010  yamt sync with head.
 1.28.4.1 16-May-2009  yamt sync with head
 1.30.4.1 05-Mar-2011  rmind sync with head
 1.30.2.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.32.22.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1456):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.32.20.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1456):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.32.18.2 03-Dec-2017  jdolecek update from HEAD
 1.32.18.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.32.14.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1456):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.32.8.1 30-Oct-2012  yamt sync with head
 1.33.30.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #39):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.33.24.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1432):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.33.16.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1432):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.33.14.1 28-Aug-2017  skrll Sync with HEAD
 1.33.12.1 15-Jun-2017  snj Pull up following revision(s) (requested by spz in ticket #1432):
sys/arch/ews4800mips/sbd/fb_sbdio.c: revision 1.16
sys/arch/pmax/ibus/pm.c: revision 1.13
sys/dev/hpc/bivideo.c: revision 1.34
sys/dev/ic/sti.c: revision 1.19
correct size checks so they cannot be circumvented by integer overflows
reported by CTurt, thanks for the notification
 1.34.22.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.35.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.2 04-Jun-2001  uch ANSI KNF.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file bivideovar.h was added on branch thorpej_scsipi on 2001-03-12 13:30:03 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.31 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.30 24-Apr-2021  thorpej branches: 1.30.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.29 06-Sep-2016  skrll branches: 1.29.32;

Don't read beyond the end of an array
 1.28 25-Jul-2014  dholland branches: 1.28.4;
Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.27 16-Mar-2014  dholland branches: 1.27.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.26 27-Oct-2012  chs branches: 1.26.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.25 12-May-2009  cegger branches: 1.25.12; 1.25.22;
struct device * -> device_t, no functional changes intended.
 1.24 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.23 05-Apr-2009  uwe Register with pmf(9), tell it we don't need anything.
btnmgr(4) is just a hub for other devices to plug into with
config_hook(9), there is no real hardware to manage.
 1.22 19-Oct-2007  ad branches: 1.22.20; 1.22.28; 1.22.34;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.21 04-Mar-2007  christos branches: 1.21.2; 1.21.14; 1.21.16; 1.21.20;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.20 16-Nov-2006  christos branches: 1.20.4;
__unused removal on arguments; approved by core.
 1.19 12-Oct-2006  uwe -Wextra fixes
 1.18 09-Oct-2006  peter Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.17 27-Jun-2006  peter branches: 1.17.4; 1.17.6;
Fix typo in a comment.
 1.16 29-Mar-2006  thorpej branches: 1.16.4;
Use device_private().
 1.15 11-Dec-2005  christos branches: 1.15.4; 1.15.6; 1.15.8; 1.15.10; 1.15.12;
merge ktrace-lwp.
 1.14 31-May-2005  uwe branches: 1.14.2;
Constify.
 1.13 27-Feb-2005  perry nuke trailing whitespace
 1.12 10-Dec-2002  hamajima branches: 1.12.6; 1.12.14; 1.12.16;
turn off light of LCD, when I closed cover
 1.11 23-Oct-2002  jdolecek 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.10 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.9 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 27-Sep-2002  thorpej Rather than referencing the cfdriver directly in the cfdata entries,
instead use a string naming the driver. The cfdriver is then looked
up in a list which is built at run-time.
 1.6 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.5 17-Mar-2002  atatat branches: 1.5.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.4 13-Jan-2002  takemura Number of elements in button_config is smaller than CONFIG_HOOK_MAX_ID.
 1.3 13-Nov-2001  lukem add RCSID
 1.2 04-Jun-2001  uch branches: 1.2.2; 1.2.4;
ANSI KNF.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file btnmgr.c was added on branch thorpej_scsipi on 2001-03-12 13:30:03 +0000
 1.1.2.8 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.7 11-Nov-2002  nathanw Catch up to -current
 1.1.2.6 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.5 17-Sep-2002  nathanw Catch up to -current.
 1.1.2.4 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.4.1 10-Oct-2001  fvdl Convert all remaining devices.
 1.2.2.4 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.2.2.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.1 16-May-2002  gehenna Add the character device switch.
 1.12.16.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.12.14.1 29-Apr-2005  kent sync with -current
 1.12.6.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.12.6.2 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.6.1 24-Jan-2005  skrll Adapt to branch.
 1.14.2.4 27-Oct-2007  yamt sync with head.
 1.14.2.3 03-Sep-2007  yamt sync with head.
 1.14.2.2 30-Dec-2006  yamt sync with head.
 1.14.2.1 21-Jun-2006  yamt sync with head.
 1.15.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.15.10.1 19-Apr-2006  elad sync with head.
 1.15.8.2 11-Aug-2006  yamt sync with head
 1.15.8.1 01-Apr-2006  yamt sync with head.
 1.15.6.1 22-Apr-2006  simonb Sync with head.
 1.15.4.1 09-Sep-2006  rpaulo sync with head
 1.16.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.17.6.2 10-Dec-2006  yamt sync with head.
 1.17.6.1 22-Oct-2006  yamt sync with head
 1.17.4.1 18-Nov-2006  ad Sync with head.
 1.20.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.21.20.1 25-Oct-2007  bouyer Sync with HEAD.
 1.21.16.1 06-Nov-2007  matt sync with HEAD
 1.21.14.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.21.2.1 23-Oct-2007  ad Sync with head.
 1.22.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.22.20.2 16-May-2009  yamt sync with head
 1.22.20.1 04-May-2009  yamt sync with head.
 1.25.22.3 03-Dec-2017  jdolecek update from HEAD
 1.25.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.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.25.12.1 30-Oct-2012  yamt sync with head
 1.26.2.1 18-May-2014  rmind sync with head
 1.27.2.1 10-Aug-2014  tls Rebase.
 1.28.4.1 05-Oct-2016  skrll Sync with HEAD
 1.29.32.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.30.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.16 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.15 12-May-2009  cegger branches: 1.15.12; 1.15.22;
struct device * -> device_t, no functional changes intended.
 1.14 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.13 19-Oct-2007  ad branches: 1.13.20; 1.13.34;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.12 29-Mar-2006  thorpej branches: 1.12.18; 1.12.32; 1.12.34; 1.12.38;
Use device_cfdata().
 1.11 11-Dec-2005  christos branches: 1.11.4; 1.11.6; 1.11.8; 1.11.10; 1.11.12;
merge ktrace-lwp.
 1.10 27-Feb-2005  perry branches: 1.10.4;
nuke trailing whitespace
 1.9 02-Oct-2002  thorpej branches: 1.9.6; 1.9.14; 1.9.16;
Add trailing ; to CFATTACH_DECL.
 1.8 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 09-Feb-2002  sato delete '#if 0' codes.
 1.5 13-Nov-2001  lukem add RCSID
 1.4 04-Jun-2001  uch branches: 1.4.2; 1.4.4;
ANSI KNF.
 1.3 01-May-2001  takemura Fix 'busname' to attach nodes correctly.
 1.2 30-Apr-2001  takemura Machine independent GPIO interface.
 1.1 30-Apr-2001  takemura Copy of sys/arch/hpcmips/vr/button_vrgiu.c.
 1.4.4.3 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.4.4.2 16-Mar-2002  jdolecek Catch up with -current.
 1.4.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.4.2.4 28-Feb-2002  nathanw Catch up to -current.
 1.4.2.3 14-Nov-2001  nathanw Catch up to -current.
 1.4.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.1 04-Jun-2001  nathanw file button.c was added on branch nathanw_sa on 2001-06-21 20:01:35 +0000
 1.9.16.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.9.14.1 29-Apr-2005  kent sync with -current
 1.9.6.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.10.4.2 27-Oct-2007  yamt sync with head.
 1.10.4.1 21-Jun-2006  yamt sync with head.
 1.11.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.11.10.1 19-Apr-2006  elad sync with head.
 1.11.8.1 01-Apr-2006  yamt sync with head.
 1.11.6.1 22-Apr-2006  simonb Sync with head.
 1.11.4.1 09-Sep-2006  rpaulo sync with head
 1.12.38.1 25-Oct-2007  bouyer Sync with HEAD.
 1.12.34.1 06-Nov-2007  matt sync with HEAD
 1.12.32.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.12.18.1 23-Oct-2007  ad Sync with head.
 1.13.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.20.1 16-May-2009  yamt sync with head
 1.15.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.12.1 30-Oct-2012  yamt sync with head
 1.3 22-Feb-2001  uch hpc common files are moved to dev/hpc.
 1.2 12-Feb-2001  uch fix flag.
 1.1 09-Feb-2001  uch branches: 1.1.2;
add hpcmips/hpcsh common device directory
put bicons. (builtin console driver that don't require actual device driver)
 1.1.2.3 12-Mar-2001  bouyer Sync with HEAD.
 1.1.2.2 11-Feb-2001  bouyer Sync with HEAD.
 1.1.2.1 09-Feb-2001  bouyer file files.bicons was added on branch thorpej_scsipi on 2001-02-11 19:15:22 +0000
 1.5 24-May-2022  andvar fix various typos in comments, docs and log messages.
 1.4 03-Apr-2009  uwe Use dev/apm/files.apm for APM options in opt_apm.h.

Now both apm and apmdev files.apm can be included so you can switch
from apmdev0 to apm0 at hpcapm0 in your kernel config easily.
 1.3 03-Apr-2009  uwe Config glue for attaching apm at apmdevif.

Unfortunately dev/apm/files.apm and dev/hpc/apm/files.apm cannot be
included both at the same time (they define same options and config(1)
complains), so you need to comment out old code and uncomment new code
to be able to replace "apmdev0 at hpcapm0" with "apm0 at hpcapm0" in
your kernel config.
 1.2 09-Oct-2006  peter branches: 1.2.52; 1.2.62; 1.2.68;
Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.1 24-Feb-2006  cube branches: 1.1.2; 1.1.10; 1.1.16; 1.1.20; 1.1.22; 1.1.24;
Rework hpcapm(4) attachment definition so it is not required to attach at
mainbus, and convert its two users, hpcsh and hpcmips, to that.

Many thanks to Valeriy Ushakov and Ben Collver for testing.
 1.1.24.1 22-Oct-2006  yamt sync with head
 1.1.22.2 09-Sep-2006  rpaulo sync with head
 1.1.22.1 24-Feb-2006  rpaulo file files.hpcapm was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:49:51 +0000
 1.1.20.1 18-Nov-2006  ad Sync with head.
 1.1.16.3 30-Dec-2006  yamt sync with head.
 1.1.16.2 21-Jun-2006  yamt sync with head.
 1.1.16.1 24-Feb-2006  yamt file files.hpcapm was added on branch yamt-lazymbuf on 2006-06-21 15:02:46 +0000
 1.1.10.2 22-Apr-2006  simonb Sync with head.
 1.1.10.1 24-Feb-2006  simonb file files.hpcapm was added on branch simonb-timecounters on 2006-04-22 11:38:52 +0000
 1.1.2.2 01-Mar-2006  yamt sync with head.
 1.1.2.1 24-Feb-2006  yamt file files.hpcapm was added on branch yamt-uio_vmspace on 2006-03-01 09:28:12 +0000
 1.2.68.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.62.1 28-Apr-2009  skrll Sync with HEAD.
 1.2.52.1 04-May-2009  yamt sync with head.
 1.4 21-Feb-2008  uwe Rasops and wsfont are now in MI conf/files so remove them from here.
 1.3 09-Oct-2006  peter branches: 1.3.24; 1.3.44; 1.3.48;
Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.2 06-Mar-2002  uch branches: 1.2.30; 1.2.60; 1.2.62;
remove ite8181video's bivideo dependency.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4; 1.1.6;
hpc common files are moved to dev/hpc.
 1.1.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file files.hpcfb was added on branch thorpej_scsipi on 2001-03-12 13:30:04 +0000
 1.1.2.1 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.62.1 22-Oct-2006  yamt sync with head
 1.2.60.1 18-Nov-2006  ad Sync with head.
 1.2.30.2 27-Feb-2008  yamt sync with head.
 1.2.30.1 30-Dec-2006  yamt sync with head.
 1.3.48.1 03-Apr-2008  mjf Sync with HEAD.
 1.3.44.1 24-Mar-2008  keiichi sync with head.
 1.3.24.1 23-Mar-2008  matt sync with HEAD
 1.8 01-Sep-2024  andvar s/trriger/trigger/ and s/sepecify/specify/.
 1.7 24-Jul-2021  andvar branches: 1.7.16;
Fix all remaining typos, mainly in comments but also in few definitions and log messages, reported by me in PR kern/54889.
Also fixed some additional typos in comments, found on review of same files or typos.
 1.6 09-Oct-2006  peter branches: 1.6.160;
Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.5 11-Dec-2005  christos branches: 1.5.20; 1.5.22;
merge ktrace-lwp.
 1.4 27-Feb-2005  perry branches: 1.4.4;
nuke trailing whitespace
 1.3 13-Jan-2002  takemura branches: 1.3.16; 1.3.24; 1.3.26;
Added new config hook type PCIINTR (handling PCI interrupt).
Added config hook APIs, config_connect, config_disconnect and
config_connected_call.
Supported PCIINTR type event in hpcio.
 1.2 06-May-2001  takemura branches: 1.2.2; 1.2.4;
Vrc4172 GPIO support. This device is currently configured on PenCentra 130.
 1.1 30-Apr-2001  takemura Machine independent GPIO interface.
 1.2.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.2.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.2.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1 06-May-2001  nathanw file files.hpcio was added on branch nathanw_sa on 2001-06-21 20:01:35 +0000
 1.3.26.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.3.24.1 29-Apr-2005  kent sync with -current
 1.3.16.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.4.1 30-Dec-2006  yamt sync with head.
 1.5.22.1 22-Oct-2006  yamt sync with head
 1.5.20.1 18-Nov-2006  ad Sync with head.
 1.6.160.1 01-Aug-2021  thorpej Sync with HEAD.
 1.7.16.1 02-Aug-2025  perseant Sync with HEAD
 1.9 10-Jun-2008  drochner use new "defpseudodev" where appropriate, and remove dummy interface
attribute definitions which were only to trick config(8)
 1.8 07-Jan-2008  uwe branches: 1.8.6; 1.8.8; 1.8.10; 1.8.12; 1.8.14;
Catch up with new option to dev/pckbport/wskbdmap_mfii.c
 1.7 09-Oct-2006  peter branches: 1.7.24; 1.7.30; 1.7.38;
Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.6 11-Dec-2005  christos branches: 1.6.20; 1.6.22;
merge ktrace-lwp.
 1.5 23-Jun-2004  uwe branches: 1.5.12;
Driver for HP F1275A external keyboard.
 1.4 13-Mar-2004  bjh21 Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it. This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111. The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers. To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned. Thy just use rather more function pointers than before. Tested
on i386 and (with a new host driver) acorn32. Compiled on several other
affected architectures.
 1.3 28-Nov-2001  lukem branches: 1.3.16;
- convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
 1.2 20-Nov-2001  lukem - replace "defopt" with "defparam" for options which must take a value,
as config(8) will warn for value-less defparam options
- minor whitespace/formatting cleanup
- consolidate opt_tcp_recvspace.h and opt_tcp_sendspace.h into opt_tcp_space.h
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4; 1.1.6;
hpc common files are moved to dev/hpc.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file files.hpckbd was added on branch thorpej_scsipi on 2001-03-12 13:30:04 +0000
 1.1.2.1 08-Jan-2002  nathanw Catch up to -current.
 1.3.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.16.1 03-Aug-2004  skrll Sync with HEAD
 1.5.12.2 21-Jan-2008  yamt sync with head
 1.5.12.1 30-Dec-2006  yamt sync with head.
 1.6.22.1 22-Oct-2006  yamt sync with head
 1.6.20.1 18-Nov-2006  ad Sync with head.
 1.7.38.1 08-Jan-2008  bouyer Sync with HEAD
 1.7.30.1 18-Feb-2008  mjf Sync with HEAD.
 1.7.24.1 09-Jan-2008  matt sync with HEAD
 1.8.14.1 18-Jun-2008  simonb Sync with head.
 1.8.12.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.8.10.1 04-May-2009  yamt sync with head.
 1.8.8.1 17-Jun-2008  yamt sync with head.
 1.8.6.1 29-Jun-2008  mjf Sync with HEAD.
 1.3 11-Dec-2005  christos merge ktrace-lwp.
 1.2 28-May-2004  tsarna Refactor tpcalib and hpc* ports to make tpcalib MI, as discussed on tech-kern.
 1.1 22-Feb-2001  uch branches: 1.1.4; 1.1.26;
hpc common files are moved to dev/hpc.
 1.1.26.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.26.2 18-Sep-2004  skrll Sync with HEAD.
 1.1.26.1 03-Aug-2004  skrll Sync with HEAD
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file files.hpctp was added on branch thorpej_scsipi on 2001-03-12 13:30:04 +0000
 1.3 13-Nov-2001  lukem add RCSID
 1.2 04-Jun-2001  uch branches: 1.2.2;
ANSI KNF.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file fontconv.c was added on branch thorpej_scsipi on 2001-03-12 13:30:04 +0000
 1.1.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.24 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.23 24-Apr-2021  thorpej branches: 1.23.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.22 28-Oct-2017  riastradh branches: 1.22.20;
Kill some more extern struct cfdriver declarations.

Down with externs in .c!
 1.21 25-Jun-2017  maxv spl leak, found by Mootja
 1.20 09-Nov-2013  christos branches: 1.20.6; 1.20.22;
fix unused variable warning
 1.19 27-Oct-2012  chs branches: 1.19.2;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 12-May-2009  cegger branches: 1.18.12; 1.18.22;
struct device * -> device_t, no functional changes intended.
 1.17 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.16 05-Apr-2009  uwe Register with pmf(9), tell it we don't need anything.
 1.15 03-Apr-2009  uwe Switch apmdev to use apm(4) structures from dev/apm/apmvar.h.
Add batteryid argument to aa_get_powstat method implementations.
 1.14 30-Mar-2009  uwe Fix battery_state vs. battery_flags confusion.
Fill all fields of struct apm_power_info in hpcapm_get_powstat.
 1.13 19-Oct-2007  ad branches: 1.13.20; 1.13.28; 1.13.34;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.12 16-Nov-2006  christos branches: 1.12.8; 1.12.22; 1.12.24; 1.12.28;
__unused removal on arguments; approved by core.
 1.11 12-Oct-2006  uwe -Wextra fixes
 1.10 09-Oct-2006  peter Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.9 24-Sep-2006  peter Improve some debug texts.
 1.8 22-Aug-2006  uwe branches: 1.8.2; 1.8.4;
Fix a pasto: save CONFIG_HOOK_PMEVENT_AC hook in the correct variable.
From Adam Wysocki on port-hpcsh@.
 1.7 29-Mar-2006  thorpej Use device_private().
 1.6 27-Feb-2006  peter branches: 1.6.2; 1.6.4; 1.6.6;
Remove the include <machine/autoconf.h>, it is a) not needed any more and
b) not available on all hpc ports.
 1.5 24-Feb-2006  cube Rework hpcapm(4) attachment definition so it is not required to attach at
mainbus, and convert its two users, hpcsh and hpcmips, to that.

Many thanks to Valeriy Ushakov and Ben Collver for testing.
 1.4 11-Dec-2005  christos branches: 1.4.2; 1.4.4; 1.4.6;
merge ktrace-lwp.
 1.3 30-Jul-2005  nakayama Get AC/battery state via config_hook_call if hooks are registered.
 1.2 27-Feb-2005  perry branches: 1.2.2; 1.2.4;
nuke trailing whitespace
 1.1 03-Jul-2004  uch branches: 1.1.2; 1.1.6; 1.1.8;
hpcmips independent part are moved to sys/dev/hpc/
 1.1.8.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.6.1 29-Apr-2005  kent sync with -current
 1.1.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 03-Jul-2004  skrll file hpcapm.c was added on branch ktrace-lwp on 2004-08-03 10:45:57 +0000
 1.2.4.3 27-Oct-2007  yamt sync with head.
 1.2.4.2 30-Dec-2006  yamt sync with head.
 1.2.4.1 21-Jun-2006  yamt sync with head.
 1.2.2.1 04-Aug-2005  tron Pull up revision 1.3 (requested by nakayama in ticket #637):
Get AC/battery state via config_hook_call if hooks are registered.
 1.4.6.1 22-Apr-2006  simonb Sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.4.2.1 01-Mar-2006  yamt sync with head.
 1.6.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.6.4.1 19-Apr-2006  elad sync with head.
 1.6.2.2 03-Sep-2006  yamt sync with head.
 1.6.2.1 01-Apr-2006  yamt sync with head.
 1.8.4.2 10-Dec-2006  yamt sync with head.
 1.8.4.1 22-Oct-2006  yamt sync with head
 1.8.2.1 18-Nov-2006  ad Sync with head.
 1.12.28.1 25-Oct-2007  bouyer Sync with HEAD.
 1.12.24.1 06-Nov-2007  matt sync with HEAD
 1.12.22.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.12.8.1 23-Oct-2007  ad Sync with head.
 1.13.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.13.28.1 28-Apr-2009  skrll Sync with HEAD.
 1.13.20.2 16-May-2009  yamt sync with head
 1.13.20.1 04-May-2009  yamt sync with head.
 1.18.22.3 03-Dec-2017  jdolecek update from HEAD
 1.18.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.18.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.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.18.12.1 30-Oct-2012  yamt sync with head
 1.19.2.1 18-May-2014  rmind sync with head
 1.20.22.1 24-Oct-2019  martin Pull up following revision(s) (requested by msaitoh in ticket #1412):

sys/dev/hpc/hpcapm.c: revision 1.21

spl leak, found by Mootja
 1.20.6.1 28-Aug-2017  skrll Sync with HEAD
 1.22.20.1 23-Mar-2021  thorpej Convert config_found_ia() call sites where the device only carries
a single interface attribute to bare config_found() calls.
 1.23.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 27-Feb-2005  perry nuke trailing whitespace
 1.4 27-Dec-2003  shin branches: 1.4.8; 1.4.10;
Add MobilePro 880 (MC/R730A) to hpcbatterytable.h.
Addresses PR/23651.
 1.3 02-Aug-2001  sato branches: 1.3.2; 1.3.4; 1.3.18; 1.3.24;
add MC-R700 battery parameters.
 1.2 24-Jul-2001  sato add missing terminator of hpcbattery_parameters.
 1.1 19-Jul-2001  sato add hpcmips battery parameter tables.
 1.3.24.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.3.24.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.24.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.24.1 03-Aug-2004  skrll Sync with HEAD
 1.3.18.1 12-Mar-2004  jmc Pullup rev 1.4 (requested by shin in ticket #1584)

Add MobilePro 880 (MC/R730A) to hpcbatterytable.h
 1.3.4.2 24-Aug-2001  nathanw Catch up with -current.
 1.3.4.1 02-Aug-2001  nathanw file hpcbatterytable.h was added on branch nathanw_sa on 2001-08-24 00:09:07 +0000
 1.3.2.2 03-Aug-2001  lukem update to -current
 1.3.2.1 02-Aug-2001  lukem file hpcbatterytable.h was added on branch kqueue on 2001-08-03 04:12:52 +0000
 1.4.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.4.8.1 29-Apr-2005  kent sync with -current
 1.5 05-Jul-2024  andvar fix various typos in comments and log messages, mainly s/hight/high/
s/hight/height/ and removing double m in time(ing).
 1.4 27-Oct-2012  chs branches: 1.4.76;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.3 11-Dec-2005  christos branches: 1.3.110; 1.3.120;
merge ktrace-lwp.
 1.2 27-Feb-2005  perry nuke trailing whitespace
 1.1 19-Jul-2001  sato branches: 1.1.2; 1.1.4; 1.1.24; 1.1.32; 1.1.34;
battery parameter structures for hpc systems.
 1.1.34.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.32.1 29-Apr-2005  kent sync with -current
 1.1.24.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.4.2 24-Aug-2001  nathanw Catch up with -current.
 1.1.4.1 19-Jul-2001  nathanw file hpcbatteryvar.h was added on branch nathanw_sa on 2001-08-24 00:09:07 +0000
 1.1.2.2 03-Aug-2001  lukem update to -current
 1.1.2.1 19-Jul-2001  lukem file hpcbatteryvar.h was added on branch kqueue on 2001-08-03 04:12:53 +0000
 1.3.120.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.3.110.1 30-Oct-2012  yamt sync with head
 1.4.76.1 02-Aug-2025  perseant Sync with HEAD
 1.4 14-Apr-2002  takemura Added '#if defined(_KERNEL)' surrounging KERNEL_RCSID macro. Hpccmap is
used in bootloader too.
 1.3 13-Nov-2001  lukem add RCSID
 1.2 08-May-2001  uch branches: 1.2.2;
fix RCS Id.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file hpccmap.c was added on branch thorpej_scsipi on 2001-03-12 13:30:04 +0000
 1.1.2.3 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5 11-Dec-2005  christos merge ktrace-lwp.
 1.4 14-Jul-2003  lukem add missing __RCSID()
 1.3 04-Jun-2001  uch branches: 1.3.22;
ANSI KNF.
 1.2 08-May-2001  uch fix RCS Id.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file hpccmap_gen.c was added on branch thorpej_scsipi on 2001-03-12 13:30:05 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.22.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.22.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.22.1 03-Aug-2004  skrll Sync with HEAD
 1.2 08-May-2001  uch fix RCS Id.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file hpccmapvar.h was added on branch thorpej_scsipi on 2001-03-12 13:30:05 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.66 29-Feb-2024  andvar s/hpcfb_refres_screen/hpcfb_refresh_screen/ in debug message.
 1.65 19-Dec-2021  andvar s/forground/foreground/ in comments.
 1.64 18-Sep-2021  tsutsui Remove unnecessary (and unimplemented) WSKBD_*BELL ioctls in kbd drivers.

It looks the only ioctl(4) to be implemented for WSKBDIO_*BELL in
the backend keyboard driver is WSKBDIO_COMPLEXBELL.
All other BELL ioctls (WSKBDIO_BELL, WSKBDIO_SETBELL, WSKBDIO_GETBELL,
WSKBDIO_SETDEFAULTBELL, and WSKBDIO_GETDEFAULTBELL) are handled in the
MI wskbd driver (in wskbd_displayioctl() in src/sys/dev/wscons/wskbd.c).
 1.63 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.62 05-Jun-2021  rin branches: 1.62.2;
hpcfb_cnattach(): If fbconf == NULL, this is for early console output
(used for hpcmips/VR41xx machines), and wsdisplay_preattach() should be
used instead of wsdisplay_cnattach().

Fix KASSERT failure for double attach of wsdisplay, reported in port-mips.
 1.61 24-Apr-2021  thorpej branches: 1.61.2; 1.61.6;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.60 07-Apr-2015  ozaki-r branches: 1.60.34;
Add missing semicolon
 1.59 04-Apr-2015  christos fix leak, found by Brainy.
 1.58 13-Nov-2010  uebayasi branches: 1.58.18; 1.58.34; 1.58.36;
Don't pull in the whole uvm(9) API to access only PAGE_SIZE and
some other constants. These are provided by sys/param.h now.
 1.57 01-Aug-2010  tsutsui Remove deprecated powerhook_establish(9) since apmdev(4) which required
the old API was gone.
 1.56 18-Jun-2010  tsutsui Add WSDISPLAYIO_LINEBYTES, which is required by Xorg wsfb server.
 1.55 15-May-2010  tsutsui Clear RI_NO_AUTO in actual attach functions during autoconf(9)
for console devices that set the flag during consinit().
 1.54 15-May-2010  tsutsui Set RI_NO_AUTO in ri->ri_flg if hpcfb_init() is invoked from cnattach.
Fixes silent hang on hpcsh and hpcmips.

XXX: all other rasops based console devices need to set this flag??
 1.53 24-Feb-2010  dyoung branches: 1.53.2;
A pointer typedef entails trading too much flexibility to declare const
and non-const types, and the kernel uses both const and non-const
PMF qualifiers and device suspensors, so change the pmf_qual_t and
device_suspensor_t typedefs from "pointers to const" to non-pointer,
non-const types.
 1.52 08-Jan-2010  dyoung branches: 1.52.2;
Expand PMF_FN_* macros.
 1.51 23-Nov-2009  rmind Remove some unecessary includes sys/user.h header.
 1.50 05-Apr-2009  uwe Register with pmf(9). Thus we register with both dopowerhooks(9) and
pmf(9), but they are mutually exclusive (apm(4) vs apmdev(4)).

Express pmf(9) hooks in terms of dopowerhooks(9) hook - the reverse
would be more natural, but pmf hook signature is hidden behind
PMF_FN_ARGS/PMF_FN_CALL, so just go the least intrusive way for now.
 1.49 05-Apr-2009  uwe Split device_t and softc.
 1.48 14-Mar-2009  dsl ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
 1.47 06-Apr-2008  cegger branches: 1.47.4; 1.47.12; 1.47.18;
use aprint_*_dev and device_xname
 1.46 30-Jan-2008  ad branches: 1.46.6;
Has this compiled recently?
 1.45 04-Jan-2008  ad Start detangling lock.h from intr.h. This is likely to cause short term
breakage, but the mess of dependencies has been regularly breaking the
build recently anyhow.
 1.44 29-Oct-2007  peter branches: 1.44.2; 1.44.8;
wsdisplay has been converted to device_t/softc separation so we can't cast
the wsdisplay device to the wsdisplay_softc anymore. Use device_private()
instead to get the softc.
 1.43 19-Oct-2007  ad machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.42 09-Jul-2007  ad branches: 1.42.6; 1.42.8; 1.42.12;
Merge some of the less invasive changes from the vmlocking branch:

- kthread, callout, devsw API changes
- select()/poll() improvements
- miscellaneous MT safety improvements
 1.41 04-Mar-2007  christos branches: 1.41.2; 1.41.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.40 16-Nov-2006  christos branches: 1.40.4;
__unused removal on arguments; approved by core.
 1.39 12-Oct-2006  uwe -Wextra fixes
 1.38 09-Oct-2006  peter Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.37 24-Sep-2006  jmcneill Add "name" parameter to powerhook_establish, to aid debugging. No objections
on tech-kern@
 1.36 12-Apr-2006  jmmv branches: 1.36.8; 1.36.10;
Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 1.35 29-Mar-2006  thorpej Use device_private().
 1.34 11-Dec-2005  christos branches: 1.34.4; 1.34.6; 1.34.8; 1.34.10; 1.34.12;
merge ktrace-lwp.
 1.33 04-Sep-2005  uwe For HPCFB_CLASS_RGBCOLOR class propagate r/g/b widths and positions
from hf_rgb to rasops_info.
 1.32 22-May-2005  christos branches: 1.32.2;
No 0x in front of %p...
 1.31 27-Feb-2005  perry branches: 1.31.2;
nuke trailing whitespace
 1.30 29-Jun-2003  fvdl branches: 1.30.2; 1.30.10; 1.30.12;
Back out the lwp/ktrace changes. They contained a lot of colateral damage,
and need to be examined and discussed more.
 1.29 29-Jun-2003  ichiro struct proc * -> struct lwp *
 1.28 01-Jan-2003  thorpej Use aprint_normal() in cfprint routines.
 1.27 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.26 02-Oct-2002  reinoud G/c static pow() function that was used to calculate (2^x) only; replaced
the two instances with equivalent (1<<x).
 1.25 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.24 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.23 25-Sep-2002  thorpej Don't include <sys/map.h>.
 1.22 01-Sep-2002  takemura BUGFIX: WSDISPLAYIO_SVIDEO and WSDISPLAYIO_GVIDEO don't work.
 1.21 04-Jul-2002  junyoung alloc_attr -> allocattr

Approved by Matthias Drochner.
 1.20 10-May-2002  uwe branches: 1.20.2; 1.20.4;
Use symbolic WSCOL_* colour names instead of magic numbers.
 1.19 13-Apr-2002  takemura Fixed dev/hpc/hpcfb.c to set RI_BSWAP flag in 8bpp for rasops8.c
and backout changes 'fix LCD byte-order setting':
arch/hpcsh/dev/hd64461/hd64461video.c Rev. 1.7 to 1.8
arch/hpcmips/dev/plumvideo.c Rev. 1.23 to 1.24
arch/hpcmips/tx/tx3912video.c Rev. 1.24 to 1.25
 1.18 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.17 27-Jan-2002  takemura Do nothing if there is no screen.
 1.16 12-Jan-2002  tsutsui Call malloc(9) with M_ZERO flag instead of memset() after malloc().
 1.15 13-Nov-2001  lukem add RCSID
 1.14 15-Aug-2001  uch fix hf_order_flags.
 1.13 02-Aug-2001  toshii Check if sc->sc_dc is NULL, so that non-console hpcfb can attach without
a panic.
 1.12 31-Jul-2001  sato Abort redrawing when screen switch was requested.
Set virtual text vram when other one is drawing framebuffer.
 1.11 22-Jul-2001  takemura You must set 'HPCFB_SWAP_*' if bytes are stored in reverse order, i.e.
little endian like order, however, usage of 'HPCFB_SWAP_*' was widely
misunderstood because it reminded you of 'RI_BSWAP' in raster operation.
Please note that 'RI_BSWAP' indicate that frame buffer byte order is different
from natural order of system while 'HPCFB_REVORDER_*' is independent of
system byte order.
 1.10 21-Jul-2001  takemura - delete sc->sc_screens[]
- BUGFIX: hpcfb_alloc_screen clears real frame buffer
- Doesn't allocate any screen in attach routine
 1.9 17-Jul-2001  toshii "infomation" -> "information"
 1.8 13-Jul-2001  sato disable framebuffer drawing while suspending.
 1.7 07-Jul-2001  toshii branches: 1.7.2;
bcopy -> memcpy, bzero -> memset.
 1.6 22-Jun-2001  toshii Don't include <machine/autoconf.h>, which should not be necessary.
Moreover, hpcarm doesn't have such a header file.
 1.5 05-Jun-2001  uch implement HPCFB_SWAP_BYTE.
 1.4 04-Jun-2001  uch ANSI KNF.
 1.3 08-May-2001  uch fix RCS Id.
 1.2 17-Mar-2001  sato * enable HPCFB_MULTI codes.
* delete unneed non HPCFB_MULTI codes.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.3 27-Mar-2001  bouyer Sync with HEAD.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file hpcfb.c was added on branch thorpej_scsipi on 2001-03-12 13:30:05 +0000
 1.1.2.12 03-Jan-2003  thorpej Sync with HEAD.
 1.1.2.11 18-Oct-2002  nathanw Catch up to -current.
 1.1.2.10 17-Sep-2002  nathanw Catch up to -current.
 1.1.2.9 01-Aug-2002  nathanw Catch up to -current.
 1.1.2.8 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.7 17-Apr-2002  nathanw Catch up to -current.
 1.1.2.6 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.5 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.4 14-Nov-2001  nathanw Catch up to -current.
 1.1.2.3 24-Aug-2001  nathanw Catch up with -current.
 1.1.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.7.2.7 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.7.2.6 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.7.2.5 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.7.2.4 11-Feb-2002  jdolecek Sync w/ -current.
 1.7.2.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.7.2.2 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.7.2.1 03-Aug-2001  lukem update to -current
 1.20.4.1 30-Nov-2002  he Pull up revision 1.22 (requested by takemura in ticket #754):
Make WSDISPLAYIO_SVIDEO and WSDISPLAYIO_GVIDEO work.
 1.20.2.1 15-Jul-2002  gehenna catch up with -current.
 1.30.12.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.30.10.1 29-Apr-2005  kent sync with -current
 1.30.2.3 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.30.2.2 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.30.2.1 24-Jan-2005  skrll Adapt to branch.
 1.31.2.1 15-Sep-2005  tron Pull up following revision(s) (requested by uwe in ticket #781):
sys/dev/hpc/hpcfb.c: revision 1.33
For HPCFB_CLASS_RGBCOLOR class propagate r/g/b widths and positions
from hf_rgb to rasops_info.
 1.32.2.7 04-Feb-2008  yamt sync with head.
 1.32.2.6 21-Jan-2008  yamt sync with head
 1.32.2.5 15-Nov-2007  yamt sync with head.
 1.32.2.4 27-Oct-2007  yamt sync with head.
 1.32.2.3 03-Sep-2007  yamt sync with head.
 1.32.2.2 30-Dec-2006  yamt sync with head.
 1.32.2.1 21-Jun-2006  yamt sync with head.
 1.34.12.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.34.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.34.10.1 19-Apr-2006  elad sync with head.
 1.34.8.2 24-May-2006  yamt sync with head.
 1.34.8.1 01-Apr-2006  yamt sync with head.
 1.34.6.1 22-Apr-2006  simonb Sync with head.
 1.34.4.1 09-Sep-2006  rpaulo sync with head
 1.36.10.2 10-Dec-2006  yamt sync with head.
 1.36.10.1 22-Oct-2006  yamt sync with head
 1.36.8.1 18-Nov-2006  ad Sync with head.
 1.40.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.41.4.1 11-Jul-2007  mjf Sync with head.
 1.41.2.3 23-Oct-2007  ad Sync with head.
 1.41.2.2 01-Jul-2007  ad Adapt to callout API change.
 1.41.2.1 13-May-2007  ad - Pass the error number and residual count to biodone(), and let it handle
setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.
 1.42.12.2 13-Nov-2007  bouyer Sync with HEAD
 1.42.12.1 25-Oct-2007  bouyer Sync with HEAD.
 1.42.8.3 23-Mar-2008  matt sync with HEAD
 1.42.8.2 09-Jan-2008  matt sync with HEAD
 1.42.8.1 06-Nov-2007  matt sync with HEAD
 1.42.6.2 31-Oct-2007  joerg Sync with HEAD.
 1.42.6.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.44.8.1 08-Jan-2008  bouyer Sync with HEAD
 1.44.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.46.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.47.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.47.12.1 28-Apr-2009  skrll Sync with HEAD.
 1.47.4.3 11-Aug-2010  yamt sync with head.
 1.47.4.2 11-Mar-2010  yamt sync with head
 1.47.4.1 04-May-2009  yamt sync with head.
 1.52.2.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.52.2.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.53.2.3 05-Mar-2011  rmind sync with head
 1.53.2.2 03-Jul-2010  rmind sync with head
 1.53.2.1 30-May-2010  rmind sync with head
 1.58.36.2 06-Jun-2015  skrll Sync with HEAD
 1.58.36.1 06-Apr-2015  skrll Sync with HEAD
 1.58.34.2 18-May-2015  msaitoh Add missing semicolon. Fix build break in last commit.
 1.58.34.1 16-May-2015  snj Pull up following revision(s) (requested by maxv in ticket #761):
sys/arch/sgimips/dev/scn.c: revision 1.8
sys/arch/sgimips/mace/macekbc.c: revision 1.8
sys/dev/hpc/hpcfb.c: revision 1.59
sys/dev/i2c/i2c.c: revision 1.47
sys/dev/ic/mfi.c: revision 1.57
sys/dev/if_ndis/if_ndis_pci.c: revision 1.21
sys/dev/sysmon/sysmon_power.c: revisions 1.50-1.52
sys/dev/usb/umass_isdata.c: revision 1.31
fix double free, found by Brainy.
--
Free cmd on error if we allocated it.
Found by Brainy, reported by maxv@.
--
don't leak rl (but there are other leaks), found by Brainy.
--
Free ped if we can't hand it to the power daemon.
Found by Brainy, reported by maxv@.
--
don't forget to free the dictionary.
--
another missing free dict.
--
fix leak, found by Brainy.
--
don't malloc a tiny, fixed size buffer to scribble into, then not use it
and never free it either
found by Brainy
--
malloc() -> kmem_alloc() for private data, also kmem_free() them if we
don't finish attaching for whatever reason
found by Brainy
 1.58.18.1 03-Dec-2017  jdolecek update from HEAD
 1.60.34.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.61.6.1 06-Jun-2021  cjep sync with head
 1.61.2.1 17-Jun-2021  thorpej Sync w/ HEAD.
 1.62.2.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 08-Apr-2022  andvar s/postion/position/
 1.3 31-Jul-2021  andvar s/dependend/dependent/
 1.2 22-Jul-2001  takemura branches: 1.2.226;
You must set 'HPCFB_SWAP_*' if bytes are stored in reverse order, i.e.
little endian like order, however, usage of 'HPCFB_SWAP_*' was widely
misunderstood because it reminded you of 'RI_BSWAP' in raster operation.
Please note that 'RI_BSWAP' indicate that frame buffer byte order is different
from natural order of system while 'HPCFB_REVORDER_*' is independent of
system byte order.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4; 1.1.6;
hpc common files are moved to dev/hpc.
 1.1.6.1 03-Aug-2001  lukem update to -current
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file hpcfbio.h was added on branch thorpej_scsipi on 2001-03-12 13:30:06 +0000
 1.1.2.1 24-Aug-2001  nathanw Catch up with -current.
 1.2.226.1 01-Aug-2021  thorpej Sync with HEAD.
 1.4 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.3 11-Dec-2005  christos branches: 1.3.26;
merge ktrace-lwp.
 1.2 04-Jun-2001  uch branches: 1.2.22; 1.2.38;
ANSI KNF.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file hpcfbvar.h was added on branch thorpej_scsipi on 2001-03-12 13:30:06 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.38.2 03-Sep-2007  yamt sync with head.
 1.2.38.1 21-Jun-2006  yamt sync with head.
 1.2.22.1 24-Jan-2005  skrll Adapt to branch.
 1.3.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.15 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.14 12-May-2009  cegger branches: 1.14.12; 1.14.22;
struct device * -> device_t, no functional changes intended.
 1.13 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.12 28-Apr-2008  martin branches: 1.12.14;
Remove clause 3 and 4 from TNF licenses
 1.11 15-Dec-2007  perry branches: 1.11.6; 1.11.8; 1.11.10;
__FUNCTION__ -> __func__
 1.10 19-Oct-2007  ad branches: 1.10.4; 1.10.8;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.9 29-Mar-2006  thorpej branches: 1.9.18; 1.9.32; 1.9.34; 1.9.38;
Use device_private().
 1.8 02-Oct-2002  thorpej branches: 1.8.22; 1.8.36; 1.8.38; 1.8.40; 1.8.42; 1.8.44;
Add trailing ; to CFATTACH_DECL.
 1.7 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 13-Jan-2002  takemura Added new config hook type PCIINTR (handling PCI interrupt).
Added config hook APIs, config_connect, config_disconnect and
config_connected_call.
Supported PCIINTR type event in hpcio.
 1.4 13-Nov-2001  lukem add RCSID
 1.3 13-Jun-2001  uch branches: 1.3.2; 1.3.4;
make this work.
 1.2 04-Jun-2001  uch ANSI KNF.
 1.1 30-Apr-2001  takemura Machine independent GPIO interface.
 1.3.4.3 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.3.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.3.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.4 28-Feb-2002  nathanw Catch up to -current.
 1.3.2.3 14-Nov-2001  nathanw Catch up to -current.
 1.3.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.1 13-Jun-2001  nathanw file hpcin.c was added on branch nathanw_sa on 2001-06-21 20:01:38 +0000
 1.8.44.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.8.42.1 19-Apr-2006  elad sync with head.
 1.8.40.1 01-Apr-2006  yamt sync with head.
 1.8.38.1 22-Apr-2006  simonb Sync with head.
 1.8.36.1 09-Sep-2006  rpaulo sync with head
 1.8.22.3 21-Jan-2008  yamt sync with head
 1.8.22.2 27-Oct-2007  yamt sync with head.
 1.8.22.1 21-Jun-2006  yamt sync with head.
 1.9.38.1 25-Oct-2007  bouyer Sync with HEAD.
 1.9.34.2 09-Jan-2008  matt sync with HEAD
 1.9.34.1 06-Nov-2007  matt sync with HEAD
 1.9.32.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.9.18.1 23-Oct-2007  ad Sync with head.
 1.10.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.10.4.1 26-Dec-2007  ad Sync with head.
 1.11.10.2 16-May-2009  yamt sync with head
 1.11.10.1 16-May-2008  yamt sync with head.
 1.11.8.1 18-May-2008  yamt sync with head.
 1.11.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.14.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.14.12.1 30-Oct-2012  yamt sync with head
 1.21 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.20 24-Apr-2021  thorpej branches: 1.20.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.19 27-Oct-2012  chs branches: 1.19.54;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.18 12-May-2009  cegger branches: 1.18.12; 1.18.22;
struct device * -> device_t, no functional changes intended.
 1.17 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.16 28-Apr-2008  martin branches: 1.16.14;
Remove clause 3 and 4 from TNF licenses
 1.15 19-Oct-2007  ad branches: 1.15.16; 1.15.18; 1.15.20;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.14 11-Dec-2005  christos branches: 1.14.30; 1.14.44; 1.14.46; 1.14.50;
merge ktrace-lwp.
 1.13 26-Aug-2005  drochner s/locdesc_t/int/g
 1.12 27-Feb-2005  perry branches: 1.12.4;
nuke trailing whitespace
 1.11 13-Sep-2004  drochner branches: 1.11.4; 1.11.6;
a round of autoconf cleanup:
-convert submatch() style functions (passed to config_search() or
config_found_sm()) to the locator passing variants
-pass interface attributes in some cases
-make submatch() functions look uniformly as far as possible
-avoid macros which just hide cfdata members, and reduce dependencies
on "locators.h"
 1.10 01-Jan-2003  thorpej branches: 1.10.2;
Use aprint_normal() in cfprint routines.
 1.9 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.8 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.7 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.6 13-Jan-2002  takemura Added new config hook type PCIINTR (handling PCI interrupt).
Added config hook APIs, config_connect, config_disconnect and
config_connected_call.
Supported PCIINTR type event in hpcio.
 1.5 13-Nov-2001  lukem add RCSID
 1.4 13-Jun-2001  uch branches: 1.4.2; 1.4.4;
make this work.
 1.3 04-Jun-2001  uch ANSI KNF.
 1.2 01-May-2001  takemura Fix 'busname' to attach nodes correctly.
 1.1 30-Apr-2001  takemura Machine independent GPIO interface.
 1.4.4.3 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.4.4.2 11-Feb-2002  jdolecek Sync w/ -current.
 1.4.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.2.6 03-Jan-2003  thorpej Sync with HEAD.
 1.4.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.4.2.4 28-Feb-2002  nathanw Catch up to -current.
 1.4.2.3 14-Nov-2001  nathanw Catch up to -current.
 1.4.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.1 13-Jun-2001  nathanw file hpcioman.c was added on branch nathanw_sa on 2001-06-21 20:01:39 +0000
 1.10.2.4 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.2.3 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.10.2.2 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.1 18-Sep-2004  skrll Sync with HEAD.
 1.11.6.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.11.4.1 29-Apr-2005  kent sync with -current
 1.12.4.2 27-Oct-2007  yamt sync with head.
 1.12.4.1 21-Jun-2006  yamt sync with head.
 1.14.50.1 25-Oct-2007  bouyer Sync with HEAD.
 1.14.46.1 06-Nov-2007  matt sync with HEAD
 1.14.44.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.14.30.1 23-Oct-2007  ad Sync with head.
 1.15.20.2 16-May-2009  yamt sync with head
 1.15.20.1 16-May-2008  yamt sync with head.
 1.15.18.1 18-May-2008  yamt sync with head.
 1.15.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.16.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.18.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.18.12.1 30-Oct-2012  yamt sync with head
 1.19.54.4 04-Apr-2021  thorpej CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
 1.19.54.3 03-Apr-2021  thorpej Give config_attach() the tagged variadic argument treatment and
mechanically convert all call sites.
 1.19.54.2 21-Mar-2021  thorpej CFARG_IATTR usage audit:

If a device carries only one interface attribute, there is no need
to specify it when calling config_search(); that specification is
meant only to disambiguate which interface attribute (which is a
proxy for "what kind of attach args are being used") is having
children attached. cfparent_match() will take care of ensuring that
any potential children can attach to one of the parent's iterface
attributes, and if the parent only carries one, no disambiguation is
necessary.
 1.19.54.1 20-Mar-2021  thorpej The proliferation if config_search_*() and config_found_*() combinations
is a little absurd, so begin to tidy this up:

- Introduce a new cfarg_t enumerated type, that defines the types of
tag-value variadic arguments that can be passed to the various
config_*() functions (CFARG_SUBMATCH, CFARG_IATTR, and CFARG_LOCATORS,
for now, plus a CFARG_EOL sentinel).
- Collapse config_search_*() into config_search() that takes these
variadic arguments.
- Convert all call sites of config_search_*() to the new signature.
Noticed several incorrect usages along the way, which will be
audited in a future commit.
 1.20.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 13-Jan-2002  takemura branches: 1.2.114; 1.2.116; 1.2.118;
Added new config hook type PCIINTR (handling PCI interrupt).
Added config hook APIs, config_connect, config_disconnect and
config_connected_call.
Supported PCIINTR type event in hpcio.
 1.1 30-Apr-2001  takemura branches: 1.1.2; 1.1.4;
Machine independent GPIO interface.
 1.1.4.1 11-Feb-2002  jdolecek Sync w/ -current.
 1.1.2.3 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.1 30-Apr-2001  nathanw file hpciomanvar.h was added on branch nathanw_sa on 2001-06-21 20:01:40 +0000
 1.2.118.1 16-May-2008  yamt sync with head.
 1.2.116.1 18-May-2008  yamt sync with head.
 1.2.114.1 02-Jun-2008  mjf Sync with HEAD.
 1.6 11-Dec-2005  christos merge ktrace-lwp.
 1.5 07-Jun-2005  he Add const to the name fields in hipcio_chip and hpcio_attach_args.
 1.4 04-Jun-2001  uch branches: 1.4.2; 1.4.24;
ANSI KNF.
 1.3 06-May-2001  takemura Vrc4172 GPIO support. This device is currently configured on PenCentra 130.
 1.2 01-May-2001  takemura Fix 'busname' to attach nodes correctly.
 1.1 30-Apr-2001  takemura Machine independent GPIO interface.
 1.4.24.1 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.4.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.1 04-Jun-2001  nathanw file hpciovar.h was added on branch nathanw_sa on 2001-06-21 20:01:40 +0000
 1.38 26-Oct-2022  andvar nix double n, i or g in "ing", in comments and documentation.
 1.37 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.36 24-Apr-2021  thorpej branches: 1.36.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.35 18-Sep-2018  uwe branches: 1.35.14;
Clarify the comment in the "unconst" version of hpckbd_keymap_setup.
Both sh3 (P1) and mips (kseg0) have the kernel directly mapped.
 1.34 18-Sep-2018  uwe Fix comment formatting in previous.
 1.33 18-Sep-2018  rin Apply workaround introduced in r1.32 to hpcmips.

Fix kernel crash when console is attached. Now, my MC/R550 boots multiuser.

Thanks Masahiko Ito for encouraging me to do bisection to find this out.

XXX pullup-8, pullup-7
 1.32 07-Aug-2017  uwe branches: 1.32.2; 1.32.4;
XXX: On hpcsh only - bring back old incorrect hpckbd_keymap_setup()
fixed in 1.31. The old one with UNCONST does work on hpcsh b/c the
kernel is directly mapped. The new one does not work on hpcsh b/c it
calls consinit() very early when malloc() is not yet available.

The real fix for this is to fix the constness of wscons keymap
structures that is self-contradictory.
 1.31 12-Jun-2017  manu Restore wscons keymaps feature on hpcarm

hpc ports need to alter keydesc data at runtime in order to load
alternate keymaps. But since keydesc is const initialized data, it
is mapped read only and the operation should fail.

It seems older compiler failed to enforce the read-only mapping and
this is why it used to work, but on recent NetBSD releases, the
feature is broken.

We fix it by duplicating the keydesc data once into a malloc'ed area
that can be modified.
 1.30 27-Oct-2012  chs branches: 1.30.12; 1.30.14; 1.30.30;
split device_t/softc for all remaining drivers.
replace "struct device *" with "device_t".
use device_xname(), device_unit(), etc.
 1.29 11-Jun-2011  nonaka branches: 1.29.2; 1.29.12;
split device_t/softc.
 1.28 12-May-2009  cegger branches: 1.28.4; 1.28.10;
struct device * -> device_t, no functional changes intended.
 1.27 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.26 05-Apr-2009  uwe Register with pmf(9), tell it we don't need anything.
 1.25 28-Apr-2008  martin branches: 1.25.8; 1.25.14;
Remove clause 3 and 4 from TNF licenses
 1.24 19-Oct-2007  ad branches: 1.24.16; 1.24.18; 1.24.20;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.23 23-Sep-2007  kiyohara branches: 1.23.4;
We call to config_hook_call() with always 'on'.
It doesn't suspend it for NULL.
 1.22 04-Mar-2007  christos branches: 1.22.2; 1.22.14; 1.22.16;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.21 29-Jan-2007  hubertf branches: 1.21.2;
Remove more duplicate headers.
Patch by Slava Semushin <slava.semushin@gmail.com>

Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
 1.20 16-Nov-2006  christos __unused removal on arguments; approved by core.
 1.19 12-Oct-2006  uwe -Wextra fixes
 1.18 24-Sep-2006  peter Run the "power button event" hooks when the special button OFF is pressed.
Change the keycodes in the keymaps that are currently using the OFF button
to -1 so that they will still operate the same way (i.e. do nothing).

No objection on port-hpcsh & port-hpcmips.
 1.17 29-Mar-2006  thorpej branches: 1.17.8; 1.17.10;
Use device_private().
 1.16 13-Feb-2006  uwe branches: 1.16.2; 1.16.4; 1.16.6;
Move assignment out of conditional expression.
 1.15 12-Feb-2006  peter Fix a typo, use uintN_t, use assigned variables, add newline to a printf.
 1.14 11-Dec-2005  christos branches: 1.14.2; 1.14.4; 1.14.6;
merge ktrace-lwp.
 1.13 08-Jun-2005  he branches: 1.13.2;
Add an __UNCONST() to appease -Wcast-qual.

XXX The way this is done is really wrong, as this function ends up
modifying read-only data marked with 'const'.
The reason we can get away with this is that apparently all the
ports using this code maps text and read-only data read-write.

Reviewed by christos, who suggested "a big XXX comment".
 1.12 27-Feb-2005  perry nuke trailing whitespace
 1.11 13-Mar-2004  bjh21 branches: 1.11.8; 1.11.10;
Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it. This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111. The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers. To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned. Thy just use rather more function pointers than before. Tested
on i386 and (with a new host driver) acorn32. Compiled on several other
affected architectures.
 1.10 02-Oct-2002  thorpej branches: 1.10.6;
Add trailing ; to CFATTACH_DECL.
 1.9 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.8 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.7 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.6 13-Nov-2001  lukem add RCSID
 1.5 04-Jun-2001  uch branches: 1.5.2;
ANSI KNF.
 1.4 08-May-2001  uch fix locking problem of event queue access.
 1.3 12-Apr-2001  thorpej splimp -> splvm (it's questionable whether or not this is really
the right level at all -- maybe splhigh? Anyway, XXX comment added
as well).
 1.2 01-Mar-2001  uch branches: 1.2.2; 1.2.4;
if catch unknown scancode, print its row and column.
 1.1 22-Feb-2001  uch hpc common files are moved to dev/hpc.
 1.2.4.3 21-Apr-2001  bouyer Sync with HEAD
 1.2.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.2.4.1 01-Mar-2001  bouyer file hpckbd.c was added on branch thorpej_scsipi on 2001-03-12 13:30:06 +0000
 1.2.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.2.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.3 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.5.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.5.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.6.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.10.6.5 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.10.6.4 24-Jan-2005  skrll Adapt to branch.
 1.10.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.10.6.1 03-Aug-2004  skrll Sync with HEAD
 1.11.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.11.8.1 29-Apr-2005  kent sync with -current
 1.13.2.5 27-Oct-2007  yamt sync with head.
 1.13.2.4 03-Sep-2007  yamt sync with head.
 1.13.2.3 26-Feb-2007  yamt sync with head.
 1.13.2.2 30-Dec-2006  yamt sync with head.
 1.13.2.1 21-Jun-2006  yamt sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.14.2.1 18-Feb-2006  yamt sync with head.
 1.16.6.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.16.4.1 19-Apr-2006  elad sync with head.
 1.16.2.1 01-Apr-2006  yamt sync with head.
 1.17.10.2 10-Dec-2006  yamt sync with head.
 1.17.10.1 22-Oct-2006  yamt sync with head
 1.17.8.2 01-Feb-2007  ad Sync with head.
 1.17.8.1 18-Nov-2006  ad Sync with head.
 1.21.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.22.16.1 06-Nov-2007  matt sync with HEAD
 1.22.14.2 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.22.14.1 02-Oct-2007  joerg Sync with HEAD.
 1.22.2.2 23-Oct-2007  ad Sync with head.
 1.22.2.1 09-Oct-2007  ad Sync with head.
 1.23.4.1 25-Oct-2007  bouyer Sync with HEAD.
 1.24.20.3 16-May-2009  yamt sync with head
 1.24.20.2 04-May-2009  yamt sync with head.
 1.24.20.1 16-May-2008  yamt sync with head.
 1.24.18.1 18-May-2008  yamt sync with head.
 1.24.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.25.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.25.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.28.10.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.28.4.1 12-Jun-2011  rmind sync with head
 1.29.12.2 03-Dec-2017  jdolecek update from HEAD
 1.29.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.29.2.1 30-Oct-2012  yamt sync with head
 1.30.30.3 23-Sep-2018  martin Pull up following revision(s) (requested by rin in ticket #1021):

sys/dev/hpc/hpckbd.c: revision 1.33
sys/dev/hpc/hpckbd.c: revision 1.34
sys/dev/hpc/hpckbd.c: revision 1.35

Apply workaround introduced in r1.31 to hpcmips.

Fix kernel crash when console is attached. Now, my MC/R550 boots multiuser.
Thanks Masahiko Ito for encouraging me to do bisection to find this out.
XXX pullup-8, pullup-7

Fix comment formatting in previous.

Clarify the comment in the "unconst" version of hpckbd_keymap_setup.
Both sh3 (P1) and mips (kseg0) have the kernel directly mapped.
 1.30.30.2 09-Aug-2017  snj Pull up following revision(s) (requested by uwe in ticket #202):
sys/dev/hpc/hpckbd.c: revision 1.32
XXX: On hpcsh only - bring back old incorrect hpckbd_keymap_setup()
fixed in 1.31. The old one with UNCONST does work on hpcsh b/c the
kernel is directly mapped. The new one does not work on hpcsh b/c it
calls consinit() very early when malloc() is not yet available.
The real fix for this is to fix the constness of wscons keymap
structures that is self-contradictory.
 1.30.30.1 30-Jun-2017  snj Pull up following revision(s) (requested by manu in ticket #61):
sys/dev/hpc/hpckbd.c: revision 1.31
Restore wscons keymaps feature on hpcarm
hpc ports need to alter keydesc data at runtime in order to load
alternate keymaps. But since keydesc is const initialized data, it
is mapped read only and the operation should fail.
It seems older compiler failed to enforce the read-only mapping and
this is why it used to work, but on recent NetBSD releases, the
feature is broken.
We fix it by duplicating the keydesc data once into a malloc'ed area
that can be modified.
 1.30.14.1 28-Aug-2017  skrll Sync with HEAD
 1.30.12.3 30-Oct-2018  sborrill Pull up the following revisions(s) (requested by rin in ticket #1638):
sys/dev/hpc/hpckbd.c: revision 1.33-1.35

Fix kernel crash on hpcmips when console is attached.
 1.30.12.2 09-Aug-2017  snj Pull up following revision(s) (requested by uwe in ticket #1465):
sys/dev/hpc/hpckbd.c: revision 1.32
XXX: On hpcsh only - bring back old incorrect hpckbd_keymap_setup()
fixed in 1.31. The old one with UNCONST does work on hpcsh b/c the
kernel is directly mapped. The new one does not work on hpcsh b/c it
calls consinit() very early when malloc() is not yet available.
The real fix for this is to fix the constness of wscons keymap
structures that is self-contradictory.
 1.30.12.1 23-Jul-2017  snj Pull up following revision(s) (requested by manu in ticket #1438):
sys/dev/hpc/hpckbd.c: revision 1.31
Restore wscons keymaps feature on hpcarm
hpc ports need to alter keydesc data at runtime in order to load
alternate keymaps. But since keydesc is const initialized data, it
is mapped read only and the operation should fail.
It seems older compiler failed to enforce the read-only mapping and
this is why it used to work, but on recent NetBSD releases, the
feature is broken.
We fix it by duplicating the keydesc data once into a malloc'ed area
that can be modified.
 1.32.4.1 10-Jun-2019  christos Sync with HEAD
 1.32.2.1 30-Sep-2018  pgoyette Ssync with HEAD
 1.35.14.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.36.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.51 06-Aug-2011  kiyohara Add support for PSIONTEKLOGIX NETBOOK PRO.
 1.50 23-May-2010  nonaka Added WS020SH keymap.
 1.49 17-Apr-2010  nonaka Added Sharp W-ZERO3 series support.
 1.48 28-Apr-2008  martin branches: 1.48.20; 1.48.22;
Remove clause 3 and 4 from TNF licenses
 1.47 23-Sep-2007  kiyohara branches: 1.47.20; 1.47.22; 1.47.24;
Fix to persona_hpw{5,20}0pad_special_keymap.[KEY_SPECIAL_OFF] = 5.
 1.46 12-Oct-2006  uwe branches: 1.46.8; 1.46.22; 1.46.24;
-Wextra fixes
 1.45 07-Oct-2006  peter Jornada 720: change key 127 to KEY_SPECIAL_OFF.
 1.44 24-Sep-2006  peter Run the "power button event" hooks when the special button OFF is pressed.
Change the keycodes in the keymaps that are currently using the OFF button
to -1 so that they will still operate the same way (i.e. do nothing).

No objection on port-hpcsh & port-hpcmips.
 1.43 27-Jun-2006  peter branches: 1.43.4; 1.43.6;
Set the jornada 720 volume up/down and play buttons to ignore
instead of unknown.
 1.42 08-Apr-2006  peter branches: 1.42.4;
The altgr button has number 184, not 219. Change the jornada 720
key translation tables to use the correct number.

Patch for the US/UK model has been tested by Alex Poylisher & Mark Kirby.
 1.41 28-Mar-2006  tsutsui Add keymap for Clio C-1000 and C-1050.
Patch from Matthew Orgass in PR port-hpcmips/28383.
 1.40 07-Mar-2006  peter branches: 1.40.2;
Jornada 720 US/UK: map the win and fn buttons correctly.

Problem reported and patch tested by Alex Poylisher.
 1.39 04-Mar-2006  peter branches: 1.39.2; 1.39.4;
Add keyboard translation for the Jornada 720 Japanese, US/UK (ABA, ABU)
and "International English" (ABB) models.

Share the existing Jornada 680/690 (hpcsh) keyboard layouts with
Jornada 720 (hpcarm).
 1.38 11-Dec-2005  christos branches: 1.38.4; 1.38.6;
merge ktrace-lwp.
 1.37 05-Sep-2005  kiyohara Support LCD screen driver for PERSONA SH3 machines.
 1.36 30-Jul-2005  nakayama Add LCD brightness control keymaps and correct some key assigns for
Sharp Telios series.
 1.35 14-Jul-2005  uwe Keyboard translation for HP 620LX. Data and testing on an
"International English" (#ABB) unit from Christer Andersson.
US version (#ABA) uses the same primary layer layout as far as I can
figure from keyboard pictures, so this table should work for those
machines too.
 1.34 19-Jan-2005  uwe branches: 1.34.6; 1.34.8;
Shuffle persona_hpw200ec_keytrans[] to match recent change to
pfckbd_callout_hitachi().

Fix KEY_SPECIAL_OFF for both Persona machines.

From KIYOHARA Takashi.
 1.33 18-Jan-2005  uwe Kill trailing whitespace.
 1.32 18-Jan-2005  uwe Use uint<N>_t instead of u_int<N>_t.
 1.31 18-Jan-2005  uwe Rewrite pfckbd_callout_hitachi() to do the same scan line dance that
pfckbd_callout_hp() does. Change the order of scan and the layout of
the matrix to be more natural.

Chords like <Shift>+<L> now work.

From KIYOHARA Takashi.
 1.30 11-Jan-2005  uwe branches: 1.30.2;
Add keyboard layout for Jornada 680/690 Spanish (ABE).
From Alfonso Fernandez.
 1.29 03-Jul-2004  uch jornada 6x0 use j6x0pwr as power button. remove special keymap.
 1.28 28-Jun-2004  uch add HPW200EC keymap. patch by "Jeremiah Holt" <jholt5638@earthlink.net>
 1.27 06-Apr-2004  tv Give the MobilePro 800 and MobilePro 880 correct keymaps: fix the
positioning of the cursor keys to match the keycaps, and make the cmdmap
work correctly.
 1.26 18-Mar-2004  uwe branches: 1.26.2;
Scandinavian keyboard layout for Jornada 680/690.
 1.25 17-Mar-2004  uwe Comment change only. Add a reminder that if you add new entry to
hpckbd_keymap_table, you must make sure that pckbd_keydesctab[] in
sys/dev/pckbport/wskbdmap_mfii.c has a placeholder KB_MACHDEP entry
for the base ht_layout that you refer.

I've stepped on this rakes two times already, with DE and FR keymaps,
so I gather, I'd better add this reminder, if only for myself. :)
 1.24 17-Mar-2004  uwe The platid for Jornada 680/690 with European English (ABB) keyboard is
now properly renamed to have the EU suffix.

Enable Jornada 680/690 French (ABF) keymap now that we have a platid
for it (requires updated hpcboot.exe to use).
 1.23 15-Mar-2004  uwe Now that we can control contrast and brightness of the Jornada 680 LCD
add KS_Cmd_{Contrast,Brightness}{Up,Down} to default keymaps.
 1.22 15-Mar-2004  uwe Change #if 0 protecting the lines with KS_euro to #ifdef KS_euro, so
that the keymap definitions are forward-compatible.
 1.21 23-Aug-2003  uwe French keydesc for Jornada 680/690. Written based on photos and
descriptions of WinCE behavior from Ge'rard Gambaro (jornada.free.fr).
Not tested on an actual ABF unit.

Hidden under #if 0, as we don't have a platform id for French Jornadas yet.
But I think it's better off committed before it's got lost.
 1.20 18-May-2003  uwe branches: 1.20.2;
Oops, correct platids for 680/690 with European English (ABB)
keyboard. We still use hpcboot's "Hungarian" entry for them.
 1.19 26-Apr-2003  uwe Keymaps for US and German keyboards for Jornada 680/690.
 1.18 28-Dec-2002  uwe Sync US map with reality. Rename what used to called "us" map to
international. Drop Hungarian map that is a proper subset of
international map (and I strongly suspect the "Hungarian" is a
misnomer in the first place). Adjust hpckbd_keymap_table accordingly.

With this change selecting "US" in hpcboot will give you real US
layout. Selecting "Hungarian" will give you international layout and
I think hpcboot shall be changed accordingly.

I'm not sure if there's separate "German" layout for hpcs. I think
any layout that is not different from us/international on the primary
layer shall be handled with wsconsctl.
 1.17 28-Dec-2002  uwe jornada6x0_us_keytrans: Map "del" key to 211 ("Del") not 14 ("<=").
Our default keymaps map "<=" to KS_Delete (i.e. vt-style rubout)
anyway, so default behavior is not changed, but some people might
prefer to map "<=" and "del" differently. Let them distinguish
between the two. Fix the flying windows key mapping it should be 219,
not 221 (menu). Drop non-existent keycode 125.
 1.16 28-Nov-2002  hamajima add Sigmarion2. it is same keymap of Sigmarion.
 1.15 11-May-2002  uwe branches: 1.15.4;
Correct AltGr keycode for 680/US layout.
 1.14 10-May-2002  uwe Comment change only: remove XXX.
 1.13 02-May-2002  uch add Jornada680/690 US-keymap. patch by uwe.
 1.12 08-Oct-2001  uch fix PERSONA keymap. patch by KIYOHARA Takashi
 1.11 14-Sep-2001  uch HITACHI PERSONA keymap. patch by KIYOHARA Takashi.
 1.10 18-Apr-2001  takemura branches: 1.10.2; 1.10.4;
Add Mobile Pro 780 own keymap. This resolves the arrow key problem on
Mobile Pro 780.
 1.9 09-Apr-2001  sato fix KS_Cmd_Screen* in sigmarion_cmdmap[].
 1.8 05-Apr-2001  sato add MobilePro770 cmdmap.
 1.7 24-Mar-2001  uch add HP 620LX Japanese model keymap.
 1.6 22-Mar-2001  uch add Hugarian and German keymap
patch by Laszlo Szabo <rka@rka.hu>
 1.5 04-Mar-2001  takemura branches: 1.5.2; 1.5.4;
Add platform id and keymap for CASIO PocketPostPet.
 1.4 04-Mar-2001  takemura Fix key codes of arrow keys:
72(KS_KP_Up) -> 200(KS_Up)
75(KS_KP_Left) -> 203(KS_Left)
77(KS_KP_Right) -> 205(KS_Right)
80(KS_KP_Down) -> 208(KS_Down)
in 11 keymaps:
tc5165_telios_jp
tc5165_compaq_c_jp
m38813c_keymap
mcr_jp
z50
tripad
mccs
mobilepro
mobilepro750c
intertop
sigmarion_jp
 1.3 02-Mar-2001  uch HP Jornada 680 Japanese model keymap.
 1.2 24-Feb-2001  uch add HP Jornada 690 Japanese model keymap.
 1.1 22-Feb-2001  uch hpc common files are moved to dev/hpc.
 1.5.4.4 21-Apr-2001  bouyer Sync with HEAD
 1.5.4.3 27-Mar-2001  bouyer Sync with HEAD.
 1.5.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.5.4.1 04-Mar-2001  bouyer file hpckbdkeymap.h was added on branch thorpej_scsipi on 2001-03-12 13:30:06 +0000
 1.5.2.7 29-Dec-2002  thorpej Sync with HEAD.
 1.5.2.6 11-Dec-2002  thorpej Sync with HEAD.
 1.5.2.5 20-Jun-2002  nathanw Catch up to -current.
 1.5.2.4 22-Oct-2001  nathanw Catch up to -current.
 1.5.2.3 21-Sep-2001  nathanw Catch up to -current.
 1.5.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.1 09-Apr-2001  nathanw Catch up with -current.
 1.10.4.2 11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.10.4.1 01-Oct-2001  fvdl Catch up with -current.
 1.10.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.10.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.15.4.1 07-Apr-2004  jmc Pullup rev 1.27 (requested by tv in ticket #1659)

Give the MobilePro 800 and MobilePro 880 correct keymaps: fix the
positioning of the cursor keys to match the keycaps, and make the cmdmap
work correctly.
 1.20.2.6 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.20.2.5 24-Jan-2005  skrll Sync with HEAD.
 1.20.2.4 17-Jan-2005  skrll Sync with HEAD.
 1.20.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.20.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.20.2.1 03-Aug-2004  skrll Sync with HEAD
 1.26.2.1 07-Apr-2004  jmc Pullup rev 1.27 (requested by tv in ticket #74)

Give the MobilePro 800 and MobilePro 880 correct keymaps: fix the
positioning of the cursor keys to match the keycaps, and make the cmdmap
work correctly.
 1.30.2.1 29-Apr-2005  kent sync with -current
 1.34.8.3 27-Oct-2007  yamt sync with head.
 1.34.8.2 30-Dec-2006  yamt sync with head.
 1.34.8.1 21-Jun-2006  yamt sync with head.
 1.34.6.2 04-Aug-2005  tron Pull up revision 1.36 (requested by nakayama in ticket #637):
Add LCD brightness control keymaps and correct some key assigns for
Sharp Telios series.
 1.34.6.1 19-Jul-2005  riz Pull up revision 1.35 (requested by uwe in ticket #598):
Keyboard translation for HP 620LX. Data and testing on an
"International English" (#ABB) unit from Christer Andersson.
US version (#ABA) uses the same primary layer layout as far as I can
figure from keyboard pictures, so this table should work for those
machines too.
 1.38.6.1 22-Apr-2006  simonb Sync with head.
 1.38.4.1 09-Sep-2006  rpaulo sync with head
 1.39.4.1 19-Apr-2006  elad sync with head.
 1.39.2.4 11-Aug-2006  yamt sync with head
 1.39.2.3 11-Apr-2006  yamt sync with head
 1.39.2.2 01-Apr-2006  yamt sync with head.
 1.39.2.1 13-Mar-2006  yamt sync with head.
 1.40.2.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.40.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.42.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.43.6.1 22-Oct-2006  yamt sync with head
 1.43.4.1 18-Nov-2006  ad Sync with head.
 1.46.24.1 06-Nov-2007  matt sync with HEAD
 1.46.22.1 02-Oct-2007  joerg Sync with HEAD.
 1.46.8.1 09-Oct-2007  ad Sync with head.
 1.47.24.2 11-Aug-2010  yamt sync with head.
 1.47.24.1 16-May-2008  yamt sync with head.
 1.47.22.1 18-May-2008  yamt sync with head.
 1.47.20.1 02-Jun-2008  mjf Sync with HEAD.
 1.48.22.1 30-May-2010  rmind sync with head
 1.48.20.2 17-Aug-2010  uebayasi Sync with HEAD.
 1.48.20.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.2 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.1 22-Feb-2001  uch branches: 1.1.4; 1.1.124; 1.1.126; 1.1.128;
hpc common files are moved to dev/hpc.
 1.1.128.1 16-May-2008  yamt sync with head.
 1.1.126.1 18-May-2008  yamt sync with head.
 1.1.124.1 02-Jun-2008  mjf Sync with HEAD.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file hpckbdvar.h was added on branch thorpej_scsipi on 2001-03-12 13:30:07 +0000
 1.16 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.15 12-May-2009  cegger branches: 1.15.12; 1.15.22;
struct device * -> device_t, no functional changes intended.
 1.14 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.13 28-Apr-2008  martin branches: 1.13.14;
Remove clause 3 and 4 from TNF licenses
 1.12 15-Dec-2007  perry branches: 1.12.6; 1.12.8; 1.12.10;
__FUNCTION__ -> __func__
 1.11 19-Oct-2007  ad branches: 1.11.4; 1.11.8;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.10 29-Mar-2006  thorpej branches: 1.10.18; 1.10.32; 1.10.34; 1.10.38;
Use device_private().
 1.9 11-Dec-2005  christos branches: 1.9.4; 1.9.6; 1.9.8; 1.9.10; 1.9.12;
merge ktrace-lwp.
 1.8 27-Feb-2005  perry branches: 1.8.4;
nuke trailing whitespace
 1.7 02-Oct-2002  thorpej branches: 1.7.6; 1.7.14; 1.7.16;
Add trailing ; to CFATTACH_DECL.
 1.6 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.5 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.4 13-Nov-2001  lukem add RCSID
 1.3 13-Jun-2001  uch branches: 1.3.2; 1.3.4;
make this work.
 1.2 04-Jun-2001  uch ANSI KNF.
 1.1 30-Apr-2001  takemura Machine independent GPIO interface.
 1.3.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.3.4.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.3.2.3 14-Nov-2001  nathanw Catch up to -current.
 1.3.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.1 13-Jun-2001  nathanw file hpcout.c was added on branch nathanw_sa on 2001-06-21 20:01:42 +0000
 1.7.16.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.7.14.1 29-Apr-2005  kent sync with -current
 1.7.6.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.8.4.3 21-Jan-2008  yamt sync with head
 1.8.4.2 27-Oct-2007  yamt sync with head.
 1.8.4.1 21-Jun-2006  yamt sync with head.
 1.9.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.9.10.1 19-Apr-2006  elad sync with head.
 1.9.8.1 01-Apr-2006  yamt sync with head.
 1.9.6.1 22-Apr-2006  simonb Sync with head.
 1.9.4.1 09-Sep-2006  rpaulo sync with head
 1.10.38.1 25-Oct-2007  bouyer Sync with HEAD.
 1.10.34.2 09-Jan-2008  matt sync with HEAD
 1.10.34.1 06-Nov-2007  matt sync with HEAD
 1.10.32.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.10.18.1 23-Oct-2007  ad Sync with head.
 1.11.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.11.4.1 26-Dec-2007  ad Sync with head.
 1.12.10.2 16-May-2009  yamt sync with head
 1.12.10.1 16-May-2008  yamt sync with head.
 1.12.8.1 18-May-2008  yamt sync with head.
 1.12.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.15.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.15.12.1 30-Oct-2012  yamt sync with head
 1.5 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.4 11-Dec-2005  christos branches: 1.4.26;
merge ktrace-lwp.
 1.3 31-May-2005  uwe branches: 1.3.2;
Constify.
 1.2 27-Feb-2005  perry nuke trailing whitespace
 1.1 28-May-2004  tsarna branches: 1.1.2; 1.1.6; 1.1.8;
Refactor tpcalib and hpc* ports to make tpcalib MI, as discussed on tech-kern.
 1.1.8.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.6.1 29-Apr-2005  kent sync with -current
 1.1.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.5 24-Jan-2005  skrll Adapt to branch.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 28-May-2004  skrll file hpctpanel.c was added on branch ktrace-lwp on 2004-08-03 10:45:58 +0000
 1.3.2.2 03-Sep-2007  yamt sync with head.
 1.3.2.1 21-Jun-2006  yamt sync with head.
 1.4.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.4 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.3 04-Mar-2007  christos branches: 1.3.36; 1.3.38; 1.3.40;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.2 11-Dec-2005  christos branches: 1.2.26;
merge ktrace-lwp.
 1.1 28-May-2004  tsarna branches: 1.1.2; 1.1.14;
Refactor tpcalib and hpc* ports to make tpcalib MI, as discussed on tech-kern.
 1.1.14.2 03-Sep-2007  yamt sync with head.
 1.1.14.1 21-Jun-2006  yamt sync with head.
 1.1.2.5 24-Jan-2005  skrll Adapt to branch.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 28-May-2004  skrll file hpctpanelvar.h was added on branch ktrace-lwp on 2004-08-03 10:45:58 +0000
 1.2.26.1 12-Mar-2007  rmind Sync with HEAD.
 1.3.40.1 16-May-2008  yamt sync with head.
 1.3.38.1 18-May-2008  yamt sync with head.
 1.3.36.1 02-Jun-2008  mjf Sync with HEAD.
 1.34 22-Aug-2025  uwe hpf1275a: g/c unused variable to placate gcc
 1.33 10-May-2023  riastradh hpf1275a(4): Use config_detach_children.
 1.32 26-Oct-2022  riastradh hpf1275a(4): Convert to ttylock/ttyunlock.
 1.31 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.30 24-Apr-2021  thorpej branches: 1.30.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.29 28-Oct-2017  riastradh branches: 1.29.20;
Kill some more extern struct cfdriver declarations.

Down with externs in .c!
 1.28 02-Aug-2017  uwe Fix the previous fix that doesn't even compile.
 1.27 28-Jun-2013  christos branches: 1.27.10; 1.27.24;
fix uninitialized pointer. This could have never worked.
http://m00nbsd.net/ae123a9bae03f7dde5c6d654412daf5a.html
 1.26 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.25 12-May-2009  cegger branches: 1.25.12; 1.25.22;
struct device * -> device_t, no functional changes intended.
 1.24 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.23 06-Apr-2008  cegger branches: 1.23.4; 1.23.18;
use aprint_*_dev and device_xname
 1.22 10-Nov-2007  ad branches: 1.22.14;
Call ttyflush() with tty_lock held.
 1.21 09-Mar-2007  drochner branches: 1.21.14; 1.21.16; 1.21.20; 1.21.22;
after the recent config_attach_pseudo() changes, unit numbers have the same
sementics as for real devices, so DVUNIT_ANY=-1 is illegal
 1.20 04-Mar-2007  christos Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.19 16-Nov-2006  christos branches: 1.19.4;
__unused removal on arguments; approved by core.
 1.18 27-Oct-2006  uwe Nuke GPROF cargo-cult I've been cut-n-pasting around in my drivers.
 1.17 12-Oct-2006  uwe -Wextra fixes
 1.16 01-Oct-2006  elad More from Matt Fleming:

Adapt to KAUTH_DEVICE_TTY_PRIVSET and KAUTH_DEVICE_TTY_OPEN.
 1.15 21-Jul-2006  ad branches: 1.15.4; 1.15.6;
- Use the LWP cached credentials where sane.
- Minor cosmetic changes.
 1.14 30-May-2006  uwe If tty that we open already has hpf1275a line discipline set, don't
spawn new pseudo-device and wskbd instances.

XXX: The logic for exclusive use needs to be thought out better, but
for now this should at least prevent scores of new hpf1275a/wskbd
being attached if you accidentally set this line discipline on your
serial console.
 1.13 29-May-2006  uwe Miscellaneous cosmetics.
 1.12 29-May-2006  uwe Propagate "static" to linesw method defintions.
 1.11 29-May-2006  uwe Constify hpf1275a_wskbd_keymapdata.
 1.10 22-May-2006  uwe #include <dev/wscons/wsksymvar.h> as gcc4 doesn't like arrays,
pckbd_keydesctab[] in this case, with incomplete element types (older
versions of gcc allow them as long as you don't try to access them).
 1.9 15-May-2006  yamt branches: 1.9.2;
- include kauth.h for kauth_authorize_generic.
- whitespace.
 1.8 14-May-2006  elad integrate kauth.
 1.7 29-Mar-2006  thorpej Use device_private().
 1.6 14-Mar-2006  uwe branches: 1.6.2;
Constify scancode translation table.
Print dv_xname when reporting unknown scancode.
 1.5 14-Mar-2006  uwe Support WSDISPLAY_COMPAT_RAWKBD so that this keyboard is usable under X.
 1.4 18-Dec-2005  uwe branches: 1.4.4; 1.4.6; 1.4.8; 1.4.10;
Adapt to ktrace-lwp changes.
Call ttyldisc_detach with correct argument.
 1.3 27-Nov-2005  thorpej Overhaul how TTY line disciplines are handled:
- Replace references to linesw[0] with a ttyldisc_default() function
that returns the default ("termios") line discipline.
- The linesw[] array is gone, replaced by a linked list.
- ttyldisc_add() and ttyldisc_remove() have been replaced by
ttyldisc_attach() and ttyldisc_detach().
- Things that provide line disciplines are now responsible for
registering those disciplines with the system. The linesw
structures are no longer declared in tty_conf.c
- Line disciplines are now refcounted; a lookup causes a reference to
be held. ttyldisc_release() releases the reference. Attempts to
detach an in-use line discipline result in EBUSY.
- Fix function signature lossage in if_sl.c, if_strip.c, and tty_tb.c
that was masked by the old tty_conf.c
- tty_init() is no longer necessary; delete it and its call from main().
 1.2 15-Oct-2004  thorpej branches: 1.2.12; 1.2.18;
Change config_attach_pseudo() to take a cfdata * that contains the
necessary information to create the pseudo-device instance. Pseudo-device
device's will reference this cfdata, just as normal devices reference
their corresponding cfdata.

Welcome to 2.99.10.
 1.1 23-Jun-2004  uwe branches: 1.1.2;
Driver for HP F1275A external keyboard.
 1.1.2.6 11-Dec-2005  christos Sync with head.
 1.1.2.5 19-Oct-2004  skrll Sync with HEAD
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 23-Jun-2004  skrll file hpf1275a_tty.c was added on branch ktrace-lwp on 2004-08-03 10:45:58 +0000
 1.2.18.1 29-Nov-2005  yamt sync with head.
 1.2.12.4 15-Nov-2007  yamt sync with head.
 1.2.12.3 03-Sep-2007  yamt sync with head.
 1.2.12.2 30-Dec-2006  yamt sync with head.
 1.2.12.1 21-Jun-2006  yamt sync with head.
 1.4.10.3 19-Apr-2006  elad sync with head.
 1.4.10.2 10-Mar-2006  elad generic_authorize() -> kauth_authorize_generic().
 1.4.10.1 08-Mar-2006  elad Adapt to kernel authorization KPI.
 1.4.8.4 11-Aug-2006  yamt sync with head
 1.4.8.3 26-Jun-2006  yamt sync with head.
 1.4.8.2 24-May-2006  yamt sync with head.
 1.4.8.1 01-Apr-2006  yamt sync with head.
 1.4.6.2 01-Jun-2006  kardel Sync with head.
 1.4.6.1 22-Apr-2006  simonb Sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.6.2.2 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.6.2.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.9.2.1 19-Jun-2006  chap Sync with head.
 1.15.6.2 10-Dec-2006  yamt sync with head.
 1.15.6.1 22-Oct-2006  yamt sync with head
 1.15.4.1 18-Nov-2006  ad Sync with head.
 1.19.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.21.22.1 19-Nov-2007  mjf Sync with HEAD.
 1.21.20.1 13-Nov-2007  bouyer Sync with HEAD
 1.21.16.1 09-Jan-2008  matt sync with HEAD
 1.21.14.1 11-Nov-2007  joerg Sync with HEAD.
 1.22.14.1 02-Jun-2008  mjf Sync with HEAD.
 1.23.18.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.23.4.1 16-May-2009  yamt sync with head
 1.25.22.3 03-Dec-2017  jdolecek update from HEAD
 1.25.22.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.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.25.12.1 30-Oct-2012  yamt sync with head
 1.27.24.1 17-May-2017  pgoyette At suggestion of chuq@, modify config_attach_pseudo() to return with a
reference held on the device.

Adapt callers to expect the reference to exist, and to ensure that the
reference is released.
 1.27.10.1 28-Aug-2017  skrll Sync with HEAD
 1.29.20.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.30.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.4 28-May-2004  tsarna Refactor tpcalib and hpc* ports to make tpcalib MI, as discussed on tech-kern.
 1.3 13-Nov-2001  lukem branches: 1.3.16;
add RCSID
 1.2 04-Jun-2001  uch branches: 1.2.2;
ANSI KNF.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file mra.c was added on branch thorpej_scsipi on 2001-03-12 13:30:07 +0000
 1.1.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.3.16.1 03-Aug-2004  skrll Sync with HEAD
 1.4 11-Dec-2005  christos merge ktrace-lwp.
 1.3 13-Mar-2004  bjh21 Abstract the interface between pckbc(4), and the pckbd(4) and pms(4)
drivers that attach to it. This allows for other host interface chips
that use the same keyboards and mice, such as the ones in the ARM
IOMD20, ARM7500, and SA-1111. The PC-compatible driver is still
called pckbc(4), and the new abstraction layer is "pckbport", so the
child devices have moved from sys/dev/pckbc to sys/dev/pckbport, which
also contains some code shared between all host controllers. To avoid
incompatibility, pckbdreg.h is still installed in
/usr/include/dev/pckbc.

In theory, this shouldn't cause any behavioural changes in the drivers
concerned. Thy just use rather more function pointers than before. Tested
on i386 and (with a new host driver) acorn32. Compiled on several other
affected architectures.
 1.2 13-Nov-2001  lukem branches: 1.2.16;
add RCSID
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4; 1.1.6;
hpc common files are moved to dev/hpc.
 1.1.6.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file pckbd_encode.c was added on branch thorpej_scsipi on 2001-03-12 13:30:07 +0000
 1.1.2.1 14-Nov-2001  nathanw Catch up to -current.
 1.2.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.16.1 03-Aug-2004  skrll Sync with HEAD
 1.1 22-Feb-2001  uch branches: 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file pckbd_encode.h was added on branch thorpej_scsipi on 2001-03-12 13:30:08 +0000
 1.20 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.19 12-May-2009  cegger branches: 1.19.12; 1.19.22;
struct device * -> device_t, no functional changes intended.
 1.18 12-May-2009  cegger struct cfdata * -> cfdata_t, no functional changes intended.
 1.17 19-Oct-2007  ad branches: 1.17.20; 1.17.34;
machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
 1.16 09-Oct-2006  peter branches: 1.16.8; 1.16.22; 1.16.24; 1.16.28;
Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.15 29-Mar-2006  thorpej branches: 1.15.8; 1.15.10;
Use device_private().
 1.14 29-Mar-2006  thorpej Use device_cfdata().
 1.13 11-Dec-2005  christos branches: 1.13.4; 1.13.6; 1.13.8; 1.13.10; 1.13.12;
merge ktrace-lwp.
 1.12 27-Feb-2005  perry branches: 1.12.4;
nuke trailing whitespace
 1.11 02-Oct-2002  thorpej branches: 1.11.6; 1.11.14; 1.11.16;
Add trailing ; to CFATTACH_DECL.
 1.10 30-Sep-2002  thorpej Use CFATTACH_DECL().
 1.9 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.8 13-Nov-2001  lukem add RCSID
 1.7 02-Aug-2001  sato turn pwctl_debug to 0
 1.6 31-Jul-2001  sato change DPRINTF() to VPRINTF() in pwctl_hardpower().
 1.5 04-Jun-2001  uch branches: 1.5.2; 1.5.4;
ANSI KNF.
 1.4 06-May-2001  takemura Vrc4172 GPIO support. This device is currently configured on PenCentra 130.
 1.3 01-May-2001  takemura Fix 'busname' to attach nodes correctly.
 1.2 30-Apr-2001  takemura Machine independent GPIO interface.
 1.1 30-Apr-2001  takemura Copy of sys/arch/hpcmips/vr/pwctl_vrgiu.c.
 1.5.4.3 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.5.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.4.1 03-Aug-2001  lukem update to -current
 1.5.2.5 18-Oct-2002  nathanw Catch up to -current.
 1.5.2.4 14-Nov-2001  nathanw Catch up to -current.
 1.5.2.3 24-Aug-2001  nathanw Catch up with -current.
 1.5.2.2 21-Jun-2001  nathanw Catch up to -current.
 1.5.2.1 04-Jun-2001  nathanw file pwctl.c was added on branch nathanw_sa on 2001-06-21 20:01:44 +0000
 1.11.16.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.11.14.1 29-Apr-2005  kent sync with -current
 1.11.6.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.4.3 27-Oct-2007  yamt sync with head.
 1.12.4.2 30-Dec-2006  yamt sync with head.
 1.12.4.1 21-Jun-2006  yamt sync with head.
 1.13.12.1 31-Mar-2006  tron Merge 2006-03-31 NetBSD-current into the "peter-altq" branch.
 1.13.10.1 19-Apr-2006  elad sync with head.
 1.13.8.1 01-Apr-2006  yamt sync with head.
 1.13.6.1 22-Apr-2006  simonb Sync with head.
 1.13.4.1 09-Sep-2006  rpaulo sync with head
 1.15.10.1 22-Oct-2006  yamt sync with head
 1.15.8.1 18-Nov-2006  ad Sync with head.
 1.16.28.1 25-Oct-2007  bouyer Sync with HEAD.
 1.16.24.1 06-Nov-2007  matt sync with HEAD
 1.16.22.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.16.8.1 23-Oct-2007  ad Sync with head.
 1.17.34.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.17.20.1 16-May-2009  yamt sync with head
 1.19.22.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.19.12.1 30-Oct-2012  yamt sync with head
 1.7 28-May-2004  tsarna Refactor tpcalib and hpc* ports to make tpcalib MI, as discussed on tech-kern.
 1.6 03-Jan-2003  takemura branches: 1.6.2;
Added new ioctl command, WSMOUSEIO_GETID to tell touch panel identifier
for tpctl(8).
 1.5 15-Dec-2002  takemura Changed SCALE value from (1024*1024) to (1024*256) to support large (1024<)
sample values.
 1.4 17-Mar-2002  atatat Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.3 13-Nov-2001  lukem add RCSID
 1.2 04-Jun-2001  uch branches: 1.2.2;
ANSI KNF.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file tpcalib.c was added on branch thorpej_scsipi on 2001-03-12 13:30:08 +0000
 1.1.2.5 07-Jan-2003  thorpej Sync with HEAD.
 1.1.2.4 19-Dec-2002  thorpej Sync with HEAD.
 1.1.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.1.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.2.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.6.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3 28-May-2004  tsarna Refactor tpcalib and hpc* ports to make tpcalib MI, as discussed on tech-kern.
 1.2 04-Jun-2001  uch branches: 1.2.22;
ANSI KNF.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file tpcalibvar.h was added on branch thorpej_scsipi on 2001-03-12 13:30:08 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.22.1 03-Aug-2004  skrll Sync with HEAD
 1.13 12-Feb-2012  matt Change old-style function defintions to C89 prototypes.

Approved by releng.
 1.12 18-Mar-2009  cegger branches: 1.12.12; 1.12.16;
Ansify function definitions w/o arguments. Generated with sed.
 1.11 28-Apr-2008  martin branches: 1.11.8; 1.11.14;
Remove clause 3 and 4 from TNF licenses
 1.10 16-Nov-2006  christos branches: 1.10.48; 1.10.50; 1.10.52;
__unused removal on arguments; approved by core.
 1.9 12-Oct-2006  uwe -Wextra fixes
 1.8 11-Dec-2005  christos branches: 1.8.20; 1.8.22;
merge ktrace-lwp.
 1.7 27-Feb-2005  perry branches: 1.7.4;
nuke trailing whitespace
 1.6 13-Nov-2003  chs branches: 1.6.8; 1.6.10;
eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
 1.5 02-Aug-2003  uwe Do not ##-concatenate identifiers with parens.
Makes gcc3 preprocessor happy.
 1.4 13-Nov-2001  lukem branches: 1.4.16;
add RCSID
 1.3 05-Jun-2001  uch branches: 1.3.2;
change behavior of cmap_work_alloc().
 1.2 04-Jun-2001  uch ANSI KNF.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file video_subr.c was added on branch thorpej_scsipi on 2001-03-12 13:30:08 +0000
 1.1.2.2 14-Nov-2001  nathanw Catch up to -current.
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.3.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.4.16.4 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.16.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.16.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.16.1 03-Aug-2004  skrll Sync with HEAD
 1.6.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.7.4.1 30-Dec-2006  yamt sync with head.
 1.8.22.2 10-Dec-2006  yamt sync with head.
 1.8.22.1 22-Oct-2006  yamt sync with head
 1.8.20.1 18-Nov-2006  ad Sync with head.
 1.10.52.2 04-May-2009  yamt sync with head.
 1.10.52.1 16-May-2008  yamt sync with head.
 1.10.50.1 18-May-2008  yamt sync with head.
 1.10.48.1 02-Jun-2008  mjf Sync with HEAD.
 1.11.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.11.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.12.16.1 18-Feb-2012  mrg merge to -current.
 1.12.12.1 17-Apr-2012  yamt sync with head
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 11-Dec-2005  christos branches: 1.4.70; 1.4.72; 1.4.74;
merge ktrace-lwp.
 1.3 27-Feb-2005  perry nuke trailing whitespace
 1.2 05-Jun-2001  uch branches: 1.2.22; 1.2.30; 1.2.32;
add vc_reverse flag to struct video_chip.
 1.1 22-Feb-2001  uch branches: 1.1.2; 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file video_subr.h was added on branch thorpej_scsipi on 2001-03-12 13:30:09 +0000
 1.1.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.2.32.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.2.30.1 29-Apr-2005  kent sync with -current
 1.2.22.1 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.4.74.1 16-May-2008  yamt sync with head.
 1.4.72.1 18-May-2008  yamt sync with head.
 1.4.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.1 22-Feb-2001  uch branches: 1.1.4;
hpc common files are moved to dev/hpc.
 1.1.4.2 12-Mar-2001  bouyer Sync with HEAD.
 1.1.4.1 22-Feb-2001  bouyer file vt220l8x10.h was added on branch thorpej_scsipi on 2001-03-12 13:30:10 +0000
 1.34 26-Sep-2021  thorpej Change the kqueue filterops::f_isfd field to filterops::f_flags, and
define a flag FILTEROP_ISFD that has the meaning of the prior f_isfd.
Field and flag name aligned with OpenBSD.

This does not constitute a functional or ABI change, as the field location
and size, and the value placed in that field, are the same as the previous
code, but we're bumping __NetBSD_Version__ so 3rd-party module source code
can adapt, as needed.

NetBSD 9.99.89
 1.33 19-Dec-2020  thorpej Use sel{record,remove}_knote().
 1.32 21-Jul-2018  maya branches: 1.32.14;
Remove unused variable.
 1.31 25-Oct-2017  maya branches: 1.31.2; 1.31.4;
Use C99 initializer for filterops

Mostly done with spatch with touchups for indentation

@@
expression a;
identifier b,c,d;
identifier p;
@@
const struct filterops p =
- { a, b, c, d
+ {
+ .f_isfd = a,
+ .f_attach = b,
+ .f_detach = c,
+ .f_event = d,
};
 1.30 25-Jul-2014  dholland Add d_discard to all struct cdevsw instances I could find.

All have been set to "nodiscard"; some should get a real implementation.
 1.29 16-Mar-2014  dholland branches: 1.29.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.28 09-Nov-2013  christos fixed unused variable warning
 1.27 03-Oct-2012  christos branches: 1.27.2;
remove diagnostic printfs to make this compile again.
 1.26 30-Sep-2012  dsl Remove code from dev/apm/apm.c for setting global variables to parameterise
the i386 bios apm code (now removed).
Remove the same code from the clone dev/hpc/apm/apmdev.c
Remove some not-used options from dev/apm/files.apm and the commented out
lines in ALL and GENERIC.
Maybe the APM_V10_ONLY and APM_NO_V12 could also be shot, but they are
further entwined in the code.
 1.25 17-Jul-2011  joerg branches: 1.25.2; 1.25.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.24 23-Nov-2009  rmind Remove some unecessary includes sys/user.h header.
 1.23 03-Apr-2009  uwe Use dev/apm/files.apm for APM options in opt_apm.h.

Now both apm and apmdev files.apm can be included so you can switch
from apmdev0 to apm0 at hpcapm0 in your kernel config easily.
 1.22 03-Apr-2009  uwe Switch apmdev to use apm(4) structures from dev/apm/apmvar.h.
Add batteryid argument to aa_get_powstat method implementations.
 1.21 03-Apr-2009  uwe Further reduce diffs to dev/apm/apm.c.

Bring over remaining bits of logic not picked up in the first round.
Main semantic difference between the two that ramins is now basically
powerhooks vs. pmf.

Cosmetics to reduce diff noise: split apmattach into apmdevattach and
apm_attach, where the latter matches its counterpart in the real
apm.c. Change local macros names from APMDEV* to APM*

Now that apmdev.c is demonstrably congruent to apm.c it should be
easier to switch hpc* and zaurus ports to apm.c from apmdev.c.
apmdev.c is one of the only two remaining drivers that call
dopowerhooks(9), the other one being arch/arm/xscale/pxa2x0_apm.c.

Ideally I would prefer for them to be interchangeable to smooth the
transition (in pmf world order *all* devices must have pmf hooks
registered), but they are attached differently - apmdev is separate
from its backend device (like hpcapm), while apm.c backends are
attachment glue, not separate devices.
 1.20 30-Mar-2009  uwe Split device_t and softc, use aprint_*, rename/reformat stuff to
minimize diffs to dev/apm/apm.c (even at the cost of uglification).

Tested on Jornada 690 (hpcsh).
 1.19 12-Jun-2008  rafal branches: 1.19.4; 1.19.10;
device_private_lookup()-ification so that hpcarm (at jeast Jornada 72x)
kernels build.
 1.18 28-Apr-2008  martin branches: 1.18.2; 1.18.4;
Remove clause 3 and 4 from TNF licenses
 1.17 06-Apr-2008  cegger branches: 1.17.2; 1.17.4;
use aprint_*_dev and device_xname
 1.16 01-Mar-2008  rmind Welcome to 4.99.55:

- Add a lot of missing selinit() and seldestroy() calls.

- Merge selwakeup() and selnotify() calls into a single selnotify().

- Add an additional 'events' argument to selnotify() call. It will
indicate which event (POLL_IN, POLL_OUT, etc) happen. If unknown,
zero may be used.

Note: please pass appropriate value of 'events' where possible.
Proposed on: <tech-kern>
 1.15 14-Dec-2007  uwe branches: 1.15.2; 1.15.6;
Complete lockmgr->mutex conversion started in 1.12. Mutex needs to be
inited with mutex_init. Since mutex ops return void, drop (void) cast
from APM_(UN)LOCK.
 1.14 05-Dec-2007  pooka branches: 1.14.4;
Do not "return 1" from kqfilter for errors. That value is passed
directly to the userland caller and results in a mysterious EPERM.
Instead, return EINVAL or something else sensible depending on the
case.
 1.13 05-Dec-2007  ad lockmgr -> mutex
 1.12 10-Jul-2007  nonaka branches: 1.12.6; 1.12.8; 1.12.14; 1.12.16;
Fix compile failure occured kthread API changes.
 1.11 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.10 04-Mar-2007  christos branches: 1.10.2; 1.10.4;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.9 16-Nov-2006  christos branches: 1.9.4;
__unused removal on arguments; approved by core.
 1.8 12-Oct-2006  uwe -Wextra fixes
 1.7 09-Oct-2006  peter Remove (the default) #define XXXDEBUG and add the options to the relevant
files.xxx file.
 1.6 05-Sep-2006  gdamore branches: 1.6.2; 1.6.4;
Convert time.tv_sec to time_second.
 1.5 27-Feb-2006  cube branches: 1.5.2;
Add support for OAPM_IOC_GETPOWER. That will keep binary compatibility
when hpcarm switches to using hpcapm(4).
 1.4 11-Dec-2005  christos branches: 1.4.2; 1.4.4; 1.4.6;
merge ktrace-lwp.
 1.3 31-May-2005  uwe branches: 1.3.2;
Constify.
 1.2 27-Feb-2005  perry nuke trailing whitespace
 1.1 03-Jul-2004  uch branches: 1.1.2; 1.1.6; 1.1.8;
hpcmips independent part are moved to sys/dev/hpc/
 1.1.8.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.1.6.1 29-Apr-2005  kent sync with -current
 1.1.2.7 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.1.2.6 04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.1.2.5 24-Jan-2005  skrll Adapt to branch.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 03-Jul-2004  skrll file apmdev.c was added on branch ktrace-lwp on 2004-08-03 10:46:05 +0000
 1.3.2.6 17-Mar-2008  yamt sync with head.
 1.3.2.5 21-Jan-2008  yamt sync with head
 1.3.2.4 07-Dec-2007  yamt sync with head
 1.3.2.3 03-Sep-2007  yamt sync with head.
 1.3.2.2 30-Dec-2006  yamt sync with head.
 1.3.2.1 21-Jun-2006  yamt sync with head.
 1.4.6.1 22-Apr-2006  simonb Sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.4.2.1 01-Mar-2006  yamt sync with head.
 1.5.2.1 14-Sep-2006  yamt sync with head.
 1.6.4.2 10-Dec-2006  yamt sync with head.
 1.6.4.1 22-Oct-2006  yamt sync with head
 1.6.2.1 18-Nov-2006  ad Sync with head.
 1.9.4.1 12-Mar-2007  rmind Sync with HEAD.
 1.10.4.1 11-Jul-2007  mjf Sync with head.
 1.10.2.2 15-Jul-2007  ad Sync with head.
 1.10.2.1 13-May-2007  ad - Pass the error number and residual count to biodone(), and let it handle
setting error indicators. Prepare to eliminate B_ERROR.
- Add a flag argument to brelse() to be set into the buf's flags, instead
of doing it directly. Typically used to set B_INVAL.
- Add a "struct cpu_info *" argument to kthread_create(), to be used to
create bound threads. Change "bool mpsafe" to "int flags".
- Allow exit of LWPs in the IDL state when (l != curlwp).
- More locking fixes & conversion to the new API.
 1.12.16.2 26-Dec-2007  ad Sync with head.
 1.12.16.1 08-Dec-2007  ad Sync with head.
 1.12.14.2 27-Dec-2007  mjf Sync with HEAD.
 1.12.14.1 08-Dec-2007  mjf Sync with HEAD.
 1.12.8.2 23-Mar-2008  matt sync with HEAD
 1.12.8.1 09-Jan-2008  matt sync with HEAD
 1.12.6.1 09-Dec-2007  jmcneill Sync with HEAD.
 1.14.4.1 02-Jan-2008  bouyer Sync with HEAD
 1.15.6.3 29-Jun-2008  mjf Sync with HEAD.
 1.15.6.2 02-Jun-2008  mjf Sync with HEAD.
 1.15.6.1 03-Apr-2008  mjf Sync with HEAD.
 1.15.2.1 24-Mar-2008  keiichi sync with head.
 1.17.4.3 11-Mar-2010  yamt sync with head
 1.17.4.2 04-May-2009  yamt sync with head.
 1.17.4.1 16-May-2008  yamt sync with head.
 1.17.2.2 17-Jun-2008  yamt sync with head.
 1.17.2.1 18-May-2008  yamt sync with head.
 1.18.4.1 18-Jun-2008  simonb Sync with head.
 1.18.2.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.19.10.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.19.4.1 28-Apr-2009  skrll Sync with HEAD.
 1.25.12.3 03-Dec-2017  jdolecek update from HEAD
 1.25.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.25.12.1 20-Nov-2012  tls Resync to 2012-11-19 00:00:00 UTC
 1.25.2.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.25.2.1 30-Oct-2012  yamt sync with head
 1.27.2.1 18-May-2014  rmind sync with head
 1.29.2.1 10-Aug-2014  tls Rebase.
 1.31.4.1 10-Jun-2019  christos Sync with HEAD
 1.31.2.1 28-Jul-2018  pgoyette Sync with HEAD
 1.32.14.1 03-Jan-2021  thorpej Sync w/ HEAD.
 1.5 03-Apr-2009  uwe Switch apmdev to use apm(4) structures from dev/apm/apmvar.h.
Add batteryid argument to aa_get_powstat method implementations.
 1.4 30-Mar-2009  uwe Split device_t and softc, use aprint_*, rename/reformat stuff to
minimize diffs to dev/apm/apm.c (even at the cost of uglification).

Tested on Jornada 690 (hpcsh).
 1.3 28-Apr-2008  martin branches: 1.3.8; 1.3.14;
Remove clause 3 and 4 from TNF licenses
 1.2 11-Dec-2005  christos branches: 1.2.70; 1.2.72; 1.2.74;
merge ktrace-lwp.
 1.1 03-Jul-2004  uch branches: 1.1.2;
hpcmips independent part are moved to sys/dev/hpc/
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 03-Jul-2004  skrll file apmvar.h was added on branch ktrace-lwp on 2004-08-03 10:46:05 +0000
 1.2.74.2 04-May-2009  yamt sync with head.
 1.2.74.1 16-May-2008  yamt sync with head.
 1.2.72.1 18-May-2008  yamt sync with head.
 1.2.70.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.14.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.8.1 28-Apr-2009  skrll Sync with HEAD.
 1.4 03-Apr-2009  uwe Use dev/apm/files.apm for APM options in opt_apm.h.

Now both apm and apmdev files.apm can be included so you can switch
from apmdev0 to apm0 at hpcapm0 in your kernel config easily.
 1.3 24-Feb-2006  cube branches: 1.3.68; 1.3.78; 1.3.84;
Rework hpcapm(4) attachment definition so it is not required to attach at
mainbus, and convert its two users, hpcsh and hpcmips, to that.

Many thanks to Valeriy Ushakov and Ben Collver for testing.
 1.2 11-Dec-2005  christos branches: 1.2.2; 1.2.4; 1.2.6;
merge ktrace-lwp.
 1.1 03-Jul-2004  uch branches: 1.1.2; 1.1.14;
hpcmips independent part are moved to sys/dev/hpc/
 1.1.14.1 21-Jun-2006  yamt sync with head.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 03-Jul-2004  skrll file files.apm was added on branch ktrace-lwp on 2004-08-03 10:46:05 +0000
 1.2.6.1 22-Apr-2006  simonb Sync with head.
 1.2.4.1 09-Sep-2006  rpaulo sync with head
 1.2.2.1 01-Mar-2006  yamt sync with head.
 1.3.84.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.3.78.1 28-Apr-2009  skrll Sync with HEAD.
 1.3.68.1 04-May-2009  yamt sync with head.

RSS XML Feed