]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoMerge upstream LLVM r192118:
Ed Maste [Mon, 11 Nov 2013 19:06:12 +0000 (19:06 +0000)]
Merge upstream LLVM r192118:

  Formally added an explicit enum for DWARF TLS support. No functionality
  change.

Reviewed by: dim@
Sponsored by: DARPA, AFRL

10 years agoMerge upstream LLVM r182803:
Ed Maste [Mon, 11 Nov 2013 19:00:20 +0000 (19:00 +0000)]
Merge upstream LLVM r182803:

  [Mips] Add Mips specific dynamic table entry tags.

This is to support an upcoming LLDB snapshot update.

Reviewed by: dim@
Sponsored by: DARPA, AFRL

10 years agoFollow up r223485, which made AIM use the ABI thread pointer instead of
Nathan Whitehorn [Mon, 11 Nov 2013 17:37:50 +0000 (17:37 +0000)]
Follow up r223485, which made AIM use the ABI thread pointer instead of
PCPU fields for curthread, by doing the same to Book-E. This closes
some potential races switching between CPUs. As a side effect, it turns out
the AIM and Book-E swtch.S implementations were the same to within a few
registers, so move that to powerpc/powerpc.

MFC after: 3 months

10 years agoAdd a brief comment about VM_GUEST and vm_guest_sysctl_names relationship.
Sergey Kandaurov [Mon, 11 Nov 2013 17:07:02 +0000 (17:07 +0000)]
Add a brief comment about VM_GUEST and vm_guest_sysctl_names relationship.

Suggested by: Roger Pau Monne
Reviewed by: Roger Pau Monne

10 years agoConsistently add the relocation offset only when the ELF type is not
Mark Johnston [Mon, 11 Nov 2013 16:57:57 +0000 (16:57 +0000)]
Consistently add the relocation offset only when the ELF type is not
ET_EXEC. This fixes several problems with the DTrace pid provider not
being able to match probes.

Reviewed by: rpaulo
MFC after: 2 weeks

10 years agoMerge nvi-2.1.1 -> 2.1.2
Peter Wemm [Mon, 11 Nov 2013 16:52:02 +0000 (16:52 +0000)]
Merge nvi-2.1.1 -> 2.1.2

10 years agoImport nvi2 2.1.2-95773e17e2751.
Peter Wemm [Mon, 11 Nov 2013 16:38:34 +0000 (16:38 +0000)]
Import nvi2 2.1.2-95773e17e2751.

10 years agoSet description string for VM_GUEST_HV (HyperV guest).
Sergey Kandaurov [Mon, 11 Nov 2013 16:14:33 +0000 (16:14 +0000)]
Set description string for VM_GUEST_HV (HyperV guest).
This fixes fallout from r256425.

Reported by: Pavel Timofeev <timp87@gmail com>
Tested by: Pavel Timofeev <timp87@gmail com>
Reviewed by: Roger Pau Monnц╘
MFC after: 3 days

10 years agoRename the "bare" platform "mpc85xx", which is what it actually is, and
Nathan Whitehorn [Mon, 11 Nov 2013 16:14:25 +0000 (16:14 +0000)]
Rename the "bare" platform "mpc85xx", which is what it actually is, and
add actual platform probing based on PVR. Still needs a little more work:
in particular, the CCRS setup should move here.

Also turn "bare" into a truly bare platform that doesn't pretend to know how
to do anything except get the memory map. This should also be enhanced to
process the FDT reserved memory list, but that is for another day.

10 years agoBe more flexible about which compatible strings to accept. This brings up
Nathan Whitehorn [Mon, 11 Nov 2013 15:44:20 +0000 (15:44 +0000)]
Be more flexible about which compatible strings to accept. This brings up
the PCI Express bus on the RB800 using the firmware device tree.

10 years agoMake tsec work with the device tree present on the RB800. The previous code
Nathan Whitehorn [Mon, 11 Nov 2013 15:43:21 +0000 (15:43 +0000)]
Make tsec work with the device tree present on the RB800. The previous code
assumed that the MDIO bus was a direct child of the Ethernet interface. It
may not be and indeed on many device trees is not. While here, add proper
locking for MII transactions, which may be on a bus shared by several MACs.

Hardware donated by: Benjamin Perrault

10 years agoAllow OF_decode_addr() to also be able to map resources on big-endian
Nathan Whitehorn [Mon, 11 Nov 2013 15:23:35 +0000 (15:23 +0000)]
Allow OF_decode_addr() to also be able to map resources on big-endian
devices. To this end, make PCI device detection rely on the device_type
field rather than name, as per the standard.

10 years agoConsolidate Apple firmware hacks and improve them by switching on the
Nathan Whitehorn [Mon, 11 Nov 2013 15:00:33 +0000 (15:00 +0000)]
Consolidate Apple firmware hacks and improve them by switching on the
presence of mac-io devices in the tree, which uniquely identifies Apple
hardware.

MFC after: 6 weeks

10 years agoInitialize prot variable.
Andrey V. Elsukov [Mon, 11 Nov 2013 13:19:55 +0000 (13:19 +0000)]
Initialize prot variable.

PR: 177417
MFC after: 1 week

10 years agoFix panic with RADIX_MPATH, when RTFREE_LOCKED() called for already
Andrey V. Elsukov [Mon, 11 Nov 2013 12:49:00 +0000 (12:49 +0000)]
Fix panic with RADIX_MPATH, when RTFREE_LOCKED() called for already
unlocked route. Use in6_rtalloc() instead of in6_rtalloc1. This helps
simplify the code and remove several now unused variables.

PR: 156283
MFC after: 2 weeks

10 years agoAdd missing line breaks.
Andrey V. Elsukov [Mon, 11 Nov 2013 11:13:12 +0000 (11:13 +0000)]
Add missing line breaks.

PR: 181900
MFC after: 1 week

10 years agoUpdate log message. Picobsd stopped using kgzip a while ago.
Sergey Kandaurov [Mon, 11 Nov 2013 10:54:06 +0000 (10:54 +0000)]
Update log message.  Picobsd stopped using kgzip a while ago.

10 years agoRemove r257748 by accident.
Kevin Lo [Mon, 11 Nov 2013 10:00:19 +0000 (10:00 +0000)]
Remove r257748 by accident.

10 years agoMention the RT5370/RT5372 chipset.
Kevin Lo [Mon, 11 Nov 2013 09:48:57 +0000 (09:48 +0000)]
Mention the RT5370/RT5372 chipset.

10 years agoAdd support for the MediaTek/Ralink RT5370/RT5372 chipset.
Kevin Lo [Mon, 11 Nov 2013 09:47:33 +0000 (09:47 +0000)]
Add support for the MediaTek/Ralink RT5370/RT5372 chipset.

Tested with the TP-Link TL-WN727N (RT5370) and the D-Link DWA-140 (RT5372)
on i386/amd64/arm with WPA.

10 years agoMFV r257952:
Xin LI [Mon, 11 Nov 2013 09:19:58 +0000 (09:19 +0000)]
MFV r257952:

Upgrade to OpenSSH 6.4p1.

Bump VersionAddendum.

Approved by: des

10 years agoVendor import of OpenSSH 6.4p1.
Xin LI [Mon, 11 Nov 2013 09:13:37 +0000 (09:13 +0000)]
Vendor import of OpenSSH 6.4p1.

Approved by: des

10 years agoIf A-MPDU transmission fails entirely, then no BA is received from the
Adrian Chadd [Mon, 11 Nov 2013 09:08:22 +0000 (09:08 +0000)]
If A-MPDU transmission fails entirely, then no BA is received from the
NIC and pushed up to the driver.  Unfortunately this means there's
no rate control notification done.  Thus, if the rate control code
makes a decision that hits a crappy rate that can't succeed, the
rate code would never lower the rate and packet loss would continue.

So, fake some rate control notification in this case.

10 years agoReplace the hard-coded RX queue value check with IWN_UNSOLICITED_RX_NOTIF.
Adrian Chadd [Mon, 11 Nov 2013 08:56:40 +0000 (08:56 +0000)]
Replace the hard-coded RX queue value check with IWN_UNSOLICITED_RX_NOTIF.

10 years agoFix off-by-one. Sorry!
Adrian Chadd [Mon, 11 Nov 2013 08:55:38 +0000 (08:55 +0000)]
Fix off-by-one. Sorry!

10 years agoUse IWN_NBANDS rather than a hard-coded limit.
Adrian Chadd [Mon, 11 Nov 2013 08:54:45 +0000 (08:54 +0000)]
Use IWN_NBANDS rather than a hard-coded limit.

Tested:

* Intel 5100, STA

10 years agoSend EAPOL frames at the management rate, not the data rate.
Adrian Chadd [Mon, 11 Nov 2013 08:53:20 +0000 (08:53 +0000)]
Send EAPOL frames at the management rate, not the data rate.

Without this, a far away station with low signal strength would
associate using the management rate (by default the lowest rate)
and then the EAPOL frames would go out at the current AMRR best
guess.  This would result in association failing authentication.

Tested:

* Intel 5100, STA
* Intel 2230, STA

10 years agoIntroduce seperate mutex lock to protect protect CTL I/O pools, slightly
Alexander Motin [Mon, 11 Nov 2013 08:27:20 +0000 (08:27 +0000)]
Introduce seperate mutex lock to protect protect CTL I/O pools, slightly
reducing global CTL lock scope and congestion.

While there, simplify CTL I/O pools KPI, hiding implementation details.

10 years agoDo not use just freed memory.
Gleb Smirnoff [Mon, 11 Nov 2013 07:44:09 +0000 (07:44 +0000)]
Do not use just freed memory.

Sponsored by: Nginx, Inc.

10 years agoRemove never used ioctls that originate from KAME. The proof
Gleb Smirnoff [Mon, 11 Nov 2013 05:39:42 +0000 (05:39 +0000)]
Remove never used ioctls that originate from KAME. The proof
of their zero usage was exp-run from misc/183538.

10 years agoFix a few style nits.
Glen Barber [Mon, 11 Nov 2013 03:30:14 +0000 (03:30 +0000)]
Fix a few style nits.

MFC after: 3 days
X-MFC-After: 10.0-RELEASE
Sponsored by: The FreeBSD Foundation

10 years agoAdd the necessary bits for dumps on ppc64.
Justin Hibbits [Mon, 11 Nov 2013 03:17:38 +0000 (03:17 +0000)]
Add the necessary bits for dumps on ppc64.

MFC after: 2 weeks

10 years agoSilence bmake(1) errors if TEST_DIRS evaluation is empty.
Glen Barber [Mon, 11 Nov 2013 03:12:43 +0000 (03:12 +0000)]
Silence bmake(1) errors if TEST_DIRS evaluation is empty.

10 years agoCheck the partition scheme before blowing away disks, instead of after.
Devin Teske [Mon, 11 Nov 2013 02:13:47 +0000 (02:13 +0000)]
Check the partition scheme before blowing away disks, instead of after.
The effects of this patch would only be noticeable if you were purposefully
setting a bad value and trying to see what happens; and leaving the disks
intact if a bad value has been set seems fair.

10 years agoRemove the env(1) but keep the var.
Devin Teske [Mon, 11 Nov 2013 02:02:05 +0000 (02:02 +0000)]
Remove the env(1) but keep the var.

10 years agoUnbreak the installer on head/:
Glen Barber [Mon, 11 Nov 2013 01:42:59 +0000 (01:42 +0000)]
Unbreak the installer on head/:

  When bsdinstall(8) sources the bsdconfig(8) common.subr file,
  PKG_ABI is set by calling 'pkg -vv' and searching for the ABI
  pkg(8) will use.

  When pkg(8) is run for the first time, the bootstrap process
  is run, which prompts for 'y/N' input from stdin if running with
  TERM set.

  Since TERM is set and it is the first time pkg(8) is run, which
  happens automatically, bsdinstall(8) hangs waiting for user input
  which is never displayed since a specific line is expected by
  awk(1), and stdin is expected by pkg(8).

  Set ASSUME_ALWAYS_YES=1, which will cause pkg(8) to assume the
  '-y' flag is also used for the bootstrap process, allowing
  bsdinstall(8) to proceed to the keymap lookup, otherwise
  bsdinstall(8) appears to hang after selecting 'Install' from the
  menu on first boot from CDROM.

10 years agoUpdate svn from 1.8.1 to 1.8.4 - minor security fixes and client side
Peter Wemm [Mon, 11 Nov 2013 01:14:58 +0000 (01:14 +0000)]
Update svn from 1.8.1 to 1.8.4 - minor security fixes and client side
merge handling bug fixes (reintegrate, mergeinfo etc)

10 years agoImport svn-1.8.4, which includes fixes for both security and merge
Peter Wemm [Mon, 11 Nov 2013 01:00:29 +0000 (01:00 +0000)]
Import svn-1.8.4, which includes fixes for both security and merge
handling.

10 years agox86 platforms that use an IOAPIC route the legacy timer interrupt (IRQ0) to
Neel Natu [Mon, 11 Nov 2013 00:45:17 +0000 (00:45 +0000)]
x86 platforms that use an IOAPIC route the legacy timer interrupt (IRQ0) to
pin 2 of the IOAPIC.

Add an 'Interrupt Source Override' entry to the MADT to describe this
and start asserting interrupts on pin 2 in the 8254 device model.

Submitted by: Tycho Nightingale (tycho.nightingale@pluribusnetworks.com)

10 years agoUse relaxed (write-only) memory barriers when writing some of queue index
Alexander Motin [Sun, 10 Nov 2013 23:48:16 +0000 (23:48 +0000)]
Use relaxed (write-only) memory barriers when writing some of queue index
registers (for now on ISP2400+).  We never read those registers back and
AFAIK their semantics does not require any immediate reaction on write.

10 years agoSome more registers access optimizations:
Alexander Motin [Sun, 10 Nov 2013 23:34:32 +0000 (23:34 +0000)]
Some more registers access optimizations:
 - Process ATIO queue only if interrupt status tells so;
 - Do not update queue out pointers after each processed command, do it
only once at the end of the loop.

10 years agosh: Properly quote alias output from command -v.
Jilles Tjoelker [Sun, 10 Nov 2013 23:00:39 +0000 (23:00 +0000)]
sh: Properly quote alias output from command -v.

An alias should be printed by command -v as a command line; therefore, make
the alias definition suitable for re-input to the shell.

10 years agoPrepare for 64-bit. Iow, use Elf_*hdr instead of the 32-bit ones.
Andreas Tobler [Sun, 10 Nov 2013 22:42:56 +0000 (22:42 +0000)]
Prepare for 64-bit. Iow, use Elf_*hdr instead of the 32-bit ones.

10 years agoApparently with "const uint32_t foo = 0x60;" gcc doesn't consider 'foo'
Ian Lepore [Sun, 10 Nov 2013 21:12:42 +0000 (21:12 +0000)]
Apparently with "const uint32_t foo = 0x60;" gcc doesn't consider 'foo'
to be a constant integer suitable for use in a case label, so use #defines.

10 years ago- Add myself as port committer and my mentor's relationship.
Alexey Degtyarev [Sun, 10 Nov 2013 20:24:41 +0000 (20:24 +0000)]
- Add myself as port committer and my mentor's relationship.
- Add myself to calendar.freebsd.

Approved:   wg (mentor)

10 years agoRB_FOREACH_[REVERSE_]FROM() do not require the head pointer. Reword.
Bruce M Simpson [Sun, 10 Nov 2013 19:49:18 +0000 (19:49 +0000)]
RB_FOREACH_[REVERSE_]FROM() do not require the head pointer. Reword.

10 years agoDocument the RB_FOREACH_FROM() and RB_FOREACH_REVERSE_FROM() macros.
Bruce M Simpson [Sun, 10 Nov 2013 19:41:04 +0000 (19:41 +0000)]
Document the RB_FOREACH_FROM() and RB_FOREACH_REVERSE_FROM() macros.

These are largely syntactic sugar. However, they improve code
readability where an RB_FOREACH() or RB_FOREACH_REVERSE()
traversal has been interrupted and must be resumed. Performance
is improved by avoiding unnecessary traversal from the head node.

10 years agosh: Add a test case for would-be assignments that are not due to quoting.
Jilles Tjoelker [Sun, 10 Nov 2013 18:46:59 +0000 (18:46 +0000)]
sh: Add a test case for would-be assignments that are not due to quoting.

10 years agoFix typo in "iscsictl -v".
Edward Tomasz Napierala [Sun, 10 Nov 2013 14:18:05 +0000 (14:18 +0000)]
Fix typo in "iscsictl -v".

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoSave one more register read per command by not reading rqstoutrp register
Alexander Motin [Sun, 10 Nov 2013 13:37:44 +0000 (13:37 +0000)]
Save one more register read per command by not reading rqstoutrp register
every time.  The purpose of that register is unlikely output queue overflow
detection, so read it only when its last known (and probably stale now)
value signals overflow.

This reduces CPU load and lock congestion and rises bottleneck in CTL
while doing target mode via two 8Gbps ports from 100K to 120K IOPS.

10 years agoFix typo.
Edward Tomasz Napierala [Sun, 10 Nov 2013 13:16:28 +0000 (13:16 +0000)]
Fix typo.

Submitted by: feld@
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

10 years agoSome CAM locks polishing:
Alexander Motin [Sun, 10 Nov 2013 12:16:09 +0000 (12:16 +0000)]
Some CAM locks polishing:
 - Fix LOR and possible lock recursion when handling high-power commands.
Introduce new lock to protect left power quota and list of frozen devices.
 - Correct locking around xpt periph creation.
 - Remove seems never used XPT_FLAG_OPEN xpt periph flag.

10 years agoFix typo in r257515.
Gleb Smirnoff [Sun, 10 Nov 2013 09:36:51 +0000 (09:36 +0000)]
Fix typo in r257515.

Submitted by: az

10 years agopkill - Optimize pgrep -F
Eitan Adler [Sun, 10 Nov 2013 05:22:29 +0000 (05:22 +0000)]
pkill - Optimize pgrep -F

 Ask for a specific process instead of pulling down all processes when
 -F <pidfile> is specified.  This is much much faster.

 Obtained from: DragonflyBSD

10 years agoDon't enable interrupts before we call sched_throw(). Interrupts
Marcel Moolenaar [Sun, 10 Nov 2013 04:22:40 +0000 (04:22 +0000)]
Don't enable interrupts before we call sched_throw(). Interrupts
are expected to be disabled by virtue of md_spinlock_count=1.

10 years agoFix typo: site_t -> size_t
Eitan Adler [Sun, 10 Nov 2013 04:06:46 +0000 (04:06 +0000)]
Fix typo: site_t -> size_t

Obtained From: DragonflyBSD (1ac92c8c857a15dc010924c5f066da404e568640)

10 years agoRemove dead link
Eitan Adler [Sun, 10 Nov 2013 03:28:36 +0000 (03:28 +0000)]
Remove dead link

10 years agoMinor spelling correction.
Hiren Panchasara [Sun, 10 Nov 2013 02:43:09 +0000 (02:43 +0000)]
Minor spelling correction.

10 years agoHide MNT_SHARED_WRITES() and MNT_EXTENDED_SHARED() under the #ifdef
Konstantin Belousov [Sat, 9 Nov 2013 22:28:04 +0000 (22:28 +0000)]
Hide MNT_SHARED_WRITES() and MNT_EXTENDED_SHARED() under the #ifdef
_KERNEL braces.  Struct mount is only defined for the kernel build.

Reported and tested by: andreast
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoFix gcc warning about an uninitialized bool in sys/x86/iommu/intel_drv.c.
Dimitry Andric [Sat, 9 Nov 2013 22:05:29 +0000 (22:05 +0000)]
Fix gcc warning about an uninitialized bool in sys/x86/iommu/intel_drv.c.

Reviewed by: kib

10 years agoFix gcc warning about an empty device_printf() format string in
Dimitry Andric [Sat, 9 Nov 2013 22:00:44 +0000 (22:00 +0000)]
Fix gcc warning about an empty device_printf() format string in
sys/x86/iommu/intel_fault.c.

Reviewed by: kib

10 years agoFix an NFSv4.1 client specific case where a forced dismount would hang.
Rick Macklem [Sat, 9 Nov 2013 21:24:56 +0000 (21:24 +0000)]
Fix an NFSv4.1 client specific case where a forced dismount would hang.
The hang occurred in nfsv4_setsequence() when it couldn't find an
available session slot and is fixed by checking for a forced dismount
in progress and just returning for this case.

MFC after: 1 month

10 years agoFix (erroneous) gcc warnings about usage of uninitialized variables in
Dimitry Andric [Sat, 9 Nov 2013 20:36:52 +0000 (20:36 +0000)]
Fix (erroneous) gcc warnings about usage of uninitialized variables in
sys/x86/iommu/intel_idpgtbl.c.

Reviewed by: kib

10 years agoIf filesystem declares that it supports shared locking for writes, use
Konstantin Belousov [Sat, 9 Nov 2013 20:36:29 +0000 (20:36 +0000)]
If filesystem declares that it supports shared locking for writes, use
shared vnode lock for VOP_PUTPAGES() as well.  The only such
filesystem in the tree is ZFS, and it uses
vnode_pager_generic_putpages(), which performs the pageout with
VOP_WRITE().

Reviewed by: alc
Discussed with: avg
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoBoth vn_close() and VFS_PROLOGUE() evaluate vp->v_mount twice, without
Konstantin Belousov [Sat, 9 Nov 2013 20:30:13 +0000 (20:30 +0000)]
Both vn_close() and VFS_PROLOGUE() evaluate vp->v_mount twice, without
holding the vnode lock; vp->v_mount is checked first for NULL
equiality, and then dereferenced if not NULL.  If vnode is reclaimed
meantime, second dereference would still give NULL.  Change
VFS_PROLOGUE() to evaluate the mp once, convert MNTK_SHARED_WRITES and
MNTK_EXTENDED_SHARED tests into inline functions.

Reviewed by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

10 years agoFix gcc warnings about casting away const in sys/x86/iommu/intel_drv.c.
Dimitry Andric [Sat, 9 Nov 2013 20:09:02 +0000 (20:09 +0000)]
Fix gcc warnings about casting away const in sys/x86/iommu/intel_drv.c.

Reviewed by: kib

10 years agoo Add ONFI signature check.
Ruslan Bukin [Sat, 9 Nov 2013 18:46:11 +0000 (18:46 +0000)]
o Add ONFI signature check.
o Add Micron chip found in Freescale Vybrid Family
  Phytec COSMIC board.

Approved by: cognet (mentor)

10 years agopkg_install has been removed on 20131031.
Sergey Kandaurov [Sat, 9 Nov 2013 16:20:42 +0000 (16:20 +0000)]
pkg_install has been removed on 20131031.

Approved by: portmgr (bdrewery)

10 years agoUse system libiconv, instead of trying to dlopen() it.
Gleb Smirnoff [Sat, 9 Nov 2013 14:48:50 +0000 (14:48 +0000)]
Use system libiconv, instead of trying to dlopen() it.

PR: 183153
Submitted by: Dominic Fandrey <kamikaze bsdforen.de>

10 years agoAdd missed DPADD
Eitan Adler [Sat, 9 Nov 2013 09:05:50 +0000 (09:05 +0000)]
Add missed DPADD

Reported by: swildner@DragonflyBSD.org

10 years agoChange manual string conversion to expand_number
Eitan Adler [Sat, 9 Nov 2013 08:57:21 +0000 (08:57 +0000)]
Change manual string conversion to expand_number

Reviewed by: adrian

10 years agoAdd support for SIIG x1 pci-e single parallel port card (JJ-E01211-S1)
Eitan Adler [Sat, 9 Nov 2013 08:27:55 +0000 (08:27 +0000)]
Add support for SIIG x1 pci-e single parallel port card (JJ-E01211-S1)

PR: kern/182217
Submitted by: Craig Leres <leres@ee.lbl.gov>
MFC After: 1 week

10 years agoStrip out this cruft; people should be making modules with a complete
Adrian Chadd [Sat, 9 Nov 2013 08:11:24 +0000 (08:11 +0000)]
Strip out this cruft; people should be making modules with a complete
kernel config environment anyway.

10 years agoFix AMRR to correctly select the initial rate.
Adrian Chadd [Sat, 9 Nov 2013 07:30:13 +0000 (07:30 +0000)]
Fix AMRR to correctly select the initial rate.

There were two bugs:

* If the initial lowest rate didn't go through the loop at least once,
  the AMRR rate index would be the highest rate in the table
  (eg the rix mapping to MCS15) but rate would stay at the default
  value, namely 0.

  This meant that the initial rate selection would be MCS15 _but_ the
  node ni_txrate value would be MCS0.

* If the node is 11n, then break out of the loop correctly.  Beforehand,
  my initial 11n AMRR commit would immediately exit out as it would
  fail the 11n check, then it would always fall through to the non-11n
  rate which would then see if it was < 36mbit (ie, "72"), which would
  always match.  Hence, it'd always return MCS15.

Tested:

* Intel Centrino 2230 STA (local changes), STA mode
* Intel Wifi 5100, STA

10 years agoAdd some new driver definitions as part of the chip support updates:
Adrian Chadd [Sat, 9 Nov 2013 06:30:09 +0000 (06:30 +0000)]
Add some new driver definitions as part of the chip support updates:

This is a no-op for now!

* Add a new flag value for "there are no extra bits" for some random
  field;

* Add a definition for the maximum number of calibration entries in
  the calibration data cache in iwn_softc.  It's not yet used.

* Add regulatory bands for the 2030 NIC.

Submitted by: Cedric Gross <cg@cgross.info>

10 years agoFix typo in r256646: We want to generate lists of directories in INDEX-OLD
Colin Percival [Sat, 9 Nov 2013 04:50:05 +0000 (04:50 +0000)]
Fix typo in r256646: We want to generate lists of directories in INDEX-OLD
and INDEX-NEW and compare them, not generate the same list of directories
from INDEX-OLD twice...

Pointy hats to: cperciva & everybody who didn't proofread EN-13:04 enough

10 years agoDon't try to use the 32-bit drti.o unless the data model is explicitly set
Mark Johnston [Sat, 9 Nov 2013 04:38:16 +0000 (04:38 +0000)]
Don't try to use the 32-bit drti.o unless the data model is explicitly set
to ILP32. Otherwise dtrace -G will attempt to use it on amd64 if it can't
determine which data model to use, which happens when -64 is omitted and
no object files are provided, e.g. with

# dtrace -G -n BEGIN

This would result in a linker error, but now works properly.

Also remove an unnecessary #ifdef.

MFC after: 2 weeks

10 years agoOn XenServer the "halt" message is used instead of "poweroff", which
Justin T. Gibbs [Sat, 9 Nov 2013 03:07:48 +0000 (03:07 +0000)]
On XenServer the "halt" message is used instead of "poweroff", which
makes FreeBSD halt but not poweroff (as expected when issuing a
shutdown from the VM manager). Fix this by using the same handler
for both "halt" and "poweroff".

NB: The "halt" signal seems to be used on XenServer only.  The OSS
    Xen toolstack (xl) uses "poweroff" instead.

Submitted by: Roger Pau Monné
Sponsored by: Citrix Systems R&D
Reviewed by: gibbs
MFC after: 2 days

10 years agoFix extattr(2) MLINKS.
Sergey Kandaurov [Sat, 9 Nov 2013 00:36:09 +0000 (00:36 +0000)]
Fix extattr(2) MLINKS.

MFC after: 1 week

10 years agoThis change builds kernel tools based on the same assumption as building
Ian Lepore [Sat, 9 Nov 2013 00:15:36 +0000 (00:15 +0000)]
This change builds kernel tools based on the same assumption as building
the kernel itself:  If building for the same architecture as the build host,
the kernel build assumes that the host toolchain is capable of building the
kernel.  If it's not, "make kernel-toolchain" will bootstrap a new set of
tools that will work.

With this change the same assumptions are made for building kernel tools,
and the existing host toolchain is used to do the build (notably, the build
doesn't link the tools with the legacy libraries, which may not even exist).
If ever for some reason the host toolchain isn't capable of building the
kernel tools, then doing a "make kernel-toolchain" will bootstrap newer
tools to get the job done.

So when built as part of buildworld or kernel-toolchain, the kernel tools
are built using the XMAKE (via BMAKE) commands and environment.  When built
as part of building just the kernel on a same-target host, the tools are
built using the new KTMAKE commands and environment.  What doesn't jump
out at you in the diffs is that the difference between BMAKE and KTMAKE
is that BMAKE contains this magic line which changes how the build is done
because it changes what files get included for .include <bsd.prog.mk> and
other standard includes:

    MAKEFLAGS="-m ${.CURDIR}/tools/build/mk ${.MAKEFLAGS}"

and KTMAKE doesn't, and contains this instead:

    TOOLS_PREFIX=${WORLDTMP}

Hopefully this brings the "how to build aicasm with the right toolchain"
saga to a conclusion that works in all usage scenarios that have
historically been supported.

10 years agomdoc: add missing El.
Joel Dahl [Fri, 8 Nov 2013 23:11:04 +0000 (23:11 +0000)]
mdoc: add missing El.

10 years agomdoc: remove superfluous paragraph macro.
Joel Dahl [Fri, 8 Nov 2013 23:08:01 +0000 (23:08 +0000)]
mdoc: remove superfluous paragraph macro.

10 years agodrm/radeon: Wake up userland after page flip
Jean-Sébastien Pédron [Fri, 8 Nov 2013 22:47:43 +0000 (22:47 +0000)]
drm/radeon: Wake up userland after page flip

For instance, this caused issues in KDE, such as stuttered animations
(with desktop effects enabled).

10 years agodrm: Initialize "handle" to 0 before calling drm_gem_handle_create()
Jean-Sébastien Pédron [Fri, 8 Nov 2013 22:44:46 +0000 (22:44 +0000)]
drm: Initialize "handle" to 0 before calling drm_gem_handle_create()

This is variable is being checked in drm_gem_name_create() before being
set.

10 years agoEliminate duplicated & dead code.
Marko Zec [Fri, 8 Nov 2013 22:40:33 +0000 (22:40 +0000)]
Eliminate duplicated & dead code.

MFC after: 3 days

10 years agoFix typo in a comment.
Hiren Panchasara [Fri, 8 Nov 2013 20:11:15 +0000 (20:11 +0000)]
Fix typo in a comment.

10 years agoDo not use a sleep lock when protecting the driver flags.
Alfred Perlstein [Fri, 8 Nov 2013 18:28:48 +0000 (18:28 +0000)]
Do not use a sleep lock when protecting the driver flags.

This was causing a locking issue with lagg

Submitted by: odeds

10 years agoFix for bad performance when mtu is increased.
Alfred Perlstein [Fri, 8 Nov 2013 18:26:28 +0000 (18:26 +0000)]
Fix for bad performance when mtu is increased.

Update the auto moderation behavior in the mlxen driver to match
the new LINUX OFED code.

Submitted by: odeds

10 years agoUse explicit long cast to avoid overflow in bitopts.
Alfred Perlstein [Fri, 8 Nov 2013 18:20:19 +0000 (18:20 +0000)]
Use explicit long cast to avoid overflow in bitopts.

This was causing problems with the buddy allocator inside of
ofed.

Submitted by: odeds

10 years agoRemove generate-release.sh from head/.
Glen Barber [Fri, 8 Nov 2013 17:27:38 +0000 (17:27 +0000)]
Remove generate-release.sh from head/.

The release.sh (based heavily on generate-release.sh) has been
used for the 9.2-RELEASE and 10.0-RELEASE cycles, so make sure
there is no confusion on what is currently being used by having
two similar scripts.

A big "thank you" to Nathan Whitehorn, the author of the
generate-release.sh script, for writing this utility.

No objection: nwhitehorn
MFC after: never
Sponsored by: The FreeBSD Foundation

10 years agoInitialize variable in sys/x86/iommu/busdma_dmar.c, to avoid possible
Dimitry Andric [Fri, 8 Nov 2013 17:27:22 +0000 (17:27 +0000)]
Initialize variable in sys/x86/iommu/busdma_dmar.c, to avoid possible
uninitialized use.

Reviewed by: kib

10 years agoFix typo in include guard, found by clang 3.4.
Dimitry Andric [Fri, 8 Nov 2013 17:23:37 +0000 (17:23 +0000)]
Fix typo in include guard, found by clang 3.4.

MFC after: 3 days

10 years agoFix signal delivery for the iBCS2 binaries. The iBCS2 sysvec uses
Konstantin Belousov [Fri, 8 Nov 2013 16:57:55 +0000 (16:57 +0000)]
Fix signal delivery for the iBCS2 binaries.  The iBCS2 sysvec uses
current FreeBSD signal trampoline, but does not specifies
sv_sigcode_base, since shared page is not mapped.  This results in the
zero %eip for the signal frame.  Fall back to calculating %eip as
offset from the psstrings when sv_sigcode_base is not initialized.

Reported by: Rich Naill <rich@enterprisesystems.net>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoEliminate an unused macro.
Alan Cox [Fri, 8 Nov 2013 16:56:13 +0000 (16:56 +0000)]
Eliminate an unused macro.

10 years agoAdd bits for the AMD features from CPUID function 0x80000001 ECX,
Konstantin Belousov [Fri, 8 Nov 2013 16:32:30 +0000 (16:32 +0000)]
Add bits for the AMD features from CPUID function 0x80000001 ECX,
described in the rev. 3.0 of the Kabini BKDG, document 48751.pdf.

Partially based on the patch submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoRemove 'inline' from ar9300_init_pll(), it's too big to inline.
Ian Lepore [Fri, 8 Nov 2013 16:28:00 +0000 (16:28 +0000)]
Remove 'inline' from ar9300_init_pll(), it's too big to inline.

Submitted by: adrian@

10 years agoAs of r257209, all architectures have defined VM_KMEM_SIZE_SCALE. In other
Alan Cox [Fri, 8 Nov 2013 16:25:00 +0000 (16:25 +0000)]
As of r257209, all architectures have defined VM_KMEM_SIZE_SCALE.  In other
words, every architecture is now auto-sizing the kmem arena.  This revision
changes kmeminit() so that the definition of VM_KMEM_SIZE_SCALE becomes
mandatory and the definition of VM_KMEM_SIZE becomes optional.

Replace or eliminate all existing definitions of VM_KMEM_SIZE.  With
auto-sizing enabled, VM_KMEM_SIZE effectively became an alternate spelling
for VM_KMEM_SIZE_MIN on most architectures.  Use VM_KMEM_SIZE_MIN for
clarity.

Change kmeminit() so that the effect of defining VM_KMEM_SIZE is similar to
that of setting the tunable vm.kmem_size.  Whereas the macros
VM_KMEM_SIZE_{MAX,MIN,SCALE} have had the same effect as the tunables
vm.kmem_size_{max,min,scale}, the effects of VM_KMEM_SIZE and vm.kmem_size
have been distinct.  In particular, whereas VM_KMEM_SIZE was overridden by
VM_KMEM_SIZE_{MAX,MIN,SCALE} and vm.kmem_size_{max,min,scale}, vm.kmem_size
was not.  Remedy this inconsistency.  Now, VM_KMEM_SIZE can be used to set
the size of the kmem arena at compile-time without that value being
overridden by auto-sizing.

Update the nearby comments to reflect the kmem submap being replaced by the
kmem arena.  Stop duplicating the auto-sizing formula in every machine-
dependent vmparam.h and place it in kmeminit() where auto-sizing takes
place.

Reviewed by: kib (an earlier version)
Sponsored by: EMC / Isilon Storage Division

10 years agoBuild and install the atf tests.
Julio Merino [Fri, 8 Nov 2013 14:33:41 +0000 (14:33 +0000)]
Build and install the atf tests.

Reviewed by: freebsd-testing
Approved by: rpaulo (mentor)

10 years agoInstall category Kyuafiles from their category directories.
Julio Merino [Fri, 8 Nov 2013 14:29:06 +0000 (14:29 +0000)]
Install category Kyuafiles from their category directories.

Move the installation of /usr/tests/lib/Kyuafile from src/tests/lib/
to src/lib/.  This is to keep the src/tests/ hierarchy unaware of the
rest of the tree, which makes things clearer in general.  In particular:

1) Everything related to the construction of /usr/tests/lib/ is kept
   in src/lib/.  There is no need to think about different directories
   and how they relate to each other.  (The same applies for libexec,
   usr.bin, etc. but these are not yet handled.)

2) src/tests becomes the place to keep cross-functional test programs
   and nothing else, which also helps in simplifying things.

Reviewed by: freebsd-testing
Approved by: rpaulo (mentor)

10 years agoHandle the removal of the test suite when WITHOUT_TESTS=yes.
Julio Merino [Fri, 8 Nov 2013 14:26:52 +0000 (14:26 +0000)]
Handle the removal of the test suite when WITHOUT_TESTS=yes.

Add all files from /usr/tests to the obsoleted files list when the
build of the tests is disabled via the WITHOUT_TESTS knob.  Do this
automatically so that we do not have to suffer the pain of maintaining
such list by hand.

Reviewed by: freebsd-testing
Approved by: rpaulo (mentor)