1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-02-01 17:00:36 +00:00
Mirror of the FreeBSD src repository https://git.FreeBSD.org/src.git .
Go to file
Adrian Chadd d52f713265 Attempt to further fix some of the concurrency/reset issues that occur.
* ath_reset() is being called in softclock context, which may have the
  thing sleep on a lock.  To avoid this, since we really _shouldn't_
  be sleeping on any locks, break out the no-loss reset path into a tasklet
  and call that from:

  + ath_calibrate()
  + ath_watchdog()

  This has the added advantage that it'll end up also doing the frame
  RX cleanup from within the taskqueue context, rather than the softclock
  context.

* Shuffle around the taskqueue_block() call to be before we grab the lock
  and disable interrupts.

  The trouble here is that taskqueue_block() doesn't block currently
  queued (but not yet running) tasks so calling it doesn't guarantee
  no further tasks (that weren't running on _A_ CPU at the time of this
  call) will complete.  Calling taskqueue_drain() on these tasks won't
  work because if any _other_ thread calls taskqueue_enqueue() for whatever
  reason, everything gets very angry and stops working.

  This slightly changes the race condition enough to let ath_rx_tasklet()
  run before we try disabling it, and thus quietens the warnings a bit.

  The (more) true solution will be doing something like the following:

  * having a taskqueue_blocked mask in ath_softc;
  * having an interrupt_blocked mask in ath_softc;
  * only calling taskqueue_drain() on each individual task _after_ the
    lock has been acquired - that way no further tasklet scheduling
    is going to occur.
  * Then once the tasks have been blocked _and_ the interrupt has been
    disabled, call taskqueue_drain() on each, ensuring that anything
    that _was_ scheduled or running is removed.

  The trouble is if something calls taskqueue_enqueue() on a task
  after taskqueue_blocked() has been called but BEFORE taskqueue_drain()
  has been called, ta_pending will be set to 1 and taskqueue_drain()
  will sit there stuck in msleep() until you hard-kill the machine.

PR: kern/165382
PR: kern/165220
2012-02-25 19:12:54 +00:00
bin Whitespace cleanup: 2012-02-25 15:21:43 +00:00
cddl Import illumos changeset 13608 [1]: 2012-02-23 19:13:19 +00:00
contrib Update libarchive to 3.0.3 2012-02-25 10:58:02 +00:00
crypto Polish diff against upstream. 2012-02-13 11:59:59 +00:00
etc Put the signal trap output to standard error instead of standard output. 2012-02-18 00:46:18 +00:00
games o Preserve argv[0] to use it later in usage(). 2012-01-28 15:29:43 +00:00
gnu Enable TLS support for ARM toolchain 2012-02-14 00:18:18 +00:00
include Revert r231673 and r231682 for now, until we can run a full make 2012-02-14 21:48:46 +00:00
kerberos5
lib Whitespace cleanup: 2012-02-25 16:02:12 +00:00
libexec Avoid error log for transfer stop w/o error code. 2012-02-21 14:59:07 +00:00
release Add isci(4) to the hardware notes. 2012-02-23 18:54:33 +00:00
rescue Disable jail support in ifconfig when either building a rescue 2012-02-14 07:14:42 +00:00
sbin Whitespace cleanup: 2012-02-25 15:21:43 +00:00
secure Return NULL on error rather than ":", per the crypt(3) man page. 2012-02-22 01:23:14 +00:00
share Whitespace cleanup: 2012-02-25 15:21:43 +00:00
sys Attempt to further fix some of the concurrency/reset issues that occur. 2012-02-25 19:12:54 +00:00
tools Update scripts to work around two sh(1) bugs found in stable/8: 2012-02-24 14:13:06 +00:00
usr.bin Update libarchive to 3.0.3 2012-02-25 10:58:02 +00:00
usr.sbin When using uidstart in /etc/adduser.conf, get the next 2012-02-25 07:58:59 +00:00
COPYRIGHT
LOCKS
MAINTAINERS Add isci(4) driver for amd64 and i386 targets. 2012-01-31 19:38:18 +00:00
Makefile delete-old does not have delete-old-libs dependency. 2012-02-16 14:08:14 +00:00
Makefile.inc1 Allow specification of build shell for the buildenv target. 2012-01-30 20:19:28 +00:00
Makefile.mips
ObsoleteFiles.inc Update libarchive to 3.0.3 2012-02-25 10:58:02 +00:00
README
UPDATING Switch getifaddrs(3) to the new API introduced in r231505. Also remove 2012-02-11 06:05:40 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html