summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_autoconf.c
Commit message (Collapse)AuthorAgeFilesLines
* Retire PCONFIG and leave the priority of thread0 alone when waiting forjhb2011-01-061-1/+1
| | | | interrupt config hooks to execute.
* Allow interrupt driven config hooks to be registered from config hook callbacks.gibbs2010-08-121-8/+45
| | | | | | | | | | | | | | | | | | | | | | Interrupt driven configuration hooks serve two purposes: they are a mechanism for registering for a callback that is invoked once interrupt services are available, and they hold off root device selection so long as any configuration hooks are still active. Before this change, it was not possible to safely register additional hooks from the context of a configuration hook callback. The need for this feature arises when interrupts are required to discover new devices (e.g. access to the XenStore to find para-virtualized devices) which in turn also require the ability to hold off root device selection until some lengthy, interrupt driven, configuration task has completed (e.g. Xen front/back device driver negotiation). More specifically, the mutex protecting the list of active configuration hooks is never held during a callback, and static information is used to ensure proper ordering and only a single callback to each hook even when faced with registration or removal of a hook during an active run. Sponsored by: Spectra Logic Corporation MFC after: 1 week.
* Prefer ANSI function definitions to K&R ones.imp2009-02-031-6/+3
|
* If run_interrupt_driven_config_hooks() waits 360 seconds and INVARIANTSrwatson2008-07-211-10/+15
| | | | | | | is compiled into the kernel, then panic. MFC after: 3 days Discussed with: scottl
* Rather than simply waiting silently and indefinitely for allrwatson2008-07-191-3/+35
| | | | | | | | | | | | | | | interrupt-driven configuration handlers to complete, print out a diagnostic message every 60 second indicating which handlers are still running. Do this at most 5 times per run so as to avoid scrolling out any useful information from the kernel message buffer. The interval of 60 seconds was selected based on a best guess as to the nature of "long enough" and may want to be tuned higher or lower depending on real-world tolerances. MFC after: 3 days Discussed with: scottl
* Add DDB "show conifhk" command, which lists hooks currently waitingrwatson2008-07-191-0/+27
| | | | | | | | for completion in run_interrupt_driven_config_hooks(). This is helpful when trying to figure out which device drivers have gone into la-la land during boot-time autoconfiguration. MFC after: 3 days
* In keeping with style(9)'s recommendations on macros, use a ';'rwatson2008-03-161-1/+1
| | | | | | | | | after each SYSINIT() macro invocation. This makes a number of lightweight C parsers much happier with the FreeBSD kernel source, including cflow's prcc and lxr. MFC after: 1 month Discussed with: imp, rink
* Remove a superfluous line in run_interrupt_driven_config_hooks(),antoine2008-02-151-1/+0
| | | | | | | | next_entry is already initialized during TAILQ_FOREACH_SAFE(). PR: kern/119604 Approved by: rwatson (mentor) MFC after: 1 month
* Add a mutex to protect the list of interrupt config hooks. We do assumejhb2006-07-191-11/+21
| | | | | | | | | that the only remove hook operation that can occur while processing the hooks is to remove the currently executing hook. This should be safe as the existing code has assumed this already for a long time now. Reviewed by: scottl MFC after: 1 week
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-061-1/+1
|
* Remove advertising clause from University of California Regent's license,imp2004-04-051-9/+0
| | | | | | per letter dated July 22, 1999. Approved by: core
* Revert stuff which accidentally ended up in the previous commit.phk2003-07-221-3/+0
|
* Don't attempt to inline large functions mb_alloc() and mb_free(),phk2003-07-221-0/+3
| | | | | | it more than doubles the text size of this file. GCC has wisely ignored us on this previously
* Use __FBSDID().obrien2003-06-111-1/+3
|
* Remove __P.alfred2002-03-191-1/+1
|
* Back out the previous change to the queue(3) interface.jake2000-05-261-1/+1
| | | | | | It was not discussed and should probably not happen. Requested by: msmith and others
* Change the way that the queue(3) structures are declared; don't assume thatjake2000-05-231-1/+1
| | | | | | | | the type argument to *_HEAD and *_ENTRY is a struct. Suggested by: phk Reviewed by: phk Approved by: mdodd
* Removal of sys/device.hn_hibma1999-10-051-1/+0
| | | | | | | | | | | | | - Move intrhook stuff into kernel.h - Remove all occurrences of #device <device.h> - Add kernel.h were necessary (nowhere) - delete device.h This file contained the structures for cfdata (old style config) and is no longer used. It was included by most drivers. It confuses the remote debugger as the definition of 'struct device' in device.h is found before the one in bus_private.h.
* Change explicit use of the queue fields into use of the definitionsn_hibma1999-09-261-10/+13
| | | | | | | | in queue.h. Change the name of two variables for consistency. Reviewed-By: peter
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fix a very long standing bug in run_interrupt_driven_config_hooks(). Itpeter1999-04-251-3/+4
| | | | was fetching the next pointer from memory that could have been free()'d.
* GC some unused code.peter1999-04-171-294/+1
|
* Well folks, this is it - The second stage of the removal for build supportpeter1999-04-171-2/+2
| | | | for LKM's..
* Split DIAGNOSTIC -> DIAGNOSTIC, INVARIANTS, and INVARIANT_SUPPORT aseivind1999-01-081-5/+3
| | | | | | | | | discussed on -hackers. Introduce 'KASSERT(assertion, ("panic message", args))' for simple check + panic. Reviewed by: msmith
* Examine all occurrences of sprintf(), strcat(), and str[n]cpy()archie1998-12-041-2/+2
| | | | | | | | | | | | | | for possible buffer overflow problems. Replaced most sprintf()'s with snprintf(); for others cases, added terminating NUL bytes where appropriate, replaced constants like "16" with sizeof(), etc. These changes include several bug fixes, but most changes are for maintainability's sake. Any instance where it wasn't "immediately obvious" that a buffer overflow could not occur was made safer. Reviewed by: Bruce Evans <bde@zeta.org.au> Reviewed by: Matthew Dillon <dillon@apollo.backplane.com> Reviewed by: Mike Spengler <mks@networkcs.com>
* Removed an unused #include. Ifdefed a conditionally used #include.bde1997-11-181-2/+3
|
* init_main.c subr_autoconf.c:gibbs1997-09-211-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for "interrupt driven configuration hooks". A component of the kernel can register a hook, most likely during auto-configuration, and receive a callback once interrupt services are available. This callback will occur before the root and dump devices are configured, so the configuration task can affect the selection of those two devices or complete any tasks that need to be performed prior to launching init. System boot is posponed so long as a hook is registered. The hook owner is responsible for removing the hook once their task is complete or the system boot can continue. kern_acct.c kern_clock.c kern_exit.c kern_synch.c kern_time.c: Change the interface and implementation for the kernel callout service. The new implemntaion is based on the work of Adam M. Costello and George Varghese, published in a technical report entitled "Redesigning the BSD Callout and Timer Facilities". The interface used in FreeBSD is a little different than the one outlined in the paper. The new function prototypes are: struct callout_handle timeout(void (*func)(void *), void *arg, int ticks); void untimeout(void (*func)(void *), void *arg, struct callout_handle handle); If a client wishes to remove a timeout, it must store the callout_handle returned by timeout and pass it to untimeout. The new implementation gives 0(1) insert and removal of callouts making this interface scale well even for applications that keep 100s of callouts outstanding. See the updated timeout.9 man page for more details.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-221-1/+1
| | | | ready for it yet.
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Added $Id$dg1994-08-021-1/+1
|
* BSD 4.4 Lite Kernel Sourcesrgrimes1994-05-241-0/+342
OpenPOWER on IntegriCloud