Home | History | Annotate | Download | only in hpc
History log of /src/sys/dev/hpc/btnmgr.c
RevisionDateAuthorComments
 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().

RSS XML Feed