]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoMFC r235638,r239348:
mckay [Thu, 6 Sep 2012 06:17:39 +0000 (06:17 +0000)]
MFC r235638,r239348:
- Work around failure to compile on FreeBSD 7.x machines.
- Correct a regression introduced during the import of file(1) 5.11.

PR:             bin/170415
Reviewed by: obrien@

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

11 years agoMFC r233122,r237086,r237228,r237264,r237290,r237404,r237414,r237513,r237551,
kib [Wed, 5 Sep 2012 20:40:11 +0000 (20:40 +0000)]
MFC r233122,r237086,r237228,r237264,r237290,r237404,r237414,r237513,r237551,
r237592,r237604,r237623,r237684,r237733,r237813,r237855,r238124,r238126,
r238163,r238414,r238610,r238889,r238970,r239072,r239137,r240126 (all by alc):

Add fine-grained PV chunk and list locking to the amd64 pmap, enabling
concurrent execution of the following functions on different pmaps:

pmap_change_wiring()
pmap_copy()
pmap_enter()
pmap_enter_object()
pmap_enter_quick()
pmap_page_exists_quick()
pmap_page_is_mapped()
pmap_protect()
pmap_remove()
pmap_remove_pages()

Requested and approved by: alc

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

11 years agoMFC r238791:
kib [Wed, 5 Sep 2012 18:55:35 +0000 (18:55 +0000)]
MFC r238791:
Do not requeue held page or page for which locking failed, just leave
them alone.

Process the act_count updates for the held pages in the vm_pageout
loop over the inactive queue, instead of refusing to do anything with
such page.

Clarify the intent of the addl_page_shortage counter and change its
use for pages which are not processed in the loop according to the
description.

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

11 years agoMFC r238732 (by alc):
kib [Wed, 5 Sep 2012 18:49:00 +0000 (18:49 +0000)]
MFC r238732 (by alc):
Addendum to r238604.  If the inactive queue scan isn't restarted, then
the variable "addl_page_shortage_init" isn't needed.

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

11 years agoMFC r238604:
kib [Wed, 5 Sep 2012 16:47:00 +0000 (16:47 +0000)]
MFC r238604:
Do not restart scan of the inactive queue when non-inactive page is
found. Rather, we shall not find such pages on inactive queue at all.

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

11 years agoMFC r238212:
kib [Wed, 5 Sep 2012 16:35:37 +0000 (16:35 +0000)]
MFC r238212:
Drop page queues mutex on each iteration of vm_pageout_scan over the
inactive queue, unless busy page is found.

MFC r238258:
Avoid vm page queues lock leak after r238212.

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

11 years agoMFC r240007:
tuexen [Wed, 5 Sep 2012 07:47:09 +0000 (07:47 +0000)]
MFC r240007:
Fix a typo which results in RTT to be off by a factor of 10, if the RTT is
larger than 1 second.

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

11 years agoMFC 239883:
emaste [Wed, 5 Sep 2012 02:03:43 +0000 (02:03 +0000)]
MFC 239883:

  Avoid passing uninitialized stack to addelem() if called with an empty
  arg.

PR: bin/171174

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

11 years agoMFC: less v451.
delphij [Tue, 4 Sep 2012 23:24:00 +0000 (23:24 +0000)]
MFC: less v451.

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

11 years agoMFH (r239836): align the boot partition on a 4 kB boundary.
des [Tue, 4 Sep 2012 20:45:59 +0000 (20:45 +0000)]
MFH (r239836): align the boot partition on a 4 kB boundary.

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

11 years agoMFH (r239255, r239730): increase maxswzone on i386 and remove it on amd64.
des [Tue, 4 Sep 2012 19:14:57 +0000 (19:14 +0000)]
MFH (r239255, r239730): increase maxswzone on i386 and remove it on amd64.

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

11 years agoMFC r239571:
jimharris [Tue, 4 Sep 2012 17:24:11 +0000 (17:24 +0000)]
MFC r239571:

Add -m option (for printing sampled PCs to a file) to pmcstat usage
message.

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

11 years agoMFC r239889:
jimharris [Tue, 4 Sep 2012 15:58:58 +0000 (15:58 +0000)]
MFC r239889:

Do not call sati_check_data_io() for SATI_UNMAP sequences.

This routine is intended only for commands such as INQUIRY where
the controller may fill out a smaller amount of data than allocated
by the host.

The end result of this bug was that isci(4) would report non-zero
resid for successful SCSI_UNMAP commands.

Sponsored by:   Intel

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

11 years agoMFC r239715:
dim [Mon, 3 Sep 2012 07:18:24 +0000 (07:18 +0000)]
MFC r239715:

Add libc++ and libcxxrt related files to OptionalObsoleteFiles.inc.

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

11 years agoMFC r236596:
eadler [Sun, 2 Sep 2012 18:54:51 +0000 (18:54 +0000)]
MFC r236596:
Fix style nit: don't use leading zero for dates in .Dd

Approved by: cperciva (implicit)

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

11 years agoMFC r237178,r237180:
eadler [Sun, 2 Sep 2012 18:44:47 +0000 (18:44 +0000)]
MFC r237178,r237180:
Fix mdoc style nits

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

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

11 years agoMFC r235251,r238205:
eadler [Sun, 2 Sep 2012 18:40:17 +0000 (18:40 +0000)]
MFC r235251,r238205:

Add Spanish Dvorak keyboard model to syscons.

(not verified to be accurate)

PR: conf/160235
Approved by: cperciva (implicit)

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

11 years agoMFC r238199:
eadler [Sun, 2 Sep 2012 18:33:51 +0000 (18:33 +0000)]
MFC r238199:
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva (implicit)

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

11 years agoMFC r238200:
eadler [Sun, 2 Sep 2012 18:31:23 +0000 (18:31 +0000)]
MFC r238200:
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva (implicit)

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

11 years agoMFC r238204:
eadler [Sun, 2 Sep 2012 18:28:09 +0000 (18:28 +0000)]
MFC r238204:
Remove unneeded variable reported by gcc46 which stopped being used in
r234178.

Approved by: cperciva (implicit)

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

11 years agoMFC r238206:
eadler [Sun, 2 Sep 2012 18:19:41 +0000 (18:19 +0000)]
MFC r238206:
Add missing sleep stat increase

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

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

11 years agoMFC r238201:
eadler [Sun, 2 Sep 2012 18:17:20 +0000 (18:17 +0000)]
MFC r238201:
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva (implicit)

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

11 years agoMFC r238203:
eadler [Sun, 2 Sep 2012 18:13:22 +0000 (18:13 +0000)]
MFC r238203:
Remove variables which are initialized but never used thereafter
reported by gcc46 warning

Approved by: cperciva (implicit)

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

11 years agoMFC r238221:
eadler [Sun, 2 Sep 2012 18:10:29 +0000 (18:10 +0000)]
MFC r238221:
Fix always 0 tautologly revealed by gcc46

Approved by: cperciva (implicit)

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

11 years agoMFC r238399:
eadler [Sun, 2 Sep 2012 18:08:41 +0000 (18:08 +0000)]
MFC r238399:
Document the behavior of mount with failok specified.

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

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

11 years agoMFC r239076:
eadler [Sun, 2 Sep 2012 18:04:50 +0000 (18:04 +0000)]
MFC r239076:
Add support for SIIG Cyber Serial Dual PCI 16C850

Approved by: cperciva (implicit)

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

11 years agoMFC r239048:
eadler [Sun, 2 Sep 2012 17:46:46 +0000 (17:46 +0000)]
MFC r239048:
Add additional Perle Speed LE serial cards

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

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

11 years agoMFC of 239023
mjacob [Sun, 2 Sep 2012 15:27:20 +0000 (15:27 +0000)]
MFC of 239023

Add detach logic to SBus variant.

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

11 years agoMFC of 239212
mjacob [Sun, 2 Sep 2012 15:24:57 +0000 (15:24 +0000)]
MFC of 239212

Add VERIFY_10 def.

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

11 years agoMFC of 239010
mjacob [Sun, 2 Sep 2012 15:23:01 +0000 (15:23 +0000)]
MFC of 239010

Oops. We only do allocate room for extended commands
and responses for 2300 cards are newer.

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

11 years agoMFC of 238887- fix compilation on isp_sbus.c
mjacob [Sun, 2 Sep 2012 15:21:55 +0000 (15:21 +0000)]
MFC of 238887- fix compilation on isp_sbus.c

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

11 years agoMFC of 238870.
mjacob [Sun, 2 Sep 2012 15:20:10 +0000 (15:20 +0000)]
MFC of 238870.

Handle a case where we had an SRR that pushed back the..

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

11 years agoMFC of 238806
mjacob [Sun, 2 Sep 2012 15:18:08 +0000 (15:18 +0000)]
MFC of 238806

Switch to FC-Tape f/w for the 23XX cards.

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

11 years agoMFC of 239330
mjacob [Sun, 2 Sep 2012 15:07:51 +0000 (15:07 +0000)]
MFC of 239330

On lun disable, complete all INOTs and ATIOs with CAM_REQ_ABORTED.

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

11 years agoMFC of 239219
mjacob [Sun, 2 Sep 2012 15:06:55 +0000 (15:06 +0000)]
MFC of 239219

Remove extraneous newline.

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

11 years agoMFC of 239218
mjacob [Sun, 2 Sep 2012 15:05:39 +0000 (15:05 +0000)]
MFC of 239218

Fix an oops where we wiped out DMA maps...

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

11 years agoMFC of 239143
mjacob [Sun, 2 Sep 2012 15:04:39 +0000 (15:04 +0000)]
MFC of 239143

More rototilling with target mode in an attemp to get multiple...

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

11 years agoMFC of 238859
mjacob [Sun, 2 Sep 2012 15:03:40 +0000 (15:03 +0000)]
MFC of 238859

Mega change for FC-Tape.

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

11 years agoMFC of 228914
mjacob [Sun, 2 Sep 2012 15:00:35 +0000 (15:00 +0000)]
MFC of 228914

Fix target mode compilation issues that arose after a change
in the sense data structures.

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

11 years agoA belated MFC of 227126
mjacob [Sun, 2 Sep 2012 14:56:04 +0000 (14:56 +0000)]
A belated MFC of 227126

Implement the sysctl's for fibre channel that are listed in the man page.

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

11 years agoMFC of 237544
mjacob [Sun, 2 Sep 2012 14:46:30 +0000 (14:46 +0000)]
MFC of 237544

Unbreak register tests for parallel SCSI.

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

11 years agoMFC of 237537
mjacob [Sun, 2 Sep 2012 14:45:36 +0000 (14:45 +0000)]
MFC of 237537

Clean up multi-id mode so it's driven by the f/w loaded,...

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

11 years agoMFC of 237210
mjacob [Sun, 2 Sep 2012 14:44:09 +0000 (14:44 +0000)]
MFC of 237210

Prepare for FC-Tape support.

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

11 years agoVery belated MFC of 227548
mjacob [Sun, 2 Sep 2012 14:41:29 +0000 (14:41 +0000)]
Very belated MFC of 227548

Was chasing down a failure to load f/w on a 2400. It turns out that the card
is actually broken, or needs a BIOS upgrade for 64 bit loads, but this uncovered
a couple of misplaced opcode definitions and some missing continual mbox command
cases, so might as well update them here.

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

11 years agoMFC r226216 (by das):
dim [Sun, 2 Sep 2012 11:44:30 +0000 (11:44 +0000)]
MFC r226216 (by das):
  Pass -std= flags in CFLAGS to mkdep. Without this, preprocessor tests
  for particular compiler features might be evaluated differently by
  mkdep than they would be by cc.

MFC r226244 (by das):
  Also pass the -ansi flag through to mkdep (requested by bde), and fix
  a cut-and-paste-o (noticed by rdivacky).

MFC r239613:
  Make sure bsd.dep.mk does not filter out -stdlib=xxx from CXXFLAGS,
  since this determines parts of the C++ include path.

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

11 years agoMFC r238980:
avatar [Sun, 2 Sep 2012 03:36:57 +0000 (03:36 +0000)]
MFC r238980:

  Just like the other file systems found in /sys/fs, g_vfs_open()
should be paried with g_vfs_close().  Though g_vfs_close() is a wrapper
around g_wither_geom_close(), r206130 added the following test in
g_vfs_open():

if (bo->bo_private != vp)
return (EBUSY);

  Which will cause a 'Device busy' error inside reiserfs_mountfs() if
the same file system is re-mounted again after umount or mounting failure:

(case 1, /dev/ad4s3 is not a valid REISERFS partition)
# mount -t reiserfs -o ro /dev/ad4s3 /mnt
mount: /dev/ad4s3: Invalid argument
# mount -t msdosfs -o ro /dev/ad4s3 /mnt
mount: /dev/ad4s3: Device busy

(case 2, /dev/ad4s3 is a valid REISERFS partition)
# mount -t reiserfs -o ro /dev/ad4s3 /mnt
# umount /mnt
# mount -t reiserfs -o ro /dev/ad4s3 /mnt
mount: /dev/ad4s3: Device busy

  On the other hand, g_vfs_close() 'fixed' the above cases by doing an
extra step to keep 'sc->sc_bo->bo_private' and 'cp->private' pointers
synchronised.

Reviewed by: kib

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

11 years agoMFC r238792:
kib [Sat, 1 Sep 2012 15:59:09 +0000 (15:59 +0000)]
MFC r238792:
Introduce curpcb magic variable.

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

11 years agoMFC r238678:
kib [Sat, 1 Sep 2012 15:57:12 +0000 (15:57 +0000)]
MFC r238678:
Provide siginfo.si_code for floating point errors when error occurs
using the SSE math processor.

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

11 years agoMFC r238677:
kib [Sat, 1 Sep 2012 15:55:14 +0000 (15:55 +0000)]
MFC r238677:
Stop clearing x87 exceptions in the #MF handler.

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

11 years agoMFC r238676:
kib [Sat, 1 Sep 2012 15:53:26 +0000 (15:53 +0000)]
MFC r238676:
Add stmxcsr.

MFC r238914:
Change (unused) prototype for stmxcsr() to match reality.

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

11 years agoMFC r238675:
kib [Sat, 1 Sep 2012 15:50:52 +0000 (15:50 +0000)]
MFC r238675:
Force clean FPU state in PCB user FPU save area for PT_I386_{GET,SET}XMMREGS.

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

11 years agoMFC r239383:
trociny [Sat, 1 Sep 2012 10:37:41 +0000 (10:37 +0000)]
MFC r239383:

In ip6_ctloutput() guard inp_flags modifications with INP_WLOCK.

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

11 years agoMFC r239075:
trociny [Sat, 1 Sep 2012 10:32:40 +0000 (10:32 +0000)]
MFC r239075:

In tcp timers, check INP_DROPPED flag a little later, after
callout_deactivate(), so if INP_DROPPED is set we return with the
timer active flag cleared.

For me this fixes negative keep timer values reported by `netstat -x'
for connections in CLOSE state.

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

11 years agoMFC r238309:
trociny [Sat, 1 Sep 2012 10:27:18 +0000 (10:27 +0000)]
MFC r238309:

In epair_clone_destroy(), when destroying the second half, we have to
switch to its vnet before calling ether_ifdetach(). Otherwise if the
second half resides in a different vnet, if_detach() silently fails
leaving a stale pointer in V_ifnet list, and the system crashes trying
to access this pointer later.

Another solution could be not to allow to destroy epair unless both
ends are in the home vnet.

Discussed with: bz
Tested by: delphij

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

11 years agoMFC r238085:
trociny [Sat, 1 Sep 2012 10:18:09 +0000 (10:18 +0000)]
MFC r238085:

Fix KASSERT message.

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

11 years agoMFC r238084:
trociny [Sat, 1 Sep 2012 09:58:09 +0000 (09:58 +0000)]
MFC r238084:

Don't check for ifp != NULL before KASSERT, as ifp may not be NULL here
(it is dereferenced below).

Discussed with: jhb

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

11 years agoMFC r238086:
trociny [Sat, 1 Sep 2012 09:55:35 +0000 (09:55 +0000)]
MFC r238086:

Fix style.

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

11 years agoMFC r239375:
kib [Sat, 1 Sep 2012 05:35:48 +0000 (05:35 +0000)]
MFC r239375:
Add drm and i915 ioctl translations for 32 bit process on 64 bit host.

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

11 years agoMFC r238671:
kib [Fri, 31 Aug 2012 12:08:31 +0000 (12:08 +0000)]
MFC r238671:
Constently use 2-space sentence breaks.

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

11 years agoMFC r238670:
kib [Fri, 31 Aug 2012 12:06:32 +0000 (12:06 +0000)]
MFC r238670:
Stop caching curpcb in the local variable.

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

11 years agoMFC r238669:
kib [Fri, 31 Aug 2012 12:04:29 +0000 (12:04 +0000)]
MFC r238669:
Force clean FPU state in PCB user FPU save area by performing
getfpuregs(9) before accessing user FPU save area in ptrace_machdep.c
for PT_I386_{GET,SET}XMMREGS and PT_{GET,SET}XSTATE.

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

11 years agoMFC r238668:
kib [Fri, 31 Aug 2012 12:01:35 +0000 (12:01 +0000)]
MFC r238668:
Stop clearing x87 exceptions in the #MF handler on amd64.

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

11 years agoMFC r238623:
kib [Fri, 31 Aug 2012 11:48:04 +0000 (11:48 +0000)]
MFC r238623:
Introduce curpcb magic variable, similar to curthread, which is MD
amd64.  It is implemented as __pure2 inline with non-volatile asm read
from pcpu, which allows a compiler to cache its results.

Convert most PCPU_GET(pcb) and curthread->td_pcb accesses into curpcb.

MFC r238723:
Forcibly shut up clang warning about NULL pointer dereference.

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

11 years agoMFC r238598:
kib [Fri, 31 Aug 2012 11:33:54 +0000 (11:33 +0000)]
MFC r238598:
On AMD64, provide siginfo.si_code for floating point errors when error
occurs using the SSE math processor.  Update comments describing the
handling of the exception status bits in coprocessors control words.

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

11 years agoMFC r238597:
kib [Fri, 31 Aug 2012 11:29:39 +0000 (11:29 +0000)]
MFC r238597:
Add stmxcsr.

MFC r238914, only amd64 part, do not record mi:
Change (unused) prototype for stmxcsr() to match reality.

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

11 years agoMFC r238450:
kib [Fri, 31 Aug 2012 11:20:12 +0000 (11:20 +0000)]
MFC r238450:
Add support for the XSAVEOPT instruction use.

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

11 years agoRevert 239931 and 239932 until I figure out why it breaks on stable branches
delphij [Fri, 31 Aug 2012 06:42:51 +0000 (06:42 +0000)]
Revert 239931 and 239932 until I figure out why it breaks on stable branches
but not on -HEAD.

Noticed by: tinderbox
Pointy hat to: delphij

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

11 years agoMFC r228700: convert IPv6 read-only stats sysctls to the read-write ones.
maxim [Fri, 31 Aug 2012 06:38:43 +0000 (06:38 +0000)]
MFC r228700: convert IPv6 read-only stats sysctls to the read-write ones.
Teach netstat(1) -z to reset these sysctls.

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

11 years agoMFC r230617: allow to build ifmcstat(8) without kvm(3) support.
maxim [Fri, 31 Aug 2012 06:34:46 +0000 (06:34 +0000)]
MFC r230617: allow to build ifmcstat(8) without kvm(3) support.

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

11 years agoMFC r238964:
delphij [Fri, 31 Aug 2012 00:33:09 +0000 (00:33 +0000)]
MFC r238964:

Teach md5(1) about sha512.

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

11 years agoMFC r239548:
jhibbits [Thu, 30 Aug 2012 23:54:49 +0000 (23:54 +0000)]
MFC r239548:

phandle_t is unsigned, and OF_finddevice() returns (phandle_t)(-1) on
failure, so check for that instead of 0.

While here, provide a better description for ATI backlight driver.

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

11 years agoMFC r239027
jhibbits [Thu, 30 Aug 2012 23:50:11 +0000 (23:50 +0000)]
MFC r239027

Add backlight support for nVidia-based PowerBooks/iBooks/iMacs.

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

11 years agoMFC 239128:
jhb [Thu, 30 Aug 2012 20:42:42 +0000 (20:42 +0000)]
MFC 239128:
Don't try to stop the IPMI watchdog timer if it is not running.
Starting or stopping the IPMI watchdog is rather expensive with the
current implementation as all IPMI requests are bounced via thread.
This is not viable during shutdown or dumps, and this avoids headache
in the common case that the watchdog is not enabled.  The IPMI watchdog
should probably be reworked to not use a separate thread to fix this
in the case when the watchdog timer is enabled.

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

11 years agoMFC 239103:
jhb [Thu, 30 Aug 2012 19:46:38 +0000 (19:46 +0000)]
MFC 239103:
Explicitly enable busmastering on PCI-PCI bridges.  Transactions initiated
on the secondary side of a bridge will not be propagated to the primary
bus unless this is enabled.  Busmastering is not enabled by default (we
have relied on firmware to set this bit to date).  The OS needs to set it
for any bridges not configured by system firmware.

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

11 years agoMFC 238424:
jhb [Thu, 30 Aug 2012 18:29:49 +0000 (18:29 +0000)]
MFC 238424:
Make the interval timings for EVFILT_TIMER more accurate.  tvtohz() always
adds an extra tick to account for the current partial clock tick.  However,
that is not appropriate for a repeating timer when the exact tvtohz() value
should be used for subsequent intervals.  Fix repeating callouts for
EVFILT_TIMER by subtracting 1 tick from the tvtohz() result similar to the
fix used in realitexpire() for interval timers.

While here, update a few comments to note that if the EVFILT_TIMER code
were to move out of kern_event.c, it should move to kern_time.c (where the
interval timer code it mimics lives) rather than kern_timeout.c.

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

11 years agoMFC 238311:
jhb [Thu, 30 Aug 2012 18:03:03 +0000 (18:03 +0000)]
MFC 238311:
Add a clts() wrapper around the 'clts' instruction to <machine/cpufunc.h>
on x86 and use that to implement stop_emulating() in the fpu/npx code.
Reimplement start_emulating() in the non-XEN case by using load_cr0() and
rcr0() instead of the 'lmsw' and 'smsw' instructions.  Intel explicitly
discourages the use of 'lmsw' and 'smsw' on 80386 and later processors in
the description of these instructions in Volume 2 of the ADM.

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

11 years agoMFC r238972:
kib [Thu, 30 Aug 2012 10:38:41 +0000 (10:38 +0000)]
MFC r238972:
Add lfence().

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

11 years agoMFC r238703:
kib [Thu, 30 Aug 2012 10:23:27 +0000 (10:23 +0000)]
MFC r238703:
Put struct ostat and struct nstat under #ifdef _KERNEL. The
compatibility definitions are only needed for implementation of the
syscalls, they cause namespace pollution and are not useful for
applications.

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

11 years agoMFC r238687:
kib [Thu, 30 Aug 2012 10:18:55 +0000 (10:18 +0000)]
MFC r238687:
Cosmetics: define FREEBSD32_MINUSER and AOUT32_MINUSER for struct
sysentvec .sv_minuser. Also improve style.

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

11 years agoMFC r238667:
kib [Thu, 30 Aug 2012 10:12:40 +0000 (10:12 +0000)]
MFC r238667:
Fixes for symbols visibility issues and style in fcntl.h.

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

11 years agoMFC r238180:
kib [Thu, 30 Aug 2012 08:37:06 +0000 (08:37 +0000)]
MFC r238180:
Style.

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

11 years agoMFC r230644: preserve argv[0] to use it later in usage().
maxim [Thu, 30 Aug 2012 07:45:25 +0000 (07:45 +0000)]
MFC r230644: preserve argv[0] to use it later in usage().

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

11 years agoMFC r232004: use ISO 3166 county code for Sweden.
maxim [Thu, 30 Aug 2012 07:38:24 +0000 (07:38 +0000)]
MFC r232004: use ISO 3166 county code for Sweden.

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

11 years agoMFC r237697: restore -u <username> getopt(3) flag.
maxim [Thu, 30 Aug 2012 07:34:25 +0000 (07:34 +0000)]
MFC r237697: restore -u <username> getopt(3) flag.

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

11 years agoMFC r230584 by glebius: remove casts from inet6 address testing macros,
maxim [Thu, 30 Aug 2012 07:25:17 +0000 (07:25 +0000)]
MFC r230584 by glebius: remove casts from inet6 address testing macros,
thus preserving qualifier from original argument.

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

11 years agoMFC 238142,238179:
jhb [Wed, 29 Aug 2012 21:12:19 +0000 (21:12 +0000)]
MFC 238142,238179:
Now that our assembler supports the xsave family of instructions, use them
natively rather than hand-assembled versions.  For xgetbv/xsetbv, add a
wrapper API to deal with xcr* registers: rxcr() and load_xcr().

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

11 years agoMFC 238310:
jhb [Wed, 29 Aug 2012 20:49:36 +0000 (20:49 +0000)]
MFC 238310:
Partially revert r217515 so that the mem_range_softc variable is always
present on x86 kernels.  This fixes the build of kernels that include
'device acpi' but do not include 'device mem'.

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

11 years agoMFC 238109,238166:
jhb [Wed, 29 Aug 2012 19:47:19 +0000 (19:47 +0000)]
MFC 238109,238166:
Several fixes to the amd64 disassembler:
- Decode the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', 'xsetbv', and
  'rdtscp' instructions.
- Add generic support for opcodes that are escape bytes used for
  multi-byte opcodes (such as the 0x0f prefix).  Use this to replace
  the hard-coded 0x0f special case and add support for three-byte
  opcodes that use the 0x0f38 prefix.
- Decode all Intel VMX instructions.  invept and invvpid in particular are
  three-byte opcodes that use the 0x0f38 escape prefix.
- Rework how the special 'SDEP' size flag works such that the default
  instruction name (i_name) is the instruction when the data size
  prefix (0x66) is not specified, and the alternate name in i_extra is
  used when the prefix is included.
- Add a new 'ADEP' size flag similar to 'SDEP' except that it chooses
  between i_name and i_extra based on the address size prefix (0x67).
  Use this to fix the decoding for jrcxz vs jecxz which is determined
  by the address size prefix, not the operand size prefix.  Also, jcxz
  is not possible in 64-bit mode, but jrcxz is the default instruction
  for that opcode.
- Add support for handling instructions that have a mandatory 'rep'
  prefix (this means not outputting the 'repe ' prefix until determining
  if it is used as part of an opcode).  Make 'pause' less of a special
  case this way.
- Decode 'cmpxchg16b' and 'cdqe' which are variants of other instructions
  but with a REX.W prefix.

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

11 years agoMFC 238123,238167:
jhb [Wed, 29 Aug 2012 19:34:46 +0000 (19:34 +0000)]
MFC 238123,238167:
- Add support for the 'xsave', 'xrstor', 'xsaveopt', 'xgetbv', and 'xsetbv'
  instructions.  I reimplemented this from scratch based on the Intel
  manuals and the existing support for handling the fxsave and fxrstor
  instructions.
- Add support for the 'invept' and 'invvpid' instructions.  Beyond simply
  adding appropriate table entries, the assembler had to be adjusted as
  these are the first non-SSE instructions to use a 3-byte opcode (and a
  mandatory prefix to boot).

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

11 years agoMFC 238024:
jhb [Wed, 29 Aug 2012 19:17:29 +0000 (19:17 +0000)]
MFC 238024:
Add a one second sleep before touching the spool directory.  If the touch
occurs in the same second as the earlier operations to create the temporary
file and the cron(8) daemon is rescans the spool directory during that
second, then the daemon may miss a cron edit and not properly update its
internal database.

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

11 years agoMFC 238000,239584:
jhb [Wed, 29 Aug 2012 19:12:33 +0000 (19:12 +0000)]
MFC 238000,239584:
Honor db_pager_quit in 'show malloc', 'show uma', and 'show witness'.

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

11 years agoMFC 238077:
jhb [Wed, 29 Aug 2012 17:36:12 +0000 (17:36 +0000)]
MFC 238077:
Fix panics triggered by older mfiutil binaries run on the new mfi(4) driver.
The new driver changed the size of the mfi_dcmd_frame structure in such a
way that a MFI_IOC_PASSTHRU ioctl from an old amd64 binary is treated as an
MFI_IOC_PASSTHRU32 ioctl in the new driver.  As a result, the user pointer
is treated as the buffer length.  mfi_user_command() doesn't have a bounds
check on the buffer length, so it passes a really big value to malloc()
which panics when it tries to exhaust the kmem_map.  Fix this two ways:
- Only honor MFI_IOC_PASSTHRU32 if the binary has the SV_ILP32 flag set,
  otherwise treat it as an unknown ioctl.
- Add a bounds check on the buffer length passed by the user.  For now
  it fails any user attempts to use a buffer larger than 1MB.

While here, fix a few other nits:
- Remove an unnecessary check for a NULL return from malloc(M_WAITOK).
- Use the ENOTTY errno for invalid ioctl commands instead of ENOENT.

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

11 years agoMFC r238835:
kib [Wed, 29 Aug 2012 16:26:41 +0000 (16:26 +0000)]
MFC r238835:
Document F_DUP2FD_CLOEXEC.

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

11 years agoMFC r238615:
kib [Wed, 29 Aug 2012 16:25:33 +0000 (16:25 +0000)]
MFC r238615:
Document F_DUPFD_CLOEXEC.

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

11 years agoMFC r238834:
kib [Wed, 29 Aug 2012 16:23:29 +0000 (16:23 +0000)]
MFC r238834:
Add F_DUP2FD_CLOEXEC.

PR: standards/169962

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

11 years agoMFC r238614:
kib [Wed, 29 Aug 2012 16:17:02 +0000 (16:17 +0000)]
MFC r238614:
Implement F_DUPFD_CLOEXEC command for fcntl(2), specified by SUSv4.

MFC r238627:
Remove line which was accidentally kept in r238614.

PR: standards/169962

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

11 years agoMFC r239601:
jamie [Wed, 29 Aug 2012 16:11:03 +0000 (16:11 +0000)]
MFC r239601:

 Remember that I'm using length-defined strings in parameters:

  Remove a bogus null terminator when stripping the netmask from
  IP addresses.  This was causing later addresses in a comma-separated
  string to disappear.

  Use memcpy instead of strcpy.  This could just cause Bad Things.

MFC r239602:

 Pre-separate IP addresses passed on the command line, so they can be
 properly parsed for interface prefixes and netmask suffixes.  This was
 already done for the old-style (fixed) command line, but missed for
 the new-style.

MFC r239621:

 Partially roll back r239601 - keep parameter strings both length-delimited
 and null-terminated at the same time, because they're later passed to
 libjail as null-terminated.  That means I also need to add a nul byte when
 comma-combining array parameters.

PR: 170832

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

11 years agoMFC r238374:
kib [Wed, 29 Aug 2012 16:00:26 +0000 (16:00 +0000)]
MFC r238374:
Add a test program, written by Stephan Uphoff, which demonstrates the
deadlock due to i/o performed over the buffers backed by file mappings.

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

11 years agoMFC r237367:
kib [Wed, 29 Aug 2012 15:58:44 +0000 (15:58 +0000)]
MFC r237367:
Enable deadlock avoidance code for NFS client.

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

11 years agoMFC r236322:
kib [Wed, 29 Aug 2012 15:56:13 +0000 (15:56 +0000)]
MFC r236322:
Enable vn_io_fault() lock avoidance for UFS.

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