]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
13 years agoMFC r208841:
nwhitehorn [Mon, 22 Nov 2010 17:14:29 +0000 (17:14 +0000)]
MFC r208841:
Add support for the I2C busses hanging off Apple system management chips.

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

13 years agoMFC r205506:
nwhitehorn [Mon, 22 Nov 2010 17:13:04 +0000 (17:13 +0000)]
MFC r205506:
Get nexus(4) out of the RTC business. The interface used by nexus(4)
in Open Firmware was Apple-specific, and we have complete coverage of Apple
system controllers, so move RTC responsibilities into the system controller
drivers. This avoids interesting problems from manipulating these devices
through Open Firmware behind the backs of their drivers.

Obtained from: NetBSD

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

13 years agoMFC r215100:
nwhitehorn [Mon, 22 Nov 2010 17:09:42 +0000 (17:09 +0000)]
MFC r215100:
Disabling CPU NAP modes during SMU commands is a hack needed only on U3
systems. Don't use it on non-U3 systems to allow cpu_idle() to work
correctly.

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

13 years agoMFC r204127,215101:
nwhitehorn [Mon, 22 Nov 2010 17:06:24 +0000 (17:06 +0000)]
MFC r204127,215101:
Provide support for the DEEPNAP power-saving mode found on the 970MP.

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

13 years agoMFC r214575:
nwhitehorn [Mon, 22 Nov 2010 17:03:09 +0000 (17:03 +0000)]
MFC r214575:
Allow access to the HT I/O port space on the IBM CPC9X5 northbridge chips.

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

13 years agoMFC r214610:
nwhitehorn [Mon, 22 Nov 2010 17:01:40 +0000 (17:01 +0000)]
MFC r214610:
Map userland copyin/copyout segment no-execute while it is mapped into the
kernel.

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

13 years agoMFC r213986:
nwhitehorn [Mon, 22 Nov 2010 16:58:07 +0000 (16:58 +0000)]
MFC r213986:
Fix an XXX comment by answering 'no'. OS X does not set the day-of-week
counter on SMU-based systems, which causes FreeBSD to reject the RTC time
when used in a dual-boot environment. Since we don't use the day-of-week
counter anyway, solve this by just not checking that it matches.

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

13 years agoWe're a bit under a week from Code Freeze for the upcoming 8.2-RELEASE
kensmith [Mon, 22 Nov 2010 16:09:57 +0000 (16:09 +0000)]
We're a bit under a week from Code Freeze for the upcoming 8.2-RELEASE
cycle.  Warn people tracking stable/8 that the branch may be more
active than usual.

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

13 years agoMFC r212247 & r212724 from head:
brian [Mon, 22 Nov 2010 09:32:54 +0000 (09:32 +0000)]
MFC r212247 & r212724 from head:
    Handle geli-encrypted root disk devices.
    Add support for identifying a journaled root filesystem.
    Fix support for identifying the given /dev/vinum/root example.

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

13 years agoMFC r215339:
netchild [Mon, 22 Nov 2010 08:35:06 +0000 (08:35 +0000)]
MFC r215339:
  Some style(9) fixes.

  Submitted by: arundel

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

13 years agoMFC r215338:
netchild [Mon, 22 Nov 2010 08:21:58 +0000 (08:21 +0000)]
MFC r215338:
  - print out the PID and program name of the program trying to use an
    unsupported futex operation
  - for those futex operations which are known to be not supported,
    print out which futex operation it is
  - shortcut the error return of the unsupported FUTEX_CLOCK_REALTIME in
    some cases:
      FUTEX_CLOCK_REALTIME can be used to tell linux to use
      CLOCK_REALTIME instead of CLOCK_MONOTONIC. FUTEX_CLOCK_REALTIME
      however must only be set, if either FUTEX_WAIT_BITSET or
      FUTEX_WAIT_REQUEUE_PI are set too. If that's not the case
      we can die with ENOSYS right at the beginning.

  Submitted by: arundel
  Reviewed by: rdivacky (earlier iteration of the patch)
  MFC after: 1 week

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

13 years agoMFC r215607:
kevlo [Mon, 22 Nov 2010 06:41:05 +0000 (06:41 +0000)]
MFC r215607:
Fix missing closedir()

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

13 years agoMFC r215519:
kevlo [Mon, 22 Nov 2010 06:38:52 +0000 (06:38 +0000)]
MFC r215519:
Fix fd leak

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

13 years agoMFC r215518:
kevlo [Mon, 22 Nov 2010 06:37:21 +0000 (06:37 +0000)]
MFC r215518:
Close file and directory descriptors

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

13 years agoMFC r215335:
kevlo [Mon, 22 Nov 2010 06:31:42 +0000 (06:31 +0000)]
MFC r215335:
Remove unused struct rue_type

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

13 years agoMFC r209669
alc [Mon, 22 Nov 2010 06:25:56 +0000 (06:25 +0000)]
MFC r209669
  Improve the comment and man page for vm_page_alloc().

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

13 years agoMFC 215334:
dougb [Mon, 22 Nov 2010 00:31:52 +0000 (00:31 +0000)]
MFC 215334:

Remove references to MAKEDEV(8)

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

13 years agoMFC 215250:
dougb [Mon, 22 Nov 2010 00:10:14 +0000 (00:10 +0000)]
MFC 215250:

Remove references to the long-gone ramdisk

Submitted by: Garrett Cooper <yanegomi@gmail.com>

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

13 years agoMFC r203567 (by antoine):
brucec [Sun, 21 Nov 2010 18:04:28 +0000 (18:04 +0000)]
MFC r203567 (by antoine):
Update files to remove when MK_KERBEROS=no.

MFC r203561 (by antoine):
Add files to remove when MK_GSSAPI=no.

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

13 years agoMFC r215306:
brucec [Sun, 21 Nov 2010 13:41:04 +0000 (13:41 +0000)]
MFC r215306:

libatm_p.a, libkeycap_p.a and libmytinfo_p.a are already in ObsoleteFiles.inc.
liblwres.so.10 has been replaced by liblwres.so.50.
usr/share/man/man8/nsupdate.8.gz was moved to usr/share/man/man1/nsupdate.1.gz
in bind 9.4.3.

Reported by: arundel

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

13 years agoMFC r212262:
kib [Sun, 21 Nov 2010 13:25:10 +0000 (13:25 +0000)]
MFC r212262:
Add aesni(4) manpage.

MFC r212268:
Grammar fixes.

MFC r212388 (by brueffer):
Some more grammar, wording and mdoc fixes.

MFC r212389 (by brueffer):
Xref aesni(4).

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

13 years agoBring aesni(4) driver from HEAD.
kib [Sun, 21 Nov 2010 13:20:14 +0000 (13:20 +0000)]
Bring aesni(4) driver from HEAD.

MFC r210409:
Crypto(4) driver for AESNI.

MFC r213064 (by pjd):
Simplify code a bit.

MFC r213066 (by pjd):
Add support for CRD_F_KEY_EXPLICIT flag.

MFC r213069 (by pjd):
Add support for CRYPTO_AES_XTS.

MFC r213166 (by pjd):
Fix two copy&paste bugs.

MFC r213797 (by dim):
Change two missed instances of 'retq' in aeskeys_i386.S to 'retl'.

MFC r215427:
Only save FPU context when not executing in the context of the crypto
thread.

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

13 years agoMFC r215286:
brucec [Sun, 21 Nov 2010 13:04:53 +0000 (13:04 +0000)]
MFC r215286:

Connect to ftp2.tr.freebsd.org when the Turkey #2 mirror is selected.

PR: bin/128587
Submitted by:  Mehmet Kose <mehmet.kose at gmail.com>

MFC r215287:

"Web" should not be all upper-case because it's not an acronym.

PR: bin/130366
Submitted by: Royce Williams <royce at alaska.net>

MFC r215290:

ntpdate(8) hosts are now configured in rc.conf via ntpdate_hosts.

PR: bin/148350
Submitted by: Joel FAEDI <joel.faedi at gmail.com>

MFC r215291:

Remove support for cpioVerbose=medium because bsdcpio doesn't support the
"-V" flag.

PR: bin/151821
Submitted by: Devin Teske <dteske at vicor.com>

MFC r215296:

Fix use of CD_VERSION=any in cdrom.inf by calling strcmp instead of
variable_cmp.

PR: bin/142960
Submitted by: G. Paul Ziemba <p-fbsd-bugs at ziemba.us>

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

13 years agoMFC r215284, r215285:
brucec [Sun, 21 Nov 2010 12:52:33 +0000 (12:52 +0000)]
MFC r215284, r215285:

When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.
This is the same change that was made in rev 1.33 of boot/i386/btx/btx.S.

PR: i386/91871
Submitted by: Bjorn Konig <bkoenig at cs.tu-berlin.de>

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

13 years agoMFC r215281, r215282, r215283, r215304:
brucec [Sun, 21 Nov 2010 12:47:54 +0000 (12:47 +0000)]
MFC r215281, r215282, r215283, r215304:

Add some descriptions to sys/kern sysctls.
Fix style(9) issues.

PR: kern/148710
PR: kern/148510

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

13 years agoMFC r214125:
delphij [Sun, 21 Nov 2010 12:40:16 +0000 (12:40 +0000)]
MFC r214125:

In syscall_module_handler(): all switch branches return, remove
unreached code as pointed out in a Chinese forum [1].

[1] http://www.freebsdchina.org/forum/viewtopic.php?t=50619

Pointed out by: btw616 <btw s qq com>

MFC r214181:

Call chainevh callback when we are invoked with neither MOD_LOAD nor
MOD_UNLOAD.  This makes it possible to add custom hooks for other module
events.

Return EOPNOTSUPP when there is no callback available.

Pointed out by: jhb
Reviewed by: jhb

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

13 years agoRevert r215618, ABI breakage ahead.
bschmidt [Sun, 21 Nov 2010 12:32:35 +0000 (12:32 +0000)]
Revert r215618, ABI breakage ahead.

Pointy hat to: me

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

13 years agoMFC r210372:
simon [Sun, 21 Nov 2010 11:10:09 +0000 (11:10 +0000)]
MFC r210372:

Add support for creating the archived log filenames using a time-stamp
instead of the traditional simple counter.

Using the time-stamp based file-names, once a log file is archived, it
will not change name until it is deleted.  This means that many backup
systems will only perform one backup of the archived log file, instead
for performing a new backup of the logfile upon each logfile rotation.

This implementation is separate from the patches in the mentioned PR,
as I wasn't aware of the existence of the PR until after I had
implemented the same functionality as the patches in the PR provide.
Unlike the PR, this new code does honor the 'log count' in
newsyslog.conf so old logfiles are deleted.  This new code does not
currently support never deleting the archived logfiles.

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

13 years agoMFC r215249:
tuexen [Sun, 21 Nov 2010 11:08:22 +0000 (11:08 +0000)]
MFC r215249:
Add for existing protocol entries the missing SCTP port allocations
and add protocol entries for protocols which have SCTP port allocations.
These entries are according to
http://www.iana.org/assignments/port-numbers
as of today. Also add SCTP port allocation entires for the
echo, daytime, and chargen service.
Discussed with rwatson@

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

13 years agoMFC r208649 by gordon (needed for MFC of r210372):
simon [Sun, 21 Nov 2010 11:04:19 +0000 (11:04 +0000)]
MFC r208649 by gordon (needed for MFC of r210372):

Add file include processing for newsyslog.

Format for the include line in /etc/newsyslog.conf is:
<include> /etc/defaults/newsyslog.conf

Other notes of interest:
Globbing is supported in <include> statements.
Properly detect circular include loop dependencies.

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

13 years agoMFC r203422,r203556:
bschmidt [Sun, 21 Nov 2010 11:03:22 +0000 (11:03 +0000)]
MFC r203422,r203556:
When taking the AMPDU reorder fastpath, need_tap wasn't being
initialized. Initialize on declaration to avoid this.

Found with: clang static analyzer
Committed by: rpaulo

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

13 years agoMFC r208648 by gordon (needed for MFC of r210372):
simon [Sun, 21 Nov 2010 11:01:56 +0000 (11:01 +0000)]
MFC r208648 by gordon (needed for MFC of r210372):

Convert newsyslog to using queue(3) macros instead of a home rolled version.

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

13 years agoMFC r199076:
bschmidt [Sun, 21 Nov 2010 10:58:18 +0000 (10:58 +0000)]
MFC r199076:
The isr_intval in ieee80211req_scan_result structure should be 16 bit.
This makes ifconfig list scan display the correct beacon interval
(previously it would int overflow). As a side effect, this makes the
ieee80211req_scan_result word aligned.

Submitted by: Paul B Mahol <onemda at gmail.com>
Committed by: rpaulo

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

13 years agoMFC r200242:
bschmidt [Sun, 21 Nov 2010 10:55:43 +0000 (10:55 +0000)]
MFC r200242:
Fix typo in comment

Submitted by: Paul B Mahol <onemda at gmail.com>
Committed by: rpaulo

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

13 years agoMFC r207322:
bschmidt [Sun, 21 Nov 2010 10:52:18 +0000 (10:52 +0000)]
MFC r207322:
Fix typo. No functional change.

Obtained from: DragonFlyBSD
Committed by: rpaulo

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

13 years agoCompare the address of the array, not the array.
bschmidt [Sun, 21 Nov 2010 10:49:40 +0000 (10:49 +0000)]
Compare the address of the array, not the array.

Committed by: rpaulo
Found with: Coverity Prevent(tm)
CID: 3690

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

13 years agoMFC r208028 by uqs:
simon [Sun, 21 Nov 2010 10:45:10 +0000 (10:45 +0000)]
MFC r208028 by uqs:

mdoc: move remaining sections into consistent order

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

13 years agoMFC r215309:
kib [Sun, 21 Nov 2010 10:00:43 +0000 (10:00 +0000)]
MFC r215309:
Use symbolic names instead of hardcoding values for magic p_osrel constants.

MFC r215321:
Do not use __FreeBSD_version prefix for the special osrel version.

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

13 years agoMFC r215307:
kib [Sun, 21 Nov 2010 09:50:11 +0000 (09:50 +0000)]
MFC r215307:
Implement a (soft) stack guard page for auto-growing stack mappings.

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

13 years agoMFC: r215325
marius [Sun, 21 Nov 2010 00:53:19 +0000 (00:53 +0000)]
MFC: r215325

Use the correct variable for determining the verbosity level in mpt_lprtc().
While at it, fix the whitespace of that macro.

PR: 149502
Submitted by: Andrew Boyer

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

13 years agoMFC: r215295
marius [Sun, 21 Nov 2010 00:50:29 +0000 (00:50 +0000)]
MFC: r215295

Let cryptosoft(4) add its pseudo-device with a specific unit number and its
probe method return BUS_PROBE_NOWILDCARD so it doesn't get attached to real
devices hanging off of nexus(4) with no specific devclass set. Actually, the
more desirable fix for this would be to get rid of the newbus interface of
cryptosoft(4) altogether but apparently crypto(9) was written with support
for cryptographic hardware in mind so that approach would require some KPI
breaking changes which don't seem worth it.

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

13 years agoMFC: r215093
marius [Sun, 21 Nov 2010 00:45:18 +0000 (00:45 +0000)]
MFC: r215093

Enable reservation-based physical memory allocation.  Even without the
creation of large page mappings in the pmap, it can provide modest
performance benefits.  In particular, for a "buildworld" on a 2x 1GHz
Ultrasparc IIIi it reduced the wall clock time by 2.2% and the system
time by 12.6%.

Tested by: marius@

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

13 years agoMFC r215410:
tuexen [Sat, 20 Nov 2010 21:44:18 +0000 (21:44 +0000)]
MFC r215410:
Add an SCTP socket option to retrieve the number of timeouts
of an association.

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

13 years agoMFC r215305:
tuexen [Sat, 20 Nov 2010 21:41:07 +0000 (21:41 +0000)]
MFC r215305:
Take out special code for disable CRC computations on
the loopback interface for IPv6. It will be handled
by the loopback interface.

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

13 years agoMFC r215301:
tuexen [Sat, 20 Nov 2010 21:39:08 +0000 (21:39 +0000)]
MFC r215301:
Simplify sctp_delayed_cksum() a bit.

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

13 years agoMFC r215241:
tuexen [Sat, 20 Nov 2010 21:24:17 +0000 (21:24 +0000)]
MFC r215241:

Fix a locking issue reported by brucec@ affecting
1-to-1 style sockets which have not yet been
accepted.

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

13 years agoMFC r215199:
tuexen [Sat, 20 Nov 2010 21:22:20 +0000 (21:22 +0000)]
MFC r215199:
Don't print an empty line when printing mapping arrays.

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

13 years agoMFC r215134,r215198:
tuexen [Sat, 20 Nov 2010 21:20:39 +0000 (21:20 +0000)]
MFC r215134,r215198:
Fix issues with the SACK/NR-SACK generation code.

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

13 years agoMFC r215039:
tuexen [Sat, 20 Nov 2010 21:15:44 +0000 (21:15 +0000)]
MFC r215039:
Improve the scalability by using the local and remote port when
putting inps in the tcpephash.

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

13 years agoMFC r215034:
brucec [Sat, 20 Nov 2010 20:34:13 +0000 (20:34 +0000)]
MFC r215034:

Fix typos.

PR: bin/148894
Submitted by: olgeni

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

13 years agoMFC r215211: echo(1): Clarify portability and mention literal "--" handling.
jilles [Sat, 20 Nov 2010 19:39:12 +0000 (19:39 +0000)]
MFC r215211: echo(1): Clarify portability and mention literal "--" handling.

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

13 years agoMFC r215035:
tuexen [Sat, 20 Nov 2010 19:39:02 +0000 (19:39 +0000)]
MFC r215035:
Fix a bug which resulted in kevent() reporting an event twice on
1-to-1 style sockets when an ABORT was received.

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

13 years agoMFC r215184: sh: Remove unused man page for echo builtin.
jilles [Sat, 20 Nov 2010 19:37:33 +0000 (19:37 +0000)]
MFC r215184: sh: Remove unused man page for echo builtin.

The information in sh(1) about the echo builtin is equivalent, though less
extensive.

The echo(1) man page (bin/echo/echo.1) is different.

Unfortunately, sh's echo builtin and /bin/echo have gone out of sync and
this probably cannot be fixed any more.

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

13 years agoMFC r214939:
tuexen [Sat, 20 Nov 2010 19:37:00 +0000 (19:37 +0000)]
MFC r214939:
Do not have the MTU table twice in the code. Therefore move the
function from the timer code to util, rename it appropriately and
also fix a bug in sctp_get_prev_mtu(), where calling it with a
value existing in the MTU table did not return a smaller one.

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

13 years agoMFC r214933:
tuexen [Sat, 20 Nov 2010 19:35:13 +0000 (19:35 +0000)]
MFC r214933:
Remove two functions which are not used.

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

13 years agoMFC r214928:
tuexen [Sat, 20 Nov 2010 19:33:42 +0000 (19:33 +0000)]
MFC r214928:
 * Use exponential backoff for retransmission of SHUTDOWN and
   SHUTDOWN-ACK chunks.
 * While there, do some cleanups.

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

13 years agoMFC r214918:
tuexen [Sat, 20 Nov 2010 19:31:31 +0000 (19:31 +0000)]
MFC r214918:
Not only stop all timers when entering the SHUTDOWN_SENT state,
but also when entering the SHUTDOWN_ACK_SENT state.

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

13 years agoMFC r214877:
tuexen [Sat, 20 Nov 2010 19:29:18 +0000 (19:29 +0000)]
MFC r214877:

Do not resend DATA chunks without delay when dropped by the peer and
the CRC was correct.

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

13 years agoMFC r214876
tuexen [Sat, 20 Nov 2010 19:26:35 +0000 (19:26 +0000)]
MFC r214876
 * Fix an accounting bug regarding SACK/NR-SACK chunks.
 * Fix the generation of the SACK/NR-SACK gap lists.

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

13 years agoAdd a second fix-up for the PC98 case.
attilio [Sat, 20 Nov 2010 18:24:09 +0000 (18:24 +0000)]
Add a second fix-up for the PC98 case.
PC98 cases might be explicit in presence of a difference with i386
because both are defined, leading to mishandling of code in
circumstances like this.

Reported by: nyan

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

13 years agoMFC r215183: Make POLL_ERR and POLL_HUP different.
jilles [Sat, 20 Nov 2010 16:46:16 +0000 (16:46 +0000)]
MFC r215183: Make POLL_ERR and POLL_HUP different.

The kernel currently does not generate any of the POLL_* constants, but
some applications use them and break if they are not all distinct.

PR: kern/126076

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

13 years agofix a mismerge in r215521: MFC imports of ACPICA revisions 20100428
avg [Sat, 20 Nov 2010 16:42:19 +0000 (16:42 +0000)]
fix a mismerge in r215521: MFC imports of ACPICA revisions 20100428
through 20101013

The mismerge resulted in ia64 build breakage.
This is a direct commit.

Pointyhat to: avg

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

13 years agoMFC r201793:
bschmidt [Sat, 20 Nov 2010 13:28:32 +0000 (13:28 +0000)]
MFC r201793:
Fix #ifdefs so that GCC 4.4 doesn't complain about it.

Committed by: trasz

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

13 years agoMFC r213321:
bschmidt [Sat, 20 Nov 2010 13:26:09 +0000 (13:26 +0000)]
MFC r213321:
Fix background roaming to actually work in AUTO roaming mode.

IEEE80211_F_BGSCAN is a vap flag, not a channel flag. So although bgscan
occured, sta_roam_check() would never be called.

Committed by: adrian

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

13 years agoMFC r209092:
bschmidt [Sat, 20 Nov 2010 13:24:05 +0000 (13:24 +0000)]
MFC r209092:
Remove GNU-style struct initialization.

Committed by: ed

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

13 years agoMFC r212853-212855:
bschmidt [Sat, 20 Nov 2010 13:12:59 +0000 (13:12 +0000)]
MFC r212853-212855:
Rewrite parts of the calibration code which is run while bringing up
the device:
- Group functions used for initial calibration.
- Unobscure some of the code by moving it into its own functions.
- Get rid of some magic numbers.
- Create similar structure as the reference driver has, this should
  make further syncs easier.

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

13 years agoMFC r199018 & r199037:
bschmidt [Sat, 20 Nov 2010 12:59:01 +0000 (12:59 +0000)]
MFC r199018 & r199037:
Turn off debug output by default.

Committed by: dougb

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

13 years agoMFC r215289:
bschmidt [Sat, 20 Nov 2010 12:28:24 +0000 (12:28 +0000)]
MFC r215289:
The ni_rctls checks are used to verify that a ratectl algo has set up
its internal data. This has been used to bypass missing calls in drivers
which do not use the ratectl framework correctly. Issue is, not all algos
use that variable, or even have internal data, therefore valid calls are
not done. Fix this by removing the checks, all driver issues should be
resolved.

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

13 years agoMFC r215244:
bschmidt [Sat, 20 Nov 2010 12:26:31 +0000 (12:26 +0000)]
MFC r215244:
Some device drivers calculate various timing related things based on
the currently selected rate. The calculations of course need a valid
rate. To make that possible before any call to node_rate() is done,
initialize ni_txrate on none_node_init() calls.

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

13 years agoMFC r214894:
bschmidt [Sat, 20 Nov 2010 12:24:26 +0000 (12:24 +0000)]
MFC r214894:
Instead of using the AMRR ratectl algo as default for drivers which have
the IEEE80211_C_RATECTL flag set, default to NONE for all drivers. Only if
a driver calls ieee80211_ratectl_init() check if the NONE algo is still
selected and try to use AMRR in that case. Drivers are still free to use
any other algo by calling ieee80211_ratectl_set() prior to the
ieee80211_ratectl_init() call.

After this change it is now safe to assume that a ratectl algo is always
available and selected, which renders the IEEE80211_C_RATECTL flag pretty
much useless. Therefore revert r211314 and 211546.

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

13 years agoMFC r207323:
bschmidt [Sat, 20 Nov 2010 12:22:02 +0000 (12:22 +0000)]
MFC r207323:
When in the RUN -> AUTH -> RUN FSM transition happens, we'll call the
ratectl_node_init() functions and since ni_rtctls was already malloc'ed()
we will panic. Fix this by using the already malloc'ed pointer.

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

13 years agoMFC r215248:
kib [Sat, 20 Nov 2010 11:14:06 +0000 (11:14 +0000)]
MFC r215248:
In printfile(), exit the process instead of only printing the warning.
Adjust style.

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

13 years agoMFC r215260:
mm [Sat, 20 Nov 2010 10:12:20 +0000 (10:12 +0000)]
MFC r215260:

Disable VFS_HOLD placed on mnt_vnodecovered during the mount of a snapshot
and VFS_RELE on a non-existing hold on snapshot parent's z_vfs.

This disables the changes from OpenSolaris onnv-revision 9234:bffdc4fc05c4
(bug IDs: 67921396794830) - not applicable to FreeBSD.

This fixes the process hang if umounting a manually mounted snapshot.

Reported by: Alexander Zagrebin <alexz@visp.ru>
Approved by: delphij (mentor)

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

13 years agoMFC r212281 and 212282
rstone [Sat, 20 Nov 2010 04:54:58 +0000 (04:54 +0000)]
MFC r212281 and 212282

In munmap() downgrade the vm_map_lock to a read lock before taking a read
lock on the pmc-sx lock.  This prevents a deadlock with
pmc_log_process_mappings, which has an exclusive lock on pmc-sx and tries
to get a read lock on a vm_map.  Downgrading the vm_map_lock in munmap
allows pmc_log_process_mappings to continue, preventing the deadlock.

Without this change I could cause a deadlock on a multicore 8.1-RELEASE
system by having one thread constantly mmap'ing and then munmap'ing a
PROT_EXEC mapping in a loop while I repeatedly invoked and stopped pmcstat
in system-wide sampling mode.

Approved by: emaste (mentor)

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

13 years agoMFC r213853
thompsa [Fri, 19 Nov 2010 21:04:18 +0000 (21:04 +0000)]
MFC r213853

 - Add missing LibUSB API functions:
   * libusb_strerror()
   * libusb_get_driver[_np]()
   * libusb_detach_kernel_driver[_np]()
 - Factor out setting of non-blocking flag inside libusb.
 - Add missing NULL check after libusb_get_device() call.
 - Correct some wrong error codes due to copy and paste error.

 PR: usb/150546
 Submitted by: Robert Jenssen, Alexander Leidinger

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

13 years agoFix-up r215539 by specifying correctly the ISA headers are they are not
attilio [Fri, 19 Nov 2010 20:23:01 +0000 (20:23 +0000)]
Fix-up r215539 by specifying correctly the ISA headers are they are not
shared on STABLE_8.

Reported by: kib

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

13 years agoMFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me:
attilio [Fri, 19 Nov 2010 17:49:16 +0000 (17:49 +0000)]
MFC r214457,214515,214584,214676,214681,214686 by jhb, nyan and me:
Move nexus in x86 and cleaning it up.

Sponsored by: Sandvine Incorporated

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

13 years agoMFC: r200874
marius [Fri, 19 Nov 2010 17:11:12 +0000 (17:11 +0000)]
MFC: r200874

Convert drivers somehow missed in r200874 (merged to stable/8 in r202225)
to multipass probing.

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

13 years agoMFC 204352, 208028, 209266, 209399, 210723, 213672, 215046:
jhb [Fri, 19 Nov 2010 17:08:15 +0000 (17:08 +0000)]
MFC 204352, 208028, 209266, 209399, 210723, 213672, 215046:
- Fixed static linkage.
- Document that mptutil/mpt do not support RAID volumes in excess of 2TB.
- Report subcommand handler errors so that tools that invoke mptutil can
  robustly report errors.
- Save errno values before calling warn(3) so that errors are correctly
  reported.
- Check for malloc() failures.

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

13 years agoMFC: r215300
marius [Fri, 19 Nov 2010 17:07:32 +0000 (17:07 +0000)]
MFC: r215300

Remove redundant cases and a style(9) bug.

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

13 years agoMFC: r214879
marius [Fri, 19 Nov 2010 17:04:55 +0000 (17:04 +0000)]
MFC: r214879

Implement pmap_is_prefaultable().

Reviewed by: alc (with bugfix)

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

13 years agoMFC 214782:
jhb [Fri, 19 Nov 2010 16:52:18 +0000 (16:52 +0000)]
MFC 214782:
Update startup_alloc() to support multi-page allocations and allow internal
zones whose objects are larger than a page to use startup_alloc().  This
allows allocation of zone objects during early boot on machines with a large
number of CPUs since the resulting zone objects are larger than a page.

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

13 years agoMFC 215001:
jhb [Fri, 19 Nov 2010 16:24:12 +0000 (16:24 +0000)]
MFC 215001:
Only dump the values of the PMC and CMCI local vector table entries on a
local APIC if those LVT entries are valid.  This quiets spurious illegal
register local APIC errors during boot on a CPU that doesn't support those
vectors.

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

13 years agoMFC imports of ACPICA revisions 20100428 through 20101013
avg [Fri, 19 Nov 2010 14:26:45 +0000 (14:26 +0000)]
MFC imports of ACPICA revisions 20100428 through 20101013

Plus related changes and ehancements.

Full list of revisions:

o-----------------------------------------------------------------------
r207344 | jkim | 2010-04-29 01:25:27 +0300 (Thu, 29 Apr 2010) | 2 lines
Merge ACPICA 20100428.
o-----------------------------------------------------------------------
r209065 | jkim | 2010-06-11 22:58:41 +0300 (Fri, 11 Jun 2010) | 2 lines
Simplify a function for getting brightness levels.
o-----------------------------------------------------------------------
r209746 | jkim | 2010-07-06 23:57:28 +0300 (Tue, 06 Jul 2010) | 2 lines
Merge ACPICA 20100702.
o-----------------------------------------------------------------------
r209747 | jkim | 2010-07-07 00:41:08 +0300 (Wed, 07 Jul 2010) | 2 lines
Fix mis-merges in the previous commit.
o-----------------------------------------------------------------------
r210150 | jkim | 2010-07-16 02:24:06 +0300 (Fri, 16 Jul 2010) | 3 lines
If there is any pending sleep request, disallow entering S5 state.
Otherwise, bad things may happen. ;-)
o-----------------------------------------------------------------------
r210976 | jkim | 2010-08-07 02:11:19 +0300 (Sat, 07 Aug 2010) | 2 lines
Merge ACPICA 20100806.
o-----------------------------------------------------------------------
r211763 | mav | 2010-08-24 21:07:59 +0300 (Tue, 24 Aug 2010) | 4 lines
When ACPI reports current battery consumption rate in mAmps, print it also
in mWatts. Values in mAmps are not always suitable, because they depend on
battery voltage, which depends on battery type and charge level.
o-----------------------------------------------------------------------
r212761 | jkim | 2010-09-16 23:08:00 +0300 (Thu, 16 Sep 2010) | 2 lines
Merge ACPICA 20100915.
o-----------------------------------------------------------------------
r213772 | rpaulo | 2010-10-13 14:38:24 +0300 (Wed, 13 Oct 2010) | 3 lines
Mark acpi_bus_number() as __unused. This allows clang to this file
without any warnings.
o-----------------------------------------------------------------------
r213783 | jkim | 2010-10-13 19:30:41 +0300 (Wed, 13 Oct 2010) | 4 lines
Remove acpi_bus_number() completely.  It had to be removed in r212761.
Pointed out by: jhb
o-----------------------------------------------------------------------
r213787 | jkim | 2010-10-13 20:06:25 +0300 (Wed, 13 Oct 2010) | 2 lines
Clean up unused headers.
o-----------------------------------------------------------------------
r213806 | jkim | 2010-10-14 00:37:02 +0300 (Thu, 14 Oct 2010) | 2 lines
Merge ACPICA 20101013.
o-----------------------------------------------------------------------
r214390 | jkim | 2010-10-26 21:59:50 +0300 (Tue, 26 Oct 2010) | 18 lines
Add two new loader tunables 'hw.acpi.install_interface' and
'hw.acpi.remove_interface'.  hw.acpi.install_interface lets you install new
interfaces.  Conversely, hw.acpi.remove_interface lets you remove OS
interfaces from the pre-defined list in ACPICA.  For example,
hw.acpi.install_interface="FreeBSD"
lets _OSI("FreeBSD") method to return 0xffffffff (or success) and
hw.acpi.remove_interface="Windows 2009"
lets _OSI("Windows 2009") method to return zero (or failure).  Both are
comma-separated lists and leading white spaces are ignored.  For example,
the following examples are valid:
hw.acpi.install_interface="Linux, FreeBSD"
hw.acpi.remove_interface="Windows 2006, Windows 2006.1"
o-----------------------------------------------------------------------
r214401 | jkim | 2010-10-27 00:22:55 +0300 (Wed, 27 Oct 2010) | 3 lines
Document newly added loader tunables "hw.acpi.install_interface" and
"hw.acpi.remove_interface".
o-----------------------------------------------------------------------
r214765 | jkim | 2010-11-04 01:16:35 +0200 (Thu, 04 Nov 2010) | 4 lines
Adjust a comment to clarify why \_SB_ and \_TZ_ are defined as device type
in ACPICA.  Reshuffle the code a bit to make sure this kludge only applies
to these two specical cases and to make it cleaner.
o-----------------------------------------------------------------------
r214848 | jkim | 2010-11-05 21:50:09 +0200 (Fri, 05 Nov 2010) | 13 lines
Fix a use-after-free bug for extended IRQ resource[1].  When _PRS buffer is
copied as a template for _SRS, a string pointer for descriptor name is also
copied and it becomes stale as soon as it gets de-allocated[2].  Now _CRS is
used as a template for _SRS as ACPI specification suggests if it is usable.
The template from _PRS is still utilized but only when _CRS is not available
or broken.  To avoid use-after-free the problem in this case, however, only
mandatory fields are copied, optional data is removed, and structure length
is adjusted accordingly.
Reported by: hps[1]
Analyzed by: avg[2]
Tested by: hps
o-----------------------------------------------------------------------
r214849 | jkim | 2010-11-05 22:24:26 +0200 (Fri, 05 Nov 2010) | 2 lines
Add a forgotten change from the previous commit.
o-----------------------------------------------------------------------
r214998 | jkim | 2010-11-08 21:52:14 +0200 (Mon, 08 Nov 2010) | 2 lines
Consistently use padding `_' in the comment.
o-----------------------------------------------------------------------

Reviewed by: jkim
Tested by: Alexandre "Sunny" Kovalenko <gaijin.k@ovi.com>
On behalf of: jkim

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

13 years agoMFC r209686,r209702:
kib [Fri, 19 Nov 2010 10:14:07 +0000 (10:14 +0000)]
MFC r209686,r209702:
Reimplement vm_object_page_clean(), using the fact that vm object memq
is ordered by page index.

Reviewed by: alc

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

13 years agoMFC r215397: fix misspelling in a comment
avg [Fri, 19 Nov 2010 10:01:30 +0000 (10:01 +0000)]
MFC r215397: fix misspelling in a comment

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

13 years agoMerge the kern_fpu_enter/kern_fpu_leave KPI and followup fixes for the
kib [Fri, 19 Nov 2010 09:49:14 +0000 (09:49 +0000)]
Merge the kern_fpu_enter/kern_fpu_leave KPI and followup fixes for the
amd64 suspend/resume support.

Tested by: Mike Tancsa
Also tested by: Dewayne Geraghty <dewayne.geraghty heuristicsystems com au>,
     Daryl Richards <daryl isletech net>

Below is the svn log of the merged revisions.
------------------------------------------------------------------------
r197455 | emaste | 2009-09-24 17:26:42 +0300 (Thu, 24 Sep 2009) | 5 lines

Add a backtrace to the "fpudna in kernel mode!" case, to help track down
where this comes from.

Reviewed by: bde

------------------------------------------------------------------------
r197863 | jkim | 2009-10-08 20:41:53 +0300 (Thu, 08 Oct 2009) | 8 lines

Clean up amd64 suspend/resume code.

- Allocate memory for wakeup code after ACPI bus is attached.  The early
memory allocation hack was inherited from i386 but amd64 does not need it.
- Exclude real mode IVT and BDA explicitly.  Improve comments about memory
allocation and reason for the exclusions.  It is a no-op in reality, though.
- Remove an unnecessary CLD from wakeup code and re-align.

------------------------------------------------------------------------
r198931 | jkim | 2009-11-05 00:39:18 +0200 (Thu, 05 Nov 2009) | 2 lines

Tweak memory allocation for amd64 suspend/resume CPU context.

------------------------------------------------------------------------
r200280 | jkim | 2009-12-09 00:38:42 +0200 (Wed, 09 Dec 2009) | 2 lines

Simplify a macro not to generate unncessary symbols.

------------------------------------------------------------------------
r205444 | emaste | 2010-03-22 13:52:53 +0200 (Mon, 22 Mar 2010) | 7 lines

Merge r197455 from amd64:

  Add a backtrace to the "fpudna in kernel mode!" case, to help track down
  where this comes from.

  Reviewed by: bde

------------------------------------------------------------------------
r208833 | kib | 2010-06-05 18:59:59 +0300 (Sat, 05 Jun 2010) | 15 lines

Introduce the x86 kernel interfaces to allow kernel code to use
FPU/SSE hardware. Caller should provide a save area that is chained
into the stack of the areas; pcb save_area for usermode FPU state is
on top. The pcb now contains a pointer to the current FPU saved area,
used during FPUDNA handling and context switches.  There is also a
facility to allow the kernel thread to use pcb save_area.

Change the dreaded warnings "npxdna in kernel mode!" into the panics
when FPU usage is not registered.

KPI discussed with: fabient
Tested by:    pho, fabient
Hardware provided by: Sentex Communications
MFC after:    1 month

------------------------------------------------------------------------
r208834 | kib | 2010-06-05 19:00:53 +0300 (Sat, 05 Jun 2010) | 13 lines

Use the fpu_kern_enter() interface to properly separate usermode FPU
context from in-kernel execution of padlock instructions and to handle
spurious FPUDNA exceptions that sometime are raised when doing padlock
calculations.

Globally mark crypto(9) kthread as using FPU.

Reviewed by: pjd
Hardware provided by: Sentex Communications
Tested by:   pho
PR:    amd64/135014
MFC after:    1 month

------------------------------------------------------------------------
r208877 | kib | 2010-06-06 19:13:50 +0300 (Sun, 06 Jun 2010) | 5 lines

Style-compilant order of declarations.

Noted by: bde
MFC after: 1 month

------------------------------------------------------------------------
r209174 | jkim | 2010-06-14 23:08:26 +0300 (Mon, 14 Jun 2010) | 3 lines

Fix ACPI suspend/resume on amd64, which was broken since r208833.
We need actual storage for FPU state to save and restore.

------------------------------------------------------------------------
r209198 | kib | 2010-06-15 12:19:33 +0300 (Tue, 15 Jun 2010) | 10 lines

Use critical sections instead of disabling local interrupts to ensure
the consistency between PCPU fpcurthread and the state of the FPU.

Explicitely assert that the calling conventions for fpudrop() are
adhered too. In cpu_thread_exit(), add missed critical section entrance.

Reviewed by: bde
Tested by: pho
MFC after: 1 month

------------------------------------------------------------------------
r209204 | kib | 2010-06-15 17:59:35 +0300 (Tue, 15 Jun 2010) | 5 lines

Rename CRITSECT_ASSERT to CRITICAL_ASSERT.

Suggested by: jhb
MFC after: 1 month

------------------------------------------------------------------------
r209208 | kib | 2010-06-15 21:16:04 +0300 (Tue, 15 Jun 2010) | 4 lines

Remove two obsoleted comments, add a note about 32bit compatibility.

MFC after: 1 month

------------------------------------------------------------------------
r209252 | kib | 2010-06-17 15:35:17 +0300 (Thu, 17 Jun 2010) | 6 lines

In the ia32_{get,set}_fpcontext(), use fpu{get,set}userregs instead
of fpu{get,set}regs.

Noted by: bde
MFC after: 1 month

------------------------------------------------------------------------
r209460 | kib | 2010-06-23 13:40:28 +0300 (Wed, 23 Jun 2010) | 8 lines

Remove unused i586 optimized bcopy/bzero/etc implementations that utilize
FPU registers for copying. Remove the switch table and jumps from
bcopy/bzero/... to the actual implementation.
As a side-effect, i486-optimized bzero is removed.

Reviewed by: bde
Tested by: pho (previous version)

------------------------------------------------------------------------
r209461 | kib | 2010-06-23 14:12:58 +0300 (Wed, 23 Jun 2010) | 8 lines

Remove the support for int13 FPU exception reporting on i386. It is
believed that all 486-class CPUs FreeBSD is capable to run on, either
have no FPU and cannot use external coprocessor, or have FPU on the
package and can use #MF.

Reviewed by: bde
Tested by: pho (previous version)

------------------------------------------------------------------------
r209462 | kib | 2010-06-23 14:21:19 +0300 (Wed, 23 Jun 2010) | 8 lines

After the FPU use requires #MF working due to INT13 FPU exception handling
removal, MFi386 r209198:
    Use critical sections instead of disabling local interrupts to ensure
    the consistency between PCPU fpcurthread and the state of FPU.

Reviewed by: bde
Tested by: pho

------------------------------------------------------------------------
r210514 | jkim | 2010-07-26 22:53:09 +0300 (Mon, 26 Jul 2010) | 6 lines

Re-implement FPU suspend/resume for amd64.  This removes superfluous uses
of critical_enter(9) and critical_exit(9) by fpugetregs() and fpusetregs().
Also, we do not touch PCB flags any more.

MFC after: 1 month

------------------------------------------------------------------------
r210517 | jkim | 2010-07-27 00:24:52 +0300 (Tue, 27 Jul 2010) | 4 lines

FNSTSW instruction can use AX register as an operand.

Obtained from: fenv.h

------------------------------------------------------------------------
r210518 | jkim | 2010-07-27 01:16:36 +0300 (Tue, 27 Jul 2010) | 5 lines

Reduce diff against fenv.h:

Mark all inline asms as volatile for safety.  No object file change after
this commit (verified with md5).

------------------------------------------------------------------------
r210519 | jkim | 2010-07-27 01:55:14 +0300 (Tue, 27 Jul 2010) | 2 lines

Remove an unused macro since r189418.

------------------------------------------------------------------------
r210520 | jkim | 2010-07-27 02:02:18 +0300 (Tue, 27 Jul 2010) | 2 lines

Add missing ldmxcsr() prototype for lint case.

------------------------------------------------------------------------
r210521 | jkim | 2010-07-27 02:20:55 +0300 (Tue, 27 Jul 2010) | 3 lines

Simplify fldcw() macro.  There is no reason to use pointer here.  No object
file change after this commit (verified with md5).

------------------------------------------------------------------------
r210614 | jkim | 2010-07-29 19:41:21 +0300 (Thu, 29 Jul 2010) | 2 lines

Rename PCB_USER_FPU to PCB_USERFPU not to clash with a macro from fpu.h.

------------------------------------------------------------------------
r210615 | jkim | 2010-07-29 19:49:20 +0300 (Thu, 29 Jul 2010) | 5 lines

Fix another fallout from r208833.  savectx() is used to save CPU context
for crash dump (dumppcb) and kdb (stoppcbs).  For both cases, there cannot
have a valid pointer in pcb_save.  This should restore the previous
behaviour.

------------------------------------------------------------------------
r210777 | jkim | 2010-08-02 20:35:00 +0300 (Mon, 02 Aug 2010) | 13 lines

- Merge savectx2() with savectx() and struct xpcb with struct pcb. [1]
savectx() is only used for panic dump (dumppcb) and kdb (stoppcbs).  Thus,
saving additional information does not hurt and it may be even beneficial.
Unfortunately, struct pcb has grown larger to accommodate more data.
Move 512-byte long pcb_user_save to the end of struct pcb while I am here.
- savectx() now saves FPU state unconditionally and copy it to the PCB of
FPU thread if necessary.  This gives panic dump and kdb a chance to take
a look at the current FPU state even if the FPU is "supposedly" not used.
- Resuming CPU now unconditionally reinitializes FPU.  If the saved FPU
state was irrelevant, it could be in an unknown state.

Suggested by: bde [1]

------------------------------------------------------------------------
r210804 | jkim | 2010-08-03 18:32:08 +0300 (Tue, 03 Aug 2010) | 6 lines

savectx() has not been used for fork(2) for about 15 years. [1]
Do not clobber FPU thread's PCB as it is more harmful.  When we resume CPU,
unconditionally reload FPU state.

Pointed out by: bde [1]

------------------------------------------------------------------------
r212026 | jkim | 2010-08-31 00:19:42 +0300 (Tue, 31 Aug 2010) | 3 lines

Save MSR_FSBASE, MSR_GSBASE and MSR_KGSBASE directly to PCB as we do not use
these values in the function.

------------------------------------------------------------------------
r214347 | jhb | 2010-10-25 18:31:13 +0300 (Mon, 25 Oct 2010) | 5 lines

Use 'saveintr' instead of 'savecrit' or 'eflags' to hold the state returned
by intr_disable().

Requested by: bde

------------------------------------------------------------------------

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

13 years agoMFC r214672:
mav [Fri, 19 Nov 2010 09:26:39 +0000 (09:26 +0000)]
MFC r214672:
Remove stale line, accidentally slipped into r214016.

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

13 years agoMFC r209683 by imp:
mav [Fri, 19 Nov 2010 09:25:12 +0000 (09:25 +0000)]
MFC r209683 by imp:
Add a safety-belt.  If the identified disk has 0 blocks, don't attach
it.  This can happen in some cases when plugging in SD/SmartCard PC
Cards with empty slots.  It is better to detect this bogosity, and
refuse to attach rather than panic with a division by zero (in one of
many places) down stream.

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

13 years agoMFC r209682 by imp:
mav [Fri, 19 Nov 2010 09:21:53 +0000 (09:21 +0000)]
MFC r209682 by imp:
Minor formatting nits.

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

13 years agoMFC r214988:
mav [Fri, 19 Nov 2010 09:14:53 +0000 (09:14 +0000)]
MFC r214988:
Teach ahci(4), siis(4) and ATA_CAM ata(4) wrapper report to CAM residual
I/O length on underruns, that often happens for some SCSI commands.

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

13 years agoMFC r207768
thompsa [Fri, 19 Nov 2010 01:58:11 +0000 (01:58 +0000)]
MFC r207768

 Add dummy function for ic_update_mcast (a la if_urtw) to avoid console
 spam.

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

13 years agoMFC r215330
thompsa [Fri, 19 Nov 2010 01:52:34 +0000 (01:52 +0000)]
MFC r215330

 Add the Sierra MC8700.

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

13 years agoMFC r215326
thompsa [Fri, 19 Nov 2010 01:51:51 +0000 (01:51 +0000)]
MFC r215326

 Add a special INIT product ID used by some models of the HUAWEI
 K3765 datacard. After ejecting this device, it reappears using
 the normal K3765 ID. It does not switch automatically

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

13 years agoMFC r212830
thompsa [Fri, 19 Nov 2010 01:50:56 +0000 (01:50 +0000)]
MFC r212830

 Cleanup white space and typos.

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

13 years agoMFC r212136
thompsa [Fri, 19 Nov 2010 01:50:22 +0000 (01:50 +0000)]
MFC r212136

 Reduce the need to accesss struct usb_device by providing functions to access
 the product, manufacturer and serial strings.

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

13 years agoMFC r212135
thompsa [Fri, 19 Nov 2010 01:49:22 +0000 (01:49 +0000)]
MFC r212135

 Add support for power mode filtering as some USB hardware does not support
 power saving.

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

13 years agoMFC r212134
thompsa [Fri, 19 Nov 2010 01:48:47 +0000 (01:48 +0000)]
MFC r212134

 Change argument for usbd_get_dma_delay() from USB bus to USB device, some
 embedded hardware needs to know exactly which device is in question before it
 exactly can decide the required delay.

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

13 years agoMFC r212133
thompsa [Fri, 19 Nov 2010 01:47:46 +0000 (01:47 +0000)]
MFC r212133

 Fix setting of the rx_max and tx_max variables. If the expected buffer size is
 greater than 65535 bytes then the CDC driver might not work as expected, which
 is not likely with the existing USB speeds.

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

13 years agoMFC r212132
thompsa [Fri, 19 Nov 2010 01:47:09 +0000 (01:47 +0000)]
MFC r212132

 Fix UMS_BUTTON_MAX define name

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