]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoEliminate sub-shells where possible for performance.
Devin Teske [Tue, 10 Feb 2015 02:55:10 +0000 (02:55 +0000)]
Eliminate sub-shells where possible for performance.

MFC after: 7 days

9 years agoWhitespace.
Devin Teske [Tue, 10 Feb 2015 02:53:26 +0000 (02:53 +0000)]
Whitespace.

MFC after: 3 days

9 years agoExclude 'tests' from DEBUG_DISTRIBUTIONS.
Glen Barber [Tue, 10 Feb 2015 01:35:26 +0000 (01:35 +0000)]
Exclude 'tests' from DEBUG_DISTRIBUTIONS.

Sponsored by: The FreeBSD Foundation

9 years agocxgbe(4): allow the SET_FILTER_MODE ioctl to change the mode when it's
Navdeep Parhar [Tue, 10 Feb 2015 01:16:43 +0000 (01:16 +0000)]
cxgbe(4): allow the SET_FILTER_MODE ioctl to change the mode when it's
safe to do so.

MFC after: 1 month

9 years agoComments.
Devin Teske [Tue, 10 Feb 2015 01:02:02 +0000 (01:02 +0000)]
Comments.

MFC after: 3 days

9 years agoAdd error reporting to interrupt CPU binding.
Nathan Whitehorn [Tue, 10 Feb 2015 00:57:26 +0000 (00:57 +0000)]
Add error reporting to interrupt CPU binding.

9 years agoSet thread priorities on multithreaded CPUs so that threads holding a
Nathan Whitehorn [Tue, 10 Feb 2015 00:55:42 +0000 (00:55 +0000)]
Set thread priorities on multithreaded CPUs so that threads holding a
spinlock are high-priority and threads waiting for a spinlock are set to
low priority.

9 years agoUn-revert the r278323 again - whatever Jenkins/kyua is up it, it has
Jamie Gritton [Tue, 10 Feb 2015 00:48:51 +0000 (00:48 +0000)]
Un-revert the r278323 again - whatever Jenkins/kyua is up it, it has
nothing to do with this.

9 years agoNotify devd(8) when a process crashed.
Rui Paulo [Mon, 9 Feb 2015 23:13:50 +0000 (23:13 +0000)]
Notify devd(8) when a process crashed.

This change implements a notification (via devctl) to userland when
the kernel produces coredumps after a process has crashed.
devd can then run a specific command to produce a human readable crash
report.  The command is most usually a helper that runs gdb/lldb
commands on the file/coredump pair.  It's possible to use this
functionality for implementing automatic generation of crash reports.

devd(8) will be notified of the full path of the binary that crashed and
the full path of the coredump file.

9 years agoAdd the ability to print a vendor copyright in dmesg.
Rui Paulo [Mon, 9 Feb 2015 23:04:30 +0000 (23:04 +0000)]
Add the ability to print a vendor copyright in dmesg.

9 years agoFix DMA address casts. Regression issue after r278279.
Hans Petter Selasky [Mon, 9 Feb 2015 21:47:12 +0000 (21:47 +0000)]
Fix DMA address casts. Regression issue after r278279.

MFC after: 3 days

9 years agoUse __builtin_popcountl() instead of __builtin_popcount().
John Baldwin [Mon, 9 Feb 2015 21:39:18 +0000 (21:39 +0000)]
Use __builtin_popcountl() instead of __builtin_popcount().

Submitted by: jkim

9 years agoAdd tests for `pw usernext'.
Brad Davis [Mon, 9 Feb 2015 21:15:52 +0000 (21:15 +0000)]
Add tests for `pw usernext'.

PR: 197120
Submitted by: Robert O'Neil <oneil.rs@gmail.com>
Approved by: will

9 years agoUse __builtin_popcnt() to implement a BIT_COUNT() operation for bitsets and
John Baldwin [Mon, 9 Feb 2015 21:03:23 +0000 (21:03 +0000)]
Use __builtin_popcnt() to implement a BIT_COUNT() operation for bitsets and
use this to implement CPU_COUNT() to count the number of CPUs in a cpuset.

MFC after: 2 weeks

9 years agoAdd x2APIC support. Enable it by default if CPU is capable. The
Konstantin Belousov [Mon, 9 Feb 2015 21:00:56 +0000 (21:00 +0000)]
Add x2APIC support.  Enable it by default if CPU is capable.  The
hw.x2apic_enable tunable allows disabling it from the loader prompt.

To closely repeat effects of the uncached memory ops when accessing
registers in the xAPIC mode, the x2APIC writes to MSRs are preceeded
by mfence, except for the EOI notifications.  This is probably too
strict, only ICR writes to send IPI require serialization to ensure
that other CPUs see the previous actions when IPI is delivered.  This
may be changed later.

In vmm justreturn IPI handler, call doreti_iret instead of doing iretd
inline, to handle corner conditions.

Note that the patch only switches LAPICs into x2APIC mode. It does not
enables FreeBSD to support > 255 CPUs, which requires parsing x2APIC
MADT entries and doing interrupts remapping, but is the required step
on the way.

Reviewed by: neel
Tested by: pho (real hardware), neel (on bhyve)
Discussed with: jhb, grehan
Sponsored by: The FreeBSD Foundation
MFC after: 2 months

9 years agoThis fixes a bug in the way that the LLE timers for nd6
Randall Stewart [Mon, 9 Feb 2015 19:28:11 +0000 (19:28 +0000)]
This fixes a bug in the way that the LLE timers for nd6
and arp were being used. They basically would pass in the
mutex to the callout_init. Because they used this method
to the callout system, it was possible to "stop" the callout.
When flushing the table and you stopped the running callout, the
callout_stop code would return 1 indicating that it was going
to stop the callout (that was about to run on the callout_wheel blocked
by the function calling the stop). Now when 1 was returned, it would
lower the reference count one extra time for the stopped timer, then
a few lines later delete the memory. Of course the callout_wheel was
stuck in the lock code and would then crash since it was accessing
freed memory. By using callout_init(c, 1) we always get a 0 back
and the reference counting bug does not rear its head. We do have
to make a few adjustments to the callouts themselves though to make
sure it does the proper thing if rescheduled as well as gets the lock.

Commented upon by hiren and sbruno
See Phabricator D1777 for more details.

Commented upon by hiren and sbruno
Reviewed by: adrian, jhb and bz
Sponsored by: Netflix Inc.

9 years agoDistribute interrupts across multiple CPUs in SMP configurations instead of sending...
Nathan Whitehorn [Mon, 9 Feb 2015 19:21:54 +0000 (19:21 +0000)]
Distribute interrupts across multiple CPUs in SMP configurations instead of sending them
all to CPU 0.

9 years agoAdd new alias "bsdconfig api" (same as "bsdconfig includes")
Devin Teske [Mon, 9 Feb 2015 19:20:59 +0000 (19:20 +0000)]
Add new alias "bsdconfig api" (same as "bsdconfig includes")
NB: My fingers like typing "api" a lot more than "includes"

MFC after: 3 days

9 years agoThis fixes two conditions that can incur when migration
Randall Stewart [Mon, 9 Feb 2015 19:19:44 +0000 (19:19 +0000)]
This fixes two conditions that can incur when migration
is being done in the callout code and harmonizes the macro
use.:
1) The callout_active() will lie. Basically if a migration
   is occuring and the callout is about to expire and the
   migration has been deferred, the callout_active will no
   longer return true until after the migration. This confuses
   and breaks callers that are doing callout_init(&c, 1); such
   as TCP.
2) The migration code had a bug in it where when migrating, if
   a two calls to callout_reset came in and they both collided with
   the callout on the wheel about to run, then the second call to
   callout_reset would corrupt the list the callout wheel uses
   putting the callout thread into a endless loop.
3) Per imp, I have fixed all the macro occurance in the code that
   were for the most part being ignored.

Phabricator D1711 and looked at by lstewart and jhb and sbruno.
Reviewed by: kostikbel, imp, adrian, hselasky
MFC after: 3 days
Sponsored by: Netflix Inc.

9 years agoAdd a few more instructions to xz/FREEBSD-upgrade.
Rui Paulo [Mon, 9 Feb 2015 19:19:13 +0000 (19:19 +0000)]
Add a few more instructions to xz/FREEBSD-upgrade.

9 years agoReplace the only instance of sed(1) in bsdconfig(8) with awk(1).
Devin Teske [Mon, 9 Feb 2015 19:16:19 +0000 (19:16 +0000)]
Replace the only instance of sed(1) in bsdconfig(8) with awk(1).

MFC after: 3 days

9 years agoRemove explicit routing/sendmail rc.d inclusion in FILES
Enji Cooper [Mon, 9 Feb 2015 17:53:16 +0000 (17:53 +0000)]
Remove explicit routing/sendmail rc.d inclusion in FILES

Reported by: Guy Yur <guyyur@gmail.com>
MFC after: 14 days
X-MFC with: r278249
Sponsored by: EMC / Isilon Storage Division

9 years agoRevert SVN r278464 -- fingers were in perforce mode (premature
Devin Teske [Mon, 9 Feb 2015 17:22:54 +0000 (17:22 +0000)]
Revert SVN r278464 -- fingers were in perforce mode (premature
commit of future stuffs not yet ready).

9 years agoReplace the only instance of sed(1) in bsdconfig(8) with awk(1).
Devin Teske [Mon, 9 Feb 2015 17:18:10 +0000 (17:18 +0000)]
Replace the only instance of sed(1) in bsdconfig(8) with awk(1).

MFC after: 3 days

9 years agoPrefer install over mkdir to create the directory. Add test to ensure
Warner Losh [Mon, 9 Feb 2015 16:29:44 +0000 (16:29 +0000)]
Prefer install over mkdir to create the directory. Add test to ensure
the directory doesn't exist before creating it. This makes the NO_ROOT
case actually work.

Suggested by: brooks@

9 years agoMove these definitions to bsd.own.mk along side the kernel directory /
Warner Losh [Mon, 9 Feb 2015 16:21:49 +0000 (16:21 +0000)]
Move these definitions to bsd.own.mk along side the kernel directory /
user defines. Make this work with WITH_INSTALL_AS_USER as well.

Noticed by: ian@

9 years agoFix typo.
Warner Losh [Mon, 9 Feb 2015 16:10:30 +0000 (16:10 +0000)]
Fix typo.

Submitted by: jhb@

9 years agoWe need to create /boot/dtb since some use cases don't create a full
Warner Losh [Mon, 9 Feb 2015 16:04:08 +0000 (16:04 +0000)]
We need to create /boot/dtb since some use cases don't create a full
root with BSD.root.mtree, so it often times will not exist. Rather
than force the latter for an installkernel, just create the directory
with a comment about why.

Submitted by: Guy Yur

9 years agoMake sure that we define DTB{OWN,GRP,MODE} so install works.
Warner Losh [Mon, 9 Feb 2015 16:04:01 +0000 (16:04 +0000)]
Make sure that we define DTB{OWN,GRP,MODE} so install works.

Submitted by: Guy Yur

9 years agoPass MODULES_EXTRA to the modules build. While I'm here, also always
Warner Losh [Mon, 9 Feb 2015 16:03:59 +0000 (16:03 +0000)]
Pass MODULES_EXTRA to the modules build. While I'm here, also always
pass WITHOUT_MODULES down. There's no need to make this conditional.

Submitted by: Guy Yur

9 years agoEnforce that MK_foo options shall be either "yes" or "no" and nothing
Warner Losh [Mon, 9 Feb 2015 16:03:55 +0000 (16:03 +0000)]
Enforce that MK_foo options shall be either "yes" or "no" and nothing
else.

9 years agoMark invalid page table entries correctly for PMAP as well as for the
Nathan Whitehorn [Mon, 9 Feb 2015 15:58:27 +0000 (15:58 +0000)]
Mark invalid page table entries correctly for PMAP as well as for the
hypervisor. This prevents an infinite loop where processes with evicted
pages would page fault forever when PMAP decided the evicted pages on
which the process was faulting was actually present and did not need to
be restored.

Found while building LLVM with make -j32.

Sponsored by: FreeBSD Foundation

9 years agoProperly hide a variable under #ifdef as it is only used inside the
Bjoern A. Zeeb [Mon, 9 Feb 2015 11:34:45 +0000 (11:34 +0000)]
Properly hide a variable under #ifdef as it is only used inside the
specific #ifdef block otherwise leaving an unused variable and breaking
other kernel builds.

9 years agoRevert r278445.
Glen Barber [Mon, 9 Feb 2015 10:46:39 +0000 (10:46 +0000)]
Revert r278445.

I was going to use __FreeBSD_version to determine if
xz(1) should be multi-threaded by default, but doing
this will cause problems if/when the changes are merged
from head.

Sponsored by: The FreeBSD Foundation

9 years agoEnable multi-threaded xz(1) compression, after r278433.
Glen Barber [Mon, 9 Feb 2015 10:42:27 +0000 (10:42 +0000)]
Enable multi-threaded xz(1) compression, after r278433.
Allow multi-threaded xz(1) to be turned off by specifying
NO_XZTHREADS, and allow number of threads to be overridden
by specifying XZ_THREADS=N.

MFC after: 1 week
X-MFC-needs: r278433
Sponsored by: The FreeBSD Foundation

9 years agoDefine FREEBSD_VERSION in release/Makefile, derived
Glen Barber [Mon, 9 Feb 2015 09:56:21 +0000 (09:56 +0000)]
Define FREEBSD_VERSION in release/Makefile, derived
from sys/sys/param.h.

Sponsored by: The FreeBSD Foundation

9 years agoChase r278433: bump __FreeBSD_version for xz 5.2.0 which adds multi-thread
Xin LI [Mon, 9 Feb 2015 09:17:00 +0000 (09:17 +0000)]
Chase r278433: bump __FreeBSD_version for xz 5.2.0 which adds multi-thread
capability to liblzma.

9 years agoAfter r278004 was committed, Bruce Evans noted that the casts were
Dimitry Andric [Mon, 9 Feb 2015 07:56:50 +0000 (07:56 +0000)]
After r278004 was committed, Bruce Evans noted that the casts were
actually completely unnecessary, here:

https://lists.freebsd.org/pipermail/svn-src-all/2015-February/098478.html

Remove the casts, and just assign &xxx_io_mc_regs[0][0] directly.

Reviewed by: dumbbell
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1748

9 years agoFix typo in PTE insertion overflow handling: use the page we're actually
Nathan Whitehorn [Mon, 9 Feb 2015 07:08:54 +0000 (07:08 +0000)]
Fix typo in PTE insertion overflow handling: use the page we're actually
returning, not the one we just looked at.

9 years agoMerge xz 5.2.0.
Rui Paulo [Mon, 9 Feb 2015 06:20:34 +0000 (06:20 +0000)]
Merge xz 5.2.0.

This brings support for multi-threaded compression.  This brings close
N times faster compression where N is the number of CPU cores.
Because of this, liblzma now depends on libthr.

Soon libarchive will be modified to use the new lzma API.

Thanks to antoine@ for the exp-run.

Differential Revision:  https://reviews.freebsd.org/D1786
Reviewed by: bapt

9 years agoDo not mark shared structures as __packed, it leads to race condition
Oleksandr Tymoshenko [Mon, 9 Feb 2015 02:31:27 +0000 (02:31 +0000)]
Do not mark shared structures as __packed, it leads to race condition

If structure packed as __packed clang (and probably gcc) generates
code that loads word fields (e.g. tx_pos)  byte-by-byte and if it's
modified by VideoCore in the same time as ARM loads the value result
is going to be mixed combination of bytes from previous value and
new one.

9 years agoRemove unused variables
Oleksandr Tymoshenko [Mon, 9 Feb 2015 02:27:33 +0000 (02:27 +0000)]
Remove unused variables

9 years agoFix an extremely subtle concurrency bug triggered by running on 32-thread
Nathan Whitehorn [Mon, 9 Feb 2015 02:17:21 +0000 (02:17 +0000)]
Fix an extremely subtle concurrency bug triggered by running on 32-thread
POWER8 systems. During thread switch, there was a very small window when
the stack pointer was set to the stack pointer of the outgoing thread, but
after the lock on that thread had already been released.

If, during that window, the outgoing thread were rescheduled on another CPU
and begin execution and an exception were taken on the original CPU, the
trap handler and the outgoing thread would simultaneously execute on the same
stack, causing memory corruption. Fix this by making sure to release the
old thread only after cpu_switch() is done with its stack.

MFC after: 2 weeks
Sponsored by: FreeBSD Foundation

9 years agoTechnically speaking, using one virtal processor area for all CPUs is a
Nathan Whitehorn [Mon, 9 Feb 2015 02:13:36 +0000 (02:13 +0000)]
Technically speaking, using one virtal processor area for all CPUs is a
violation of the spec. Make duplicate entries for each CPU.

9 years agoSimplify trapcode setup by placing a copy of the generic trap handler at
Nathan Whitehorn [Mon, 9 Feb 2015 02:12:38 +0000 (02:12 +0000)]
Simplify trapcode setup by placing a copy of the generic trap handler at
every possible trap address by default. This also makes sure the kernel
notices (and panics at) traps from newer CPUs that the kernel was not
expecting rather than executing gibberish memory.

9 years agorevert r278414
Baptiste Daroussin [Sun, 8 Feb 2015 23:03:41 +0000 (23:03 +0000)]
revert r278414

Reported by: bz

9 years agoReapply r255891
Baptiste Daroussin [Sun, 8 Feb 2015 22:24:18 +0000 (22:24 +0000)]
Reapply r255891

9 years agoPreset the object's color, or alignment, to maximize superpage usage.
Alan Cox [Sun, 8 Feb 2015 21:00:51 +0000 (21:00 +0000)]
Preset the object's color, or alignment, to maximize superpage usage.

MFC after: 5 days

9 years agoFix ordering of "*logout" and "*terminate"; no functional changes.
Edward Tomasz Napierala [Sun, 8 Feb 2015 19:18:23 +0000 (19:18 +0000)]
Fix ordering of "*logout" and "*terminate"; no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoExtend ICL to add receive offload methods. For software ICL backend
Edward Tomasz Napierala [Sun, 8 Feb 2015 19:15:14 +0000 (19:15 +0000)]
Extend ICL to add receive offload methods.  For software ICL backend
they are no-ops.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd some error checking on the supplied page size list. This makes sure
Nathan Whitehorn [Sun, 8 Feb 2015 16:50:00 +0000 (16:50 +0000)]
Add some error checking on the supplied page size list. This makes sure
that we (a) get the correct large page size to provide to pmap and (b)
we can alert the user if running under incorrectly-configured PowerKVM
on POWER7 and POWER8 systems.

MFC after: 1 week

9 years agoAdd Neoway WM620 module ID.
Dmitry Chagin [Sun, 8 Feb 2015 11:55:29 +0000 (11:55 +0000)]
Add Neoway WM620 module ID.

MFC after: 1 Week

9 years agoMake output of "iscsictl -v" and "ctladm islist -v" a little prettier
Edward Tomasz Napierala [Sun, 8 Feb 2015 10:58:25 +0000 (10:58 +0000)]
Make output of "iscsictl -v" and "ctladm islist -v" a little prettier
by capitalizing "None".

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agocxgbe(4): tidy up some of the interaction between the Upper Layer
Navdeep Parhar [Sun, 8 Feb 2015 09:28:55 +0000 (09:28 +0000)]
cxgbe(4): tidy up some of the interaction between the Upper Layer
Drivers (ULDs) and the base if_cxgbe driver.

Track the per-adapter activation of ULDs in a new "active_ulds" field.
This was done pretty arbitrarily before this change -- via TOM_INIT_DONE
in adapter->flags for TOM, and the (1 << MAX_NPORTS) bit in
adapter->offload_map for iWARP.

iWARP and hw-accelerated iSCSI rely on the TOE (supported by the TOM
ULD).  The rules are:
a) If the iWARP and/or iSCSI ULDs are available when TOE is enabled then
   iWARP and/or iSCSI are enabled too.
b) When the iWARP and iSCSI modules are loaded they go looking for
   adapters with TOE enabled and enable themselves on that adapter.
c) You cannot deactivate or unload the TOM module from underneath iWARP
   or iSCSI.  Any such attempt will fail with EBUSY.

MFC after: 2 weeks

9 years agocxgbe(4): adapter_full_init is always a synchronized operation.
Navdeep Parhar [Sun, 8 Feb 2015 08:52:18 +0000 (08:52 +0000)]
cxgbe(4): adapter_full_init is always a synchronized operation.

MFC after: 1 week

9 years agocxgbe(4): a change to the synchronization rules within the the driver.
Navdeep Parhar [Sun, 8 Feb 2015 08:42:45 +0000 (08:42 +0000)]
cxgbe(4): a change to the synchronization rules within the the driver.
This is purely cosmetic because the new rules are already followed.

MFC after: 1 week

9 years agoFix a typo in r278137: make sure to free provider state.
Mark Johnston [Sun, 8 Feb 2015 03:55:12 +0000 (03:55 +0000)]
Fix a typo in r278137: make sure to free provider state.

X-MFC-With:     r278136

9 years agoAdd VideoCore audio driver for Rasperry Pi (BCM2835)
Oleksandr Tymoshenko [Sun, 8 Feb 2015 01:12:40 +0000 (01:12 +0000)]
Add VideoCore audio driver for Rasperry Pi (BCM2835)

9 years agoAct as a bus in attach method: probe and attach devices
Oleksandr Tymoshenko [Sun, 8 Feb 2015 01:12:23 +0000 (01:12 +0000)]
Act as a bus in attach method: probe and attach devices

9 years agoBig wpi(4) overhaul! Not by me!
Adrian Chadd [Sat, 7 Feb 2015 23:11:38 +0000 (23:11 +0000)]
Big wpi(4) overhaul! Not by me!

This is a sync against iwn(4) and openbsd.

- Add power management support;
- Add background scanning support;
- Fix few LORs;
- Handle rfkill switch state changes properly;
- Fix recovering after firmware failure;
- Add more error checking;
- Cleanup & disable by default debug output;
- Update macroses names;
- Other various fixes;
- Add IBSS support:
  - don't set data_ntries field for management frames;
- Add AHDEMO support:
    - fix padding;
- Sync eeprom functions;
- Use CMD_RXON_ASSOC where possible;
- Enable HW CCMP encryption/decryption for pairwise keys;
- Fix filter flags for CMD_RXON.

Tested (by submitter) - iwn 3945 NIC.  I have one somewhere; I'll
validate this later on and revert it if it's a problem.

Thanks!

PR: 197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoAdd WPI_DEBUG option.
Adrian Chadd [Sat, 7 Feb 2015 23:09:03 +0000 (23:09 +0000)]
Add WPI_DEBUG option.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoRemove kdb_backtrace extern; get the definition for kdb_backtrace from
Enji Cooper [Sat, 7 Feb 2015 21:29:17 +0000 (21:29 +0000)]
Remove kdb_backtrace extern; get the definition for kdb_backtrace from
<sys/kdb.h> instead

Fix whitespace in WARN_ON macro definition

MFC after: 1 week
Reviewed by: np
Differential Revision: https://reviews.freebsd.org/D1799
Sponsored by: EMC / Isilon Storage Division

9 years agoProtect uninitialized scalar variable from being accessed
Pedro F. Giffuni [Sat, 7 Feb 2015 19:51:34 +0000 (19:51 +0000)]
Protect uninitialized scalar variable from being accessed

In a couple of cases a variable "stayopen" can be checked
unitialized. This is of no danger as the complementary
condition is false but prevent the access by switching
the checks.

CID: 1018729
CID: 1018732

9 years agoFix couple issues in ctlstat header printing.
Alexander Motin [Sat, 7 Feb 2015 17:53:47 +0000 (17:53 +0000)]
Fix couple issues in ctlstat header printing.

MFC after: 1 week

9 years agoBack out r278349 and r278350 for now, since this apparently blows up the
Dimitry Andric [Sat, 7 Feb 2015 16:57:32 +0000 (16:57 +0000)]
Back out r278349 and r278350 for now, since this apparently blows up the
kernel build in sys/dev/hptmv/hptproc.c for some people.

Reported by: sbruno, Matthew Fuller <fullermd@over-yonder.net>

9 years agoMake hccontrol(8) and sdpcontrol(8) appear in "man -k bluetooth" output.
Edward Tomasz Napierala [Sat, 7 Feb 2015 14:31:51 +0000 (14:31 +0000)]
Make hccontrol(8) and sdpcontrol(8) appear in "man -k bluetooth" output.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoTidy up; no functional changes.
Edward Tomasz Napierala [Sat, 7 Feb 2015 14:15:17 +0000 (14:15 +0000)]
Tidy up; no functional changes.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoTeach ctld(8) to control non-iSCSI CTL ports.
Alexander Motin [Sat, 7 Feb 2015 13:19:04 +0000 (13:19 +0000)]
Teach ctld(8) to control non-iSCSI CTL ports.

This change introduces new target option "port", that assigns current target
to specified CTL port.  On config application ctld(8) will apply LUN mapping
according to target configuration to specified port and bring the port up.
On shutdown cltd(8) will remove the mapping and put the port down.

This change allows to configure both iSCSI and FibreChannel targets in the
same configuration file in alike way.

Kernel side support was added earlier at r278037.

MFC after: 2 weeks
Relnotes: yes
Sponsored by: iXsystems, Inc.

9 years agoRemove useless comment.
Edward Tomasz Napierala [Sat, 7 Feb 2015 13:11:45 +0000 (13:11 +0000)]
Remove useless comment.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd llvm patch corresponding to r278349.
Dimitry Andric [Sat, 7 Feb 2015 12:52:34 +0000 (12:52 +0000)]
Add llvm patch corresponding to r278349.

9 years agoPull in r224884 from upstream llvm trunk (by Keno Fischer):
Dimitry Andric [Sat, 7 Feb 2015 12:50:33 +0000 (12:50 +0000)]
Pull in r224884 from upstream llvm trunk (by Keno Fischer):

  [FastIsel][X86] Fix invalid register replacement for bool args

  Summary:
  Consider the following IR:

   %3 = load i8* undef
   %4 = trunc i8 %3 to i1
   %5 = call %jl_value_t.0* @foo(..., i1 %4, ...)
   ret %jl_value_t.0* %5

  Bools (that are the result of direct truncs) are lowered as whatever
  the argument to the trunc was and a "and 1", causing the part of the
  MBB responsible for this argument to look something like this:

   %vreg8<def,tied1> = AND8ri %vreg7<kill,tied0>, 1, %EFLAGS<imp-def>; GR8:%vreg8,%vreg7

  Later, when the load is lowered, it will insert

   %vreg15<def> = MOV8rm %vreg14, 1, %noreg, 0, %noreg; mem:LD1[undef] GR8:%vreg15 GR64:%vreg14

  but remember to (at the end of isel) replace vreg7 by vreg15. Now for
  the bug. In fast isel lowering, we mistakenly mark vreg8 as the result
  of the load instead of the trunc. This adds a fixup to have
  vreg8 replaced by whatever the result of the load is as well, so
  we end up with

   %vreg15<def,tied1> = AND8ri %vreg15<kill,tied0>, 1, %EFLAGS<imp-def>; GR8:%vreg15

  which is an SSA violation and causes problems later down the road.

  This fixes PR21557.

  Test Plan: Test test case from PR21557 is added to the test suite.

  Reviewers: ributzka

  Reviewed By: ributzka

  Subscribers: llvm-commits

  Differential Revision: http://reviews.llvm.org/D6245

This fixes a possible assertion failure when compiling toolbox.cxx from
LibreOffice 4.3.5.

Reported by: kwm

9 years agoFix a number of -Wcast-qual warnings in ath's ar9300_attach.c, by making
Dimitry Andric [Sat, 7 Feb 2015 12:20:33 +0000 (12:20 +0000)]
Fix a number of -Wcast-qual warnings in ath's ar9300_attach.c, by making
the ia_array field of struct ar9300_ini_array const, and removing the
const-dropping casts.  No functional change.

Reviewed by: adrian
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1725

9 years agoRevert the rc part of r278323 until I can figure out what Jenkins is doing.
Jamie Gritton [Sat, 7 Feb 2015 05:02:10 +0000 (05:02 +0000)]
Revert the rc part of r278323 until I can figure out what Jenkins is doing.

9 years agocxgbe(4): fix a test made while enabling TOE.
Navdeep Parhar [Sat, 7 Feb 2015 01:50:32 +0000 (01:50 +0000)]
cxgbe(4): fix a test made while enabling TOE.

MFC after: 1 week

9 years agoMake VCHI driver optional and add "device vchiq" to default RPI-B config
Oleksandr Tymoshenko [Sat, 7 Feb 2015 01:03:45 +0000 (01:03 +0000)]
Make VCHI driver optional and add "device vchiq" to default RPI-B config

9 years agoPull in the rpi.dts -> rpi.dtb module (dtb/rpi) and have it install
Warner Losh [Sat, 7 Feb 2015 00:41:08 +0000 (00:41 +0000)]
Pull in the rpi.dts -> rpi.dtb module (dtb/rpi) and have it install
rpi.dtb in /boot/dtb by default.

9 years agoTruncate the exponent 'n' of type long to a domain contained
Steve Kargl [Sat, 7 Feb 2015 00:38:18 +0000 (00:38 +0000)]
Truncate the exponent 'n' of type long to a domain contained
within [INT_MIN, INT_MAX] where the magnitude of the lower
and upper bounds are sufficiently large to span the range of
scalbn[fl].

While here, remove the GNU style bug in the function declarations.

Reviewed by: bde, pfg

9 years agoCreate a module to install the Raspberry Pi dtb files.
Warner Losh [Sat, 7 Feb 2015 00:13:36 +0000 (00:13 +0000)]
Create a module to install the Raspberry Pi dtb files.

9 years agoWhen upgrading, install the ELF runtime linkers before libraries.
Brooks Davis [Fri, 6 Feb 2015 23:44:16 +0000 (23:44 +0000)]
When upgrading, install the ELF runtime linkers before libraries.

This is required to prevent problems with nss modules that use libthr when
upgrading from releases prior to 10.1.

PR: 197366
Sponsored by: DARPA, AFRL
Differential Revision: D1790
Reviewed by: cperciva
MFC after: 3 days

9 years agoUnbreak the build (memchr is explicitly required by devctl(9) after r278320)
Enji Cooper [Fri, 6 Feb 2015 23:34:40 +0000 (23:34 +0000)]
Unbreak the build (memchr is explicitly required by devctl(9) after r278320)

Submitted by: Michael Butler <imb@protected-networks.net>
Reported by: O. Hartmann <ohartman@zedat.fu-berlin.de>

9 years agoRevert SVN r277693.
Devin Teske [Fri, 6 Feb 2015 23:19:17 +0000 (23:19 +0000)]
Revert SVN r277693.

Discussed on: src-committers
Approved by: core (emaste)

9 years agoMake it possible to set (via ctl.conf(5)) and query (via ctladm islist -v)
Edward Tomasz Napierala [Fri, 6 Feb 2015 21:03:25 +0000 (21:03 +0000)]
Make it possible to set (via ctl.conf(5)) and query (via ctladm islist -v)
target iSCSI offload.  Add mechanism to query maximum receive data segment
size supported by chosen hardware offload module, and use it in ctld(8)
to determine the value to advertise to the other side.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoBump .Dd per r278329
Enji Cooper [Fri, 6 Feb 2015 20:52:01 +0000 (20:52 +0000)]
Bump .Dd per r278329

9 years agoDocument WITNESS_COUNT and WITNESS_NO_VNODE
Enji Cooper [Fri, 6 Feb 2015 20:46:46 +0000 (20:46 +0000)]
Document WITNESS_COUNT and WITNESS_NO_VNODE

Reviewed by: bcr, kib
Differential Revision: D1789
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoChange ktrdump to use the more standard -M/-N flags to specify the path
John Baldwin [Fri, 6 Feb 2015 19:41:23 +0000 (19:41 +0000)]
Change ktrdump to use the more standard -M/-N flags to specify the path
to a crash dump and kernel, respectively.  The existing -m/-e flags are
still supported for backwards compatiblity but are no longer documented.

Requested by: np
MFC after: 2 weeks

9 years agoRevert the IPI startup sequence to match what is described in the
John Baldwin [Fri, 6 Feb 2015 18:19:59 +0000 (18:19 +0000)]
Revert the IPI startup sequence to match what is described in the
Intel Multiprocessor Specification v1.4.  The Intel SDM claims that
the INIT IPIs here are invalid, but other systems follow the MP
spec instead.

While here, fix the IPI wait routine to accept a timeout in microseconds
instead of a raw spin count, and don't spin forever during AP startup.
Instead, panic if a STARTUP IPI is not delivered after 20 us.

PR: 196542
Differential Revision: https://reviews.freebsd.org/D1719
MFC after: 2 weeks

9 years agoAdd mount.procfs jail parameter, so procfs can be mounted when a prison's
Jamie Gritton [Fri, 6 Feb 2015 17:54:53 +0000 (17:54 +0000)]
Add mount.procfs jail parameter, so procfs can be mounted when a prison's
root is in its fstab.

Also fix a typo while I'm at it.

PR: 197237 197066
MFC after: 3 days

9 years agoAdd support for multiple portal groups per target.
Alexander Motin [Fri, 6 Feb 2015 17:43:13 +0000 (17:43 +0000)]
Add support for multiple portal groups per target.

This change allows multiple "portal-group" options to be specified per
target.  Each of them may include new optional auth-group name parameter
to override per-target auth parameters for specific portal group.

Kernel side support was added earlier at r278161.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

9 years agoUse direct hardware access for internal requests for KCS and SMIC. In
John Baldwin [Fri, 6 Feb 2015 16:45:10 +0000 (16:45 +0000)]
Use direct hardware access for internal requests for KCS and SMIC.  In
particular, updates to the watchdog should no longer sleep.
- Add a new IPMI_IO_LOCK for low-level I/O access.  Use this for
  kcs_polled_request() and smic_polled_request().
- Add a new backend callback "ipmi_driver_request" to handle a driver
  request.  The new callback performs the request sychronously for KCS
  and SMIC.  SSIF still defers the work to the worker thread since the
  worker thread sleeps during request processing anyway.
- Allocate driver requests on the stack rather than using malloc().

Differential Revision: https://reviews.freebsd.org/D1723
Tested by: scottl
MFC after: 2 weeks

9 years agoAdd a new device control utility for new-bus devices called devctl. This
John Baldwin [Fri, 6 Feb 2015 16:09:01 +0000 (16:09 +0000)]
Add a new device control utility for new-bus devices called devctl.  This
allows the user to request administrative changes to individual devices
such as attach or detaching drivers or disabling and re-enabling devices.
- Add a new /dev/devctl2 character device which uses ioctls for device
  requests.  The ioctls use a common 'struct devreq' which is somewhat
  similar to 'struct ifreq'.
- The ioctls identify the device to operate on via a string.  This
  string can either by the device's name, or it can be a bus-specific
  address.  (For unattached devices, a bus address is the only way to
  locate a device.)  Bus drivers register an eventhandler to claim
  unrecognized device names that the driver recognizes as a valid address.
  Two buses currently support addresses: ACPI recognizes any device
  in the ACPI namespace via its full path starting with "\" and
  the PCI bus driver recognizes an address specification of
  'pci[<domain>:]<bus>:<slot>:<func>' (identical to the PCI selector
  strings supported by pciconf).
- To make it easier to cut and paste, change the PnP location string
  in the PCI bus driver to output a full PCI selector string rather
  than 'slot=<slot> function=<func>'.
- Add a devctl(3) interface in libdevctl which provides a wrapper around
  the ioctls and is the preferred interface for other userland code.
- Add a devctl(8) program which is a simple wrapper around the requests
  supported by devctl(3).
- Add a device_is_suspended() function to check DF_SUSPENDED.
- Add a resource_unset_value() function that can be used to remove a
  hint from the kernel environment.  This is used to clear a
  hint.<driver>.<unit>.disabled hint when re-enabling a boot-time
  disabled device.

Reviewed by: imp (parts)
Requested by: imp (changing PCI location string)
Relnotes: yes

9 years agomakeroot: Add -l option to set file system volume label
Ed Maste [Fri, 6 Feb 2015 15:38:11 +0000 (15:38 +0000)]
makeroot: Add -l option to set file system volume label

Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D1782

9 years agoHandle invocation with neither of -e / -f
Ed Maste [Fri, 6 Feb 2015 15:34:10 +0000 (15:34 +0000)]
Handle invocation with neither of -e / -f

Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D1780

9 years agoMake "ctladm islist" ignore unknown elements, so the old version
Edward Tomasz Napierala [Fri, 6 Feb 2015 14:44:29 +0000 (14:44 +0000)]
Make "ctladm islist" ignore unknown elements, so the old version
continues to work with newer kernel.

Other ctladm(8) "*list" subcommands seem to already handle it in
a reasonable way.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoUpdate comment and NetBSD ID tag.
Pedro F. Giffuni [Fri, 6 Feb 2015 14:22:00 +0000 (14:22 +0000)]
Update comment and NetBSD ID tag.

The NetBSD revisions correspond to changes we have already done
like __P() removal and ANSI-fication of definitions.

9 years agoDrop cgetclose() from getdiskbyname().
Pedro F. Giffuni [Fri, 6 Feb 2015 14:07:01 +0000 (14:07 +0000)]
Drop cgetclose() from getdiskbyname().

This was a local addition to the original change from NetBSD.
Being this libc there is some chance for it to interfere with
user's cget*() functions usage. The memory leak was finely
plugged by r278300.

Pointed out by: ache

9 years agoFully initialize allocated memory for the new barrier. The
Konstantin Belousov [Fri, 6 Feb 2015 12:18:38 +0000 (12:18 +0000)]
Fully initialize allocated memory for the new barrier.  The
b_destroying member was left uninitialized, which caused spurious
EBUSY.

PR: 197365
Noted by: Florent Guiliani <fguiliani@verisign.com>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoSome NetGraph debug polishing.
Alexander Motin [Fri, 6 Feb 2015 09:41:16 +0000 (09:41 +0000)]
Some NetGraph debug polishing.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after: 2 weeks

9 years agoVendor import of xz-5.2.0 (stripped)
Rui Paulo [Fri, 6 Feb 2015 05:11:18 +0000 (05:11 +0000)]
Vendor import of xz-5.2.0 (stripped)

9 years agoAlways prefer double dashes for GNU LD long options.
Davide Italiano [Fri, 6 Feb 2015 03:49:31 +0000 (03:49 +0000)]
Always prefer double dashes for GNU LD long options.

I discovered this while working on llvm/lld and realized export-dynamic
only supported --. Although upstream will eventually grow to support
both - and --, switch this in our build system, because GNU ld supports
both modes, and because there's some hope lld will become the default linker
for FreeBSD in the future.

Discussed with: emaste, rdivacky

9 years agoAdd a comment explaining why gcc is needed.
Justin Hibbits [Fri, 6 Feb 2015 02:35:29 +0000 (02:35 +0000)]
Add a comment explaining why gcc is needed.

X-MFC-With: 278231
MFC after: 2 weeks