]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
12 years agoMFC r224525:
mm [Tue, 2 Aug 2011 11:33:19 +0000 (11:33 +0000)]
MFC r224525:
Fix wrong initialization of "cmd" for calling the jail/unjail ioctl.

Reviewed by: pjd@, delphij@

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

12 years agoMFH r223715
uqs [Tue, 2 Aug 2011 09:06:04 +0000 (09:06 +0000)]
MFH r223715

- Fix typo in check_for_nested_with_variably_modified
- Implement -Wvariable-decl.
- Port -Wtrampolines support from gcc3.
    (all three also via OpenBSD)

PR: gnu/127136, gnu/157019
Submitted by: Henning Petersen, Pedro Giffuni

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

12 years agoUpdate for version 9.6-ESV-R5
dougb [Tue, 2 Aug 2011 08:09:12 +0000 (08:09 +0000)]
Update for version 9.6-ESV-R5

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

12 years agoUpdate for version 9.6-ESV-R5
dougb [Tue, 2 Aug 2011 08:08:31 +0000 (08:08 +0000)]
Update for version 9.6-ESV-R5

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

12 years agoUpdate to version 9.6-ESV-R5 which contains various bug fixes
dougb [Tue, 2 Aug 2011 08:07:59 +0000 (08:07 +0000)]
Update to version 9.6-ESV-R5 which contains various bug fixes
and improvements:

ftp://ftp.isc.org/isc/bind9/9.6-ESV-R5/RELEASE-NOTES-BIND-9.6-ESV.html

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

12 years agoNon-functional changes related to version 9.6-ESV-R5
dougb [Tue, 2 Aug 2011 05:45:14 +0000 (05:45 +0000)]
Non-functional changes related to version 9.6-ESV-R5
(format of time stamp in CVS $Id)

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

12 years agoMFC 224177:
mm [Mon, 1 Aug 2011 08:17:54 +0000 (08:17 +0000)]
MFC 224177:
ZFS tries to allocate blocks evenly across all devices. This means when
devices are imbalanced zfs will lots of CPU searching for space on devices
which tend to be pretty full. It should instead fail quickly on the full
devices and move onto devices which have more availability.

New loader tunable: vfs.zfs.mg_alloc_failures (min = 8)

Illumos-gate changeset: 13379:4df42cc92254

Obtained from: Illumos (Bug #1051)

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

12 years agoMFC 224174:
mm [Mon, 1 Aug 2011 08:14:16 +0000 (08:14 +0000)]
MFC 224174:
Resurrect the ZFS "aclmode" property
Change default of "aclmode" to "discard".

Illumos-gate changeset: 13370:8c04143bd318

Obtained from: Illumos (Feature #742)

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

12 years agoSync bsdtar with 9-CURRENT:
mm [Mon, 1 Aug 2011 08:00:46 +0000 (08:00 +0000)]
Sync bsdtar with 9-CURRENT:

MFC on usr.bin/bsdtar:
203569,203571,203586-203590,203593-203594,204329,205076,206463-206466,
206484-206485,206487,207786,207790-207791,208028,209152,210720,213469,
223541,223573,224153,224158

MFC 203569 (kientzle):
bsdtar doesn't actually know what compression is supported by libarchive
and it should not pretend that it does.  It should just pass along the
user's request and handle an error if it's not supported.

MFC 203571 (kientzle):
Fill in some missing error handling, be a little more careful about
error reporting, prefer int64_t to off_t.

MFC 203586 (kientzle):
Trim out some unused configuration variables, remove
some unused headers, etc.

MFC 203587 (kientzle):
Minor code rework.

MFC 203588 (kientzle):
Restructure the logic that determines when we're crossing a mount
point.  In particular, this carves out a place for detecting and
excluding synthetic or network filesystems.

MFC 203589 (kientzle):
Various portability workarounds for non-FreeBSD platforms.

MFC 203590 (kientzle):
Style & Portability:  Use archive_entry methods to examine
file information, change some functions to static, remove
some unused headers.

MFC 203593 (kientzle):
Merge a bunch of refactoring from Joerg Sonnenberger to
isolate common code used by tar and cpio (and useful to other
libarchive clients).  The functions here are prefixed with
"lafe" (libarchive front-end) to indicate their use.

MFC 203594 (kientzle):
Simplify, remove unnecessary code.

MFC 204329 (ru)
Fixed dependencies (make checkdpadd).

MFC 205076 (uqs):
Fix several typos in macros or macro misusage.

Found by: make manlint

MFC 206463 (kientzle):
Correct the markup for the -s option,
document the iso9660:rockridge and mtree:indent options

MFC 206464 (kientzle):
Remove an unnecessary include and conditionalize some code.

MFC 206465 (kientzle):
Consistently specify O_BINARY when opening files.

MFC 206466 (kientzle):
Fix -X.

MFC 206484 (kientzle):
Diff reduction against bsdtar 2.8.3

MFC 206485 (kientzle):
Diff reduction against bsdtar 2.8.3

MFC 206487 (kientzle):
If a file is specifically both included and excluded, then:
 * It is not extracted (because it is excluded)
 * If it's not present in the archive, then an error is
   reported (because the file was requested and not found)
 * If it is present in the archive, no error is reported.
Previously, this would always report an error because the
exclusion prevented the entry from matching the inclusion.

Also, tar is now more reluctant to report unmatched inclusions.
Previously, "tar x file1 'file*'" against an archive that contained a
single entry "file1" would match file1 and then report an error for
the second pattern because it wasn't matched.  It now considers both
inclusions to be matched and reports no error.

MFC 207786 (kientzle):
Various manpage updates, including many long-option synonyms that were previously
undocumented.

MFC 207790 (kientzle):
Config updates.

MFC 207791 (kientzle)
FreeBSD is now using bsdtar 2.8.3.

MFC 208028 (uqs):
mdoc: move remaining sections into consistent order

This pertains mostly to FILES, HISTORY, EXIT STATUS and AUTHORS sections.

Found by: mdocml lint run

MFC 209152 (kientzle):
If the compressed data is larger than the uncompressed,
report the compression ratio as 0% instead of displaying
nonsense triggered by numeric overflow.  This is common
when dealing with uncompressed files when the I/O blocking
causes there to be small transient differences in the
accounting.

Thanks to: Boris Samorodov

MFC 210720 (joel):
Fix typos.

MFC 213469 (kientzle):
Recognize both ! and ^ as markers for negated character classes.

Submitted by: Mykola Dzham

MFC 223541 (kientzle):
If there is a read error reading Y/N confirmation from the keyboard,
exit immediately with an error.

If there is an error opening or reading a file to put into the archive,
set the return value for a deferred error exit.

MFC 223573 (kientzle):
The --newer-than test should descend into old
directories to look for new files.

MFC 224153 (mm):
Update bsdtar to 2.8.4
Use common code from lib/libarchive/libarchive_fe

MFC 224158 (mm):
Fix accidential commit part:
Include "bsdtar_platform.h" instead of "lafe_platform.h"

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

12 years agoSync bsdcpio with 9-CURRENT:
mm [Mon, 1 Aug 2011 07:59:54 +0000 (07:59 +0000)]
Sync bsdcpio with 9-CURRENT:

MFC on usr.bin/cpio:
203183,204329,207792,211054,211397,212263,224154-224155

MFC 203183 (kientzle):
Support -V option to print a dot for each file processed.
Also, change the existing -vi behavior to send the filenames to
stderr rather than stdout, as GNU cpio does.

PR: bin/141175
Submitted by: Philip Kizer

MFC 204329 (ru):
Fixed dependencies (make checkdpadd).

MFC 207792 (kientzle):
bsdcpio 2.8.3

MFC 211054 (kientzle):
Fix -R when used with -p.  Previously, the
uname and gname weren't overwritten, so the
disk restore would use those to lookup the
original uid/gid again.  Clearing the uname
and gname prevents this.

Reported by: swell.k

MFC 211397 (joel):
Fix typos, spelling, formatting and mdoc mistakes found by Nobuyuki while
translating these manual pages.  Minor corrections by me.

Submitted by: Nobuyuki Koganemaru <n-kogane@syd.odn.ne.jp>

MFC 212263 (gjb):
Fix typo in bsdcpio manual:
s/libarchive_formats/libarchive-formats

MFC 224154 (mm):
Update bsdcpio to 2.8.4
Use common code from lib/libarchive/libarchive_fe

MFC 224155 (mm):
Append to CPIO_SRCS instead of using TAR_SRCS,
the variable name is misleading

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

12 years agoSync libarchive with 9-CURRENT:
mm [Mon, 1 Aug 2011 07:59:02 +0000 (07:59 +0000)]
Sync libarchive with 9-CURRENT:

MFC on lib/libarchive:
196961,200351,201077,201079-201097,201099-201112,201155-201157,
201159-201163,201165,201167-201171,201246-201250,201253,202868-202869,
202871-202873,203952,208027,208169,208184,208263,208291,210825,213573,
214822,214867,214905,216258,221472,224152

MFC 196961 (kientzle):
Update tests to match r195873, which corrected how hardlinked files
on iso9660 images were returned.  While I'm poking around, update
some comments around this area to try to clarify what's going on and
what still remains to be improved.

MFC 200351 (kientzle):
Merge two cpio fixes from libarchive.googlecode.com:
 1) Avoid an infinite loop in the header resync for certain malformed
    archives.
 2) Don't try to match hardlinks if the nlinks count is < 2.   This
    reduces the likelihood of a false hardlink match due to ino truncation.

MFC 201077 (kientzle):
Update format manpages for libarchive.

MFC 201079 (kientzle):
Update the hard-coded configuration for libarchive.

MFC 201080 (kientzle):
Remove some unused variables and dead assignments.

MFC 201081 (kientzle):
Remove a dead assignment.

MFC 201082 (kientzle):
Catch certain gzip failures at close time.

MFC 201083 (kientzle):
Compatibility fix for some older systems with non-POSIX getgrnam_r/getpwnam_r
and a minor style fix for the hash function.

MFC 201084 (kientzle):
Sync with googlecode some changes that have no impact on FreeBSD.

MFC 201085 (kientzle):
Compatibility:  I found some more compilers that don't like 'inline' keyword.
Protection:  Discourage people from using this header outside libarchive.

MFC 201086 (kientzle):
Discourage people from using this header outside of libarchive.

MFC 201087 (kientzle):
Enforce this as an internal-only header.

MFC 201088 (kientzle):
Allow more formats to be active at a time; discourage outside use.

MFC 201089 (kientzle):
Portability: terminate abnormally via abort() instead of segfault,
watch the return value from write(), and avoid signed arithmetic on
unsigned values.

MFC 201091 (kientzle):
Remove dead assignment.

MFC 201092 (kientzle):
Discourage outside use of this internal header.

MFC 201093 (kientzle):
Portability:  Set the file descriptor to binary mode on Win32

MFC 201094 (kientzle):
Eliminate an unused assignment.

MFC 201095 (kientzle):
Remove an unused variable and an unnecessary increment.

MFC 201096 (kientzle):
Various portability fixes, plus:
 * New "ino64" field.
 * New UTF8 interfaces for hardlink/symlink updates

MFC 201097 (kientzle):
Portability fixes.

MFC 201099 (kientzle):
Use new ino64 interface.

MFC 201110 (kientzle):
Clarify an example so Linux folks won't keep getting confused by this
point.

MFC 201111 (kientzle):
Remove some dead assignments, fix some declarations.

MFC 201112 (kientzle):
Portability.

MFC 201155 (kientzle):
64-bit ino support and discourage bad use of this header.

MFC 201156 (kientzle):
Various style and portability fixes, including:
 * Enforce option interface can only be used before the archive is opened
 * Correctly handle large skips on platforms with 32-bit off_t
 * Use int64_t instead of off_t

MFC 201157 (kientzle):
Catch decompression failures earlier.  In particular, this gives
immediate feedback if we fail to fork an external decompression program.

MFC 201159 (kientzle):
Various fixes when creating objects on disk:
 * Write xattrs last instead of first (required on platforms that use
   system xattrs for security attributes)
 * Better handling of chdir() failures
 * Don't bother trying to shorten files via seek()/write()
 * Fix build on systems that lack link()/symlink()/mknod()
 * Prefer futimens()/utimensat() when they're present

MFC 201160 (kientzle):
Various style fixes to the 'newc' cpio writer:
 * Warn about truncation of ino
 * Use a macro to hide the somewhat obscure pad-to-multiple-of-4 calculation
 * Eliminate some unused variables

MFC 201161 (kientzle):
Style fixes to tar reader:
  For portability, prefer int64_t to off_t.
  Improve numeric overflow handling when parsing.
  Fix some variable types.
  Eliminate some unused results.

MFC 201162 (kientzle):
Style and portability fixes for pax writer.  Mostly very routine, except for:
 * Use ino64 where appropriate
 * Don't pass atime or nsec to ustar formatter

MFC 201163 (kientzle):
Be a little more skeptical of dev/ino matches when reading cpio files.
This eliminates some false-positives in the hardlink detection logic.

MFC 201165 (kientzle):
Minor style fixes plus a fix for an obscure crash on certain malformed
mtree files.

MFC 201167 (kientzle):
If we're linking against liblzma, allow the decompressor to use up to
1<<30 bytes of memory, which is required for some streams.

Also, try to make the taster more discriminating about raw lzma streams.
The detection here is still really weak, though; please use xz instead
of lzma.

MFC 201168 (kientzle):
Zip write support for libarchive.

The initial implementation was developed by Anselm Strauss as part of
Google Summer of Code 2008, then completed by Joerg Sonnenberger.

MFC 201169 (kientzle):
Clear extraneous error messages.

MFC 201170 (kientzle):
Essentially eliminate problems with false hardlinks in POSIX cpio
archives by generating synthetic ino values and mapping values
from disk into the new values.

MFC 201171 (kientzle):
Rationalize the support for cryptographic hashes.

MFC 201246 (kientzle):
Merge Michihiro NAKAJIMA's significant work on the ISO9660 reader
from googlecode:
 * Support for zisofs compressed entries
 * Support for relocated deep directories
 * Direct calculation of link counts for accurate nlink values
   even on images that lack Rockridge extensions
 * Faster handling of the internal file lists.
 * Better detection of ISO variants

MFC 201247 (kientzle):
A raft of test changes and improvements from the Googlecode repository.
In particular, this includes tests for the new features I've merged
over the last few days.

MFC 201248 (kientzle):
UU decoder.  Now that libarchive can recursively taste input streams,
you can do things like this:  tar xvf archive.tar.gz.uu

MFC 201249 (kientzle):
Libarchive in FreeBSD is now synced up with 2.7.901a from
libarchive.googlecode.com

MFC 201250 (kientzle):
Reserve constants for RPM unwrapper and XAR reader.

MFC 201253 (kientzle):
Remove some test files that are no longer used.

MFC 202868 (kientzle):
Fix a memory leak when a filter fails to initialize.

MFC 202869 (kientzle):
Initialize the allocated 'struct zip'.

MFC 202871 (kientzle):
If we can't stat a file, return the correct ARCHIVE_FAILED (this entry can't
be processed any further) and a suitable error string.
In particular, this improves the error-reporting when cpio -o is
given a nonexistent filename.

MFC 202872 (kientzle):
Use a simpler memory-management strategy for the file objects.
Instead of trying to reference-count them and free them as soon
as they are no longer needed, we now just keep them around and free
them all when we release the archive object.  This fixes a number
of minor memory leaks, especially when reading damaged archives.

MFC 202873 (kientzle):
Don't try to hardlink block or character device nodes that come out
of cpio archives.

MFC 203952 (uqs):
Add missing newline in last line of file.

Uncovered via: fromcvs vs. svn

MFC 208027 (uqs):
mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

GNU groff doesn't care about the ordering, and doesn't even mention
CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put
them.

Found by:       mdocml lint run

MFC 208169 (kientzle):
Reorganize slightly in preparation for making lzma and bz2 support
conditional.

MFC 208184 (delphij):
Fix build.

MFC 208263 (kientzle):
Retry reads that fail with EINTR.  This fixes a problem
with bsdtar failing on SIGINT.

MFC 208291 (uqs):
mdoc: consistently spell our email addresses <foo@FreeBSD.org>

MFC 210825 (joel):
Fix typo.

MFC 213573 (uqs):
mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd

MFC 214822 (kientzle):
Clarify the naming:  Methods that free an object should
be called "free".  Retain the old "finish" names to preserve
source compatibility for now.

MFC 214867 (uqs):
Fix manpage markup.

MFC 214905 (kientzle):
If the Zip reader doesn't see a PK signature block
because there's inter-entry garbage, just scan forward
to find the next one.  This allows us to handle a lot
of Zip archives that have been modified in-place.

Thanks to: Gleb Kurtsou for sending me a sample archive

MFC 216258 (kientzle):
Don't write data into an empty "file."

In particular, this check avoids a warning when
extracting directory entries from certain GNU tar
archives that store directory contents.

MFC 221472 (obrien):
libarchive is mixing libmd and libcrypto -- correct to use one or the other.
[mixing the two can be quite bad -- they define the same context structures,
 but with differing structure members (and sizes)]

MFC 224152 (mm):
- Update libarchive to 2.8.4
- Add support for extracting xar and rpm archives
- Add libarchive_fe subdir (common code for tar and cpio)

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

12 years agoCreate dummy opt_compat.h for i386 build to fix buildworld breakage
art [Mon, 1 Aug 2011 04:29:04 +0000 (04:29 +0000)]
Create dummy opt_compat.h for i386 build to fix buildworld breakage
when MODULES_WITH_WORLD is set.

PR: 157529
Submitted by: Eugene Grosbein
Approved by: avg (mentor)

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

12 years agoMFC r224076:
dougb [Sun, 31 Jul 2011 23:09:11 +0000 (23:09 +0000)]
MFC r224076:

Handle the MK_BIND_XML option more intelligently

MFC r224129:

Fixes for WITH_BIND_LIBS

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

12 years agoMFC r224140:
marck [Sun, 31 Jul 2011 08:52:24 +0000 (08:52 +0000)]
MFC r224140:

  Correct small typo in a do{}while(0)

Approved by: kib

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

12 years agoMFC: r224117
rmacklem [Sat, 30 Jul 2011 23:42:15 +0000 (23:42 +0000)]
MFC: r224117
The new NFSv4 client handled NFSERR_GRACE as a fatal error
for the remove and rename operations. Some NFSv4 servers will
report NFSERR_GRACE for these operations. This patch changes
the behaviour of the client so that it handles NFSERR_GRACE
like NFSERR_DELAY for non-state related operations like
remove and rename. It also exempts the delegreturn operation
from handling within newnfs_request() for NFSERR_DELAY/NFSERR_GRACE
so that it can handle NFSERR_GRACE in the same manner as before.
This problem was resolved thanks to discussion with bfields at fieldses.org.
The problem was identified at the recent NFSv4 ineroperability
bakeathon.

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

12 years agoHost mergeinfo for 219400 up to sys/ and out of sys/geom/label.
jhb [Sat, 30 Jul 2011 21:28:34 +0000 (21:28 +0000)]
Host mergeinfo for 219400 up to sys/ and out of sys/geom/label.

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

12 years agor224283:
mav [Sat, 30 Jul 2011 09:38:52 +0000 (09:38 +0000)]
r224283:
Do not try to execute FLUSHCACHE on close and print extra messages for
invalidated (considered lost) ada device. Exactly same already done for
the da devices.

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

12 years agoMFC r216047 by kevlo:
jh [Sat, 30 Jul 2011 08:31:18 +0000 (08:31 +0000)]
MFC r216047 by kevlo:

Fix fd leak in get_font

MFC r222568:

Don't try to close the stream if fopen(3) fails.

PR: bin/155349

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

12 years agoMFC r223663: add SNDCTL_DSP_HALT specified by OSS
avg [Fri, 29 Jul 2011 22:00:32 +0000 (22:00 +0000)]
MFC r223663: add SNDCTL_DSP_HALT specified by OSS

PR: kern/156874

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

12 years agoMFC r224250:
mav [Fri, 29 Jul 2011 10:02:03 +0000 (10:02 +0000)]
MFC r224250:
Fix `diskinfo -t` operation for disks smaller then 8GB or bigger then 2TB.
Tested to work with 1.44MB floppy, 4GB USB stick and 4TB disk array.

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

12 years agoMFC r224270:
mav [Fri, 29 Jul 2011 09:58:56 +0000 (09:58 +0000)]
MFC r224270:
 - Use mutex to serialize index/data register pair usage, when
accessing SATA registers. Unserialized access under heavy load caused
wrong speed reporting and potentially could cause device loss.
 - To free memory and other resources (including above), allocated
during chipinit() method call on attach, add new chipdeinit() method,
called during driver detach.

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

12 years agoUse calloc() instead of an explicit memset.
delphij [Fri, 29 Jul 2011 06:16:16 +0000 (06:16 +0000)]
Use calloc() instead of an explicit memset.

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

12 years agoMFC rr224004,224025:
delphij [Fri, 29 Jul 2011 06:15:18 +0000 (06:15 +0000)]
MFC rr224004,224025:

Add a -l option to show file system's corresponding /dev/ufsid path.
This is useful for scripts that converts existing system's fstab to
use their /dev/ufsid devices.

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

12 years agoMFC: r223971
rmacklem [Thu, 28 Jul 2011 21:00:46 +0000 (21:00 +0000)]
MFC: r223971
r222389 introduced a case where the NFSv4 client could
loop in nfscl_getcl() when a forced dismount is in progress,
because nfsv4_lock() will return 0 without sleeping when
MNTK_UNMOUNTF is set.
This patch fixes it so it won't loop calling nfsv4_lock()
for this case.

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

12 years agoMFC r223437:
ae [Thu, 28 Jul 2011 10:16:30 +0000 (10:16 +0000)]
MFC r223437:
  Export AddLink() function from libalias.  It can be used when custom
  alias address needs to be specified.
  Add inbound handler to the alias_ftp module. It helps handle active
  FTP transfer mode for the case with external clients and FTP server behind
  NAT. Fix passive FTP transfer case for server behind NAT using redirect with
  external IP address different from NAT ip address.

  PR: kern/157957
  Submitted by: Alexander V. Chernikov

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

12 years agoMFC r223080:
ae [Thu, 28 Jul 2011 10:10:39 +0000 (10:10 +0000)]
MFC r223080:
  Implement "global" mode for ipfw nat. It is similar to natd(8)
  "globalport" option for multiple NAT instances.

  If ipfw rule contains "global" keyword instead of nat_number, then
  for each outgoing packet ipfw_nat looks up translation state in all
  configured nat instances. If an entry is found, packet aliased
  according to that entry, otherwise packet is passed unchanged.

  User can specify "skip_global" option in NAT configuration to exclude
  an instance from the lookup in global mode.

  PR: kern/157867
  Submitted by: Alexander V. Chernikov (previous version)

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

12 years agoMFC: r223228
marius [Wed, 27 Jul 2011 11:21:49 +0000 (11:21 +0000)]
MFC: r223228

Merge from r161730:
o  Set TP using inline assembly to avoid dead code elimination.
o  Eliminate _tcb.

Merge from r161840:
Stylize: avoid using a global register variable.

Merge from r157461:
Simplify _get_curthread() and _tcb_ctor because libc and rtld now
already allocate thread pointer space in tls block for initial thread.

Merge from r177853:
Replace function _umtx_op with _umtx_op_err, the later function directly
returns errno, because errno can be mucked by user's signal handler and
most of pthread api heavily depends on errno to be correct, this change
should improve stability of the thread library.

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

12 years agoMFC r223846 by thompsa: grab the rlock before checking if our
maxim [Wed, 27 Jul 2011 07:02:33 +0000 (07:02 +0000)]
MFC r223846 by thompsa: grab the rlock before checking if our
interface is enabled.

Approved by: thompsa

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

12 years agoMFC r216754:
ae [Wed, 27 Jul 2011 04:23:26 +0000 (04:23 +0000)]
MFC r216754:
  Make EBR probe method less strictly to be able detect EBRs with
  small non fatal inconsistency. EBR may contain boot loader and sometimes
  it just has some garbage data. Now this does not prevent FreeBSD to use
  extended partitions. But since we do not support bootcode for EBR we mark
  tables which have non empty boot area as corrupt. This does make them
  readonly and we can not damage this data.

MFC r223594:
  EBR could contain an early stage of boot code. But we do not support it.
  Remove message about non empty bootcode, we can not break something
  while GEOM_PART_EBR_COMPAT is defined.

  But without GEOM_PART_EBR_COMPAT any changes in EBR are allowed and we
  can accidentally wipe the boot code. To do not break anything save
  the first EBR chunk and keep it untouched each time when we are
  changing EBR. Note that we are still not support boot code for EBR.

  PR: kern/141235

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

12 years agoMFC r223587:
ae [Wed, 27 Jul 2011 04:10:32 +0000 (04:10 +0000)]
MFC r223587:
  MS Windows NT+ uses 4 bytes at offset 0x1b8 in the MBR to identify
  disk drive. The boot0cfg(8) utility preserves these 4 bytes when it is
  writing bootcode to keep a multiboot ability.
  Change gpart's bootcode method to keep DSN if it is not zero. Also
  do not allow writing bootcode with size not equal to MBRSIZE.

  PR: kern/157819

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

12 years agoMFC 224286:
gjb [Wed, 27 Jul 2011 01:56:52 +0000 (01:56 +0000)]
MFC 224286:

Document the potential for jail escape.

PR: 142341

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

12 years agoMFC: r223954
rmacklem [Tue, 26 Jul 2011 20:51:58 +0000 (20:51 +0000)]
MFC: r223954
Try and fix the exports.5 man page so that it clarifies how
NFSv4 exports are handled. Improved by comments from
mckusick, kudak at mit.edu and bde.
This is a content change.

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

12 years agoMFC 223773:
gjb [Tue, 26 Jul 2011 19:05:10 +0000 (19:05 +0000)]
MFC 223773:

- General grammar and mdoc(7) fixes.
- While here, remove a paragraph about userspace operation
  that has been outdated for some time.

PR: 158623

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

12 years agoMFC 202386, 224284:
gjb [Tue, 26 Jul 2011 17:38:49 +0000 (17:38 +0000)]
MFC 202386, 224284:

202386 (by ru):
Use the newly brought %U macro.

224284:
Fix various broken links in manual pages.

PR: 159130 159131 159132 159133
PR: 159134 159135 159144

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

12 years agoMFC 224284:
gjb [Tue, 26 Jul 2011 17:16:13 +0000 (17:16 +0000)]
MFC 224284:
Fix various broken links in manual pages.

PR: 159136

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

12 years agoMFC 224284:
gjb [Tue, 26 Jul 2011 17:09:44 +0000 (17:09 +0000)]
MFC 224284:
Fix various broken links in manual pages.

PR: 159137

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

12 years agoMFC 202386, 224284:
gjb [Tue, 26 Jul 2011 17:02:17 +0000 (17:02 +0000)]
MFC 202386, 224284:

202386 (by ru):
Use the newly brought %U macro.

224284:
Fix various broken links in manual pages.

PR: 159138

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

12 years agoMFC: r214921, r219954, r219956, r221387, r221470, r221536, r222191
marius [Tue, 26 Jul 2011 14:41:54 +0000 (14:41 +0000)]
MFC: r214921, r219954, r219956, r221387, r221470, r221536, r222191

- Sync with the latest version from NetBSD. It notably addds ISO9660 support.
- Add support for synthesizing an APM partition map to map Mac PowerPC
  bootstrap partitions from the ISO9660 boot catalog. This preserves OS X's
  ability to mount the CD, while allowing us a way to provide HFS-ified
  bootstrap code for Open Firmware.
- Add analogs to the -chrp-boot and -prep-boot options to mkisofs.

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

12 years agoMFC rr215733,217577,219024,219308,221118,221319: sync with head.
maxim [Tue, 26 Jul 2011 14:41:28 +0000 (14:41 +0000)]
MFC rr215733,217577,219024,219308,221118,221319: sync with head.

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

12 years agoMFC: r210933 (partial)
marius [Tue, 26 Jul 2011 14:03:50 +0000 (14:03 +0000)]
MFC: r210933 (partial)

Fix typos and spelling mistakes.

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

12 years agoMFC: r203059
marius [Tue, 26 Jul 2011 13:58:08 +0000 (13:58 +0000)]
MFC: r203059

Correct copy-paste typo from previous option description.

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

12 years agoMFC: r220389, r220392
marius [Tue, 26 Jul 2011 13:29:11 +0000 (13:29 +0000)]
MFC: r220389, r220392

- Mark getc() as inline, this has no effect on gcc but helps clang.
- Move getc() body before xgetc() so gcc does not emit a warning about function
  having no body.

Approved by:    jhb

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

12 years agoMFC: r219452
marius [Tue, 26 Jul 2011 13:26:46 +0000 (13:26 +0000)]
MFC: r219452

Some more shrinking.

   o    bunch of variables are turned into uint8_t

   o    initial setting of namep[] in lookup() is removed
        as it's only overwritten a few lines down

   o    kname is explicitly initialized in main() as BSS
        in boot2 is not zeroed

   o    the setting and reading of "fmt" in load() is removed

   o    buf in printf() is made static to save space

Reviewed by:    jhb
Tested by:      me and Fabian Keil <freebsd-listen fabiankeil de>

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

12 years agoMFC: r219186
marius [Tue, 26 Jul 2011 13:24:52 +0000 (13:24 +0000)]
MFC: r219186

This patch shrinks boot2 a little.

o    It switches kname to be just a pointer instead of an array
     thus avoiding a couple of memcpy()s.

o    It changes ioctl to unsigned from uint8_t.

o    It changes the second keyhit limit to 3 seconds from 5
     so that constant propagation can take place.

o    It changes the ticks overflow computation as suggested by bde@.

o    It removes bi_basemem/bi_extmem/bi_memsizes_valid setting from
     bootinfo as it is unused.

Reviewed by: jhb

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

12 years agoMFC: r218926
marius [Tue, 26 Jul 2011 13:23:25 +0000 (13:23 +0000)]
MFC: r218926

In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable
from uint16_t back to uint32_t.  The actual option bitmasks (RB_* and
RBX_*) assume at least a 32 bit variable.

Submitted by: rdivacky

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

12 years agoMFC: r218745
marius [Tue, 26 Jul 2011 13:22:12 +0000 (13:22 +0000)]
MFC: r218745

Remove reading of symbols from a.out loaded files.  Since we are tight
on space for clang and a.out support is only needed for /boot/loader,
they are excess bytes that serve no useful purpose other than to
support really old kernels (FreeBSD < 3.2 or so).  Prefer clang
support over support for these old kernels and remove this code.  We
gain about 100 bytes of space this way.

Reviewed by: rdivacky@

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

12 years agoMFC: r214210
marius [Tue, 26 Jul 2011 13:19:57 +0000 (13:19 +0000)]
MFC: r214210

Avoid using memcpy() for copying 32bit chunks. This shrinks
the resulting code a little.

Approved by:    rpaulo (mentor)
Reviewed by:    jhb

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

12 years agoMFC: r220685
marius [Tue, 26 Jul 2011 13:13:31 +0000 (13:13 +0000)]
MFC: r220685

MFi386: revisions 220389 and 220392

  - Mark getc() as inline, this has no effect on gcc but helps clang.
  - Move getc() body before xgetc() so gcc does not emit a warning about
    function having no body.

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

12 years agoMFC: r219960
marius [Tue, 26 Jul 2011 13:12:09 +0000 (13:12 +0000)]
MFC: r219960

MFi386: the part of 219452

  - bunch of variables are turned into uint8_t.
  - the setting and reading of "fmt" in load() is removed.
  - buf in printf() is made static to save space.

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

12 years agoMFC: r219225
marius [Tue, 26 Jul 2011 13:06:21 +0000 (13:06 +0000)]
MFC: r219225

MFi386: revision 219186

  This patch shrinks boot2 a little.

  o    It switches kname to be just a pointer instead of an array.
  o    It changes ioctl to unsigned from uint8_t.
  o    It changes the second keyhit limit to 3 seconds from 5.
  o    It removes bi_basemem/bi_extmem/bi_memsizes_valid setting.

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

12 years agoMFC: r218842
marius [Tue, 26 Jul 2011 13:04:43 +0000 (13:04 +0000)]
MFC: r218842

MFi386: revision 218745

  Remove reading of symbols from a.out loaded files.

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

12 years agoMFC: r218737, r218946
marius [Tue, 26 Jul 2011 13:01:14 +0000 (13:01 +0000)]
MFC: r218737, r218946

MFi386: revision 218713

  Apply a few small optimizations to boot2's code, to make it shrink a
  little further.

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

12 years agoMFC: r214257
marius [Tue, 26 Jul 2011 12:58:29 +0000 (12:58 +0000)]
MFC: r214257

MFi386: revision 214210

  Avoid using memcpy() for copying 32bit chunks. This shrinks
  the resulting code a little.

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

12 years agoMFC: r212064, r212098
marius [Tue, 26 Jul 2011 12:57:23 +0000 (12:57 +0000)]
MFC: r212064, r212098

Use a cleaner expression to retrieve the memory size in pc98's boot2.c,
which also avoids NULL pointer arithmetic, as suggested by jhb.  The
available space goes from 11 bytes to 7.

Reviewed by: nyan
Approved by: rpaulo (mentor)

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

12 years agoMFC r223945:
ae [Tue, 26 Jul 2011 04:33:00 +0000 (04:33 +0000)]
MFC r223945:
  Add SIGINFO handler.

  Obtained from: NetBSD (partly)

MFC r223946:
  Use NULL instead of 0 for third argument of sigaction(2).

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

12 years agoMFC: r223938
marius [Mon, 25 Jul 2011 23:01:08 +0000 (23:01 +0000)]
MFC: r223938

Since r219452 the alignment of __dmadat has changed, revealing that fsread()
bogusly casts its contents around causing alignment faults on sparc64 and
most likely also on at least powerpc. Fix this by copying the contents
bytewise instead as partly already done here. Solving this the right way
costs some space, i.e. 148 bytes with GCC and 16 bytes with clang on x86
there are still some bytes left there though, and an acceptable hack which
tricks the compiler into only using a 2-byte alignment instead of the native
one when accessing the contents turned out to even take up more space that.

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

12 years agoMFC r222932: skel/.shrc: Improve commented CDPATH example for POSIX
jilles [Mon, 25 Jul 2011 21:58:39 +0000 (21:58 +0000)]
MFC r222932: skel/.shrc: Improve commented CDPATH example for POSIX
requirements.

POSIX says an empty entry in CDPATH shall not result in the new directory
being printed, while any non-empty entry shall result in the new directory
being printed, including ".". Therefore, the value of CDPATH should almost
always start with a colon, not dot and colon.

Our sh does not print the name for empty entries as well as "." entries.

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

12 years agoMFC: r218713, r218716
marius [Mon, 25 Jul 2011 21:44:35 +0000 (21:44 +0000)]
MFC: r218713, r218716

Apply a few small optimizations to boot2's code, to make it shrink a
little further.  This gets us further on the way to be able to build it
successfully with clang.  Using in-tree gcc, this shrinks boot2.bin with
60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes.

Submitted by: rdivacky
Reviewed by: imp

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

12 years agoMFC r224157:
yongari [Mon, 25 Jul 2011 20:12:31 +0000 (20:12 +0000)]
MFC r224157:
  Revert r222135 by allowing controller reinitialization.  Due to
  unknown reason Apple UniNorth2 gem(4) device required manual
  interface down/up operation after r222135.  Even though this is not
  correct thing and I don't like to revert it but it would be better
  than breaking gem(4) on PPC.  This should be revisited.

  PR: kern/157405

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

12 years agoMFC r224023,224060:
yongari [Mon, 25 Jul 2011 20:09:09 +0000 (20:09 +0000)]
MFC r224023,224060:
  Document AX88772B and AX88760. AX88760 is treated as AX88772A in
  driver.
  Mention all ASIX USB controllers that are supported by axe(4).
  Reword media types and explicly mention AX88178 is the only
  controller that supports gigabit link.
  While I'm here use shorten model instead of showing all controller
  model numbers.

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

12 years agoMFC r224020:
yongari [Mon, 25 Jul 2011 20:06:18 +0000 (20:06 +0000)]
MFC r224020:
  Add initial support for AX88772B USB Fast Ethernet. AX88772B
  supports IPv4/IPv6 checksum offloading and VLAN tag insertion/
  stripping as well as WOL.  Because uether does not provide a way
  to announce driver specific offload capabilities to upper stack,
  checksum offloading support needs more work and will be done in
  future.
  Special thanks to ASIX for donating sample hardware.

  H/W donated by: ASIX Electronics
  Reviewed by: hselasky

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

12 years agoMFC: r223986
marius [Mon, 25 Jul 2011 19:13:51 +0000 (19:13 +0000)]
MFC: r223986

- Expand the scope of the lock in the interrupt routine to close races with
  checking IFF_DRV_RUNNING and simplify the code. This also involves holding
  the driver lock in the rx_ch callout.
- Just use ifp instead of sc->sc_ifp.

Submitted by: jhb (mostly)

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

12 years agoMFC: r223984
marius [Mon, 25 Jul 2011 19:11:29 +0000 (19:11 +0000)]
MFC: r223984

PCIB_ALLOC_MSIX() may already fail on the first pass, f.e. when the PCI-PCI
bridge is blacklisted. In that case just return from pci_alloc_msix_method(),
otherwise we continue without a single MSI-X resource, causing subsequent
attempts to use the seemingly available resource to fail or when booting
verbose to NULL-dereference rle->start when trying to print the IRQ in
pci_alloc_msix_method().

Reviewed by: jhb

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

12 years agoMFC: r223981
marius [Mon, 25 Jul 2011 19:06:30 +0000 (19:06 +0000)]
MFC: r223981

Remove extra empty lines.

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

12 years agoMFC: r223962
marius [Mon, 25 Jul 2011 19:04:57 +0000 (19:04 +0000)]
MFC: r223962

Remove NULL assignments which are redundant for static timecounters.

Submitted by: jkim

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

12 years agoMFC: r223961
marius [Mon, 25 Jul 2011 19:03:45 +0000 (19:03 +0000)]
MFC: r223961

- Remove redundant timecounter masking from counter_get_timecount().
- Zero the timecounter when allocation so we don't need to initialize unused
  members and remove a now redundant NULL assignment.

Submitted by: jkim

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

12 years agoMFC: r223960
marius [Mon, 25 Jul 2011 19:01:36 +0000 (19:01 +0000)]
MFC: r223960

- Current testing shows that (ab)using the JBC performance counter in bus
  cycle mode as timecounter just works fine. My best guess is that a firmware
  update has fixed this, so check at run-time whether it advances and use a
  positive quality if it does. The latter will cause this timecounter to be
  used instead of the tick counter based one, which just sucks for SMP.
- Remove a redundant NULL assignment from the timecounter initialization.

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

12 years agoMFC: r223959
marius [Mon, 25 Jul 2011 18:59:45 +0000 (18:59 +0000)]
MFC: r223959

- Add a missing shift in schizo_get_timecount(). This happened to be non-fatal
  as STX_CTRL_PERF_CNT_CNT0_SHIFT actually is zero, if we were using the
  second counter in the upper 32 bits this would be required though as the MI
  timecounter code doesn't support 64-bit counters/counter registers.
- Remove a redundant NULL assignment from the timecounter initialization.

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

12 years agoMFC: r223944
marius [Mon, 25 Jul 2011 18:57:49 +0000 (18:57 +0000)]
MFC: r223944

According to the OpenSolaris source the PCI latency and the cache line size
should be set for Sun ERI.
Tested by: yongari

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

12 years agoMFC: r223801
marius [Mon, 25 Jul 2011 18:54:28 +0000 (18:54 +0000)]
MFC: r223801

It can be useful to know which page still has mappings.

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

12 years agoMFC: r223800
marius [Mon, 25 Jul 2011 18:52:49 +0000 (18:52 +0000)]
MFC: r223800

- pmap_cache_remove() and pmap_protect_tte() are only used within pmap.c
  so static'ize them.
- Correct a typo.

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

12 years agoMFC: r223795
marius [Mon, 25 Jul 2011 18:46:54 +0000 (18:46 +0000)]
MFC: r223795

Call pmap_qremove() before freeing or unwiring the pages, otherwise
there's a window during which a page can be re-used before its previous
mapping is removed.

Reviewed by: alc

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

12 years agoMFC: r223721
marius [Mon, 25 Jul 2011 18:44:46 +0000 (18:44 +0000)]
MFC: r223721

UltraSPARC-IV CPUs seem to be affected by a not publicly documented
erratum causing them to trigger stray vector interrupts accompanied by a
state in which they even fault on locked TLB entries. Just retrying the
instruction in that case gets the CPU back on track though. OpenSolaris
also just ignores a certain number of stray vector interrupts.
While at it, implement the stray vector interrupt handling for SPARC64-VI
which use these for indicating uncorrectable errors in interrupt packets.

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

12 years agoMFC: r223720
marius [Mon, 25 Jul 2011 18:43:25 +0000 (18:43 +0000)]
MFC: r223720

Don't waste a delay slot.

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

12 years agoMFC: r223719
marius [Mon, 25 Jul 2011 18:41:52 +0000 (18:41 +0000)]
MFC: r223719

- For Cheetah- and Zeus-class CPUs don't flush all unlocked entries from
  the TLBs in order to get rid of the user mappings but instead traverse
  them an flush only the latter like we also do for the Spitfire-class.
  Also flushing the unlocked kernel entries can cause instant faults which
  when called from within cpu_switch() are handled with the scheduler lock
  held which in turn can cause timeouts on the acquisition of the lock by
  other CPUs. This was easily seen with a 16-core V890 but occasionally
  also happened with 2-way machines.
  While at it, move the SPARC64-V support code entirely to zeus.c. This
  causes a little bit of duplication but is less confusing than partially
  using Cheetah-class bits for these.
- For SPARC64-V ensure that 4-Mbyte page entries are stored in the 1024-
  entry, 2-way set associative TLB.
- In {d,i}tlb_get_data_sun4u() turn off the interrupts in order to ensure
  that ASI_{D,I}TLB_DATA_ACCESS_REG actually are read twice back-to-back.

Tested by:      Peter Jeremy (16-core US-IV), Michael Moll (2-way SPARC64-V)

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

12 years agoMFC: r223718
marius [Mon, 25 Jul 2011 18:34:42 +0000 (18:34 +0000)]
MFC: r223718

Using .comm to declare intrnames and eintrnames causes binutils 2.17.50 to
merge the two.

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

12 years agoMFC: r223648, r223949
marius [Mon, 25 Jul 2011 18:32:56 +0000 (18:32 +0000)]
MFC: r223648, r223949

- In gem_reset_rx() also reset the RX MAC which is necessary in order to
  get it out of a stuck condition that can be caused by GEM_MAC_RX_OVERFLOW.
- In gem_reset_rxdma() call gem_setladrf() in order to reprogram the RX
  filter and restore the previous content of GEM_MAC_RX_CONFIG. While at it
  consistently use the newly introduced sc_mac_rxcfg throughout the driver
  instead of reading the its old content.
- Increment if_iqdrops instead of if_ierrors in case of RX buffer allocation
  failure.
- According to the GEM datasheet the RX MAC should also be disabled in
  gem_setladrf() before changing its configuration.
- Add error messages to gem_disable_{r,t}x() and take advantage of these
  throughout the driver instead of duplicating their functionality all over
  the place.

In joint forces with: yongari

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

12 years agoMFC: r223379
marius [Mon, 25 Jul 2011 18:29:35 +0000 (18:29 +0000)]
MFC: r223379

Fix whitespace

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

12 years agoMFC: r223378
marius [Mon, 25 Jul 2011 18:28:12 +0000 (18:28 +0000)]
MFC: r223378

On machines where we don't need to lock the kernel TSB into the dTLB and
thus may basically use the entire 64-bit kernel address space reduce
VM_KMEM_SIZE_SCALE to 1 allowing kernel to use more memory.

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

12 years agoMFC: r223377
marius [Mon, 25 Jul 2011 18:26:54 +0000 (18:26 +0000)]
MFC: r223377

On machines where we don't need to lock the kernel TSB into the dTLB and
thus may basically use the entire 64-bit kernel address space increase
the kernel virtual memory to not be limited by VM_KMEM_SIZE_MAX.

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

12 years agoMFC: r223347
marius [Mon, 25 Jul 2011 18:25:30 +0000 (18:25 +0000)]
MFC: r223347

As astopgap minimize the sched_lock coverage in pmap_activate() in order
to reduce lock contention.

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

12 years agoMFC: r223235
marius [Mon, 25 Jul 2011 18:23:24 +0000 (18:23 +0000)]
MFC: r223235

- As with stray vector interrupts limit the reporting of stray level
  interrupts. Bringup on additional machine models repeatedly reveals
  firmware that enables interrupts behind our back, causing the console
  to be flooded otherwise.
- As with the regular interrupt counters using uint16_t instead of
  u_long for counting the stray vector interrupts should be more than
  sufficient.
- Cache the interrupt vector in intr_stray_vector().

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

12 years agoMFC: r223126 (partial)
marius [Mon, 25 Jul 2011 18:17:11 +0000 (18:17 +0000)]
MFC: r223126 (partial)

Don't include curcpu in the mask which is used as the IPI cookie as we
have to ignore it when sending the IPI anyway. Actually I can't think of
a good reason why this ever was done that way in the first place as it's
not even usefull for debugging.

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

12 years agoMFC: r222840
marius [Mon, 25 Jul 2011 17:56:06 +0000 (17:56 +0000)]
MFC: r222840

- For the case when tl1_align(_trap) is used to call rsf_fatal via
  RSF_FATAL we need to switch to alternate globals for KSTACK_CHECK just
  like tl1_data_excptn(_trap) does. This is more or less cosmetic because
  in case RSF_FATAL is called we're already heading south.
- Correct an END().
- Read the window state from the correct register for a CATR().

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

12 years agoMFC: r222828 (partial)
marius [Mon, 25 Jul 2011 17:54:04 +0000 (17:54 +0000)]
MFC: r222828 (partial)

- Test KTR_CPUMASK against pc_cpuid rather than pc_mid to match what the C
  version does.
- Initialize global registers early in the MP startup code so PCPU can be
  used.

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

12 years agoMFC: r221960
marius [Mon, 25 Jul 2011 17:37:53 +0000 (17:37 +0000)]
MFC: r221960

Recognize the SAB 82532 found in Fujitsu PRIMEPOWER650 and 900.

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

12 years agoMFC: r221958
marius [Mon, 25 Jul 2011 17:32:22 +0000 (17:32 +0000)]
MFC: r221958

Recognize the eeprom device found in Fujitsu PRIMEPOWER650 and 900.

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

12 years agoMFC: r221957
marius [Mon, 25 Jul 2011 17:31:09 +0000 (17:31 +0000)]
MFC: r221957

Add support for MK48T37.

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

12 years agoMFC: r221955
marius [Mon, 25 Jul 2011 17:20:36 +0000 (17:20 +0000)]
MFC: r221955

- Add 10baseT as an alias for 10baseT/UTP.
- Add shorthand aliases for common media+option combinations as announced
  by miibus(4) so that one can actually supply the media strings found in
  the dmesg output to ifconfig(8).

Obtained from: NetBSD (in principle)

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

12 years agoMFC: r221954
marius [Mon, 25 Jul 2011 17:18:46 +0000 (17:18 +0000)]
MFC: r221954

When setting media always and not just in case of switching to IFM_AUTO
clear the options of the current media, i.e. only inherit the instance,
which matches what NetBSD does. Without this it's really non-intuitive
that the following sequence:
ifconfig bge0 media 1000baseT mediaopt full-duplex
ifconfig bge0 media 100baseTX
results in 100baseTX full-duplex to be set or that:
ifconfig bge0 media autoselect mediaopt flowcontrol
ifconfig bge0 media 1000baseT mediaopt full-duplex
tries to set 1000baseT full-duplex with flowcontrol, which isn't suported
und thus fails while the following:
ifconfig re0 media 1000baseT mediaopt flowcontrol,full-duplex
ifconfig re0 media autoselect
just switches to autoselection without flowcontrol.

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

12 years agoMFC: r221344
marius [Mon, 25 Jul 2011 17:14:49 +0000 (17:14 +0000)]
MFC: r221344

Correct spelling in comments.

Submitted by: brucec

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

12 years agoMFC: r220951
marius [Mon, 25 Jul 2011 17:12:52 +0000 (17:12 +0000)]
MFC: r220951

Correct spelling in comments.

Submitted by: brucec

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

12 years agoMFC: r220945
marius [Mon, 25 Jul 2011 17:01:13 +0000 (17:01 +0000)]
MFC: r220945

Correct spelling.

Submitted by: brucec

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

12 years agoMFC: r210943
marius [Mon, 25 Jul 2011 16:20:00 +0000 (16:20 +0000)]
MFC: r210943

Figure which is the IO and MEM bars- do not assume that they are in
a fixed order.

PR: 149220
Obtained from: John Baldwin

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

12 years agoFlush output buffers before closing TCP session. Fixes the case where
bz [Mon, 25 Jul 2011 15:14:03 +0000 (15:14 +0000)]
Flush output buffers before closing TCP session.  Fixes the case where
the proxy would eat the 221 response coming from the server towards the
client.

This is a commit as HEAD got the change with the entire pf45 import.

PR: bin/154469
Obtained from: OpenBSD r1.18
MFC after: 2 weeks

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

12 years agoMFC: r220944, r220950
marius [Mon, 25 Jul 2011 15:10:52 +0000 (15:10 +0000)]
MFC: r220944, r220950

- Correct spelling. [1]
- Remove variables which are unused besides initialization. [2]

Submitted by: brucec, N.J. Mann [1], Christoph Mallon [2]

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

12 years agoMFC: r220943
marius [Mon, 25 Jul 2011 15:05:37 +0000 (15:05 +0000)]
MFC: r220943

Correct spelling in a comment.

Submitted by: brucec

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

12 years agoMFC: r220941
marius [Mon, 25 Jul 2011 15:01:37 +0000 (15:01 +0000)]
MFC: r220941

Correct spelling in comments.

Submitted by: brucec

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

12 years agoMFC: r220940
marius [Mon, 25 Jul 2011 14:46:24 +0000 (14:46 +0000)]
MFC: r220940

Correct spelling in comments.

Submitted by: brucec

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

12 years agoMFC: r220939
marius [Mon, 25 Jul 2011 14:45:17 +0000 (14:45 +0000)]
MFC: r220939

Correct spelling in comments.

Submitted by: brucec

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