kib [Sat, 2 Jun 2012 18:10:16 +0000 (18:10 +0000)]
Use plain store for atomic_store_rel on x86, instead of implicitly
locked xchg instruction. IA32 memory model guarantees that store has
release semantic, since stores cannot pass loads or stores.
dim [Sat, 2 Jun 2012 11:07:19 +0000 (11:07 +0000)]
Install libcxxrt's C++ ABI and unwind headers. This is done in libc++'s
Makefile, so these headers go into the same destination directory as
libc++'s own headers, currently /usr/include/c++/v1.
The stat structures returned on pipes seems to contain all the
information required by POSIX. Especially the wording "and thus to a
pipe" makes little sense, because it seems to imply a certain
relationship between sockets and pipes that simply isn't there.
mav [Sat, 2 Jun 2012 08:29:07 +0000 (08:29 +0000)]
Rewrite enabling NCQ for SATA devices in a way more alike to SCSI TCQ.
This allows to control it with `camcontrol negotiate adaX -T (en|dis)able`
on the fly, same as for SCSI devices.
mjacob [Fri, 1 Jun 2012 23:29:48 +0000 (23:29 +0000)]
Clean up and complete the incomplete deferred enable code.
Make the default role NONE if target mode is selected. This
allows ctl(8) to switch to/from target mode via knob settings.
If we default to role 'none', this causes a reset of the
24XX f/w which then causes initiators to wake up and notice
when we come online.
jhb [Fri, 1 Jun 2012 18:33:40 +0000 (18:33 +0000)]
Add a new -e flag to pciconf(8)'s list mode to display PCI error details.
Currently this dumps the status of any error bits in the PCI status register
and PCI-express device status register. It also lists any errors indicated
by version 1 of PCI-express Advanced Error Reporting (AER).
jhb [Fri, 1 Jun 2012 15:52:41 +0000 (15:52 +0000)]
Commit a portion of 233708 I missed earlier and don't include the
definition of igb_start() and igb_start_locked() (nor set if_start in
the ifnet) when igb(4) uses if_transmit.
jhb [Fri, 1 Jun 2012 15:42:37 +0000 (15:42 +0000)]
Extend VERBOSE_SYSINIT to also print out the name of variables passed
to SYSINIT routines if they can be resolved via symbol look up in DDB.
To avoid false positives, only honor a name if the symbol resolves
exactly to the pointer value (no offset).
iwasaki [Fri, 1 Jun 2012 15:26:32 +0000 (15:26 +0000)]
Call AcpiLeaveSleepStatePrep() in interrupt disabled context
(described in ACPICA source code).
- Move intr_disable() and intr_restore() from acpi_wakeup.c to acpi.c
and call AcpiLeaveSleepStatePrep() in interrupt disabled context.
- Add acpi_wakeup_machdep() to execute wakeup MD procedures and call
it twice in interrupt disabled/enabled context (ia64 version is
just dummy).
- Rename wakeup_cpus variable in acpi_sleep_machdep() to suspcpus in
order to be shared by acpi_sleep_machdep() and acpi_wakeup_machdep().
- Move identity mapping related code to acpi_install_wakeup_handler()
(i386 version) for preparation of x86/acpica/acpi_wakeup.c
(MFC candidate).
alc [Fri, 1 Jun 2012 03:56:12 +0000 (03:56 +0000)]
pmap_alloc_vhpt() doesn't need the pages that it allocates to be mapped
into the kernel map, so vm_page_alloc_contig() can be used in place of
contigmalloc().
imp [Fri, 1 Jun 2012 02:55:42 +0000 (02:55 +0000)]
Initialize the clocks before we call cninit() so that the serial
console so initialized will work upon return from cninit. While this
is the very next line, other platforms setup all this stuff before
calling cninit. Also, initialize the SDRAM base register in the inner
block in at91_ramsize().
tj [Thu, 31 May 2012 19:33:51 +0000 (19:33 +0000)]
- Fix my botched merge and correct mentor ordering. (Spotted by flo)
- Fix missing new line in node block. (Spotted by gavin)
- Sort the node list while I'm here.
obrien [Wed, 30 May 2012 22:23:08 +0000 (22:23 +0000)]
Deprecate the FreeBSD make's ":U" (to-upper case) and ":L" (to-lower case)
modifiers for ":tu" and ":tl" from OSF's ODE, which made its way into
NetBSD's make, which is the source for the Portable Berkeley Make.
jhb [Wed, 30 May 2012 21:02:12 +0000 (21:02 +0000)]
- Witness doesn't verify the old MTX_NOSWITCH flag's correctness (that was obsoleted
when critical sections were added). Instead, list a check that witness does perform.
- Note that 'show locks' in DDB takes an optional thread argument.
- Document 'show all locks'.
- Remove the BUGS section, the bug in question was fixed 11 years ago in r76272.
marius [Wed, 30 May 2012 20:04:07 +0000 (20:04 +0000)]
Try to finally get the point in time at which bge_add_sysctls() is called
right; it needs to be called before bge_can_use_msi() but in turn requires
bge_flags to be properly set.
raj [Wed, 30 May 2012 18:05:48 +0000 (18:05 +0000)]
Panic openly if we cannot retrieve memory information from the device tree.
This is a critical condition and can lead to all sorts of misterious hangs if
not handled.
kib [Wed, 30 May 2012 16:42:08 +0000 (16:42 +0000)]
vn_io_fault() is a facility to prevent page faults while filesystems
perform copyin/copyout of the file data into the usermode
buffer. Typical filesystem hold vnode lock and some buffer locks over
the VOP_READ() and VOP_WRITE() operations, and since page fault
handler may need to recurse into VFS to get the page content, a
deadlock is possible.
The facility works by disabling page faults handling for the current
thread and attempting to execute i/o while allowing uiomove() to
access the usermode mapping of the i/o buffer. If all buffer pages are
resident, uiomove() is successfull and request is finished. If EFAULT
is returned from uiomove(), the pages backing i/o buffer are faulted
in and held, and the copyin/out is performed using uiomove_fromphys()
over the held pages for the second attempt of VOP call.
Since pages are hold in chunks to prevent large i/o requests from
starving free pages pool, and since vnode lock is only taken for
i/o over the current chunk, the vnode lock no longer protect atomicity
of the whole i/o request. Use newly added rangelocks to provide the
required atomicity of i/o regardind other i/o and truncations.
Filesystems need to explicitely opt-in into the scheme, by setting the
MNTK_NO_IOPF struct mount flag, and optionally by using
vn_io_fault_uiomove(9) helper which takes care of calling uiomove() or
converting uio into request for uiomove_fromphys().
kib [Wed, 30 May 2012 16:06:38 +0000 (16:06 +0000)]
Add a rangelock implementation, intended to be used to range-locking
the i/o regions of the vnode data space. The implementation is quite
simple-minded, it uses the list of the lock requests, ordered by
arrival time. Each request may be for read or for write. The
implementation is fair FIFO.