History log of /src/sys/dev/isa/pcppi.c |
Revision | | Date | Author | Comments |
1.48 |
| 09-Feb-2024 |
andvar | s/anthing/anything/ and s/be to/too/ in comments.
|
1.47 |
| 07-Aug-2021 |
thorpej | Merge thorpej-cfargs2.
|
1.46 |
| 24-Apr-2021 |
thorpej | branches: 1.46.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.45 |
| 14-Jun-2017 |
pgoyette | branches: 1.45.22; Instead of directly referencing a parent device's code (ie, pcppi_bell() routine), let the parent device pass a pointer to the code (in the aux config data). This allows us to load the spkr module without requiring the pcppi parent device to exist. (The spkr device can also have an audio as parent.)
|
1.44 |
| 17-May-2015 |
pgoyette | Modularize the spkr(4) driver (i386 and amd64 only). Adapt parent pcppi(4) driver to be able to handle rescan().
|
1.43 |
| 08-Dec-2014 |
msaitoh | Add missing newlines...
|
1.42 |
| 06-Apr-2012 |
plunky | branches: 1.42.2; 1.42.14; 1.42.16; device_pmf_is_registered() is not required
|
1.41 |
| 26-Nov-2011 |
drochner | branches: 1.41.2; stopgap fix to avoid panic due to recursive locking if the keyboard beep is activated through a tty (which it usually is) IMO it was no good idea to abuse tty_lock here - it is already problematic in the tty subsystem
|
1.40 |
| 25-Nov-2011 |
riastradh | KASSERT(!mutex_owned(...)) is not kosher.
|
1.39 |
| 25-Nov-2011 |
jakllsch | Make locking in pcppi_pckbd_bell() work. Works around locking problems triggered when an X server rings the console bell.
|
1.38 |
| 23-Nov-2011 |
jmcneill | Merge jmcneill-audiomp3 branch, which is derived from ad-audiomp2. From the original ad-audiomp branch notes:
Add MP locking to the audio drivers.
Making the audio drivers MP safe is necessary before efforts can be made to make the VM system MP safe.
The are two locks per device instance, an ISR lock and a character device lock. The ISR lock replaces calls to splaudio()/splx(), and will be held across calls to device methods which were called at splaudio() before (e.g. trigger_output). The character device lock is held across calls to nearly all of the methods, excluding some only used for initialization, e.g. get_locks.
Welcome to 5.99.57.
|
1.37 |
| 24-May-2011 |
mrg | branches: 1.37.4; 1.37.6; avoid mutex locking botch and introduce an unlocked version of pcppi_bell_stop(). fixes a problem reported in private email.
|
1.36 |
| 03-May-2011 |
mrg | convert a lockless + spltty() combo to a IPL_VM mutex and cv.
hopefully this will avoid the beep-didn't-stop problem i had recently that i was able to fix by calling wakeup() on pcppi's softc from ddb.
|
1.35 |
| 17-Apr-2009 |
dyoung | branches: 1.35.4; 1.35.6; Detach pcppi0 at isa0 during shutdown.
|
1.34 |
| 07-Apr-2009 |
dyoung | Make pcppi(4) detach the "speaker" from attimer(4), so that the corresponding attimer(4) resource is not perpetually busy: now it is possible to detach and to reattach pcppi(4). Make attimer(4)'s device-detachment hook return EBUSY if pcppi(4) is still attached, so that pcppi(4) cannot end up with a dangling pointer to attimer(4).
|
1.33 |
| 14-Mar-2009 |
ad | 'boot -z' bogons
|
1.32 |
| 05-Mar-2008 |
cube | branches: 1.32.4; 1.32.12; 1.32.14; 1.32.16; 1.32.18; Fix a softc split fallout.
|
1.31 |
| 04-Mar-2008 |
dyoung | The attimer (sc_timer) is not actually a child of pcppi, and pcppi does do not hold references to any other device, so provide an empty child-detachment method.
|
1.30 |
| 04-Mar-2008 |
cube | - Split device_t and softc for pcppi(4) and attimer(4) - Change the attimer <-> pcppi communication using device_t so that pcppi(4) doesn't have to know about the contents of struct attimer_softc.
XXX pcppi's childdet function is completely wrong. This has to be XXX revisited later.
|
1.29 |
| 22-Feb-2008 |
dyoung | Use device_t and accessors. Use aprint_*_dev().
Add method to detach child.
|
1.28 |
| 30-Jan-2008 |
he | branches: 1.28.2; 1.28.6; Do a dummy pmf_device_register() in pcppi_attach() instead of only in pcppi_isa_attach(), so that pcppi at acpi doesn't become an obstacle to suspending.
Looked over by jmcneill.
|
1.27 |
| 10-Jan-2008 |
dyoung | In pcppi_detach(), s/pmf_device_register/pmf_device_deregister/. Why that never blew up when I tested, I will never know. Thanks wiz@ for catching my mistake.
|
1.26 |
| 10-Jan-2008 |
dyoung | Support pcppi(4) detachment.
Use device_t, device_private(). Get rid of a struct device * cast.
|
1.25 |
| 16-Dec-2007 |
christos | add null pmf handlers.
|
1.24 |
| 19-Oct-2007 |
ad | branches: 1.24.2; 1.24.4; 1.24.8; machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.h
|
1.23 |
| 09-Jul-2007 |
ad | branches: 1.23.6; 1.23.8; 1.23.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.22 |
| 10-Dec-2006 |
cube | branches: 1.22.6; 1.22.8; Remove an error message about having FSTAR'd instances attaching at pcppi. It's actually fine to have them. Somehow I wish there was a way to express that there can be only one device of that kind attaching on a given pcppi.
All of this is generic for all indirectly configured bus (i.e., specified by kernel configuration).
Reported by uwe@.
|
1.21 |
| 10-Dec-2006 |
uwe | When comlaining about child* attachment print "WARNING" and the child name. Makes it more obvious what the problem is, and easier to spot in the dmesg output after quiet boot warns about "errors" while detecting hardware.
|
1.20 |
| 16-Nov-2006 |
christos | __unused removal on arguments; approved by core.
|
1.19 |
| 05-Nov-2006 |
cube | config_found() is for direct configuration, not indirect.
Change the code to use config_search/config_attach, and print a warning when the user has device* at pcppi? in the kernel configuration file.
|
1.18 |
| 12-Oct-2006 |
christos | - sprinkle __unused on function decls. - fix a couple of unused bugs - no more -Wno-unused for i386
|
1.17 |
| 11-Dec-2005 |
christos | branches: 1.17.20; 1.17.22; merge ktrace-lwp.
|
1.16 |
| 25-Mar-2005 |
cube | branches: 1.16.2; Make pcppi(4) use attimer(4) to set the pitch of the bell.
In case you don't configure an attimer(4) device in your kernel config, you will simply lose the ability to set the pitch. It will still beep.
|
1.15 |
| 21-Mar-2005 |
xtraeme | Move the struct pcppi_softc into pcppivar.h, add in this file pcppi_attach(), which now accepts "struct pcppi_softc"; Split ISA specific bits from pcppi_attach() into pcppi_isa_attach() (needed by the upcoming pcppi(4) ACPI attachment).
Reviewed by christos@.
|
1.14 |
| 21-Mar-2005 |
xtraeme | Use ANSI function declarations.
|
1.13 |
| 27-Feb-2005 |
perry | nuke trailing whitespace
|
1.12 |
| 04-Feb-2005 |
perry | de-__P
|
1.11 |
| 14-Sep-2004 |
drochner | branches: 1.11.4; 1.11.6; Separate the namespace for default (ie unspecified) locators used by the isa.c bus driver and the "address/whatever not specified" argument passed to leaf device drivers. The former is "ISACF_XXX_DEFAULT" as generaterd by config(8), the latter "ISA_UNKNOWN_XXX", defined in isavar.h. This way we save a dependency of every ISA device driver on "locators.h".
|
1.10 |
| 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.9 |
| 02-Oct-2002 |
thorpej | branches: 1.9.6; Fix sizeof and whitespace bug from the script I'm using to do the CFATTACH_DECL conversion. (Grumble.)
|
1.8 |
| 02-Oct-2002 |
thorpej | Use CFATTACH_DECL().
|
1.7 |
| 27-Sep-2002 |
thorpej | Declare all cfattach structures const.
|
1.6 |
| 07-Jan-2002 |
thorpej | Overhaul of the ISA autoconfiguration code to support direct configuration of devices logically attached to the ISA bus:
* Change the isa_attach_args to have arrays of io, mem, irq, drq resources. * Add a "pnpnames" and a linked list of "pnpcompatnames" to the isa_attach_args. If either of these members are non-NULL, direct configuration of the bus is being performed. Add an ISA_DIRECT_CONFIG() macro to test for this. * Drivers are not allowed to modify the isa_attach_args unless direct configuration is not being performed and the probe fucntion is returning success. * Adapt device drivers -- currently, all driver probe routines return "no match" if ISA_DIRECT_CONFIG() evaluates to true.
|
1.5 |
| 13-Nov-2001 |
lukem | add RCSID
|
1.4 |
| 23-Mar-2000 |
thorpej | branches: 1.4.6; 1.4.8; New callout mechanism with two major improvements over the old timeout()/untimeout() API: - Clients supply callout handle storage, thus eliminating problems of resource allocation. - Insertion and removal of callouts is constant time, important as this facility is used quite a lot in the kernel.
The old timeout()/untimeout() API has been removed from the kernel.
|
1.3 |
| 10-Mar-2000 |
thorpej | Only poll for bell completion if we're calling in from cnbell(). Fixes a problem reported by Lennart Augustsson.
|
1.2 |
| 06-Mar-2000 |
thorpej | - Make the pcppi and pckbd drivers cooperate a little more -- pckbd provides a call to hook up a bell-ringer (since the keyboard itself has no bell). This eliminates the need for #ifdefs for the bell-ringer in the pckbd driver. - Add cnbell() support to pckbd.
|
1.1 |
| 15-Apr-1998 |
drochner | branches: 1.1.14; MI driver for the ISA speaker, and the IBM BASIC playstring interpreter which has so many fans.
|
1.1.14.1 |
| 20-Nov-2000 |
bouyer | Update thorpej_scsipi to -current as of a month ago A i386 GENERIC kernel compiles without the siop, ahc and bha drivers (will be updated later). i386 IDE/ATAPI and ncr work, as well as sparc/esp_sbus. alpha should work as well (untested yet). siop, ahc and bha will be updated once I've updated the branch to current -current, as well as machine-dependant code.
|
1.4.8.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.4.8.1 |
| 10-Jan-2002 |
thorpej | Sync kqueue branch with -current.
|
1.4.6.4 |
| 18-Oct-2002 |
nathanw | Catch up to -current.
|
1.4.6.3 |
| 28-Feb-2002 |
nathanw | Catch up to -current.
|
1.4.6.2 |
| 11-Jan-2002 |
nathanw | More catchup.
|
1.4.6.1 |
| 14-Nov-2001 |
nathanw | Catch up to -current.
|
1.9.6.6 |
| 01-Apr-2005 |
skrll | Sync with HEAD.
|
1.9.6.5 |
| 04-Mar-2005 |
skrll | Sync with HEAD.
Hi Perry!
|
1.9.6.4 |
| 04-Feb-2005 |
skrll | Sync with HEAD.
|
1.9.6.3 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.9.6.2 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.9.6.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.11.6.3 |
| 26-Mar-2005 |
yamt | sync with head.
|
1.11.6.2 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
1.11.6.1 |
| 12-Feb-2005 |
yamt | sync with head.
|
1.11.4.1 |
| 29-Apr-2005 |
kent | sync with -current
|
1.16.2.7 |
| 17-Mar-2008 |
yamt | sync with head.
|
1.16.2.6 |
| 27-Feb-2008 |
yamt | sync with head.
|
1.16.2.5 |
| 04-Feb-2008 |
yamt | sync with head.
|
1.16.2.4 |
| 21-Jan-2008 |
yamt | sync with head
|
1.16.2.3 |
| 27-Oct-2007 |
yamt | sync with head.
|
1.16.2.2 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.16.2.1 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.17.22.3 |
| 18-Dec-2006 |
yamt | sync with head.
|
1.17.22.2 |
| 10-Dec-2006 |
yamt | sync with head.
|
1.17.22.1 |
| 22-Oct-2006 |
yamt | sync with head
|
1.17.20.2 |
| 12-Jan-2007 |
ad | Sync with head.
|
1.17.20.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
1.22.8.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.22.6.2 |
| 23-Oct-2007 |
ad | Sync with head.
|
1.22.6.1 |
| 01-Jul-2007 |
ad | Adapt to callout API change.
|
1.23.12.1 |
| 25-Oct-2007 |
bouyer | Sync with HEAD.
|
1.23.8.3 |
| 23-Mar-2008 |
matt | sync with HEAD
|
1.23.8.2 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.23.8.1 |
| 06-Nov-2007 |
matt | sync with HEAD
|
1.23.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.24.8.2 |
| 10-Jan-2008 |
bouyer | Sync with HEAD
|
1.24.8.1 |
| 02-Jan-2008 |
bouyer | Sync with HEAD
|
1.24.4.1 |
| 26-Dec-2007 |
ad | Sync with head.
|
1.24.2.1 |
| 18-Feb-2008 |
mjf | Sync with HEAD.
|
1.28.6.1 |
| 03-Apr-2008 |
mjf | Sync with HEAD.
|
1.28.2.1 |
| 24-Mar-2008 |
keiichi | sync with head.
|
1.32.18.1 |
| 13-May-2009 |
jym | Sync with HEAD.
Commit is split, to avoid a "too many arguments" protocol error.
|
1.32.16.1 |
| 09-Dec-2008 |
ad | Checkpoint work on MIDI.
|
1.32.14.3 |
| 18-Jun-2011 |
bouyer | Pull up following revision(s) (requested by mrg in ticket #1625): sys/dev/isa/pcppi.c: revision 1.37 avoid mutex locking botch and introduce an unlocked version of pcppi_bell_stop(). fixes a problem reported in private email.
|
1.32.14.2 |
| 18-Jun-2011 |
bouyer | Pull up following revision(s) (requested by mrg in ticket #1625): sys/dev/isa/pcppivar.h: revision 1.10 sys/dev/isa/pcppi.c: revision 1.36 convert a lockless + spltty() combo to a IPL_VM mutex and cv. hopefully this will avoid the beep-didn't-stop problem i had recently that i was able to fix by calling wakeup() on pcppi's softc from ddb.
|
1.32.14.1 |
| 20-Nov-2010 |
riz | Pull up following revision(s) (requested by hubertf in ticket #1386): sys/dev/raidframe/rf_netbsdkintf.c: revision 1.258 sys/dev/pad/pad.c: revision 1.11 sys/dev/scsipi/cd.c: revision 1.288 sys/dev/isa/pcppi.c: revision 1.33 sys/kern/subr_autoconf.c: revision 1.169 'boot -z' bogons
|
1.32.12.1 |
| 28-Apr-2009 |
skrll | Sync with HEAD.
|
1.32.4.1 |
| 04-May-2009 |
yamt | sync with head.
|
1.35.6.1 |
| 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.35.4.1 |
| 31-May-2011 |
rmind | sync with head
|
1.37.6.1 |
| 20-Nov-2011 |
mrg | port the changes from ad-audiomp2 branch. this mostly replaces the changes i'd made to pcppi to achieve a similar result.
XXX: these actually could be pulled down to -current today, i think. no actual dependancies on audiomp branch itself.
|
1.37.4.1 |
| 17-Apr-2012 |
yamt | sync with head
|
1.41.2.1 |
| 29-Apr-2012 |
mrg | sync to latest -current.
|
1.42.16.3 |
| 28-Aug-2017 |
skrll | Sync with HEAD
|
1.42.16.2 |
| 06-Jun-2015 |
skrll | Sync with HEAD
|
1.42.16.1 |
| 06-Apr-2015 |
skrll | Sync with HEAD
|
1.42.14.1 |
| 08-Jan-2015 |
martin | Pull up following revision(s) (requested by msaitoh in ticket #392): sys/dev/acpi/acpi_ec.c: revision 1.74 sys/dev/isa/pcppi.c: revision 1.43 Add missing newlines...
|
1.42.2.1 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.45.22.6 |
| 05-Apr-2021 |
thorpej | config_match() -> config_probe() for the straight-forward indirect config cases. There are still a few odd balls using config_match() which should be sorted out later.
|
1.45.22.5 |
| 04-Apr-2021 |
thorpej | CFARG_SUBMATCH -> CFARG_SEARCH for the indirect configuration uses.
|
1.45.22.4 |
| 03-Apr-2021 |
thorpej | config_attach_loc() -> config_attach() with CFARG_LOCATORS argument.
|
1.45.22.3 |
| 28-Mar-2021 |
thorpej | pcppi_scan(): No need to pass interface attribute or locators to config_search().
|
1.45.22.2 |
| 21-Mar-2021 |
thorpej | In "rescan" routines, always pass locators and the interface attribute straight through to config_search(). Also, for devices that carry only one interface attribute, no need to do an ifattr_match(), because rescan_with_cfdata() will have already validated that the parent is eligible, which includes an interface attribute check.
|
1.45.22.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.46.8.1 |
| 04-Aug-2021 |
thorpej | Adapt to CFARGS().
|