]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC r233546:
kib [Tue, 3 Apr 2012 08:56:29 +0000 (08:56 +0000)]
MFC r233546:
Prevent rtld_verify_object_versions() from being called several times
for the same object.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233832 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233231:
kib [Tue, 3 Apr 2012 08:54:35 +0000 (08:54 +0000)]
MFC r233231:
Fix several problems with our ELF filters implementation.

Do not relocate twice an object which happens to be needed by loaded
binary (or dso) and some filtee opened due to symbol resolution when
relocating need objects.  Record the state of the relocation
processing in Obj_Entry and short-circuit relocate_objects() if
current object already processed.

Do not call constructors for filtees loaded during the early
relocation processing before image is initialized enough to run
user-provided code.  Filtees are loaded using dlopen_object(), which
normally performs relocation and initialization.  If filtee is
lazy-loaded during the relocation of dso needed by the main object,
dlopen_object() runs too earlier, when most runtime services are not
yet ready.

Postpone the constructors call to the time when main binary and
depended libraries constructors are run, passing the new flag
RTLD_LO_EARLY to dlopen_object().  Symbol lookups callers inform
symlook_* functions about early stage of initialization with
SYMLOOK_EARLY.  Pass flags through all functions participating in
object relocation.

Use the opportunity and fix flags argument to find_symdef() in
arch-specific reloc.c to use proper name SYMLOOK_IN_PLT instead of
true, which happen to have the same numeric value.

MFC r233777 (by kan):
Do not try to adjust stacks if dlopen_object is called too early.

MFC r233778 (by kan):
Remove extra blank line from revious commit.

MFC note: the ARM and MIPS TLS support is not merged back, so the chunks
from r233231 which fix misuse of flags in calls to find_symdef() in
the corresponding relocation type handlers were not applied. When TLS
support is merged, the rest of r233231 should be applied too.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233831 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233746:
mav [Tue, 3 Apr 2012 08:29:39 +0000 (08:29 +0000)]
MFC r233746:
Be more conservative in using READ CAPACITY(16) command. Previous code
checked PROTECT bit in INQUIRY data for all SPC devices, while it is defined
only since SPC-3. But there are some SPC-2 USB devices were reported, that
have PROTECT bit set, return no error for READ CAPACITY(16) command, but
return wrong sector count value in response.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233828 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233544:
fabient [Tue, 3 Apr 2012 07:15:42 +0000 (07:15 +0000)]
MFC r233544:
Fix random deadlock on pmcstat exit:
- Exit the thread when soft shutdown is requested
- Wakeup owner thread.

Reproduced/tested by looping pmcstat measurement:
pmcstat -S instructions -O/tmp/test ls

git-svn-id: svn://svn.freebsd.org/base/stable/9@233824 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 233236: Add sys/ofed to the 'make cscope' target.
jhb [Mon, 2 Apr 2012 20:36:35 +0000 (20:36 +0000)]
MFC 233236: Add sys/ofed to the 'make cscope' target.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233816 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 232700:
jhb [Mon, 2 Apr 2012 20:34:15 +0000 (20:34 +0000)]
MFC 232700:
Add a new sched_clear_name() method to the scheduler interface to clear
the cached name used for KTR_SCHED traces when a thread's name changes.
This way KTR_SCHED traces (and thus schedgraph) will notice when a thread's
name changes, most commonly via execve().

git-svn-id: svn://svn.freebsd.org/base/stable/9@233814 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233701
marius [Mon, 2 Apr 2012 20:14:32 +0000 (20:14 +0000)]
MFC: r233701

- Remove erroneous trailing semicolon. [1]
- Correctly determine the maximum payload size for setting the TX link
  frequent NACK latency and replay timer thresholds.

Submitted by: stefanf [1]

git-svn-id: svn://svn.freebsd.org/base/stable/9@233811 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 232612
gnn [Mon, 2 Apr 2012 20:10:50 +0000 (20:10 +0000)]
MFC: 232612

Properly mask off bits that are not supported in the IAP counters.
This fixes a bug where users would see massively large counts, near
to 2**64 -1, due to the bits not being cleared.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233810 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232182:
trociny [Mon, 2 Apr 2012 19:17:01 +0000 (19:17 +0000)]
MFC r232182:

When displaying security credential information show also process umask.

Submitted by:   Dmitry Banschikov <me ubique spb ru>
Discussed with: rwatson

git-svn-id: svn://svn.freebsd.org/base/stable/9@233807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232181, r232455:
trociny [Mon, 2 Apr 2012 19:15:32 +0000 (19:15 +0000)]
MFC r232181, r232455:

r232181:

Add sysctl to retrieve or set umask of another process.

Submitted by: Dmitry Banschikov <me ubique spb ru>
Discussed with: kib, rwatson
Reviewed by: kib

r232455:

Make kern.proc.umask sysctl readonly.

Requested by: src

git-svn-id: svn://svn.freebsd.org/base/stable/9@233806 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231975:
trociny [Mon, 2 Apr 2012 19:06:28 +0000 (19:06 +0000)]
MFC r231975:

Make vnode_if.awk parse vnode operations with underscores, like VOP_FOO_BAR.

Reviewed by: kib

git-svn-id: svn://svn.freebsd.org/base/stable/9@233804 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232152:
trociny [Mon, 2 Apr 2012 19:01:32 +0000 (19:01 +0000)]
MFC r232152:

When detaching a unix domain socket, uipc_detach() checks
unp->unp_vnode pointer to detect if there is a vnode associated with
(binded to) this socket and does necessary cleanup if there is.

The issue is that after forced unmount this check may be too late as
the unp_vnode is reclaimed and the reference is stale.

To fix this provide a helper function that is called on a socket vnode
reclamation to do necessary cleanup.

Pointed by: kib
Reviewed by: kib

git-svn-id: svn://svn.freebsd.org/base/stable/9@233803 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231976:
trociny [Mon, 2 Apr 2012 18:52:52 +0000 (18:52 +0000)]
MFC r231976:

unp_connect() may use a shared lock on the vnode to fetch the socket.

Suggested by: jhb
Reviewed by: jhb, kib, rwatson

git-svn-id: svn://svn.freebsd.org/base/stable/9@233801 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233702
jkim [Mon, 2 Apr 2012 18:17:51 +0000 (18:17 +0000)]
MFC: r233702

Work around Erratum 721 for AMD Family 10h and 12h processors.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233798 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r232416, r232561
jkim [Mon, 2 Apr 2012 18:13:29 +0000 (18:13 +0000)]
MFC: r232416, r232561

Add VESA option to GENERIC for amd64 and i386.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233797 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233619
jkim [Mon, 2 Apr 2012 17:33:46 +0000 (17:33 +0000)]
MFC: r233619

Add a PNP ID for Japanese 106-key keyboard.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233794 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233663:
jimharris [Mon, 2 Apr 2012 16:35:42 +0000 (16:35 +0000)]
MFC r233663:

Fix bug where isci(4) would report only 15 bytes of returned data on a
READ_CAP_16 command to a SATA target.

Sponsored by: Intel
Approved by: sbruno

git-svn-id: svn://svn.freebsd.org/base/stable/9@233788 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233622:
jimharris [Mon, 2 Apr 2012 16:30:13 +0000 (16:30 +0000)]
MFC r233622:

Ensure consistent target IDs for direct-attached devices.

Sponsored by: Intel
Reported by: sbruno, Ravi Pokala <rpokala at panasas dot com>
Tested by: Ravi Pokala <rpokala at panasas dot com>
Approved by: sbruno

git-svn-id: svn://svn.freebsd.org/base/stable/9@233784 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoTurn off WITNESS, etc. for GENERIC64. This was missed in the stable/9
nwhitehorn [Mon, 2 Apr 2012 12:00:35 +0000 (12:00 +0000)]
Turn off WITNESS, etc. for GENERIC64. This was missed in the stable/9
branch in r226405.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233779 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233168:
kib [Mon, 2 Apr 2012 11:27:20 +0000 (11:27 +0000)]
MFC r233168:
If we ever allow for managed fictitious pages, the pages shall be
excluded from superpage promotions.  At least one of the reason is
that pv_table is sized for non-fictitious pages only.

Consistently check for the page to be non-fictitious before accesing
superpage pv list.

MFC note: erronous chunks from r233168 which were fixed in r233185
are not included into the merge.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233775 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge r233506: MySQL port 3306 in /etc/services
ivoras [Mon, 2 Apr 2012 10:24:50 +0000 (10:24 +0000)]
Merge r233506: MySQL port 3306 in /etc/services

git-svn-id: svn://svn.freebsd.org/base/stable/9@233772 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227802:
delphij [Mon, 2 Apr 2012 07:18:31 +0000 (07:18 +0000)]
MFC r227802:

Improve the way to calculate available pages in tmpfs:

 - Don't deduct wired pages from total usable counts because it does not
   make any sense.  To make things worse, on systems where swap size is
   smaller than physical memory and use a lot of wired pages (e.g. ZFS),
   tmpfs can suddenly have free space of 0 because of this;
 - Count cached pages as available; [1]
 - Don't count inactive pages as available, technically we could but that
   might be too aggressive; [1]

[1] Suggested by kib@

git-svn-id: svn://svn.freebsd.org/base/stable/9@233769 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232828:
kib [Sun, 1 Apr 2012 20:57:04 +0000 (20:57 +0000)]
MFC r232828:
ELF image can have several PT_NOTE program headers.  Look for the ELF
brand note in each header, instead of using only first one.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233763 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229667, r230541, r230869, r231909, r231910, r231911, r231912:
trociny [Sun, 1 Apr 2012 20:53:35 +0000 (20:53 +0000)]
MFC r229667, r230541, r230869, r231909, r231910, r231911, r231912:

r229667, r230541, r230869 (ghelmer):

Change the notes about the pidfile to include Doug's preference
for pre-creating the pidfile with appropriate owner and permissions.

Requested by dougb

r231909:

The pidfile_open(3) is going to be fixed to set close-on-exec in order
not to leak the descriptor after exec(3). This raises the issue for
daemon(3) of the pidfile lock to be lost when the child process
executes.

To solve this and also to have the pidfile cleaned up when the program
exits, if a pidfile is specified, spawn a child to exec the command
and wait in the parent keeping the pidfile locked until the child
process exits and remove the file.

Reported by: Andrey Zonov <andrey zonov org>
Suggested by: pjd
Reviewed by: pjd

r231910:

If the supervising process receives SIGTERM, forward it to the spawned
process.  Normally it will cause the child to exit followed by the
termination of the supervisor after removing the pidfile.

This looks like desirable behavior, because termination of a
supervisor usually supposes termination of its charge. Also it will
fix the issue with stale pid files after reboot due to init kills a
supervisor before its child exits.

r231911:

Add -r option to restart the program if it has been terminated.

Suggested by: Andrey Zonov <andrey zonov org>

r231912:

If permitted protect the supervisor against pageout kill.

Suggested by: Andrey Zonov <andrey zonov org>

git-svn-id: svn://svn.freebsd.org/base/stable/9@233761 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233121:
kevlo [Sun, 1 Apr 2012 15:05:15 +0000 (15:05 +0000)]
MFC r233121:
Repair function when used with large scales

Submitted by: AIDA Shinra <shinra at j10n dot org>

git-svn-id: svn://svn.freebsd.org/base/stable/9@233759 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232450:
jh [Sun, 1 Apr 2012 08:40:52 +0000 (08:40 +0000)]
MFC r232450:

Use snprintf(3) constantly when generating CAM error messages.

PR: bin/57088

git-svn-id: svn://svn.freebsd.org/base/stable/9@233755 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233256
alc [Sat, 31 Mar 2012 17:47:50 +0000 (17:47 +0000)]
MFC r233256
  Eliminate vm.pmap.shpgperproc and vm.pmap.pv_entry_max because they no
  longer serve any purpose.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233750 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233427
marius [Sat, 31 Mar 2012 10:47:34 +0000 (10:47 +0000)]
MFC: r233427

Add cas(4), gem(4) and hme(4) to x86 GENERICs as suggested by netchild@ in
<20120222095239.Horde.0hpYHJjmRSRPRKzXsoFRbYk@webmail.leidinger.net>.
According to some private emails received, it apparently is not unpopular
to use at least Quad GigaSwift cards driven by cas(4) in x86 machines.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233743 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233425
marius [Sat, 31 Mar 2012 10:26:58 +0000 (10:26 +0000)]
MFC: r233425

Consistently update to the MPI header set version 01.05.20 after r224761.
Requested by: mjacob

git-svn-id: svn://svn.freebsd.org/base/stable/9@233740 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233426
marius [Sat, 31 Mar 2012 10:20:48 +0000 (10:20 +0000)]
MFC: r233426

Add QGE-X to the list of known-working cards.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233737 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233328,r233382:
bschmidt [Sat, 31 Mar 2012 08:44:27 +0000 (08:44 +0000)]
MFC r233328,r233382:
Fix incorrect parameter usage.

Submitted by: Monthadar Al Jaberi

git-svn-id: svn://svn.freebsd.org/base/stable/9@233735 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233607:
kib [Sat, 31 Mar 2012 06:58:16 +0000 (06:58 +0000)]
MFC r233607:
Update comment.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233732 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233102:
kib [Sat, 31 Mar 2012 06:53:52 +0000 (06:53 +0000)]
MFC r233102:
Do not claim that msync(2) is obsoleted.
Document EIO from msync(2).

git-svn-id: svn://svn.freebsd.org/base/stable/9@233731 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233101:
kib [Sat, 31 Mar 2012 06:50:27 +0000 (06:50 +0000)]
MFC r233101:
Add sysctl vfs.nfs.nfs_keep_dirty_on_error to switch the nfs client
behaviour on error from write RPC back to behaviour of old nfs client.
When set to not zero, the pages for which write failed are kept dirty.

PR: kern/165927

git-svn-id: svn://svn.freebsd.org/base/stable/9@233730 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233100:
kib [Sat, 31 Mar 2012 06:44:48 +0000 (06:44 +0000)]
MFC r233100:
In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag
if the filesystem performed short write and we are skipping the page
due to this.

Propogate write error from the pager back to the callers of
vm_pageout_flush().  Report the failure to write a page from the
requested range as the FALSE return value from vm_object_page_clean(),
and propagate it back to msync(2) to return EIO to usermode.

While there, convert the clearobjflags variable in the
vm_object_page_clean() and arguments of the helper functions to
boolean.

PR: kern/165927

git-svn-id: svn://svn.freebsd.org/base/stable/9@233728 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233423
marius [Sat, 31 Mar 2012 01:21:46 +0000 (01:21 +0000)]
MFC: r233423

Initialize the mutexes used for the NVM and the swflag as MTX_DUPOK in
order to avoid otherwise harmless witness warnings when these are acquired
at the same time and due to both using MTX_NETWORK_LOCK as their type.
The right fix actually would be to use different, descriptive types for
these. However, the latter would require undesirable changes to the shared
code base. Another approach would be to just supply NULL as the type, which
was deemed as less desirable though as it would cause the unique but cryptic
name also to be used for the type and to diverge from the type used by other
network device drivers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233725 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233421
marius [Sat, 31 Mar 2012 00:13:41 +0000 (00:13 +0000)]
MFC: r233421

Given that this is a host-PCI-Express bridge driver, create the parent
DMA tag with a 4 GB boundary as required by PCI-Express. With r232403
(MFC'ed to stable/9 in r233393) in place this actually is redundant.
However, the host-PCI-Express bridge driver is the more appropriate
place for implementing this restriction.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233723 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233403, r233404
marius [Sat, 31 Mar 2012 00:10:16 +0000 (00:10 +0000)]
MFC: r233403, r233404

- Use the PCI ID macros from mpi_cnfg.h rather than duplicating them here.
  Note that this driver additionally probes some device IDs for the most
  part not know to other MPT drivers, if at all. So rename the macros not
  present in mpi_cnfg.h to match the naming scheme in the latter and but
  suffix them with a _FB in order to not cause conflicts.
- Like mpt_set_config_regs(), comment out mpt_read_config_regs() as the
  content of the registers read isn't actually used and both functions
  aren't exactly up to date regarding the possible layouts of the BARs
  (these function might be helpful for debugging though, so don't remove
  them completely).
- Use DEVMETHOD_END.
- Use NULL rather than 0 for pointers.
- Remove an unusual check for the softc being NULL.
- Remove redundant zeroing of the softc.
- Remove an overly banal and actually partly incorrect as well as partly
  outdated comment regarding the allocation of the memory resource.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233721 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233287
marius [Sat, 31 Mar 2012 00:07:53 +0000 (00:07 +0000)]
MFC: r233287

Use the common/shared CRC-32 implementation instead of duplicating it.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233719 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233282
marius [Fri, 30 Mar 2012 23:56:16 +0000 (23:56 +0000)]
MFC: r233282

- First pass at const'ifying ata(4) as appropriate.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233717 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233274
marius [Fri, 30 Mar 2012 23:50:16 +0000 (23:50 +0000)]
MFC: r233274

Remove remnants of ATA_LOCKING uses in the ATA_CAM case and wrap it
along with functions, SYSCTLs and tunables that are not used with
ATA_CAM in #ifndef ATA_CAM, similar to the existing #ifdef'ed ATA_CAM
code for the other way around. This makes it easier to understand
which parts of ata(4) actually are used in the new world order and
to later on remove the !ATA_CAM bits. It also makes it obvious that
there is something fishy with the C-bus front-end as well as in the
ATP850 support, as these used ATA_LOCKING which is defunct in the
ATA_CAM case. When fixing the former, ATA_LOCKING probably needs to
be brought back in some form or other.

Reviewed by: mav

git-svn-id: svn://svn.freebsd.org/base/stable/9@233715 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233273
marius [Fri, 30 Mar 2012 23:24:44 +0000 (23:24 +0000)]
MFC: r233273

Exclude devices which are mutually exclusive with ATA_CAM. For better
or worse, the former are still built as modules as part of the LINT
builds.

Reviewed by: mav

git-svn-id: svn://svn.freebsd.org/base/stable/9@233712 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 232669:
jhb [Fri, 30 Mar 2012 17:38:28 +0000 (17:38 +0000)]
MFC 232669:
Use bus_get_dma_tag() to inherit the 4G boundary restriction from the
parent PCI bus and remove the home-grown version in this driver.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233705 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232974:
kib [Fri, 30 Mar 2012 09:38:35 +0000 (09:38 +0000)]
MFC r232974:
Stop using strerror(3) in rtld, which brings in msgcat and stdio.
Directly access sys_errlist array of errno messages with private
rtld_strerror() function.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233697 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232862:
kib [Fri, 30 Mar 2012 09:37:25 +0000 (09:37 +0000)]
MFC r232862:
Do not use stdio for libmap.conf read.  Directly map the file and
parse lines from the mappings.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232861:
kib [Fri, 30 Mar 2012 09:36:12 +0000 (09:36 +0000)]
MFC r232861:
Provide rtld-private implementations of __stack_chk_guard,
__stack_chk_fail() and __chk_fail() symbols, to be used by functions
linked from libc_pic.a.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233695 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232831:
kib [Fri, 30 Mar 2012 09:34:19 +0000 (09:34 +0000)]
MFC r232831:
Add support for preinit, init and fini arrays to rtld.
Only binaries marked with proper ABI note gets array ctr/dtrs called.

MFC r232856:
When iterating over the dso program headers, the object is not initialized
yet, and object segments are not yet mapped.  Only parse the notes that
appear in the first page of the dso (as it should be anyway), and use
the preloaded page content.

MFC r232857 (by dim):
Fix a warning/error with clang.

MFC r232859 (by dim):
Amend r232857, now dropping the casts entirely, as they were not
necessary at all.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233694 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231300, r231328:
eadler [Thu, 29 Mar 2012 23:57:54 +0000 (23:57 +0000)]
MFC r231300, r231328:
Permit the use of relative paths for the prefix argument.
Remove an unnecessary cwd from created plists when -p is specified

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@233685 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233096:
rmh [Thu, 29 Mar 2012 13:01:29 +0000 (13:01 +0000)]
MFC r233096:

  Hide a few declarations from userland (including `struct inpcbgroup'). This
  removes the dependency on <machine/param.h> which was introduced with SVN
  rev 222748 (due to CACHE_LINE_SIZE).

  Reviewed by:    bde
  MFC after:      10 days

git-svn-id: svn://svn.freebsd.org/base/stable/9@233659 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232948:
kib [Thu, 29 Mar 2012 09:19:00 +0000 (09:19 +0000)]
MFC r232948:
Supply boolean as the second argument to ffs_update(), and not a
MNT_[NO]WAIT constants, which in fact always caused sync operation.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233654 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232835:
kib [Thu, 29 Mar 2012 09:16:10 +0000 (09:16 +0000)]
MFC r232835:
Do not fall back to slow synchronous i/o when low on memory or buffers.
The bawrite() schedules the write to happen immediately, and its use
frees the current thread to do more cleanups.

MFC r232837:
Remove superfluous brackets.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233653 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233291
alc [Thu, 29 Mar 2012 04:54:34 +0000 (04:54 +0000)]
MFC r233291
  Handle spurious page faults that may occur in no-fault sections of the
  kernel.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233647 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227489:
eadler [Thu, 29 Mar 2012 02:45:28 +0000 (02:45 +0000)]
MFC r227489:
- fix duplicate "a a" in some comments

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@233640 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233136, r233432:
eadler [Thu, 29 Mar 2012 01:46:01 +0000 (01:46 +0000)]
MFC r233136, r233432:
Restore the ability to use a non-standard LOCALBASE to sshd
Add the ability to use a non-standard LOCALBASE to ssh

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@233632 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC of 232351, 233438, and 233629
mckusick [Wed, 28 Mar 2012 21:34:55 +0000 (21:34 +0000)]
MFC of 232351, 233438, and 233629

MFC reviewed by: kib

MFC 232351:

This change avoids a kernel deadlock on "snaplk" when using
snapshots on UFS filesystems running with journaled soft updates.
This is the first of several bugs that need to be fixed before
removing the restriction added in -r230250 to prevent the use
of snapshots on filesystems running with journaled soft updates.

The deadlock occurs when holding the snapshot lock (snaplk)
and then trying to flush an inode via ffs_update(). We become
blocked by another process trying to flush a different inode
contained in the same inode block that we need. It holds the
inode block for which we are waiting locked. When it tries to
write the inode block, it gets blocked waiting for the our
snaplk when it calls ffs_copyonwrite() to see if the inode
block needs to be copied in our snapshot.

The most obvious place that this deadlock arises is in the
ffs_copyonwrite() routine when it updates critical metadata
in a snapshot and tries to write it out before proceeding.
The fix here is to write the data and indirect block pointer
for the snapshot, but to skip the call to ffs_update() to
write the snapshot inode. To ensure that we will never have
to update a pointer in the inode itself, the ffs_snapshot()
routine that creates the snapshot has to ensure that all the
direct blocks are allocated as part of the creation of the
snapshot.

A less obvious place that this deadlock occurs is when we hold
the snaplk because we are deleting a snapshot. In the course of
doing the deletion, we need to allocate various soft update
dependency structures and allocate some journal space. If we
hit a resource limit while doing this we decrease the resources
in use by flushing out an existing dirty file to get it to give
up the soft dependency resources that it holds. The flush can
cause an ffs_update() to be done on the inode for the file that
we have selected to flush resulting in the same deadlock as
described above when the inode that we have chosen to flush
resides in the same inode block as the snapshot inode that we hold.
The fix is to defer cleaning up any time that the inode on which
we are operating is a snapshot.

Help and review by:    Jeff Roberson
Tested by:             Peter Holm

MFC 233438:

Add a third flags argument to ffs_syncvnode to avoid a possible conflict
with MNT_WAIT flags that passed in its second argument.

Discussed with: kib

MFC 233629:

A refinement of change 232351 to avoid a race with a forcible unmount.
While we have a snapshot vnode unlocked to avoid a deadlock with another
inode in the same inode block being updated, the filesystem containing
it may be forcibly unmounted. When that happens the snapshot vnode is
revoked. We need to check for that condition and fail appropriately.

Spotted by:  kib
Reviewed by: kib

git-svn-id: svn://svn.freebsd.org/base/stable/9@233630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC Revision 233465
gibbs [Wed, 28 Mar 2012 19:40:58 +0000 (19:40 +0000)]
MFC Revision 233465

Correct failure to attach the PV block front device on Citrix
XenServer configurations that advertise the multi-page ring extension,
but only allow a single page of ring space.

sys/dev/xen/blkfront/blkfront.c:
If only one page of ring space is being used, do not publish
in the XenStore the number of pages in use (1), via either
of the supported multi-page ring extension schemes.

Single page operation is the same with or without the
ring-page extension being negotiated.   Relying on the
legacy behavior avoids an incompatible difference in how
the two ring-page extension schemes that are out in the
wild, deal with the base case of a single page.  The
Amazon/Red Hat drivers use the same XenStore variable as
if the extension was not negotiated.  The Citrix drivers
assume the new ring reference XenStore variables will be
available

Reported by: Oliver Schonefeld <schonefeld@ids-mannheim.de>

git-svn-id: svn://svn.freebsd.org/base/stable/9@233626 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232830:
kib [Wed, 28 Mar 2012 19:07:18 +0000 (19:07 +0000)]
MFC r232830:
Add a header with definitions useful for constructing ELF notes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233624 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233313
jkim [Wed, 28 Mar 2012 16:32:15 +0000 (16:32 +0000)]
MFC: r233313

Add ACPI_LV_REPAIR debug level, available since ACPICA 20091214.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233612 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232517:
zec [Wed, 28 Mar 2012 12:45:35 +0000 (12:45 +0000)]
MFC r232517:
  Change SYSINIT priorities so that ip_mroute_modevent() is executed
  before vnet_mroute_init(), since vnet_mroute_init() depends on mfchashsize
  tunable to be set, and that is done in in ip_mroute_modevent().
  Apparently I broke that ordering with r208744 almost 2 years ago...

  PR:           kern/162201
  Submitted by: Stevan Markovic (mcafee.com)
  MFC after:    3 days

git-svn-id: svn://svn.freebsd.org/base/stable/9@233604 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 232487
zec [Wed, 28 Mar 2012 12:40:30 +0000 (12:40 +0000)]
MFC: 232487
  Properly restore curvnet context when returning early from
  ether_input_internal().

  This change only affects options VIMAGE kernel builds.

  PR:           kern/165643
  Submitted by: Vijay Singh
  MFC after:    3 days

git-svn-id: svn://svn.freebsd.org/base/stable/9@233602 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232207, r232454:
mav [Wed, 28 Mar 2012 11:37:06 +0000 (11:37 +0000)]
MFC r232207, r232454:
Rework CPU load balancing in SCHED_ULE:
 - In sched_pickcpu() be more careful taking previous CPU on SMT systems.
Do it only if all other logical CPUs of that physical one are idle to avoid
extra resource sharing.
 - In sched_pickcpu() change general logic of CPU selection. First
look for idle CPU, sharing last level cache with previously used one,
skipping SMT CPU groups. If none found, search all CPUs for the least loaded
one, where the thread with its priority can run now. If none found, search
just for the least loaded CPU.
 - Make cpu_search() compare lowest/highest CPU load when comparing CPU
groups with equal load. That allows to differentiate 1+1 and 2+0 loads.
 - Make cpu_search() to prefer specified (previous) CPU or group if load
is equal. This improves cache affinity for more complicated topologies.
 - Randomize CPU selection if above factors are equal. Previous code tend
to prefer CPUs with lower IDs, causing unneeded collisions.
 - Rework periodic balancer in sched_balance_group(). With cpu_search()
more intelligent now, make balansing process flat, removing recursion
over the topology tree. That fixes double swap problem and makes load
distribution more even and predictable.

All together this gives 10-15% performance improvement in many tests on
CPUs with SMT, such as Core i7, for number of threads is less then number
of logical CPUs. In some tests it also gives positive effect to systems
without SMT.

Sponsored by: iXsystems, Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233599 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232852:
mav [Wed, 28 Mar 2012 10:15:42 +0000 (10:15 +0000)]
MFC r232852:
Tune cpuset macros to optimize cases when CPU_SETSIZE fits into single
machine word. For example, it turns CPU_SET() into expected shift and OR,
removing extra shift, AND and additional index on memory access.

Generated code checked for kernel (optimized) and user-level (unoptimized)
cases with GCC and CLANG.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233598 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233276:
ae [Wed, 28 Mar 2012 06:49:04 +0000 (06:49 +0000)]
MFC r233276:
  Acquire modules lock before call module_getname() in the KLD_DEBUG case.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233595 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230348:
eadler [Wed, 28 Mar 2012 02:33:50 +0000 (02:33 +0000)]
MFC r230348:
 - Fix warning when compiling with gcc46:
        error: variable 'extra_async_bytes' set but not used

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@233588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233313
jkim [Wed, 28 Mar 2012 00:11:06 +0000 (00:11 +0000)]
MFC: r233313

Add ACPI_LV_REPAIR debug level, available since ACPICA 20091214.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233583 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233208, r233249
jkim [Wed, 28 Mar 2012 00:06:52 +0000 (00:06 +0000)]
MFC: r233208, r233249

Fix a witness panic.  We cannot enter critical section here.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233582 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233042, r233054, r233056, r233187
jkim [Tue, 27 Mar 2012 23:59:48 +0000 (23:59 +0000)]
MFC: r233042, r233054, r233056, r233187

- Do not unnecessarily clear display memory when switching modes.
- Remove unnecessary static variable initializations and duplicate codes.
- Consistently use bcopy(9) over memcpy(9).
- Save and restore linear frame buffer between suspend and resume.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233581 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 233186
jpaetzel [Tue, 27 Mar 2012 19:05:49 +0000 (19:05 +0000)]
MFC: 233186

An intel RAID can have any arbitrary name.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233573 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 233131
jpaetzel [Tue, 27 Mar 2012 18:59:58 +0000 (18:59 +0000)]
MFC: 233131

Redirect camcontrol stderr to /dev/null.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233572 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233048:
mm [Tue, 27 Mar 2012 17:24:51 +0000 (17:24 +0000)]
MFC r233048:
Unhide /dev/zfs in devfsrules_jail.

The /dev/zfs device is required for managing jailed ZFS datasets.

Discussed with: pjd, jamie

git-svn-id: svn://svn.freebsd.org/base/stable/9@233566 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233111:
hselasky [Tue, 27 Mar 2012 15:33:38 +0000 (15:33 +0000)]
MFC r233111:
Regenerate usb.conf to use new -n option when doing kldload.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233562 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233110:
hselasky [Tue, 27 Mar 2012 15:32:09 +0000 (15:32 +0000)]
MFC r233110:
Use new -n option when executing kldload, to
not warn about already loaded module(s).

git-svn-id: svn://svn.freebsd.org/base/stable/9@233561 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233109:
hselasky [Tue, 27 Mar 2012 15:29:51 +0000 (15:29 +0000)]
MFC r233109:
Add option to ignore error codes if the module specified is already loaded.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233560 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233090:
hselasky [Tue, 27 Mar 2012 15:27:36 +0000 (15:27 +0000)]
MFC r233090:
The UMS module is now loaded by rules in /etc/devd/usb.conf which
are executed by devd. Remove duplicate kldload.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233559 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233126:
jh [Tue, 27 Mar 2012 14:01:09 +0000 (14:01 +0000)]
MFC r233126:

Cast wallclock.tv_sec to uint64_t to avoid overflow in the calculation.

PR: kern/161552

git-svn-id: svn://svn.freebsd.org/base/stable/9@233543 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233428:
eadler [Tue, 27 Mar 2012 00:51:28 +0000 (00:51 +0000)]
MFC r233428:
 - Direct users to csup instead of cvsup in the csup-file boilerplate text.

Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@233526 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227214 (by antoine, partially):
pluknet [Mon, 26 Mar 2012 09:31:15 +0000 (09:31 +0000)]
MFC r227214 (by antoine, partially):

 Add more obsolete files.

PR: misc/165523 (RELENG_9)

git-svn-id: svn://svn.freebsd.org/base/stable/9@233504 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232951,232953,233158:
yongari [Mon, 26 Mar 2012 05:14:04 +0000 (05:14 +0000)]
MFC r232951,232953,233158:
r232951:
  fxp(4) does not handle deferred dma map loading.  Tell
  bus_dmamap_load(9) that it should return immediately with error
  when there are insufficient mapping resources.

r232953:
  Fix white space nits.

r233158:
  Do not change current media when driver is already running.  If
  driver is running driver would have already completed flow control
  configuration.  This change removes unnecessary media changes in
  controller reconfiguration cases such that it does not trigger link
  reestablishment for configuration change requests like promiscuous
  mode change.

  Reported by: Many
  Tested by: Mike Tancsa <mike <> sentex dot net>

git-svn-id: svn://svn.freebsd.org/base/stable/9@233501 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232849-232850:
yongari [Mon, 26 Mar 2012 04:47:06 +0000 (04:47 +0000)]
MFC r232849-232850:
r232849:
  Show PCI bus speed and width as well as running mode of PCI-X
  device in device attach.  This would help to narrow down issue to a
  specific controller and operating mode of the controller.
  While I'm here rename BGE_MISCCFG_BOARD_ID with
  BGE_MISCCFG_BOARD_ID_MASK.

r232850:
  Make if_ierrors updated whenever any of the following counters are
  updated.
   o Number of times NIC ran out of RX buffer descriptors
   o Number of inbound packet errors
   o Number of inbound packets that were chosen to be discarded
  Previously only the discarded packet counter was used to update
  if_ierrors.  This change fixes wrong if_ierrors counter on
  BCM570[0-4] controllers.  For BCM5705 and later controllers bge(4)
  already correctly counted it.

  Reported by: Eugene Grosbein <egrosbein <> rdtc dot ru>

git-svn-id: svn://svn.freebsd.org/base/stable/9@233498 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232848:
yongari [Mon, 26 Mar 2012 04:36:22 +0000 (04:36 +0000)]
MFC r232848:
  Add workaround for PCI-X BCM5704 controller that live behind
  AMD-8131 PCI-X bridge.  The bridge seems to reorder write access to
  mailbox registers such that it caused watchdog timeouts by
  out-of-order TX completions.

  Tested by: Michael L. Squires <mikes <> siralan dot org >

git-svn-id: svn://svn.freebsd.org/base/stable/9@233495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232246:
yongari [Mon, 26 Mar 2012 04:27:01 +0000 (04:27 +0000)]
MFC r232246:
  Prefer RL_GMEDIASTAT register to RGEPHY_MII_SSR register to
  extract a link status of PHY when parent driver is re(4).
  RGEPHY_MII_SSR register does not seem to report correct PHY status
  on some integrated PHYs used with re(4).
  Unfortunately, RealTek PHYs have no additional information to
  differentiate integrated PHYs from external ones so relying on PHY
  model number is not enough to know that.  However, it seems
  RGEPHY_MII_SSR register exists for external RealTek PHYs so
  checking parent driver would be good indication to know which PHY
  was used. In other words, for non-re(4) controllers, the PHY is
  external one and its revision number is greater than or equal to 2.
  This change fixes intermittent link UP/DOWN messages reported on
  RTL8169 controller.

  Also, mii_attach(9) is tried after setting interface name since
  rgephy(4) have to know parent driver name.

  PR: kern/165509

git-svn-id: svn://svn.freebsd.org/base/stable/9@233492 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232145:
yongari [Mon, 26 Mar 2012 03:54:19 +0000 (03:54 +0000)]
MFC r232145:
  Use correct Config registers for RTL8139 family. Unlike RTL8168 and
  RTL810x family , RTL8139 has different register map for Config
  registers.

  While here, follow the lead of re(4) in WOL configuration.
   - Disable WOL_UCAST and WOL_MCAST capabilities by default.
   - Config5 register write does not need to unlock EEPROM access
     on RTL8139 family but unlocking EEPROM access does not affect
     its operation and make it consistent with re(4).

  Reported by: Matt Renzelmann  mjr <> cs dot wisc dot edu

git-svn-id: svn://svn.freebsd.org/base/stable/9@233489 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232019,232021,232025,232027,232029,232031,232040:
yongari [Mon, 26 Mar 2012 03:45:46 +0000 (03:45 +0000)]
MFC r232019,232021,232025,232027,232029,232031,232040:
r232019:
  Give hardware chance to drain active DMA cycles.

r232021:
  If there are not enough RX buffers, release partially allocated RX
  buffers.

r232025:
  Introduce sf_ifmedia_upd_locked() and have driver reset PHY before
  switching to selected media.  While here, set if_drv_flags before
  switching to selected media.

r232027:
  No need to reprogram hardware RX filter when driver is not running.

r232029:
  Remove taskqueue based MII stat change handler.
  Driver does not need deferred link state change processing.
  While I'm here, do not report current link status if interface is
  not UP.

r232031:
  With r232015, sf(4) gets correct speed/duplex of established link.
  Add more strict speed check in sf_miibus_statchg() and do not touch
  MAC config registers when driver lost a link.

r232040:
  Add check for IFF_DRV_RUNNING flag after serving an interrupt and
  don't give RX path more priority than TX path.
  Also remove infinite loop in interrupt handler and limit number of
  iteration to 32. This change addresses system load fluctuations
  under high network load.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232015-232016:
yongari [Mon, 26 Mar 2012 02:40:54 +0000 (02:40 +0000)]
MFC r232015-232016:
r232015:
  Add Seeq Technology 80220 PHY support to smcphy(4).  This PHY is
  found on Adaptec AIC-6915 Starfire ethernet controller.
  While here, use status register to know resolved speed/duplex.
  With this change, sf(4) correctly reports speed/duplex of
  established link.

r232016:
  Connect smcphy(4) to mii module build.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233485 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233138:
eadler [Mon, 26 Mar 2012 01:15:38 +0000 (01:15 +0000)]
MFC r233138:
 draft-ietf-ipv6-scoping-arch-02.txt is now RFC 4007

PR: phk
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@233481 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233132: fts(3): Mention that FTS_NOCHDIR imposes {PATH_MAX} limits on
jilles [Sun, 25 Mar 2012 20:03:13 +0000 (20:03 +0000)]
MFC r233132: fts(3): Mention that FTS_NOCHDIR imposes {PATH_MAX} limits on
the returned pathnames.

With the current API (no *at functions), FTS_NOCHDIR requires that the
fts_accpath start with the original path passed to fts_open(); therefore,
the depth that can be reached is limited by the {PATH_MAX} constraint on
this pathname.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233475 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233130: fts(3): Document cases where FTS_NOCHDIR is set implicitly.
jilles [Sun, 25 Mar 2012 20:01:03 +0000 (20:01 +0000)]
MFC r233130: fts(3): Document cases where FTS_NOCHDIR is set implicitly.

PR: docs/166091
Submitted by: Matthew Story

git-svn-id: svn://svn.freebsd.org/base/stable/9@233474 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233188
andreast [Sun, 25 Mar 2012 18:43:14 +0000 (18:43 +0000)]
MFC: r233188
Provide a fix for certain PowerMacs where the U3 i2c lacks the interrupt
info.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r232482
andreast [Sun, 25 Mar 2012 18:42:19 +0000 (18:42 +0000)]
MFC: r232482
Add support for PWM controlled fans. I found these fans on my PowerMac9,1.
These fans are not located under the same node as the the RPM controlled ones,
So I had to adapt the current source to parse and fill the properties correctly.
To control the fans we can set the PWM ratio via sysctl between 20 and 100%.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233471 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r233105
marius [Sun, 25 Mar 2012 16:24:42 +0000 (16:24 +0000)]
MFC: r233105

Declare some variables static in order to reduce the object size and
redo r232822 (MFC'ed to stable/9 in r232962) in a less hackish way.
The latter now no longer breaks compiling the x86 boot2 with clang.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233468 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r232754 (remaining part)
marius [Sun, 25 Mar 2012 16:20:01 +0000 (16:20 +0000)]
MFC: r232754 (remaining part)

Make boot2 build with Clang again.

Submitted by: dim (bsd.sys.mk)
Reviewed by: dim, jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@233467 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r232355
brueffer [Sun, 25 Mar 2012 13:20:38 +0000 (13:20 +0000)]
MFC: r232355

Add snd_hdspe(4) to the hardware notes.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233464 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r233283:
bschmidt [Sun, 25 Mar 2012 10:59:40 +0000 (10:59 +0000)]
MFC r233283:
Load the firmware during init not attach, as a root filesystem might
not yet be available. While here, also print the firmware version.

Submitted by: PseudoCylon

git-svn-id: svn://svn.freebsd.org/base/stable/9@233460 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC of r233445, tzdata2012a
edwin [Sun, 25 Mar 2012 02:18:22 +0000 (02:18 +0000)]
MFC of r233445, tzdata2012a

- Updates to various locations in Antarctica.
- Armenia will abolish DST this year.
- Not only Samoa has moved to UTC+14, also Fakaofo did.
- There will be a leap second in 30 June 2012.
- Historical updates of 1918 to Canada, Winn, Regina, Edm, Vanc, Creston.
- Chili stays on DST until 28 April 2012
- The Falkland islands will stay on DST this year.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233447 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC of 226976, tzdata2011n
edwin [Sun, 25 Mar 2012 02:16:57 +0000 (02:16 +0000)]
MFC of 226976, tzdata2011n

- Fiji will end DST on 22 January 2012.
- Moldova split into two timezones has been cancelled.
- Cuba will end DST on 13 November 2011

git-svn-id: svn://svn.freebsd.org/base/stable/9@233446 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232836:
kib [Sun, 25 Mar 2012 01:00:31 +0000 (01:00 +0000)]
MFC r232836:
Do schedule delayed writes for async mounts.
While there, make some style adjustments, like missed () around
return values.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233440 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r232834:
kib [Sun, 25 Mar 2012 00:44:54 +0000 (00:44 +0000)]
MFC r232834:
In ffs_syncvnode(), pass boolean false as second argument of ffs_update().
Synchronous inode block update is not needed for MNT_LAZY callers (syncer),
and since waitfor values are not zero, code did unneccessary synchronous
update.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233439 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230155:
eadler [Fri, 23 Mar 2012 22:03:46 +0000 (22:03 +0000)]
MFC r230155:
Make man page wording more clear

PR: docs/164078
Approved by: cperciva (implicit)

git-svn-id: svn://svn.freebsd.org/base/stable/9@233399 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 232470:
jhb [Fri, 23 Mar 2012 21:19:07 +0000 (21:19 +0000)]
MFC 232470:
Use pci_find_cap() instead of pci_find_extcap() to locate PCI
find capabilities as the latter API is deprecated for this purpose.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233398 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 232362,232363,232463,232553,232569,232571:
jhb [Fri, 23 Mar 2012 20:58:18 +0000 (20:58 +0000)]
MFC 232362,232363,232463,232553,232569,232571:
- Sort function prototypes.
- Update the documentation on pci_get/set_powerstate().  These methods are
  not ACPI-specific at all, but deal with PCI power states.  Also,
  pci_set_powerstate() fails with EOPNOTSUPP if a request is made that the
  underlying device does not support rather than falling back to somehow
  setting D0.
- Document the following routines: pci_alloc_msi(), pci_alloc_msix(),
  pci_find_cap(), pci_get_max_read_req(), pci_get_vpd_ident(),
  pci_get_vpd_readonly(), pci_msi_count(), pci_msix_count(),
  pci_pending_msix(), pci_release_msi(),  pci_remap_msix(), and
  pci_set_max_read_req().
- Group the functions into five sub-sections: raw configuration access,
  locating devices, device information, device configuration, and
  message signaled interrupts.
- Discourage use of pci_disable_io() and pci_enable_io() in device drivers.
  The PCI bus driver handles this automatically as resources are activated.

git-svn-id: svn://svn.freebsd.org/base/stable/9@233395 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f