]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC r232157, r232158:
gjb [Thu, 26 Apr 2012 20:11:57 +0000 (20:11 +0000)]
MFC r232157, r232158:

r232157:
  Fix various typos in manual pages.

  Submitted by: amdmi3
  PR:           165431

r232158:
  Whitespace cleanup:
    o Wrap sentences on to new lines
    o Cleanup trailing whitespace

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

12 years agoMFC: r233580
jkim [Thu, 26 Apr 2012 18:16:44 +0000 (18:16 +0000)]
MFC: r233580

- Do not clobber softc when psm(4) is reintialized.
- Make INITAFTERSUSPEND flag independent of HOOKRESUME flag.
- Automatically set INITAFTERSUSPEND flag when ALPS GlidePoint is detected.
- Always probe Synaptics Touchpad.  Allow MOUSE_SYN_GETHWINFO ioctl and
automatically set INITAFTERSUSPEND flag when a supported device is detected,
regardless of "hw.psm.synaptics_support" tunable setting.
- Update psm(4) to reflect the above changes.
- Remove long-time defunct SYNCHACK flag while I am in the neighborhood.

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

12 years agoMFC r234615:
nwhitehorn [Thu, 26 Apr 2012 14:02:39 +0000 (14:02 +0000)]
MFC r234615:
Fix copy-and-paste error in r230400 that would cause ppc64 executables
built with -fvisibility=hidden to fail to link with a message about
hidden symbol main being referenced from a DSO.

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

12 years agoMFC r234579:
nwhitehorn [Thu, 26 Apr 2012 14:00:29 +0000 (14:00 +0000)]
MFC r234579:
Avoid a lock order reversal in pmap_extract_and_hold() from relocking
the page. This PMAP requires an additional lock besides the PMAP lock
in pmap_extract_and_hold(), which vm_page_pa_tryrelock() did not release.

Suggested by: kib

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

12 years agoMFC r234542:
nwhitehorn [Thu, 26 Apr 2012 13:59:00 +0000 (13:59 +0000)]
MFC r234542:
Organize some members of ucontext_t in the same order they are in the
trap frame. These are usually not used, and so this changes very little.

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

12 years agoMFC r234589:
nwhitehorn [Thu, 26 Apr 2012 13:57:41 +0000 (13:57 +0000)]
MFC r234589:
Correctly specify assembler constrains for synchronization instructions.

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

12 years agoMFC r234517:
nwhitehorn [Thu, 26 Apr 2012 13:56:38 +0000 (13:56 +0000)]
MFC r234517:
Make sure all pending operations have completed on the existing thread
before (potentially) migrating it to a different CPU.

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

12 years agoMFC r234156:
nwhitehorn [Thu, 26 Apr 2012 13:55:15 +0000 (13:55 +0000)]
MFC r234156:
We don't need kcopy() in any of the remaining places it is used, so
remove it.

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

12 years agoMFC r234697:
ru [Thu, 26 Apr 2012 09:14:52 +0000 (09:14 +0000)]
MFC r234697:
  Fixed a misspelling of OLD_LIBS in r232671 by pluknet@.
  (The patch in the PR 165523 had this spelled correctly.)

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

12 years agoMFC r234692:
ae [Thu, 26 Apr 2012 05:17:25 +0000 (05:17 +0000)]
MFC r234692:
  Read backup GPT header from the last LBA only when primary GPT header and
  table aren't valid. If they are ok, use hdr_lba_alt value to read backup
  header. This will make gptboot happy when GPT used atop of some GEOM
  provider, e.g. GEOM_MIRROR.

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

12 years agoMFC r234574
melifaro [Wed, 25 Apr 2012 09:55:34 +0000 (09:55 +0000)]
MFC r234574

Fix panic in ng_patch(4) caused by checksum flags being added to mbuf flags.

Tested by:        Maxim Ignatenko <gelraen.ua@gmail.com>
Approved by:      ae(mentor)

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

12 years agoMFC r234339: zfsboot: honor -q if it's present in boot.config
avg [Wed, 25 Apr 2012 07:23:35 +0000 (07:23 +0000)]
MFC r234339: zfsboot: honor -q if it's present in boot.config

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

12 years agoMFC r234338: intpm: add ATI IXP400 pci id
avg [Wed, 25 Apr 2012 07:13:16 +0000 (07:13 +0000)]
MFC r234338: intpm: add ATI IXP400 pci id

PR: kern/136762

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

12 years agoMerge r233167 from head:
glebius [Wed, 25 Apr 2012 07:09:02 +0000 (07:09 +0000)]
Merge r233167 from head:
  Rotate auth.log and messages at the beginning of a year. Otherwise,
  daily security checks 800.loginfail and 900.tcpwrap may produce
  false positive alerts.

PR: 142467, 165331

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

12 years agoMerge r233257, r233258 from head:
glebius [Wed, 25 Apr 2012 07:04:48 +0000 (07:04 +0000)]
Merge r233257, r233258 from head:
  Don't run through time checks when entry is definitely oversized. This
  leads to newsyslog rotating on (size OR time) if both are specified.

  Fix a sentence in a paragraph that describes time and interval based
  trimming. This sentence vaguely can be interpreted as if it was speaking
  about time and size interaction, while it wasn't about it.

PR: 100018, 160432

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

12 years agoMFC r234208: add actual interrupt counters to back ipi_invlcache_counts
avg [Wed, 25 Apr 2012 06:52:26 +0000 (06:52 +0000)]
MFC r234208: add actual interrupt counters to back ipi_invlcache_counts

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

12 years agoMFC r234207: bump INTRCNT_COUNT values to reflect actual numbers of IPI counters
avg [Wed, 25 Apr 2012 06:43:40 +0000 (06:43 +0000)]
MFC r234207: bump INTRCNT_COUNT values to reflect actual numbers of IPI counters

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

12 years agoMFC r234414:
mav [Wed, 25 Apr 2012 06:18:49 +0000 (06:18 +0000)]
MFC r234414:
Alike to SCSI make adaclose() to not return error if device gone.
This fixes KASSERT panic inside GEOM if kernel built with INVARIANTS.

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

12 years agoMFC r234416:
kib [Wed, 25 Apr 2012 04:53:04 +0000 (04:53 +0000)]
MFC r234416:
Fix string buffer overflow when preparing the line of output.

PR: bin/161739

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

12 years agoMFC r232317:
trociny [Tue, 24 Apr 2012 19:08:40 +0000 (19:08 +0000)]
MFC r232317:

Introduce VOP_UNP_BIND(), VOP_UNP_CONNECT(), and VOP_UNP_DETACH()
operations for setting and accessing vnode's v_socket field.

The operations are necessary to implement proper unix socket handling
on layered file systems like nullfs(5).

This change fixes the long standing issue with nullfs(5) being in that
unix sockets did not work between lower and upper layers: if we bound
to a socket on the lower layer we could connect only to the lower
path; if we bound to the upper layer we could connect only to the
upper path. The new behavior is one can connect to both the lower and
the upper paths regardless what layer path one binds to.

PR: kern/51583, kern/159663
Suggested by: kib
Reviewed by: arch

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

12 years agoMFC: r232702
pho [Tue, 24 Apr 2012 19:00:42 +0000 (19:00 +0000)]
MFC: r232702

Free up allocated memory used by posix_fadvise(2).

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

12 years agoMFC r234376:
mav [Tue, 24 Apr 2012 07:27:56 +0000 (07:27 +0000)]
MFC r234376:
Add some more SCSI mode pages from SPC-4 spec.

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

12 years agoMFC r234529:
das [Tue, 24 Apr 2012 03:59:21 +0000 (03:59 +0000)]
MFC r234529:
  Ensure that the {,v}swprintf functions always null-terminate the
  output string, even if an encoding error or malloc failure occurs.

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

12 years agoMFC r234528, r234536:
das [Tue, 24 Apr 2012 03:56:45 +0000 (03:56 +0000)]
MFC r234528, r234536:
  Fix an infinite loop in fputws().

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

12 years agoMFC r233160:
bjk [Tue, 24 Apr 2012 03:27:27 +0000 (03:27 +0000)]
MFC r233160:
    Expound a bit more about the system maximum number of FIBs,
    how it may be set, and current limitations on the value.

PR: docs/157453
Approved by: hrs (mentor)

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

12 years agoMFC r234132:
eadler [Mon, 23 Apr 2012 22:37:48 +0000 (22:37 +0000)]
MFC r234132:
Make the item numbers match the crypt magic number

PR: kern/161553
Approved by: cperciva (implicit)

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

12 years agoMFC r233298:
pluknet [Mon, 23 Apr 2012 12:18:38 +0000 (12:18 +0000)]
MFC r233298:
 Garbage collect defunct nlist(3) symbols.

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

12 years agoMFC r232865, r232868, r233478
melifaro [Mon, 23 Apr 2012 07:15:15 +0000 (07:15 +0000)]
MFC r232865, r232868, r233478

- Add ipfw eXtended tables permitting radix to be used for any kind of keys.
- Add support for IPv6 and interface extended tables
- Make number of tables to be changed in runtime in range 0..65534.
- Use IP_FW3 opcode for all new extended table cmds

No ABI changes are introduced. Old userland will see valid tables for
IPv4 tables and no entries otherwise. Flush works for any table.

IP_FW3 socket option is used to encapsulate all new opcodes:
 /* IP_FW3 header/opcodes */
 typedef struct _ip_fw3_opheader {
        uint16_t opcode;        /* Operation opcode */
        uint16_t reserved[3];   /* Align to 64-bit boundary */
 } ip_fw3_opheader;

New opcodes added:
 IP_FW_TABLE_XADD, IP_FW_TABLE_XDEL, IP_FW_TABLE_XGETSIZE, IP_FW_TABLE_XLIST

ipfw(8) table argument parsing behavior is changed:
 'ipfw table 999 add host' now assumes 'host' to be interface name instead of
 hostname.

New tunable:
 net.inet.ip.fw.tables_max controls number of table supported by ipfw in given
 VNET instance. 128 is still the default value.

Sysctl change:
  net.inet.ip.fw.tables_max is now read-write.

New syntax:
ipfw add skipto tablearg ip from any to any via table(42) in
ipfw add skipto tablearg ip from any to any via table(4242) out

This is a bit hackish, special interface name '\1' is used to signal interface
table number is passed in p.glob field.

Sponsored by Yandex LLC

Approved by:        kib(mentor)

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

12 years agoMFC r234121:
yongari [Mon, 23 Apr 2012 03:38:40 +0000 (03:38 +0000)]
MFC r234121:
  Back out r228476.
  r228476 fixed superfluous link UP/DOWN messages but broke IPMI
  access during boot.  It's not clear why r228476 breaks IPMI and
  should be revisited.

  Reported by: Paul Guyot <paulguyot <> ieee dot org >

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

12 years agoMFC r233387:
bschmidt [Sun, 22 Apr 2012 09:19:10 +0000 (09:19 +0000)]
MFC r233387:
Use suspend/resume methods provided by net80211. This ensures that the
appropriate state handling takes place, not doing so results in the
device doing nothing until manual intervention.

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

12 years agoMFC: revision 232784
nyan [Sun, 22 Apr 2012 03:53:11 +0000 (03:53 +0000)]
MFC: revision 232784

  MFi386: revisions 232570 and 232754

  Fix boot2 to handle boot config files that only contain a custom path to
  a loader or kernel.

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

12 years agoMFC r227730:
raj [Sat, 21 Apr 2012 20:22:02 +0000 (20:22 +0000)]
MFC r227730:

 Initial version of cesa(4) driver for Marvell crypto engine and security
 accelerator.

 The following algorithms and schemes are supported:
  - 3DES, AES, DES
  - MD5, SHA1

 Obtained from: Semihalf
 Written by: Piotr Ziecik

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

12 years agoMFC r233230, r233323:
raj [Sat, 21 Apr 2012 20:10:26 +0000 (20:10 +0000)]
MFC r233230, r233323:

Improve device tree blob (DTB) handling in loader(8).

 Enable using the statically embedded blob from the kernel, if present. The
 KLD loaded DTB takes precedence, but they are both recognized and handled in
 the same way.

Improve FDT handling in loader(8) and make it more robust.

 o Fix buffer overflows when using a long property body in node paths.
 o Fix loop end condition when iterating through the symbol table.
 o Better error handling during node modification, better problem reporting.
 o Eliminate build time warnings.

Submitted by:   Lukasz Wojcik
Obtained from:  Semihalf

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

12 years agoMFC r232921:
melifaro [Sat, 21 Apr 2012 19:22:53 +0000 (19:22 +0000)]
MFC r232921:

Use rt_numfibs variable instead of compile-time RT_NUMFIBS.

Approved by:    kib(mentor)

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

12 years agoMFC r229930
melifaro [Sat, 21 Apr 2012 18:12:24 +0000 (18:12 +0000)]
MFC r229930

Add setsockopt(2) example to ng_ksocket(4).
While here, fix formatting a bit

Approved by:     ae(mentor)

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

12 years agoMFC r233973:
das [Sat, 21 Apr 2012 07:00:39 +0000 (07:00 +0000)]
MFC r233973:
  Fix bugs in remquo{,f,l}.

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

12 years agoMFC r234115:
nwhitehorn [Sat, 21 Apr 2012 00:26:03 +0000 (00:26 +0000)]
MFC r234115:
Do not restore the register holding the TLS pointer when doing various
usermode context switches (long jumps and ucontext operations). If these
are used across threads, multiple threads can end up with the same TLS base.
Madness will then result.

This makes behavior on PPC match that on x86 systems and on Linux.

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

12 years agoMFC: r234303
davide [Fri, 20 Apr 2012 22:43:04 +0000 (22:43 +0000)]
MFC: r234303

Fix a typo.

Approved by: gnn (mentor)

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

12 years agoMFC of r227310:
rmh [Fri, 20 Apr 2012 22:14:26 +0000 (22:14 +0000)]
MFC of r227310:

Don astbestos garment and remove the warning about TMPFS being experimental
-- highly experimental even. So far the closest to a bug in TMPFS that people
have gotten to relates to how ZFS can take away from the memory that TMPFS
needs. One can argue that such is not a bug in TMPFS. Irrespective, even if
there is a bug here and there in TMPFS, it's not in our own advantage to
scare people away from using TMPFS. I for one have been using it, even with
ZFS, very successfully.

Reviewed by: marcel

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

12 years agoMFC: r233045, r234302
davide [Fri, 20 Apr 2012 21:40:31 +0000 (21:40 +0000)]
MFC: r233045, r234302

r233045:
Add rudimentary profiling of the hash table used in the umtx code to
hold active lock queues.

r234302:
Fix some style bugs introduced in a previous commit (r233045)

Approved by: gnn (mentor)

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

12 years agoMFC: 234234
gnn [Fri, 20 Apr 2012 16:20:16 +0000 (16:20 +0000)]
MFC: 234234

Change SIGUSR1 to SIGTHR to properly wake up a process that is being
traced.  The use of SIGUSR1 caused traced processes (those attached to
with dtrace -p) to exit when dtrace exited.

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

12 years agoMFC: r234247
marius [Fri, 20 Apr 2012 13:47:22 +0000 (13:47 +0000)]
MFC: r234247

Merge from x86:

r233961:

Fix interrupt load balancing regression, introduced in revision
222813, that left all un-pinned interrupts assigned to CPU 0.
In intr_shuffle_irqs(), remove CPU_SETOF() call that initialized
the "intr_cpus" cpuset to only contain CPU0.

This initialization is too late and nullifies the results of calls
to the intr_add_cpu() that occur much earlier in the boot process.

r234074 (partial):

The BSP is not added to the mask of valid target CPUs for interrupts.
Fix this by adding the BSP as an interrupt target directly in

r234105:

Fix !SMP build after r234074.

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

12 years agoMFC r233949,233957,233964,234149,234155:
nwhitehorn [Fri, 20 Apr 2012 00:45:23 +0000 (00:45 +0000)]
MFC r233949,233957,233964,234149,234155:
More PMAP concurrency and performance improvements by only flushing icaches
when needed and executing ptesync only when architecturally required.

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

12 years agoMFC of 234158:
mckusick [Thu, 19 Apr 2012 22:42:28 +0000 (22:42 +0000)]
MFC of 234158:

Export vinactive() from kern/vfs_subr.c (e.g., make it no longer
static and declare its prototype in sys/vnode.h) so that it can be
called from process_deferred_inactive() (in ufs/ffs/ffs_snapshot.c)
instead of the body of vinactive() being cut and pasted into
process_deferred_inactive().

Reviewed by: kib
MFC after:   2 weeks

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

12 years agoMFC of 234157:
mckusick [Thu, 19 Apr 2012 22:28:42 +0000 (22:28 +0000)]
MFC of 234157:

Whitespace cleanup.

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

12 years agoMFC of 233817:
mckusick [Thu, 19 Apr 2012 22:22:21 +0000 (22:22 +0000)]
MFC of 233817:

A file cannot be deallocated until its last name has been removed
and it is no longer referenced by a user process. The inode for a
file whose name has been removed, but is still referenced at the
time of a crash will still be allocated in the filesystem, but will
have no references (e.g., they will have no names referencing them
from any directory).

With traditional soft updates these unreferenced inodes will be
found and reclaimed when the background fsck is run. When using
journaled soft updates, the kernel must keep track of these inodes
so that it can find and reclaim them during the cleanup process.
Their existence cannot be stored in the journal as the journal only
handles short-term events, and they may persist for days. So, they
are tracked by keeping them in a linked list whose head pointer is
stored in the superblock. The journal tracks them only until their
linked list pointers have been commited to disk. Part of the cleanup
process involves traversing the list of unreferenced inodes and
reclaiming them.

This bug was triggered when confusion arose in the commit steps
of keeping the unreferenced-inode linked list coherent on disk.
Notably, a race between the link() system call adding a link-count
to a file and the unlink() system call removing a link-count to
the file. Here if the unlink() ran after link() had looked up
the file but before link() had incremented the link-count of the
file, the file's link-count would drop to zero before the link()
incremented it back up to one. If the file was referenced by a
user process, the first transition through zero made it appear
that it should be added to the unreferenced-inode list when in
fact it should not have been added. If the new name created by
link() was deleted within a few seconds (with the file still
referenced by a user process) it would legitimately be a candidate
for addition to the unreferenced-inode list. The result was that
there were two attempts to add the same inode to the unreferenced-inode
list which scrambled the unreferenced-inode list's pointers leading
to a panic. The fix is to detect and avoid the false attempt at
adding it to the unreferenced-inode list by having the link()
system call check to see if the link count is zero before it
increments it. If it is, the link() fails with ENOENT (showing that
it has failed the link()/unlink() race).

While tracking down this bug, we have added additional assertions
to detect the problem sooner and also simplified some of the code.

Reported by:      Kirk Russell
Fix submitted by: Jeff Roberson
Tested by:        Peter Holm
PR:               kern/159971

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

12 years agoMFV r234164/MFC r234165:
dougb [Thu, 19 Apr 2012 20:44:40 +0000 (20:44 +0000)]
MFV r234164/MFC r234165:

The BIND 9.8.2 tarball was re-rolled to remove 9.8.1 release notes.
This change was noticed by ISC at:

https://lists.isc.org/pipermail/bind-users/2012-April/087345.html

and verified by me both by comparing the contents of the old and new
distfiles and by verifying the PGP signature on the new distfile.

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

12 years agoMFC: r234350
jkim [Thu, 19 Apr 2012 20:11:43 +0000 (20:11 +0000)]
MFC: r234350

- When interrupt is not requested for VM86 call, make a fake exit point and
push the address onto stack as we do for INTn emulation.  This avoids stack
underflow when we encounter RETF instruction in VM86 mode.  Lack of this
exit point actually caused page fault in VM86 mode with VESA module when we
resume from suspend state.
- Remove unnecessary CLI and STI instructions from BIOS interrupt emulation.
INTn and IRET must be able to emulate the flag correctly.

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

12 years agoMFC of 233627, 234024, 234025, and 234026
mckusick [Thu, 19 Apr 2012 18:03:24 +0000 (18:03 +0000)]
MFC of 233627, 234024, 234025, and 234026

Restore per mount-point counts of synchronous and asynchronous
reads and writes associated with UFS and MSDOS filesystems.

MFS 233627:
Keep track of the mount point associated with a special device
to enable the collection of counts of synchronous and asynchronous
reads and writes for its associated filesystem. The counts are
displayed using `mount -v'.

Ensure that buffers used for paging indicate the vnode from
which they are operating so that counts of paging I/O operations
from the filesystem are collected.

This checkin only adds the setting of the mount point for the
UFS/FFS filesystem, but it would be trivial to add the setting
and clearing of the mount point at filesystem mount/unmount
time for other filesystems too.

Reviewed by: kib

MFC 234024:
Drop an unnecessary setting of si_mountpt when updating a UFS mount point.
Clearly it must have been set when the mount was done.

Reviewed by: kib

MFC 234025:
Add I/O accounting to msdos filesystem.

Suggested and reviewed by: kib

MFC 234026:
Expand locking around identification of filesystem mount point when
accounting for I/O counts at completion of I/O operation. Also switch
from using global devmtx to vnode mutex to reduce contention.

Suggested and reviewed by: kib

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

12 years agoMFC r234172:
kib [Thu, 19 Apr 2012 10:36:23 +0000 (10:36 +0000)]
MFC r234172:
Add thread-private flag to indicate that error value is already placed
in td_errno. Flag is supposed to be used by syscalls returning
EJUSTRETURN because errno was already placed into the usermode frame
by a call to set_syscall_retval(9). Both ktrace and dtrace get errno
value from td_errno if the flag is set.

Use the flag to fix sigsuspend(2) error return ktrace records.

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

12 years agoMFC r234170:
kib [Thu, 19 Apr 2012 10:17:28 +0000 (10:17 +0000)]
MFC r234170:
Propagate the current state of rtld_bind_lock to dlopen_object() calls
through the filter loading call chain. This fixes attempts to
write-lock the already locked rtld_bind_lock when filter loading is
initiated by relocation of dlopening dso.

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

12 years agoMFC r234336:
mm [Thu, 19 Apr 2012 07:43:28 +0000 (07:43 +0000)]
MFC r234336:
Fix typo miror -> mirror

Reported by: Glen Barber <gjb@FreeBSD.org>

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

12 years agoMFC r234058:
dim [Wed, 18 Apr 2012 20:32:07 +0000 (20:32 +0000)]
MFC r234058:
  In kdump's mkioctls script, use '${CPP}' instead of hardcodedly using
  'gcc -E'.  This fixes building when WITH_CLANG_IS_CC is in effect.

  Report by: Niclas Zeising <zeising@daemonic.se>

MFC r234060:
  Since truss also uses kdump's mkioctls script, pass the value of ${CPP}
  there too, similar to r234058.

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

12 years agoMFC r230778
ambrisko [Wed, 18 Apr 2012 19:15:59 +0000 (19:15 +0000)]
MFC r230778
When detaching an AIO or LIO requests grab the lock and tell knlist_remove
that we have the lock now.  This cleans up a locking panic ASSERT when
knlist_empty is called without a lock when INVARIANTS etc. are turned.

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

12 years agoMFC r233713
ambrisko [Wed, 18 Apr 2012 18:58:18 +0000 (18:58 +0000)]
MFC r233713
Remove the magic mfi_array is 288 bytes and just use the
sizeof the array since it is not 288 bytes.

Change reporting of a "SYSTEM" disk to "JBOD" to match
LSI MegaCli and firmware reporting.

This means that mfiutil command to "create jbod" is now a
little confusing since a RAID per drive is not really what
LSI defines JBOD to be.  This should be fixed in the future
and support added to really create LSI JBOD and enable that
feature on cards that support it.

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

12 years agoMFC r233711:
ambrisko [Wed, 18 Apr 2012 18:31:11 +0000 (18:31 +0000)]
MFC r233711:
Major update to driver to support for Drake Skinny and ThunderBolt cards.

MFC r233768:
Change typedef atomic_t to struct mfi_atomic to avoid name space
collision and some couple more style changes.

MFC r233805:
Move struct megasas_sge from mfi_ioctl.h to mfivar.h so we can
remove including machine/bus.h.  Add some more mfi_ prefixes to
avoid name space pollution.

MFC r233877:
- Do not include machine/atomic.h.  It is no longer necessary since r233768.
- Remove bogus "atomic" macros and a read-only variable from softc.

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

12 years agoMFC r234122:
ae [Wed, 18 Apr 2012 05:16:02 +0000 (05:16 +0000)]
MFC r234122:
  It seems that libdisk(3) incorrectly sets d_secperunit value.
  Automatically fix it like GEOM_PART_BSD does.

  PR: bin/165789

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

12 years agoMFC r233179:
ae [Wed, 18 Apr 2012 05:11:52 +0000 (05:11 +0000)]
MFC r233179:
  Document GEOM_PART_LDM scheme and partition types.

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

12 years agoMFC r233176:
ae [Wed, 18 Apr 2012 04:59:47 +0000 (04:59 +0000)]
MFC r233176:
  Add new GEOM_PART_LDM module that implements the Logical Disk Manager
  scheme. The LDM is a logical volume manager for MS Windows NT and it
  is also known as dynamic volumes. It supports about 2000 partitions
  and also provides the capability for software RAID implementations.

  This version implements only partitioning scheme capability and based
  on the linux-ntfs project documentation and several publications across
  the Web. NOTE: JBOD, RAID0 and RAID5 volumes aren't supported.

  An access to the LDM metadata is read-only. When LDM is on the disk
  partitioned with MBR we can also destroy metadata. For the GPT
  partitioned disks destroy action is not supported.

MFC r233177:
  Connect geom_part_ldm module to the build.

MFC r233178:
  Connect geom_part_ldm to the kernel build.

MFC r233181:
  Add CTLFLAG_TUN to sysctls.

MFC r233651:
  Do proper cleanup for the GPT case when an error occurs.

MFC r233652:
  VMDB offset should be greater than logical volume size only for MBR.

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

12 years agoMFC r233175:
ae [Wed, 18 Apr 2012 04:39:12 +0000 (04:39 +0000)]
MFC r233175:
  Make kern.geom.part node not static. Also add CTLFLAG_TUN to the
  check_integrity sysctl.

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

12 years agoMFC 234059:
jhb [Tue, 17 Apr 2012 19:55:31 +0000 (19:55 +0000)]
MFC 234059:
Recognize the RDRAND instruction feature.

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

12 years agoMFC 233296,233300:
pluknet [Tue, 17 Apr 2012 11:54:01 +0000 (11:54 +0000)]
MFC 233296,233300:
 Prevent fs_file NULL pointer dereference.

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

12 years agoMFC r233939:
pluknet [Tue, 17 Apr 2012 11:01:17 +0000 (11:01 +0000)]
MFC r233939:
 Free ballooned pages with the corresponding malloc type.

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

12 years agoMerge 233103, 233912 from head:
davidxu [Tue, 17 Apr 2012 09:09:14 +0000 (09:09 +0000)]
Merge 233103, 233912 from head:

233103:
Some software think a mutex can be destroyed after it owned it, for
example, it uses a serialization point like following:
pthread_mutex_lock(&mutex);
pthread_mutex_unlock(&mutex);
pthread_mutex_destroy(&muetx);
They think a previous lock holder should have already left the mutex and
is no longer referencing it, so they destroy it. To be maximum compatible
with such code, we use IA64 version to unlock the mutex in kernel, remove
the two steps unlocking code.

233912:
umtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses
a mutex after a thread has unlocked it, it event writes data to the mutex
memory to clear contention bit, there is a race that other threads
can lock it and unlock it, then destroy it, so it should not write
data to the mutex memory if there isn't any waiter.
The new operation UMTX_OP_MUTEX_WAKE2 try to fix the problem. It
requires thread library to clear the lock word entirely, then
call the WAKE2 operation to check if there is any waiter in kernel,
and try to wake up a thread, if necessary, the contention bit is set again
by the operation. This also mitgates the chance that other threads find
the contention bit and try to enter kernel to compete with each other
to wake up sleeping thread, this is unnecessary. With this change, the
mutex owner is no longer holding the mutex until it reaches a point
where kernel umtx queue is locked, it releases the mutex as soon as
possible.
Performance is improved when the mutex is contensted heavily.  On Intel
i3-2310M, the runtime of a benchmark program is reduced from 26.87 seconds
to 2.39 seconds, it even is better than UMTX_OP_MUTEX_WAKE which is
deprecated now. http://people.freebsd.org/~davidxu/bench/mutex_perf.c

Special code for stable/9:
And add code to detect if the UMTX_OP_MUTEX_WAKE2 is available.

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

12 years agoMFC r233912:
davidxu [Tue, 17 Apr 2012 09:02:55 +0000 (09:02 +0000)]
MFC r233912:

mtx operation UMTX_OP_MUTEX_WAKE has a side-effect that it accesses
a mutex after a thread has unlocked it, it event writes data to the mutex
memory to clear contention bit, there is a race that other threads
can lock it and unlock it, then destroy it, so it should not write
data to the mutex memory if there isn't any waiter.
The new operation UMTX_OP_MUTEX_WAKE2 try to fix the problem. It
requires thread library to clear the lock word entirely, then
call the WAKE2 operation to check if there is any waiter in kernel,
and try to wake up a thread, if necessary, the contention bit is set again
by the operation. This also mitgates the chance that other threads find
the contention bit and try to enter kernel to compete with each other
to wake up sleeping thread, this is unnecessary. With this change, the
mutex owner is no longer holding the mutex until it reaches a point
where kernel umtx queue is locked, it releases the mutex as soon as
possible.
Performance is improved when the mutex is contensted heavily.  On Intel
i3-2310M, the runtime of a benchmark program is reduced from 26.87 seconds
to 2.39 seconds, it even is better than UMTX_OP_MUTEX_WAKE which is
deprecated now. http://people.freebsd.org/~davidxu/bench/mutex_perf.c

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

12 years agoMerge r232779 from head:
gavin [Mon, 16 Apr 2012 12:49:19 +0000 (12:49 +0000)]
Merge r232779 from head:
  Move determination of socket buffer sizes from startup to the first time
  a socket is used.  The previous code structure assumed that AF_INET
  sockets were always available, which is an invalid assumption on
  IPv6-only systems.

  This merges the fololowing revisions from NetBSD:
  src/usr.bin/ftp/main.c 1.120
  src/usr.bin/ftp/util.c 1.156

PR: bin/162661
Obtained from: NetBSD

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

12 years agoMFC r234206:
kevlo [Mon, 16 Apr 2012 01:15:38 +0000 (01:15 +0000)]
MFC r234206:
Partially implement zipinfo (-Z) support.
This fixes some test failures seen with perl 5.12 and 5.14.

PR: bin/166895
Submitted by: swills

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

12 years agoregen
netchild [Sun, 15 Apr 2012 16:53:44 +0000 (16:53 +0000)]
regen

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

12 years agoMFC r232799:
netchild [Sun, 15 Apr 2012 16:52:48 +0000 (16:52 +0000)]
MFC r232799:
  - add comments to syscalls.master and linux(32)_dummy about which linux
    kernel version introduced the sysctl (based upon a linux man-page)
  - add comments to syscalls.master regarding some names of sysctls which are
    different than the linux-names (based upon the linux unistd.h)
  - add some dummy sysctls
  - name an unimplemented sysctl

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

12 years agoMFC r233392, r233679:
trociny [Sat, 14 Apr 2012 17:33:47 +0000 (17:33 +0000)]
MFC r233392, r233679:

r233392:

Fix typo.

r233679:

If hastd is invoked with "-P pidfile" option always create pidfile
regardless of whether -F (foreground) option is set or not.

Also, if -P option is specified, ignore pidfile setting from configuration
not only on start but on reload too. This fixes the issue when for hastd
run with -P option reload caused the pidfile change.

Reviewed by: pjd

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

12 years agoMerge 233272:
glebius [Sat, 14 Apr 2012 10:36:43 +0000 (10:36 +0000)]
Merge 233272:
  in6_pcblookup_local() still can return a pcb with NULL
  inp_socket. To avoid panic, do not dereference inp_socket,
  but obtain reuse port option from inp_flags2, like this
  is done after next call to in_pcblookup_local() a few lines
  down below.

  Submitted by: rwatson

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

12 years agoMerge 231076,231078:
glebius [Sat, 14 Apr 2012 10:20:34 +0000 (10:20 +0000)]
Merge 231076,231078:
  Make the 'tcpwin' option of ipfw(8) accept ranges and lists.

  Submitted by: sem

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

12 years agoMerge 231831:
glebius [Sat, 14 Apr 2012 10:13:36 +0000 (10:13 +0000)]
Merge 231831:
  Refactor the name hash and the ID hash, that are used to address nodes:

  - Make hash sizes growable, to satisfy users running large mpd
    installations, having thousands of nodes.
  - NG_NAMEHASH() proved to give a very bad distribution in real life
    name sets, while generic hash32_str(name, HASHINIT) proved to give
    an even one, so use the latter for name hash.
  - Do not store unnamed nodes in slot 0 of name hash, no reason for that.
  - Use the ID hash in cases when we need to run through all nodes: the
    NGM_LISTNODES command and in the vnet_netgraph_uninit().
  - Implement NGM_LISTNODES and NGM_LISTNAMES as separate code, the former
    iterates through the ID hash, and the latter through the name hash.
  - Keep count of all nodes and of named nodes, so that we don't need
    to count nodes in NGM_LISTNODES and NGM_LISTNAMES. The counters are
    also used to estimate whether we need to grow hashes.
  - Close a race between two threads running ng_name_node() assigning same
    name to different nodes.

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

12 years agoMerge 231760,231761,231764,231765,231766,231823,231830 from head:
glebius [Sat, 14 Apr 2012 10:08:07 +0000 (10:08 +0000)]
Merge 231760,231761,231764,231765,231766,231823,231830 from head:

  231760,231766:
style(9): sort includes
  231761:
In ng_bypass() add more protection against potential race
with ng_rmnode() and its followers.
  231764:
Remove testing stuff, reducing kernel memory footprint by 1 Kb.
  231765:
Trim double empty lines.
  231823:
In ng_getsockaddr() allocate memory prior to obtaining lock.
  231830:
Specify correct loading order for core of netgraph(4).

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

12 years agoMerge 233269:
glebius [Sat, 14 Apr 2012 09:48:52 +0000 (09:48 +0000)]
Merge 233269:
  Add multibyte char support.

  PR:           165429
  Submitted by: amdmi3

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

12 years agoMerge 231586:
glebius [Sat, 14 Apr 2012 09:43:58 +0000 (09:43 +0000)]
Merge 231586:
  Fix write(1) to support wide characters.

  Submitted by: amdmi3
  PR:           bin/164317

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

12 years agoMerge 232538:
glebius [Sat, 14 Apr 2012 09:21:06 +0000 (09:21 +0000)]
Merge 232538:
  Fix ng_ipfw(4) cookie number in example.

  Pointed out by: "Jacco van Buuren" <jaccovanbuuren gmail.com>

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

12 years agoMFC r231813:
eadler [Sat, 14 Apr 2012 02:46:59 +0000 (02:46 +0000)]
MFC r231813:
Add err(3) to strerror(3) SEE ALSO section

Approved by: cperciva (implicit)

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

12 years agoMFC r230347:
eadler [Sat, 14 Apr 2012 02:10:45 +0000 (02:10 +0000)]
MFC r230347:
Fix warning when compiling with gcc46:
error: variable 'addrs' set but not used

Approved by: cperciva (implicit)

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

12 years agoMFC r234134:
eadler [Sat, 14 Apr 2012 02:06:53 +0000 (02:06 +0000)]
MFC r234134:
s/Free Memory Pages/Free Memory/ to avoid confusion, since we're
reporting a number of bytes rather than a number of pages

Approved by: cperciva (implicit)

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

12 years agoMFC: r233888
marius [Fri, 13 Apr 2012 22:04:26 +0000 (22:04 +0000)]
MFC: r233888

- Const'ify the device lookup-table.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.
- Enable support for flow control.
  Tested by: yongari

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

12 years agoMFC r233710:
dim [Fri, 13 Apr 2012 21:50:14 +0000 (21:50 +0000)]
MFC r233710:

Fix the following compilation warning with clang trunk in isci(4):

  sys/dev/isci/isci_task_request.c:198:7: error: case value not in enumerated type 'SCI_TASK_STATUS' (aka 'enum _SCI_TASK_STATUS') [-Werror,-Wswitch]
    case SCI_FAILURE_TIMEOUT:
   ^

This is because the switch is done on a SCI_TASK_STATUS enum type, but
the SCI_FAILURE_TIMEOUT value belongs to SCI_STATUS instead.

Because the list of SCI_TASK_STATUS values cannot be modified at this
time, use the simplest way to get rid of this warning, which is to cast
the switch argument to int.  No functional change.

Reviewed by: jimharris

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

12 years agoMFC r233354:
dim [Fri, 13 Apr 2012 21:47:14 +0000 (21:47 +0000)]
MFC r233354:

Work around the following clang warning in mps(4):

  sys/dev/mps/mps_sas.c:861:1: error: function 'mpssas_discovery_timeout' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration]
  mpssas_discovery_timeout(void *data)
  ^

Because the driver is obtained from upstream, we don't want to modify
it; just silence the warning instead, it is harmless.

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

12 years agoMFC r233052:
dim [Fri, 13 Apr 2012 21:35:24 +0000 (21:35 +0000)]
MFC r233052:

Change the style of share/mk/bsd.sys.mk to that of the other bsd.*.mk
files, and style.Makefile(5), where applicable.  While here, update the
link to the gcc warning documentation.

No functional change.

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

12 years agoMFC r234043: intpm: return only SMB bus error codes from SMB methods
avg [Fri, 13 Apr 2012 08:08:44 +0000 (08:08 +0000)]
MFC r234043: intpm: return only SMB bus error codes from SMB methods

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

12 years agoMFC r234040: intpm: reflect the fact that SB800 and later AMD chipsets
avg [Fri, 13 Apr 2012 08:01:34 +0000 (08:01 +0000)]
MFC r234040: intpm: reflect the fact that SB800 and later AMD chipsets
are not supported

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

12 years agoMFC r233918: zfs_ioctl: no need for ddi_copyin/out here because
avg [Fri, 13 Apr 2012 07:48:45 +0000 (07:48 +0000)]
MFC r233918: zfs_ioctl: no need for ddi_copyin/out here because
sys_ioctl handles that

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

12 years agoMFC r231558: newvers.sh: unbreak git/git-svn support
avg [Fri, 13 Apr 2012 07:39:20 +0000 (07:39 +0000)]
MFC r231558: newvers.sh: unbreak git/git-svn support

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

12 years agoMFC r233000:
ae [Fri, 13 Apr 2012 04:17:43 +0000 (04:17 +0000)]
MFC r233000:
  Add MODULE_DEPEND() to geom_part modules.

MFC r233342:
  Check that scheme is not already registered. This may happens when a
  KLD is preloaded with loader(8) and leads to infinity loop.

  Also do not return EEXIST error code from MOD_LOAD handler, because
  we have undocumented(?) ability replace kernel's module with preloaded one.
  And if we have so, then preloaded module will be initialized first.
  Thus error in MOD_LOAD handler will be triggered for the kernel.

  PR: kern/165573

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

12 years agoMFC: r233704
jkim [Thu, 12 Apr 2012 23:06:07 +0000 (23:06 +0000)]
MFC: r233704

Re-initialize more model-specific registers when we resume CPUs.

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

12 years agoMFC: r228730
melifaro [Thu, 12 Apr 2012 17:49:53 +0000 (17:49 +0000)]
MFC: r228730

Add binding support to libradius(3).
Submitted by:    Sergey Matveychuk <sem33@yandex-team.ru>

Approved by:     kib(mentor)

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

12 years agoMFC 233547:
jhb [Thu, 12 Apr 2012 13:53:10 +0000 (13:53 +0000)]
MFC 233547:
Use VM_MEMATTR_UNCACHEABLE instead of VM_MEMATTR_UNCACHED for UC mappings.
VM_MEMATTR_UNCACHED is actually the x86-specific UC- mode (where a WC
MTRR can override the PAT setting).

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

12 years agoMFC 233670,233671:
jhb [Thu, 12 Apr 2012 13:46:56 +0000 (13:46 +0000)]
MFC 233670,233671:
- Use VM_MEMATTR_UNCACHEABLE for the constant for UC memory rather than
  VM_MEMATTR_UNCACHED on mips.
- Rename VM_MEMATTR_UNCACHED to VM_MEMATTR_WEAK_UNCACHEABLE on x86 to
  be less ambiguous and more clearly identify what it means.  An alias
  from VM_MEMATTR_WEAK_UNCACHEABLE to VM_MEMATTR_WEAK_UNCACHED remains
  on x86 to preserve the KPI.
- Remove the VM_MEMATTR_UNCACHED alias from powerpc.

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

12 years agoMFC 232919:
mav [Thu, 12 Apr 2012 06:29:02 +0000 (06:29 +0000)]
MFC 232919:
Add kern.eventtimer.activetick tunable/sysctl, specifying whether each
hardclock() tick should be run on every active CPU, or on only one.

On my tests, avoiding extra interrupts because of this on 8-CPU Core i7
system with HZ=10000 saves about 2% of performance. At this moment option
implemented only for global timers, as reprogramming per-CPU timers is
too expensive now to be compensated by this benefit, especially since we
still have to regularly run hardclock() on at least one active CPU to
update system uptime. For global timer it is quite trivial: timer runs
always, but we just skip IPIs to other CPUs when possible.

Option is enabled by default now, keeping previous behavior, as periodic
hardclock() calls are still used at least to implement setitimer(2) with
ITIMER_VIRTUAL and ITIMER_PROF arguments. But since default schedulers don't
depend on it since r232917, we are much more free to experiment with it.

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

12 years agoMFC r232917:
mav [Thu, 12 Apr 2012 06:24:47 +0000 (06:24 +0000)]
MFC r232917:
Rewrite thread CPU usage percentage math to not depend on periodic calls
with HZ rate through the sched_tick() calls from hardclock().

Potentially it can be used to improve precision, but now it is just minus
one more reason to call hardclock() for every HZ tick on every active CPU.
SCHED_4BSD never used sched_tick(), but keep it in place for now, as at
least SCHED_FBFS existing in patches out of the tree depends on it.

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

12 years agoMFC r233018:
nwhitehorn [Thu, 12 Apr 2012 00:38:34 +0000 (00:38 +0000)]
MFC r233018:
Make ofw_bus_get_node() consistently return -1 when there is no associated
OF node, instead of a random mixture of 0 and -1. Update all checks for 0
to check for -1 instead.

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

12 years agoMFC 233676:
jhb [Wed, 11 Apr 2012 20:50:17 +0000 (20:50 +0000)]
MFC 233676:
Use a more proper fix for enabling HT MSI mapping windows on Host-PCI
bridges.  Rather than blindly enabling the windows on all of them, only
enable the window when an MSI interrupt is enabled for a device behind
the bridge, similar to what already happens for HT PCI-PCI bridges.

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

12 years agoMFC 233893:
jhb [Wed, 11 Apr 2012 20:26:50 +0000 (20:26 +0000)]
MFC 233893:
Disable INET6 support in modules when building the LINT-NOINET6 kernel.

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

12 years agoMFC 233305,233623:
jhb [Wed, 11 Apr 2012 20:25:01 +0000 (20:25 +0000)]
MFC 233305,233623:
- Mark the 'lapics' and 'ioapics' arrays here static since they are
  private to this file.  The 'lapics' array was actually shadowing a
  completely different 'lapics' array that is private to local_apic.c.
- Allocate the ioapics[] array dynamically since it is only needed for the
  duration of madt_setup_io().  This avoids having the array take up
  permanent space in the BSS.

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

12 years agoMFC 232228,233613:
jhb [Wed, 11 Apr 2012 20:19:07 +0000 (20:19 +0000)]
MFC 232228,233613:
Move the DTrace return IDT vector back up from 0x20 to 0x92.  The 0x20
vector is currently dedicated to servicing IRQ 0 from the 8259A's, so
it shouldn't be overloaded for DTrace.

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