]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC r227214 (by antoine, partially):
pluknet [Mon, 26 Mar 2012 09:31:15 +0000 (09:31 +0000)]
MFC r227214 (by antoine, partially):

 Add more obsolete files.

PR: misc/165523 (RELENG_9)

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

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

r232953:
  Fix white space nits.

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

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

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

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

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

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

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

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

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

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

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

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

  PR: kern/165509

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

PR: phk
Approved by: cperciva (implicit)

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

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

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

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

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

PR: docs/166091
Submitted by: Matthew Story

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

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

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

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

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

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

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

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

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

Make boot2 build with Clang again.

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

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

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

Add snd_hdspe(4) to the hardware notes.

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

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

Submitted by: PseudoCylon

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

12 years agoMFC 232403,232667:
jhb [Fri, 23 Mar 2012 20:47:25 +0000 (20:47 +0000)]
MFC 232403,232667:
- Add a bus_dma tag to each PCI bus that is a child of a Host-PCI bridge.
  The tag enforces a single restriction that all DMA transactions must not
  cross a 4GB boundary.  Note that while this restriction technically only
  applies to PCI-express, this change applies it to all PCI devices as it
  is simpler to implement that way and errs on the side of caution.
- Add a softc structure for PCI bus devices to hold the bus_dma tag and
  a new pci_attach_common() routine that performs actions common to the
  attach phase of all PCI bus drivers.  Right now this only consists of
  a bootverbose printf and the allocate of a bus_dma tag if necessary.
- Adjust all PCI bus drivers to allocate a PCI bus softc and to call
  pci_attach_common() from their attach routines.

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

12 years agoMFC 232401:
jhb [Fri, 23 Mar 2012 18:29:09 +0000 (18:29 +0000)]
MFC 232401:
Similar to the fixes in 226967 and 226987, purge any name cache entries
associated with the previous vnode (if any) associated with the target of
a rename().  Otherwise, a lookup of the target pathname concurrent with a
rename() could re-add a name cache entry after the namei(RENAME) lookup
in kern_renameat() had purged the target pathname.

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

12 years agoMFC 232367:
jhb [Fri, 23 Mar 2012 18:22:20 +0000 (18:22 +0000)]
MFC 232367:
Properly handle failures in igb_setup_msix() by returning 0 if MSI or MSI-X
allocation fails.

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

12 years agoMFC 232360:
jhb [Fri, 23 Mar 2012 18:03:04 +0000 (18:03 +0000)]
MFC 232360:
Add pci_save_state() and pci_restore_state() wrappers around
pci_cfg_save() and pci_cfg_restore() for device drivers to use when
saving and restoring state (e.g. to handle device-specific resets).

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

12 years agoRecord mergeinfo for 233374.
jhb [Fri, 23 Mar 2012 17:24:29 +0000 (17:24 +0000)]
Record mergeinfo for 233374.

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

12 years agoMFC 232570,232754:
jhb [Fri, 23 Mar 2012 17:22:43 +0000 (17:22 +0000)]
MFC 232570,232754:
Fix boot2 to handle boot config files that only contain a custom path to
a loader or kernel.  Specifically, kname cannot be pointed at cmd[] since
it's value is change to be an empty string after the initial call to
parse, and cmd[]'s value can be changed (thus losing a prior setting for
kname) due to user input at the boot prompt.  While here, ensure that that
initial boot config file text is nul-terminated, that ops is initialized
to zero, and that kname is always initialized to a valid string.

In addition, include other changes to ensure boot2 still builds with
Clang.

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

12 years agoMFC r233371:
jimharris [Fri, 23 Mar 2012 16:59:03 +0000 (16:59 +0000)]
MFC r233371:

Call xpt_bus_register during attach context, then freeze and do not release
until domain discovery is complete.  This fixes an isci(4) bug on FreeBSD 7.x
where devices weren't always appearing after boot without an explicit rescan.

Sponsored by: Intel
Reported and tested by: <rpokala at panasas dot com>
Reviewed by: scottl
Approved by: scottl

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

12 years agoMFC r232793:
mav [Fri, 23 Mar 2012 16:17:46 +0000 (16:17 +0000)]
MFC r232793:
Revert r175376 and tune cpufreq(4) frequency comparison logic instead.
Instead of using 25MHz equality threshold, look for the nearest value when
handling dev.cpu.0.freq sysctl and for exact match when it is expected.

ACPI may report extra level with frequency 1MHz above the nominal to
control Intel Turbo Boost operation. It is not a bug, but feature:
dev.cpu.0.freq_levels: 2934/106000 2933/95000 2800/82000 ...
In this case value 2933 means 2.93GHz, but 2934 means 3.2-3.6GHz.

I've found that my Core i7 based systems have Intel Turbo Boost not used
by default and without this change it was absolutely invisible and hard
to control.

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

12 years agoMFC r232717:
mav [Fri, 23 Mar 2012 16:12:52 +0000 (16:12 +0000)]
MFC r232717:
Be more polite when setting state->nextevent inside cpu_new_callout().
Hardclock is not the only who wakes idle CPU since kdtrace cyclic addition.

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

12 years agoMFC 232218:
jhb [Fri, 23 Mar 2012 12:05:51 +0000 (12:05 +0000)]
MFC 232218:
Clear the a device's description string anytime it's driver changes.
Descriptions are specific to drivers and we don't change drivers on attached
devices.  This fixes a few places where we were not clearing the description
when detaching a driver (e.g. if device_attach() failed).  While here, fix
a few other nits:
- Remove spurious call to remove a device's driver from
  devclass_driver_deleted().  device_detach() removes it already.
- Fix a typo.

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

12 years agoMFC 232265:
jhb [Fri, 23 Mar 2012 12:01:33 +0000 (12:01 +0000)]
MFC 232265:
Properly clear a device's devclass if DEVICE_ATTACH() fails if the device
does not have a fixed devclass.

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

12 years agoMFC r231949:
kib [Fri, 23 Mar 2012 11:26:54 +0000 (11:26 +0000)]
MFC r231949:
Fix found places where uio_resid is truncated to int.

Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the
sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from
the usermode.

MFC r232493:
Remove unneeded cast to u_int. The values as small enough to fit into
int, beside the use of MIN macro which performs type promotions.

MFC r232494:
Instead of incomplete handling of read(2)/write(2) return values that
does not fit into registers, declare that we do not support this case
using CTASSERT(), and remove endianess-unsafe code to split return value
into td_retval.

While there, change the style of the sysctl debug.iosize_max_clamp
definition.

MFC r232495:
pipe_read(): change the type of size to int, and remove signed clamp.
pipe_write(): change the type of desiredsize back to int, its value fits.

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

12 years agoMFC r232749:
dim [Fri, 23 Mar 2012 11:01:04 +0000 (11:01 +0000)]
MFC r232749:

Partially undo r228693, by removing NO_WFORMAT.clang in fsdb's Makefile,
and fixing the format string in sbin/fsdb/fsdbutil.c instead.

Note the remark "Work around a problem with format string warnings and
ntohs macros" was actually incorrect.  The DIP(dp, di_nlink) macro
invocation actually returned an int, due to its ternary expression, even
though the di_nlink members of struct ufs1_dinode and struct ufs2_dinode
are both defined as int16_t.

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

12 years agoMFC r232748:
dim [Fri, 23 Mar 2012 10:58:35 +0000 (10:58 +0000)]
MFC r232748:

After r232745, which makes sure __bswap16(), ntohs() and htons() return
__uint16_t, we can partially undo r228668.

Note the remark "Work around a clang false positive with format string
warnings and ntohs macros (see LLVM PR 11313)" was actually incorrect.

Before r232745, on some arches, the ntohs() macros did in fact return
int, not uint16_t, so clang was right in warning about the %hu format
string.

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

12 years agoMFC r232745:
dim [Fri, 23 Mar 2012 10:55:19 +0000 (10:55 +0000)]
MFC r232745:

Add casts to __uint16_t to the __bswap16() macros on all arches which
didn't already have them.  This is because the ternary expression will
return int, due to the Usual Arithmetic Conversions.  Such casts are not
needed for the 32 and 64 bit variants.

While here, add additional parentheses around the x86 variant, to
protect against unintended consequences.

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

12 years agoMFC 230547:
jhb [Thu, 22 Mar 2012 21:07:54 +0000 (21:07 +0000)]
MFC 230547:
Add a timeout on positive name cache entries in the NFS client.  That is,
we will only trust a positive name cache entry for a specified amount of
time before falling back to a LOOKUP RPC, even if the ctime for the file
handle matches the cached copy in the name cache entry.  The timeout is
configured via a new 'nametimeo' mount option and defaults to 60 seconds.
It may be set to zero to disable positive name caching entirely.

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

12 years agoMFC 232116:
jhb [Thu, 22 Mar 2012 20:51:35 +0000 (20:51 +0000)]
MFC 232116:
Adjust the nfs_skip_wcc_data_onerr setting so that it does not block
post-op attributes for ENOENT errors now that the name caching logic
depends on working post-op attributes.

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

12 years agoMFC: 232703
pfg [Thu, 22 Mar 2012 20:31:52 +0000 (20:31 +0000)]
MFC: 232703

Add support for ns timestamps and birthtime to the ext2/3 driver.

When using big inodes there is sufficient space in ext3 to
keep extra resolution and birthtime (creation) timestamps.
We now support the extra timestamps silently when the inode
is big enough.

Reviewed by: bde
Approved by: jhb (mentor)

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

12 years agoMFC r233037 and r233039:
hselasky [Thu, 22 Mar 2012 17:04:49 +0000 (17:04 +0000)]
MFC r233037 and r233039:
Fix cross-platform issue about the file-format in which
usbdump stores data.

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

12 years agoMFC r233195:
dim [Thu, 22 Mar 2012 09:50:16 +0000 (09:50 +0000)]
MFC r233195:

Fix the following warning from clang trunk:

usr.sbin/dconschat/dconschat.c:163:65: error: format specifies type 'size_t' (aka 'unsigned int') but the argument has type 'off_t' (aka 'long long') [-Werror,-Wformat]
snprintf(buf, PAGE_SIZE, "\r\n[dconschat reset target(addr=0x%zx)...]\r\n", dc->reset);
     ~~^            ~~~~~~~~~
     %llx

Silence this by casting dc->reset to intmax_t, and using the appropriate
length modifier.  While here, wrap the line to a 80 character margin.

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

12 years agoMFC r233193:
dim [Thu, 22 Mar 2012 09:47:10 +0000 (09:47 +0000)]
MFC r233193:

Add explicit braces to avoid dangling else in stl_tree.h.  This silences
the following warning produced by clang trunk:

  In file included from /usr/src/sbin/devd/devd.cc:91:
  In file included from /usr/obj/usr/src/tmp/usr/include/c++/4.2/map:64:
  /usr/obj/usr/src/tmp/usr/include/c++/4.2/bits/stl_tree.h:987:2: error: add explicit braces to avoid dangling else [-Werror,-Wdangling-else]
        else
        ^

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

12 years agoMFC r233010:
pluknet [Thu, 22 Mar 2012 08:38:13 +0000 (08:38 +0000)]
MFC r233010:
 Remove TARGET_ARCH conditionals for COMPAT_FREEBSD32.

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

12 years agoMFC r229201: sh: Make patmatch() non-recursive.
jilles [Wed, 21 Mar 2012 23:10:16 +0000 (23:10 +0000)]
MFC r229201: sh: Make patmatch() non-recursive.

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

12 years agoMFC 230394,230441,230489,230552,232420:
jhb [Wed, 21 Mar 2012 20:50:15 +0000 (20:50 +0000)]
MFC 230394,230441,230489,230552,232420:
Close a race in NFS lookup processing that could result in stale name cache
entries on one client when a directory was renamed on another client.  The
root cause for the stale entry being trusted is that each per-vnode nfsnode
structure has a single 'n_ctime' timestamp used to validate positive name
cache entries.  However, if there are multiple entries for a single vnode,
they all share a single timestamp.  To fix this, extend the name cache
to allow filesystems to optionally store a timestamp value in each name
cache entry.  The NFS clients now fetch the timestamp associated with
each name cache entry and use that to validate cache hits instead of the
timestamps previously stored in the nfsnode.  Another part of the fix is
that the NFS clients now use timestamps from the post-op attributes of
RPCs when adding name cache entries rather than pulling the timestamps out
of the file's attribute cache.  The latter is subject to races with other
lookups updating the attribute cache concurrently.

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

12 years agoMFC r232975: Add an assert for proctree_lock to proc_to_reap().
jh [Wed, 21 Mar 2012 16:16:59 +0000 (16:16 +0000)]
MFC r232975: Add an assert for proctree_lock to proc_to_reap().

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

12 years agoMerge 232685 from head:
glebius [Wed, 21 Mar 2012 09:19:23 +0000 (09:19 +0000)]
Merge 232685 from head:
  Merge from OpenBSD:

    revision 1.146
    date: 2010/05/12 08:11:11;  author: claudio;  state: Exp;  lines: +2 -3
    bzero() the full compressed update struct before setting the values.
    This is needed because pf_state_peer_hton() skips some fields in certain
    situations which could result in garbage beeing sent to the other peer.
    This seems to fix the pfsync storms seen by stephan@ and so dlg owes me
    a whiskey.

  I didn't see any storms, but this definitely fixes a useless memory
  allocation on the receiving side, due to non zero scrub_flags field
  in a pfsync_state_peer structure.

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

12 years agoMerge 228321 from head:
glebius [Wed, 21 Mar 2012 07:29:47 +0000 (07:29 +0000)]
Merge 228321 from head:
  Fix double free.

  PR:           kern/163089
  Submitted by: Herbie Robinson <Herbie.Robinson stratus.com>

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

12 years agoMerge from head:
glebius [Wed, 21 Mar 2012 07:22:27 +0000 (07:22 +0000)]
Merge from head:
r227785:
  - Reduce severity for all ARP events, that can be triggered from remote
    machine to LOG_NOTICE. Exception left to "using my IP address".
  - Fix multicast ARP warning: add newline and also log the bad MAC address.

  Tested by:    Alexander Wittig <wittigal msu.edu>

r227790:
  Be more informative for "unknown hardware address format" message.

  Submitted by: Andrzej Tobola <ato iem.pw.edu.pl>

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

12 years agoMerge 227308 from head/:
glebius [Wed, 21 Mar 2012 07:07:43 +0000 (07:07 +0000)]
Merge 227308 from head/:
  In icmp6_redirect_input:

  - Assert that we got a valid mbuf with rcvif pointer. [1]
  - Use __func__ in logging.

  Submitted by: prabhakar lakhera <prabhakar.lakhera gmail.com> [1]
  Submitted by: Kristof Provost <kristof sigsegv.be> [1]

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

12 years agoMerge 226690 and 226725 from head:
glebius [Wed, 21 Mar 2012 07:05:29 +0000 (07:05 +0000)]
Merge 226690 and 226725 from head:
  Protect NIS client with madvise(2) since this daemon is required
  for succesful authentication of users.

  Protect NIS server with madvise(2) since this daemon is required
  for succesful authentication of users.

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

12 years agoMFC r233005:
tuexen [Tue, 20 Mar 2012 19:27:27 +0000 (19:27 +0000)]
MFC r233005:

Clean up, no functional change.

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

12 years agoMFC r233004:
tuexen [Tue, 20 Mar 2012 19:24:56 +0000 (19:24 +0000)]
MFC r233004:

Fix bugs which can result in a panic when an non-SCTP socket it
used with an sctp_ system-call which expects an SCTP socket.

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

12 years agoMFC r232866:
tuexen [Tue, 20 Mar 2012 19:22:44 +0000 (19:22 +0000)]
MFC r232866:

This fixes PR 165210. Basically we just
add in the netgraph interface to the list of
acceptable interfaces. A todo at the next
IETF code blitz, though is we need to review
why we screen interfaces, there was a reason ;-).
From rrs@.

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

12 years agoMFC r232724:
tuexen [Tue, 20 Mar 2012 19:19:50 +0000 (19:19 +0000)]
MFC r232724:
Add support for stf interfaces.

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

12 years agoMFC r231895:
tuexen [Tue, 20 Mar 2012 19:16:54 +0000 (19:16 +0000)]
MFC r231895:

Remove two clang warnings.

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

12 years agoMFC: 232901
jpaetzel [Mon, 19 Mar 2012 23:28:13 +0000 (23:28 +0000)]
MFC: 232901

Use gpart "-a" flag to 4k alignment.

Submitted by: kmoore
Obtained from: PC-BSD

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

12 years agoMFC 232510:
eadler [Mon, 19 Mar 2012 23:25:10 +0000 (23:25 +0000)]
MFC 232510:
Permit the use of raidz3 in pc-sysinstall

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

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

12 years agoMFC: 232899
jpaetzel [Mon, 19 Mar 2012 23:20:52 +0000 (23:20 +0000)]
MFC: 232899

Add the ability to use a varity of ZFS dataset options.
While here fix a bug causing zpools with /tmp mount-points to fail

Submitted by: kmoore
Obtained from: PC-BSD

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

12 years agoMFC: 232898
jpaetzel [Mon, 19 Mar 2012 23:17:26 +0000 (23:17 +0000)]
MFC: 232898

Improve ZFS exporting functionality, only export pools which are on a
specific device we happen to be writing to. This fixes an issue when
running pc-sysinstall on a running system which needs ZFS and the main
disk gets exported.

Submitted by: kmoore
Obtained from: PC-BSD

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

12 years agoMFC: 232895
jpaetzel [Mon, 19 Mar 2012 23:14:47 +0000 (23:14 +0000)]
MFC: 232895

Check for intel RAID devices

Submitted by: kmoore
Obtained from: PC-BSD

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

12 years agoMFC: 232890
jpaetzel [Mon, 19 Mar 2012 23:09:30 +0000 (23:09 +0000)]
MFC: 232890

Fix a couple of bugs saving network config.
Don't duplicate wlans_ lines.
Enable ipv6 on wireless devices correctly.

Submitted by: kmoore
Obtained from: PC-BSD

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

12 years agoMFC: 232889
jpaetzel [Mon, 19 Mar 2012 23:04:21 +0000 (23:04 +0000)]
MFC: 232889

Make sure when creating new MBR partition it is set to active by default.

Submitted by: kmoore
Obtained from: PC-BSD

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

12 years agoMFC: 232880
jpaetzel [Mon, 19 Mar 2012 22:59:19 +0000 (22:59 +0000)]
MFC: 232880

Fix a bug running the autoinstall functionality.

Submitted by: kmoore
Obtained from: PC-BSD

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

12 years agoMFC: 232681
jpaetzel [Mon, 19 Mar 2012 22:52:19 +0000 (22:52 +0000)]
MFC: 232681

Work around broken BIOS memory reporting

Andrzej has a machine with 32GB of RAM, but only 16GB is reported by the
smbios.memory.enabled.  Thus, use the greater of hw.realmem and the smbios
value.

Reported by: Andrzej Tobola <ato of iem pw edu pl>

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

12 years agoMFC 227470:
jpaetzel [Mon, 19 Mar 2012 22:41:53 +0000 (22:41 +0000)]
MFC 227470:

Report the amount of memory from smbios data if provided.

This should get the correct memory size even if a 32-bit image is running
on a machine with > 4GB of memory.  This can be useful is using a 32-bit
installer on a machine which will eventually run a 64-bit image.

Reviewed by: kmoore

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

12 years agoMFC: r232991
jkim [Mon, 19 Mar 2012 22:08:13 +0000 (22:08 +0000)]
MFC: r232991

Add a PCI quirk to ignore PCI map registers from configuration space.
This works around a resource conflict, e. g., MSI K9AGM2 motherboard.

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

12 years agoMFC 232072: Pretty-print the advice constants passed to posix_fadvise(2).
jhb [Mon, 19 Mar 2012 21:33:23 +0000 (21:33 +0000)]
MFC 232072: Pretty-print the advice constants passed to posix_fadvise(2).

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

12 years agoMFC 229621:
jhb [Mon, 19 Mar 2012 20:49:16 +0000 (20:49 +0000)]
MFC 229621:
Convert all users of IF_ADDR_LOCK to use new locking macros that specify
either a read lock or write lock.

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

12 years agoMFC r233041:
kib [Mon, 19 Mar 2012 10:06:22 +0000 (10:06 +0000)]
MFC r233041:
Remove write-only variable.

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

12 years agoMFC r232541:
kib [Mon, 19 Mar 2012 10:04:45 +0000 (10:04 +0000)]
MFC r232541:
Apply inlined vn_vget_ino() algorithm for ".." lookup in pseudofs.

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

12 years agoMFC r232894:
dim [Mon, 19 Mar 2012 08:10:23 +0000 (08:10 +0000)]
MFC r232894:
  Pull in r145194 from upstream clang trunk:

    Make our handling of MMX x SSE closer to what gcc does:

    * Enabling sse enables mmx.
    * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already).
    * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse.

  Some configure scripts depend on this.

  PR: i386/165968

MFC r232933:
  Update comments and CFLAGS in sys/conf/kern.mk, introduced in r221879,
  to match reality: clang does _not_ disable SSE automatically when
  -mno-mmx is used, you have to specify -mno-sse explicitly.

  Note this was the case even before r232894, which only makes a change in
  the 'positive' flag case; e.g. when you specify -msse, MMX gets enabled
  too.

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

12 years agoMFC r232337:
mav [Mon, 19 Mar 2012 07:34:09 +0000 (07:34 +0000)]
MFC r232337:
Add driver for the RME HDSPe AIO/RayDAT sound cards -- snd_hdspe(4).
Cards are expensive and so rare, so leave the driver as module.

Submitted by: Ruslan Bukin <br@bsdpad.com>

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

12 years agoMFC r230845:
mav [Mon, 19 Mar 2012 07:24:26 +0000 (07:24 +0000)]
MFC r230845:
Make sound(4) more flexible in setting soft buffer and block sizes when
hardware imposes strict limitations on hard buffer and block sizes.

Previous code set soft buffer to be no smaller then hard buffer. On some
cards with fixed 64K physical buffer that caused up to 800ms play latency.
New code allows to set soft buffer size down to just two blocks of the hard
buffer and to not write more then that size ahead to the hardware buffer.
As result of that change I was able to reduce full practically measured
record-playback loop delay in those conditions down to only about 115ms
with theoretical playback latency of only about 50ms.

New code works fine for both vchans and direct cases. In both cases sound(4)
tries to follow hw.snd.latency_profile and hw.snd.latency values and
application-requested buffer and block sizes as much as limitation of two
hardware blocks allows.

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

12 years agoMFC r232783:
mav [Mon, 19 Mar 2012 07:15:42 +0000 (07:15 +0000)]
MFC r232783:
Idle ticks optimization:
 - Pass number of events to the statclock() and profclock() functions
   same as to hardclock() before to not call them many times in a loop.
 - Rename them into statclock_cnt() and profclock_cnt().
 - Turn statclock() and profclock() into compatibility wrappers,
   still needed for arm.
 - Rename hardclock_anycpu() into hardclock_cnt() for unification.

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

12 years agoMFC r232797:
mav [Mon, 19 Mar 2012 07:13:30 +0000 (07:13 +0000)]
MFC r232797:
ServerWorks HT1000 HPET reported to have problems with IRQs >= 16.
Lower (ISA) IRQs are working, but allowed mask is not set correctly.
Block both by default to allow HP BL465c G6 blade system to boot.

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

12 years agoMFC r232505:
eadler [Mon, 19 Mar 2012 01:56:26 +0000 (01:56 +0000)]
MFC r232505:
Remove outdated comment of seven years

PR: docs/116116
Approved by: cperciva

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

12 years agoMFC r231306:
eadler [Mon, 19 Mar 2012 01:51:08 +0000 (01:51 +0000)]
MFC r231306:
Fix NULL ptr dereference in setusercontext if pwd is null,
LOGIN_SETPRIORITY is set, and setting the priority (rtprio or
setpriority) fails.

PR: kern/164238
Approved by: cperciva

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

12 years agoMFC r232504:
eadler [Mon, 19 Mar 2012 01:32:28 +0000 (01:32 +0000)]
MFC r232504:
Remove reference to gcc's non-standard -fwritable-strings, which
doesn't exist in recent releases (and is bad advice anyway)

PR: docs/163119
Approved by: cperciva

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

12 years agoMFC r232503:
eadler [Mon, 19 Mar 2012 01:27:30 +0000 (01:27 +0000)]
MFC r232503:
POSIX mandates that swab do nothing when len < 0

PR: 140690
Approved by: cperciva

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

12 years agoMFC r232506:
eadler [Mon, 19 Mar 2012 01:18:22 +0000 (01:18 +0000)]
MFC r232506:
Explicitly list dependency

PR: misc/160463
Approved by: cperciva

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

12 years agoMFC r232501:
eadler [Mon, 19 Mar 2012 01:15:36 +0000 (01:15 +0000)]
MFC r232501:
ehci tunables are only available when kernel is compiled with USB_DEBUG

PR: docs/163646
Approved by: cperciva

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

12 years agoMFC r232466, r232469:
eadler [Mon, 19 Mar 2012 01:04:26 +0000 (01:04 +0000)]
MFC r232466, r232469:
Direct users to swapinfo and pstat from df

PR: bin/165321
Approved by: cperciva

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

12 years agoMFC r232483:
kevlo [Sun, 18 Mar 2012 15:03:02 +0000 (15:03 +0000)]
MFC r232483:

Clean up style(9) nits

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

12 years agoMFC r232994:
kevlo [Sun, 18 Mar 2012 14:49:36 +0000 (14:49 +0000)]
MFC r232994:
- Fix an erroneous invocation of the editline.
- Fix wrong scaling in the bc.library.
- Let length(0.000) conform to what gnu bc does.

PR: bin/159227
Submitted by: AIDA Shinra <shinra at j10n dot org>

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

12 years agoMFC r226892,r228007,r228873,r230121,r232839: sh: Various testcases that
jilles [Sun, 18 Mar 2012 13:02:56 +0000 (13:02 +0000)]
MFC r226892,r228007,r228873,r230121,r232839: sh: Various testcases that
already work.

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

12 years agoMFC r228322,228330,228477,228495,228562,228564,228859,228897,229574,230277:
ed [Sun, 18 Mar 2012 09:19:40 +0000 (09:19 +0000)]
MFC r228322,228330,228477,228495,228562,228564,228859,228897,229574,230277:

  Bring <sys/cdefs.h> in sync with FreeBSD HEAD:

  - Add an __alignof() for non-GCC and GCC < 2.95.
  - Attempt to implement the following C11 keywords: _Alignas(),
    _Alignof(), _Noreturn, _Static_assert() and _Thread_local.
  - Add __generic(), which allows us to do _Generic() in a portable
    fashion.
  - Improve __offsetof(), __DECONST(), __DEVOLATILE() and __DEQUALIFY()
    to use __uintptr_t and __size_t to make them work with less
    header prerequisites.
  - Add __has_feature(), __has_include() and __has_builtin() to make it
    easier to test against Clang features.

Tested by: linimon@'s exp-run (thanks!)

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

12 years agoMFC 232322:
dim [Sat, 17 Mar 2012 22:29:05 +0000 (22:29 +0000)]
MFC 232322:
  Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
  installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

  Note this does *not* disable building and installing gcc, which will
  still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.  If
  you want to disable gcc completely, you must use WITHOUT_GCC.

MFC 232323:
  Regenerate src.conf(5) after r232322.

MFC 232477:
  In r232322, I forgot one case where a check for MK_CLANG_IS_CC was
  needed, in sys/conf/kern.pre.mk.  Add it now.

MFC 232522:
  Fix a thinko in r232322, where gcc (and its tools) are not built during
  the cross-tools stage, if CC=clang and WITH_CLANG_IS_CC is not set.

  This causes no 'cc' to be installed in the temporary cross-tools tree,
  making lint fall over later in the build, because it ignores ${CC} and
  attempts to run 'cc' anyway.

  To fix this, only skip building gcc during cross-tools, if WITHOUT_GCC
  is set, or if WITH_CLANG_IS_CC is set.

  Pointy hat to: dim

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

12 years agoMFC: r232316
brueffer [Sat, 17 Mar 2012 12:33:12 +0000 (12:33 +0000)]
MFC: r232316

Update bridge(4) default values.

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

12 years agoMFC: r232315
brueffer [Sat, 17 Mar 2012 12:11:53 +0000 (12:11 +0000)]
MFC: r232315

Use a more appropriate default for the maximum number of addresses in the
bridge forwarding table.

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

12 years agoMFC r232780 and r232781:
ed [Sat, 17 Mar 2012 09:10:43 +0000 (09:10 +0000)]
MFC r232780 and r232781:

  Fix whitespace.

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

12 years agoMFC r232785
iwasaki [Sat, 17 Mar 2012 06:48:13 +0000 (06:48 +0000)]
MFC r232785

Fix wrong asresp frame parsing in iwi_checkforqos().

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

12 years agoMFC r227430:
marcel [Sat, 17 Mar 2012 05:45:21 +0000 (05:45 +0000)]
MFC r227430:
On i386, fbt probes are implemented by writing an invalid opcode over
certain instructions in a function prologue or epilogue.  DTrace has a
hook into the invalid opcode fault handler that checks whether the fault
was due to an probe and if so, runs the DTrace magic.

Upon returning from an invalid opcode fault caused by a probe, DTrace must
emulate the instruction that was replaced with the invalid opcode and then
return control to the instruction following the invalid opcode.

There were a pair of related bugs in the emulation for the leave
instruction.  The leave instruction is used to pop off a stack frame prior
to returning from a function.  The emulation for this instruction must
move the trap frame for the invalid opcode fault down the stack to the
bottom of the stack frame that is being removed, and then execute an iret.

At two points in this process, the emulation code was storing values above
the current value of the stack pointer.  This opened up a window in which
if we were two take an interrupt, the trap frame for the interrupt would
overwrite the values stored on the stack, causing the system to panic
later.

The first bug was that at one point the emulation code saves the new value
for $esp above the current stack pointer value.  The fix is to save this
value instead inside of the original trap frame.  At this point we do
not need the original trap frame so this is safe.

The second bug is that when the emulate code loads $esp from the stack, it
points part-way through the new trap frame instead of at its beginning.
The emulation code adjusts the stack pointer to the correct value
immediately afterwards, but this still leaves a one instruction window in
which an interrupt would corrupt this trap frame.  Fix this by adjusting
the stack frame value before loading it into $esp.

This fixes panics in invop_leave on i386 when using fbt return probes.

Ok'd by: rstone

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

12 years agoMFC r232777:
kib [Sat, 17 Mar 2012 01:37:40 +0000 (01:37 +0000)]
MFC r232777:
Optimize tls_get_addr_common().

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

12 years agoMFC r232973:
kib [Sat, 17 Mar 2012 01:27:09 +0000 (01:27 +0000)]
MFC r232973:
Fix indentation.

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

12 years agoMFC r232967:
kib [Sat, 17 Mar 2012 01:23:49 +0000 (01:23 +0000)]
MFC r232967:
Add PCI Id for the AMT SOL UART on G4x series Intel chipsets.

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

12 years agoMFC r232776:
kib [Sat, 17 Mar 2012 01:19:36 +0000 (01:19 +0000)]
MFC r232776:
Add brackets around bare '-1' used as the macro body.

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