freebsd.git
9 years agoRemove ISA NICs. Anyone still using these on amd64 can build their
des [Sun, 25 Jan 2015 12:02:38 +0000 (12:02 +0000)]
Remove ISA NICs.  Anyone still using these on amd64 can build their
own kernel.

9 years agoFix the font in the text version. This has bothered me for a long time...
des [Sun, 25 Jan 2015 11:57:18 +0000 (11:57 +0000)]
Fix the font in the text version.  This has bothered me for a long time...

MFC after: 1 week

9 years agoBuild lib/libgpio if MK_GPIO != no
ngie [Sun, 25 Jan 2015 05:37:06 +0000 (05:37 +0000)]
Build lib/libgpio if MK_GPIO != no

Fill in corresponding entries for MK_GPIO == no in OptionalObsoleteFiles.inc

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFill in entries for MK_BSNMP == no
ngie [Sun, 25 Jan 2015 05:30:45 +0000 (05:30 +0000)]
Fill in entries for MK_BSNMP == no

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoInstall bsnmp rc.d script if MK_BSNMP != no
ngie [Sun, 25 Jan 2015 05:30:03 +0000 (05:30 +0000)]
Install bsnmp rc.d script if MK_BSNMP != no

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFill in some dtrace entries when MK_CDDL == no
ngie [Sun, 25 Jan 2015 05:23:22 +0000 (05:23 +0000)]
Fill in some dtrace entries when MK_CDDL == no

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFill in entries for MK_CUSE == no
ngie [Sun, 25 Jan 2015 05:15:45 +0000 (05:15 +0000)]
Fill in entries for MK_CUSE == no

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoMake install cuse headers if MK_CUSE != no
ngie [Sun, 25 Jan 2015 05:15:06 +0000 (05:15 +0000)]
Make install cuse headers if MK_CUSE != no

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoBuild cuse(4) if MK_CUSE != no
ngie [Sun, 25 Jan 2015 05:13:15 +0000 (05:13 +0000)]
Build cuse(4) if MK_CUSE != no

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agospl man page hasn't been relevant for a while, retire it.
imp [Sun, 25 Jan 2015 04:58:41 +0000 (04:58 +0000)]
spl man page hasn't been relevant for a while, retire it.

9 years agoRegen src.conf(5)
ngie [Sun, 25 Jan 2015 04:56:43 +0000 (04:56 +0000)]
Regen src.conf(5)

9 years agoAdd MK_CCD knob for building and installing ccd(4), ccdconfig, etc
ngie [Sun, 25 Jan 2015 04:52:48 +0000 (04:52 +0000)]
Add MK_CCD knob for building and installing ccd(4), ccdconfig, etc

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd MK_BSDINSTALL knob for building and installing bsdinstall
ngie [Sun, 25 Jan 2015 04:43:13 +0000 (04:43 +0000)]
Add MK_BSDINSTALL knob for building and installing bsdinstall

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd MK_TALK knob for building the talk and talkd
ngie [Sun, 25 Jan 2015 04:37:44 +0000 (04:37 +0000)]
Add MK_TALK knob for building the talk and talkd

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel
ngie [Sun, 25 Jan 2015 04:20:11 +0000 (04:20 +0000)]
Add MK_ISCSI knob for building the iscsi initiator, iscsi daemon, kernel
modules, etc

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoFix building rcorder with -DDEBUG by using libutil.h instead of util.h from
ngie [Sun, 25 Jan 2015 03:08:21 +0000 (03:08 +0000)]
Fix building rcorder with -DDEBUG by using libutil.h instead of util.h from
usr.bin/make

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agogr_equal(): Fix a crash that could occur if the first group's member list
markj [Sun, 25 Jan 2015 00:47:06 +0000 (00:47 +0000)]
gr_equal(): Fix a crash that could occur if the first group's member list
was longer than the second's. There is no need to compute and compare the
member list lengths in a separate pass, since we now just return false when
comparing member names if the list lengths are not equal.

MFC after: 2 weeks

9 years agoDocument the fact that modules declared with SYSCALL_MODULE(9) have their
markj [Sun, 25 Jan 2015 00:36:42 +0000 (00:36 +0000)]
Document the fact that modules declared with SYSCALL_MODULE(9) have their
names prefixed with "sys/".

MFC after: 3 days

9 years agoEnsure that we don't try to demangle a symbol name if we failed to look
markj [Sun, 25 Jan 2015 00:34:43 +0000 (00:34 +0000)]
Ensure that we don't try to demangle a symbol name if we failed to look
up the symbol. Add a test to exercise this code path.

Reviewed by: adrian

9 years agoOnly build share/dtrace if MK_CDDL != no
ngie [Sun, 25 Jan 2015 00:32:17 +0000 (00:32 +0000)]
Only build share/dtrace if MK_CDDL != no

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoOnly build vi support into rescue if MK_VI != no
ngie [Sun, 25 Jan 2015 00:30:22 +0000 (00:30 +0000)]
Only build vi support into rescue if MK_VI != no

Sponsored by: EMC / Isilon Storage Division

9 years agoAdd MK_EE knob to control installing edit, ee, etc
ngie [Sun, 25 Jan 2015 00:03:44 +0000 (00:03 +0000)]
Add MK_EE knob to control installing edit, ee, etc

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoMFV r277658:
pfg [Sat, 24 Jan 2015 21:05:18 +0000 (21:05 +0000)]
MFV r277658:

GDB: Replace use of sprintf.

2005-03-17  Mark Kettenis  <kettenis@gnu.org>

      * corelow.c (get_core_register_section): Replace usage of sprintf
      and strcpy with xstrprintf and xstrdup.

Sourceware commit: 3ecda4574edb38ad12fb491ccaf6d9b0caa3a07a

CID: 1006819
MFC after: 4 days

9 years agoMFV: r277654
pfg [Sat, 24 Jan 2015 20:25:21 +0000 (20:25 +0000)]
MFV: r277654

gdb: Add missing break statements

2004-05-21  Jim Blandy  <jimb@redhat.com>

       * dwarf2expr.c (execute_stack_op): Add 'break' statements after
       cases for DW_OP_div and DW_OP_shr.  (Thanks to Reva Cuthbertson.)

Sourceware commit 99c87dab95747d380392a3698740507a21ad3236

CID: 1008254
MFC after: 4 days

9 years agoReimplement fdt_clock_register_provider() correctly. It turns out you
ian [Sat, 24 Jan 2015 20:18:37 +0000 (20:18 +0000)]
Reimplement fdt_clock_register_provider() correctly.  It turns out you
can't use OF_xref_from_device() to implement the function that registers
the xref association with the device.

Pointy hat:      ian
Submitted by:      loos

9 years agoChange the permissions from 0660 to 0600.
adrian [Sat, 24 Jan 2015 19:49:27 +0000 (19:49 +0000)]
Change the permissions from 0660 to 0600.

Otherwise people in wheel can do things with netmap, including
but not limited to promisc transmit/receive.

Approved by: luigi
MFC after: 1 week

9 years agoAllow negative numbers in -u and -g options
bapt [Sat, 24 Jan 2015 19:13:03 +0000 (19:13 +0000)]
Allow negative numbers in -u and -g options

PR: 196514
MFC after: 1 week

9 years agoAdd vm.panic_on_oom sysctl, which enables those who would rather panic than
will [Sat, 24 Jan 2015 17:32:45 +0000 (17:32 +0000)]
Add vm.panic_on_oom sysctl, which enables those who would rather panic than
kill a process, when the system runs out of memory.  Defaults to off.

Usually, this is most useful when the OOM condition is due to mismanagement
of memory, on a system where the applications in question don't respond well
to being killed.

In theory, if the system is properly managed, it shouldn't be possible to
hit this condition. If it does, the panic can be more desirable for some
users (since it can be a good means of finding the root cause) rather than
killing the largest process and continuing on its merry way.

As kib@ mentions in the differential, there is also protect(1), which uses
procctl(PROC_SPROTECT) to ensure that some processes are immune.  However,
a panic approach is still useful in some environments.  This is primarily
intended as a development/debugging tool.

Differential Revision: D1627
Reviewed by: kib
MFC after: 1 week

9 years agoAdd tests/etc/rc.d to mtree.
will [Sat, 24 Jan 2015 17:11:11 +0000 (17:11 +0000)]
Add tests/etc/rc.d to mtree.

Submitted by: stefanf
MFC after: 1 week
MFC with: 277627

9 years agovmspace_release() may sleep if the last reference is being released,
rstone [Sat, 24 Jan 2015 16:59:38 +0000 (16:59 +0000)]
vmspace_release() may sleep if the last reference is being released,
so add a WITNESS_WARN() to catch cases where it is called with a
non-sleepable lock held.

MFC after: 1 month
Sponsored by: Sandvine Inc.

9 years agoEnable utimensat tests from NetBSD.
jilles [Sat, 24 Jan 2015 15:49:40 +0000 (15:49 +0000)]
Enable utimensat tests from NetBSD.

As with other tests from c063, a required #include <sys/stat.h> was missing.

9 years agoFix wrong LUN reference in XCOPY block-to-block operation.
mav [Sat, 24 Jan 2015 15:40:52 +0000 (15:40 +0000)]
Fix wrong LUN reference in XCOPY block-to-block operation.

This could cause data corruption due to accessing wrong LUN in case of
retries on write errors.  Failed writes were retried to read LUN.

MFC after: 3 days

9 years agoAvoid calling vmspace_free() while owning the process lock. Freeing
kib [Sat, 24 Jan 2015 15:33:42 +0000 (15:33 +0000)]
Avoid calling vmspace_free() while owning the process lock.  Freeing
of an vm space may require obtaining sleepable locks.  Hold the
process to keep the pointer valid, and change trylock to lock, since
there is no longer two process locks owned simultaneously in
vm_pageout_oom().

Note that after the process lock is dropped, process might exec, and
no longer qualify as the owner of biggest vm space.

In collaboration with: rstone
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agocp,mv,touch: Set timestamps with nanosecond precision.
jilles [Sat, 24 Jan 2015 13:50:13 +0000 (13:50 +0000)]
cp,mv,touch: Set timestamps with nanosecond precision.

This uses utimensat().

9 years agoAdd support for audio transmitting, include drivers for:
br [Sat, 24 Jan 2015 13:07:07 +0000 (13:07 +0000)]
Add support for audio transmitting, include drivers for:
o Digital Audio Multiplexer (AUDMUX)
o Smart Direct Memory Access Controller (SDMA)
o Synchronous Serial Interface (SSI)

Disable by default as it depends on SDMA firmware.

Sponsored by: Machdep, Inc.

9 years agoRemove Giant from /dev/mem and /dev/kmem. It is definitely not needed
kib [Sat, 24 Jan 2015 12:51:15 +0000 (12:51 +0000)]
Remove Giant from /dev/mem and /dev/kmem.  It is definitely not needed
for i386, and from the code inspection, nothing in the
arm/mips/sparc64 implementations depends on it.

Discussed with: imp, nwhitehorn
Sponsored by: The FreeBSD Foundation
MFC after: 3 weeks

9 years agoProvide individual prototype and generate macros for the red-black tree.
kib [Sat, 24 Jan 2015 12:43:36 +0000 (12:43 +0000)]
Provide individual prototype and generate macros for the red-black tree.
This helps to reduce code size in statically linked applications.

Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de>
MFC after: 2 weeks

9 years agodo not strip /stand
luigi [Sat, 24 Jan 2015 08:48:05 +0000 (08:48 +0000)]
do not strip /stand

This is a temporary workaround until the elftoolchain's version
of strip is fixed:

The previous (GNU) strip, when acting on a file with multiple links,
would modify the one and only file in place (which means creating
a new stripped copy, and then writing it back to the original).

The new version from elftoolchain creates the new file and then
unlinks the old one and renames the new.
With multiple hard links, the original remains alive.  In the /stand
directory, this ends up creating 80+ copies of the same file.

9 years agoDon't include libcapsicum headers when requested.
delphij [Sat, 24 Jan 2015 06:06:46 +0000 (06:06 +0000)]
Don't include libcapsicum headers when requested.

Reported by: luigi
MFC after: 14 days
X-MFC-with: r276788

9 years agoMake sure the compiler flag to get cxgbe(4) to compile with gcc is used
np [Sat, 24 Jan 2015 04:41:14 +0000 (04:41 +0000)]
Make sure the compiler flag to get cxgbe(4) to compile with gcc is used
only when gcc is being used.  This is what r277225 should have been.

Suggested by: dim@

9 years agoFix typo in r277561.
nwhitehorn [Sat, 24 Jan 2015 01:58:15 +0000 (01:58 +0000)]
Fix typo in r277561.

9 years agoAfter interrupt read value from register to make sure it reached hardware. This
gonzo [Sat, 24 Jan 2015 01:53:28 +0000 (01:53 +0000)]
After interrupt read value from register to make sure it reached hardware. This
should fix "Spurious inteerupt" message

Suggested by ian@

9 years agoWhen creating or updating a node, use vfs_timestamp() for "now" instead
will [Sat, 24 Jan 2015 00:43:02 +0000 (00:43 +0000)]
When creating or updating a node, use vfs_timestamp() for "now" instead
of gethrestime(), to allow the administrator to decide the appropriate
timestamp precision instead of always using nanosecond precision.

9 years agoAdd routing_test:static_ipv6_loopback_route_for_each_fib.
will [Sat, 24 Jan 2015 00:37:41 +0000 (00:37 +0000)]
Add routing_test:static_ipv6_loopback_route_for_each_fib.
It tests that all FIBs get a static IPv6 loopback route.

Submitted by: asomers
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1048456 on 2014/03/13
1114523 on 2015/01/23

9 years agoAdd macro to identify AVIC capability (advanced virtual interrupt controller)
neel [Sat, 24 Jan 2015 00:35:49 +0000 (00:35 +0000)]
Add macro to identify AVIC capability (advanced virtual interrupt controller)
in AMD processors.

Submitted by: Dmitry Luhtionov (dmitryluhtionov@gmail.com)

9 years agoBump config(8) minor version for r277567.
will [Sat, 24 Jan 2015 00:04:34 +0000 (00:04 +0000)]
Bump config(8) minor version for r277567.

Config files built using this version that take advantage of the bugfix
won't be buildable using older config(8).

Submitted by: imp
MFC after: 1 week
MFC with: 277567

9 years agoFix panic in firewire and creation of invalid config ROM.
will [Fri, 23 Jan 2015 23:53:56 +0000 (23:53 +0000)]
Fix panic in firewire and creation of invalid config ROM.
(This change was supposed to be included in r277508.)

sys/boot/i386/libfirewire/firewire.c:
Fix configuration ROM generation count wrapping logic
so that the generation count is never outside of
allowed limits (0x2 -> 0xF).

Submitted by: gibbs
MFC after: 1 week
MFC with: 277508
Sponsored by: Spectra Logic
MFSpectraBSD: 1110685 on 2015/01/05

9 years agoRestore addr2line to cross tools
emaste [Fri, 23 Jan 2015 21:34:08 +0000 (21:34 +0000)]
Restore addr2line to cross tools

Addr2line is not required for the build, and a per-arch binary is no
longer required with the switch to the ELF Tool Chain. However, building
these tools during the cross tools stage can be useful for developers
who cross build HEAD from stable/10, and adds very little to the build
time.

Reviewed by: ian, imp
Differential Revision: https://reviews.freebsd.org/D1583

9 years agoRun make sysent.
jilles [Fri, 23 Jan 2015 21:08:24 +0000 (21:08 +0000)]
Run make sysent.

9 years agoAdd futimens and utimensat system calls.
jilles [Fri, 23 Jan 2015 21:07:08 +0000 (21:07 +0000)]
Add futimens and utimensat system calls.

The core kernel part is patch file utimes.2008.4.diff from
pluknet@FreeBSD.org. I updated the code for API changes, added the manual
page and added compatibility code for old kernels. There is also audit and
Capsicum support.

A new UTIME_* constant might allow setting birthtimes in future.

Differential Revision: https://reviews.freebsd.org/D1426
Submitted by: pluknet (partially)
Reviewed by: delphij, pluknet, rwatson
Relnotes: yes

9 years agoWhen iterating through VMFORMATS, the VMBASE file is
gjb [Fri, 23 Jan 2015 21:04:59 +0000 (21:04 +0000)]
When iterating through VMFORMATS, the VMBASE file is
not removed or truncated to a zero-size file, which
if used to create more than one disk image format, can
result in accidental pollution of the target formatted
disk image.

Instead of using a single VMBASE image (vm.img, by
default), use a single base file for each format, named
as VMFORMAT.img, which produces VMBASE.VMFORMAT as the
final formatted image.

Reported by: cperciva
MFC after: 1 month
X-MFC-with: r277458, r277536
Sponsored by: The FreeBSD Foundation

9 years agoMFV r277607:
pfg [Fri, 23 Jan 2015 20:40:31 +0000 (20:40 +0000)]
MFV r277607:

GDB: Fix memset thinkos.

2005-03-25  Anthony Green  <green@redhat.com>

       * remote.c (remote_store_registers): Fix memset usage.
       * std-regs.c (value_of_builtin_frame_reg): Ditto.
       (value_of_builtin_frame_fp_reg): Ditto.
       (value_of_builtin_frame_reg): Ditto.

Reported by: Dirk Engling
CID: 604160, 604161, 604162, 604163
MFC after: 5 days

9 years agoProvide a recipe of "true" for building the "release" target once its
cperciva [Fri, 23 Jan 2015 20:24:13 +0000 (20:24 +0000)]
Provide a recipe of "true" for building the "release" target once its
prerequisites are satisfied, in order to avoid having an implicit rule
triggered by the presence of release.sh.

Approved by: gjb

9 years agoUpdate the latest revision.
gjb [Fri, 23 Jan 2015 19:33:46 +0000 (19:33 +0000)]
Update the latest revision.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277458, support for cloud hosting providers added to
gjb [Fri, 23 Jan 2015 19:33:08 +0000 (19:33 +0000)]
Document r277458, support for cloud hosting providers added to
the Release Engineering build tools.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277166, ptrace(2) Altivec register support.
gjb [Fri, 23 Jan 2015 19:33:05 +0000 (19:33 +0000)]
Document r277166, ptrace(2) Altivec register support.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r276881, libedit UTF-8 support.
gjb [Fri, 23 Jan 2015 19:33:03 +0000 (19:33 +0000)]
Document r276881, libedit UTF-8 support.

Sponsored by: The FreeBSD Foundation

9 years agoSimplify retry loops. No functional change.
jkim [Fri, 23 Jan 2015 18:55:04 +0000 (18:55 +0000)]
Simplify retry loops.  No functional change.

9 years agoRevert r216942. This commit was premature and caused too many complaints.
jkim [Fri, 23 Jan 2015 18:12:44 +0000 (18:12 +0000)]
Revert r216942.  This commit was premature and caused too many complaints.

PR: 162859
MFC after: 3 days

9 years agoUse clock_gettime to measure the time that we spent asleep during
will [Fri, 23 Jan 2015 16:21:31 +0000 (16:21 +0000)]
Use clock_gettime to measure the time that we spent asleep during
"vmstat -i" instead of assuming it's what we asked for.

Submitted by: asomers
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1066751 on 2014/06/04

9 years agoUse CLOCK_UPTIME to get the uptime instead of CLOCK_MONOTONIC.
will [Fri, 23 Jan 2015 16:18:39 +0000 (16:18 +0000)]
Use CLOCK_UPTIME to get the uptime instead of CLOCK_MONOTONIC.

Submitted by: asomers
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1066740 on 2014/06/04

9 years agoMake "vmstat -i" respect the -c <count> and -i <interval> options together.
will [Fri, 23 Jan 2015 16:15:55 +0000 (16:15 +0000)]
Make "vmstat -i" respect the -c <count> and -i <interval> options together.

Submitted by: asomers
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1066735 on 2014/06/04

9 years agoAdd pinctrl driver support for the encoded input register config words
ian [Fri, 23 Jan 2015 16:05:47 +0000 (16:05 +0000)]
Add pinctrl driver support for the encoded input register config words
that the linux guys made up on the fly (but didn't document) last August.
This type of encoded config now appears in the imx6 fdt data.

9 years agoAllow lists for "nooption" and "nooptions" keywords.
will [Fri, 23 Jan 2015 16:03:02 +0000 (16:03 +0000)]
Allow lists for "nooption" and "nooptions" keywords.

usr.sbin/config/config.y
According to config(5), the "device", "devices",
"nodevice", "nodevices", "option", "options",
"nooption", and "nooptions" keywords can all take a
comma-separated list of values.  However, the yacc code
did not allow lists for "nooption" and "nooptions", only
single values.  This commit fixes the yacc code to allow
comma separated values for all the above keywords.

Submitted by: asomers
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1095296 on 2014/10/07

9 years agoPrint transfer times for read, write, & overall independently.
will [Fri, 23 Jan 2015 15:55:03 +0000 (15:55 +0000)]
Print transfer times for read, write, & overall independently.

Round up calculated values for iops and average time per io to avoid a
shifting display if there are 1000+ (or even 10000+) iops, or if an
average time per io column is 1000+ ms.

Reviewed by: ken
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1089947 on 2014/09/26
1093625 on 2014/09/29
1093650 on 2014/09/29
1095662 on 2014/10/09

9 years agoRemove break after return.
kevlo [Fri, 23 Jan 2015 15:14:30 +0000 (15:14 +0000)]
Remove break after return.

9 years agoLog hardware interface up/down as "hardware" rather than just "hw".
will [Fri, 23 Jan 2015 14:30:24 +0000 (14:30 +0000)]
Log hardware interface up/down as "hardware" rather than just "hw".

Suggested by: glebius
MFC after: 1 week
MFC with: 277530

9 years agoWhen a CARP state change is caused by an ifconfig request, log it accordingly.
will [Fri, 23 Jan 2015 14:28:12 +0000 (14:28 +0000)]
When a CARP state change is caused by an ifconfig request, log it accordingly.

Suggested by: glebius
MFC after: 1 week
MFC with: 277530

9 years agoAfter r270929 RAW IP code assumes that all IP fields are in network
ae [Fri, 23 Jan 2015 13:26:35 +0000 (13:26 +0000)]
After r270929 RAW IP code assumes that all IP fields are in network
byte order. Fix ping(8) to pass an IP header with converted ip_off
and ip_len fields, when IP_HDRINCL socket option used.

9 years agoUse relocation-safe methods to determine the sizes of the exception handlers.
nwhitehorn [Fri, 23 Jan 2015 07:36:51 +0000 (07:36 +0000)]
Use relocation-safe methods to determine the sizes of the exception handlers.
A "size" symbol with its address set to the length of handler would be
shifted forward with all other addresses when relocations are processed.
Instead, just note the end and do the subtraction at runtime.

9 years agoFix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n'
danfe [Fri, 23 Jan 2015 07:30:57 +0000 (07:30 +0000)]
Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n'
in bitfield argument is wrong, as it will be treated as bit 10, causing any
code printing >=10 bits with bit 10 on as having a trailing comma.

Newline (intended one) should be part of the format string (already present
in the examples).

Also fix grammar and kill EOL whitespace in comment while here.

PR: 195005
Approved by: bdrewery

9 years agoEnable all the mmc/sd controllers, because there's no telling which ones
ian [Fri, 23 Jan 2015 01:18:08 +0000 (01:18 +0000)]
Enable all the mmc/sd controllers, because there's no telling which ones
any given board will be using.

Yes, changing source is an unusually primitive power control implementation.

9 years agoImprove the distribution of LAGG port traffic.
will [Fri, 23 Jan 2015 00:06:35 +0000 (00:06 +0000)]
Improve the distribution of LAGG port traffic.

I edited the original change to retain the use of arc4random() as a seed for
the hashing as a very basic defense against intentional lagg port selection.

The author's original commit message (edited slightly):

sys/net/ieee8023ad_lacp.c
sys/net/if_lagg.c
In lagg_hashmbuf, use the FNV hash instead of the old
hash32_buf.  The hash32 family of functions operate one octet
at a time, and when run on a string s of length n, their output
is equivalent to :

   ----- i=n-1
   \
       n    \           (n-i-1)              32
( seed^  +  /        33^        * s[i] ) % 2^
   /
   ----- i=0

The problem is that the last five bytes of input don't get
multiplied by sufficiently many powers of 33 to rollover 2^32.
That means that changing the last few bytes (but obviously not
the very last) of input will always change the value of the
hash by a multiple of 33.  In the case of lagg_hashmbuf() with
ipv4 input, the last four bytes are the TCP or UDP port
numbers.  Since the output of lagg_hashmbuf is always taken
modulo the port count, and 3 is a common port count for a lagg,
that's bad.  It means that the UDP or TCP source port will
never affect which lagg member is selected on a 3-port lagg.

At 10Gbps, I was not able to measure any difference in CPU
consumption between the old and new hash.

Submitted by: asomers (original commit)
Reviewed by: emaste, glebius
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1001723 on 2013/08/28 (original)
1114258 on 2015/01/22 (edit)

9 years agoAdd sample log rotation support for opensm
ngie [Thu, 22 Jan 2015 23:50:47 +0000 (23:50 +0000)]
Add sample log rotation support for opensm

Up to 7 archives of the log will be kept (just for consistency with the other
log rotation rules)

PR: 196788
MFC after: 1 week
Reviewed by: hselasky
Sponsored by: EMC / Isilon Storage Division

9 years agoAllow use of a pre-instantiated RTAS as well as a self-instantiated one. This
nwhitehorn [Thu, 22 Jan 2015 22:04:43 +0000 (22:04 +0000)]
Allow use of a pre-instantiated RTAS as well as a self-instantiated one. This
lets the kernel boot on RTAS-based systems by being kexec'ed from Linux.

9 years agoRename the 'release' target to 'real-release', and
gjb [Thu, 22 Jan 2015 19:43:05 +0000 (19:43 +0000)]
Rename the 'release' target to 'real-release', and
add two targets, 'vm-release' and 'cloudware-release',
that are invoked if WITH_VMIMAGES and WITH_CLOUDWARE
are not empty.

This fixes an issue where 'make release' would not
build the cloud provider targets because CLOUDWARE was
not yet set. [1]

Move the WITH_VMIMAGES and WITH_CLOUDWARE targets to
Makefile.vm.

Note: There is no 'cloudware-install' target yet, since
some of the disk image names may need to be specific to
the provider, so this is probably best handled by the
build scripts.

Reported by: cperciva [1]
MFC after: 1 month
X-MFC-with: r277458
Sponsored by: The FreeBSD Foundation

9 years agoUpdate reported elftoolchain version
emaste [Thu, 22 Jan 2015 17:53:30 +0000 (17:53 +0000)]
Update reported elftoolchain version

The last elftoolchain update is upstream rev 3136. Update our reported
version and add M (Modified) suffix as our elftoolchain contains
additional fixes not yet committed upstream.

Sponsored by: The FreeBSD Foundation

9 years agoDeclare Maxmem on arm. This should have been part of r277532.
ian [Thu, 22 Jan 2015 17:46:05 +0000 (17:46 +0000)]
Declare Maxmem on arm.  This should have been part of r277532.

9 years agoAdd the Maxmem global and set it to the highest physical page number plus 1.
ian [Thu, 22 Jan 2015 17:42:30 +0000 (17:42 +0000)]
Add the Maxmem global and set it to the highest physical page number plus 1.

9 years agoDon't include newvers.sh into freebsd-version.
ume [Thu, 22 Jan 2015 17:13:43 +0000 (17:13 +0000)]
Don't include newvers.sh into freebsd-version.

9 years agoImprove CARP logging so that all state transitions are logged.
will [Thu, 22 Jan 2015 17:09:54 +0000 (17:09 +0000)]
Improve CARP logging so that all state transitions are logged.

sys/netinet/ip_carp.c:
Add a "reason" string parameter to carp_set_state() and
carp_master_down_locked() allowing more specific logging
information to be passed into these apis.

Refactor existing state transition logging into a single
log call in carp_set_state().

Update all calls to carp_set_state() and
carp_master_down_locked() to pass an appropriate reason
string.  For state transitions that were previously logged,
the output should be unchanged.

Submitted by: gibbs (original), asomers (updated)
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1039697 on 2014/02/11 (original)
1049992 on 2014/03/21 (updated)

9 years agoDon't count requests with status sent as overlapping.
mav [Thu, 22 Jan 2015 14:49:36 +0000 (14:49 +0000)]
Don't count requests with status sent as overlapping.

While those requests are still in target OOA queue, for initiator they are
already completed, so tags can be reused.

MFC after: 1 week

9 years agoRevert for r277213:
hselasky [Thu, 22 Jan 2015 11:12:42 +0000 (11:12 +0000)]
Revert for r277213:

FreeBSD developers need more time to review patches in the surrounding
areas like the TCP stack which are using MPSAFE callouts to restore
distribution of callouts on multiple CPUs.

Bump the __FreeBSD_version instead of reverting it.

Suggested by: kmacy, adrian, glebius and kib
Differential Revision: https://reviews.freebsd.org/D1438

9 years agoMake this compile with WARNS=6 and clang/gcc
ngie [Thu, 22 Jan 2015 09:25:31 +0000 (09:25 +0000)]
Make this compile with WARNS=6 and clang/gcc

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agostyle(9) cleanup
rstone [Thu, 22 Jan 2015 03:56:23 +0000 (03:56 +0000)]
style(9) cleanup

9 years agoAdd last_fault_code used in pmap-v6.c if kernel is compiled with "option DEBUG"
gonzo [Thu, 22 Jan 2015 03:33:51 +0000 (03:33 +0000)]
Add last_fault_code used in pmap-v6.c if kernel is compiled with "option DEBUG"

9 years agoWrite ACK for all kinds of LCDC interrupts
gonzo [Thu, 22 Jan 2015 03:32:04 +0000 (03:32 +0000)]
Write ACK for all kinds of LCDC interrupts

9 years agoBack out r276841, r276756, r276747, r276746. The change in r276747 is very
glebius [Thu, 22 Jan 2015 01:23:16 +0000 (01:23 +0000)]
Back out r276841, r276756, r276747, r276746. The change in r276747 is very
very questionable, since it makes vimages more dependent on each other. But
the reason for the backout is that it screwed up shutting down the pf purge
threads, and now kernel immedially panics on pf module unload. Although module
unloading isn't an advertised feature of pf, it is very important for
development process.

I'd like to not backout r276746, since in general it is good. But since it
has introduced numerous build breakages, that later were addressed in
r276841, r276756, r276747, I need to back it out as well. Better replay it
in clean fashion from scratch.

9 years agoEnable nanobsd.sh to be executed when pwd != NANO_SRC.
will [Thu, 22 Jan 2015 00:52:34 +0000 (00:52 +0000)]
Enable nanobsd.sh to be executed when pwd != NANO_SRC.

While here, fix a bug in which NANO_PMAKE would not be appended at the
appropriate time.

Simply move both checks to after the call to set_defaults_and_export().

Tested by: lstewart
Sponsored by: Spectra Logic

9 years agoFix bootstrap on systems with old libdwarf and WITHOUT_CDDL
emaste [Wed, 21 Jan 2015 21:49:03 +0000 (21:49 +0000)]
Fix bootstrap on systems with old libdwarf and WITHOUT_CDDL

ELF Tool Chain tools need libelf and libdwarf.

Submitted by: jmallett (earlier version)
Reviewed by: jmallett
Sponsored by: The FreeBSD Foundation

9 years agoMove the __aligned() declaration to where it will actually do something.
ian [Wed, 21 Jan 2015 21:31:26 +0000 (21:31 +0000)]
Move the __aligned() declaration to where it will actually do something.

9 years agoFix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards.
will [Wed, 21 Jan 2015 20:32:36 +0000 (20:32 +0000)]
Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards.

The newer boards don't have the response field that indicates
whether the SCSI status byte is present.  You have to just look to
see whether it is non-zero.

The code was looking to see whether the sense length was valid
before propagating the SCSI status byte (and sense information) up
the stack.  With a status like Reservation Conflict, there is no
sense information, only the SCSI status byte.  So it wasn't getting
correctly returned.

isp.c:
In isp_intr(), if we are on a 2400 or 2500 type board and
get a response, look at the actual contents of the
SCSI status value and set the RQSF_GOT_STATUS flag
accordingly so that return any SCSI status value we get.  The
RQSF_GOT_SENSE flag will get set later on if there is
actual sense information returned.

Submitted by: ken
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1112791 on 2015/01/15

9 years agoForce commit to record the correct log for r277513.
will [Wed, 21 Jan 2015 20:27:11 +0000 (20:27 +0000)]
Force commit to record the correct log for r277513.

If the user sends an XPT_RESET_DEV CCB, make sure to reset the
Fibre Channel Command Reference Number if we're running on a FC
controller.

We send a SCSI Target Reset when we get this CCB, and as a result
need to reset the CRN to 1 on the next command.

isp_freebsd.c:
In the XPT_RESET_DEV implementation in isp_action(), reset
the CRN if we're on a FC controller.

Submitted by: ken
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1112787 on 2015/01/15

9 years agoChange 1112791 by kenm@ken.spectrabsd8 on 2015/01/15 16:45:13
will [Wed, 21 Jan 2015 20:22:53 +0000 (20:22 +0000)]
Change 1112791 by kenm@ken.spectrabsd8 on 2015/01/15 16:45:13

Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards.

The newer boards don't have the response field that indicates
whether the SCSI status byte is present.  You have to just look to
see whether it is non-zero.

The code was looking to see whether the sense length was valid
before propagating the SCSI status byte (and sense information) up
the stack.  With a status like Reservation Conflict, there is no
sense information, only the SCSI status byte.  So it wasn't getting
correctly returned.

isp.c:
In isp_intr(), if we are on a 2400 or 2500 type board and
get a response, look at the actual contents of the
SCSI status value and set the RQSF_GOT_STATUS flag
accordingly so that return any SCSI status value we get.  The
RQSF_GOT_SENSE flag will get set later on if there is
actual sense information returned.

Submitted by: ken
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1112791 on 2015/01/15

9 years agoMicro-optimize the new arm inline bus_space implementation by grouping all
ian [Wed, 21 Jan 2015 20:12:35 +0000 (20:12 +0000)]
Micro-optimize the new arm inline bus_space implementation by grouping all
the data the inline functions access together at the start of the bus_space
struct.  The start-of part isn't so important, it's the grouping-together
that's the point: now all the most-accessed data should be in one cache line.

Suggested by:   cognet

9 years agoFix remote DMA based firewire debugging when targeting
will [Wed, 21 Jan 2015 20:08:24 +0000 (20:08 +0000)]
Fix remote DMA based firewire debugging when targeting
systems with more than 4GB of physical memory.

To remotely debug the system 'stealthy' which has a kernel
with this change installed and firewire properly configured:

% fwcontrol -m stealthy (or stealthy's firewire EUI64)
% kgdb kernel /dev/fwmem0.0

sys/dev/firewire/fwohci.c:
Rather than hard code the upper limit for hw based
automatic responses to remote DMA requests at 4GB,
program the hardware using Maxmem, the page number
one higher than the highest physical page detected
in the system.

While here, garbage collect more useless splfw()
calls.

Submitted by: gibbs
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1110994 on 2015/01/06

9 years agoFix firewire panic when issuing a reply to an unhandled
will [Wed, 21 Jan 2015 20:06:25 +0000 (20:06 +0000)]
Fix firewire panic when issuing a reply to an unhandled
asynchronous remote dma request (DMA request that the
hardware cannot automatically handle).

sys/dev/firewire/firewire.c
In fw_rcv(), add missing early return in the error
path for DMA requests to unregistered regions.

Submitted by: gibbs
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1110993 on 2015/01/06

9 years agoProperly lock accesss to the firewire_comm->devices list.
will [Wed, 21 Jan 2015 20:05:10 +0000 (20:05 +0000)]
Properly lock accesss to the firewire_comm->devices list.

sys/dev/firewire/firewire.c:
Add missing FW_GLOCK/UNLOCK() usage to fw_noderesolve_nodeid().

sys/dev/firewire/firewire.c:
sys/dev/firewire/fwmem.c:
Remove no-op splfw() calls from functions that have been
audited for proper lock usage.

Submitted by: gibbs
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1110992 on 2015/01/06

9 years agoFix panic in firewire and creation of invalid config ROM.
will [Wed, 21 Jan 2015 20:03:46 +0000 (20:03 +0000)]
Fix panic in firewire and creation of invalid config ROM.

sys/boot/i386/libfirewire/firewire.c:
sys/dev/firewire/firewire.c:
Fix configuration ROM generation count wrapping logic
so that the generation count is never outside of
allowed limits (0x2 -> 0xF).

sys/dev/firewire/firewire.c:
In fw_xfer_unload(), xfer->fc may be NULL.  Protect
against this before taking the fc lock.

Submitted by: gibbs
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1110685 on 2015/01/05

9 years agoFix a FWXF_INQ race in the firewire driver.
will [Wed, 21 Jan 2015 20:02:16 +0000 (20:02 +0000)]
Fix a FWXF_INQ race in the firewire driver.

sys/dev/firewire/firewire.c:
In fw_xfer_unload() expand lock coverage so that
the test for FWXF_INQ doesn't race with it being
cleared in another thread.

Submitted by: gibbs
MFC after: 1 week
Sponsored by: Spectra Logic
MFSpectraBSD: 1110207 on 2015/01/02