freebsd.git
9 years agoRemove vestiges of previous autofs.
trasz [Mon, 18 Aug 2014 14:47:13 +0000 (14:47 +0000)]
Remove vestiges of previous autofs.

Discussed with: alfred@
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoUse the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual
hselasky [Mon, 18 Aug 2014 14:30:43 +0000 (14:30 +0000)]
Use the "bSubslotSize" and "bSubFrameSize" fields to obtain the actual
sample size. According to the USB audio frame format specification
from USB.org, the value in the "bBitResolution" field can be less than
the actual sample size, depending on the actual hardware, and should
not be used for this computation.

PR: 192755
MFC after: 1 week

9 years agoAdd more USB class codes.
hselasky [Mon, 18 Aug 2014 14:23:07 +0000 (14:23 +0000)]
Add more USB class codes.

Obtained from: libusb project at SourceForge
MFC after: 1 week

9 years ago- Do not look for more matching lines if -L is specified
gabor [Mon, 18 Aug 2014 12:29:28 +0000 (12:29 +0000)]
- Do not look for more matching lines if -L is specified

Submitted by:   eadler (based on)
MFC after: 2 weeks

9 years agoImport the tools used to convert the keymap files from SYSCONS (in locale
se [Mon, 18 Aug 2014 09:40:19 +0000 (09:40 +0000)]
Import the tools used to convert the keymap files from SYSCONS (in locale
dependent encoding) to NEWCONS (Unicode).

The file "LANG.map" is used to convert INDEX.keymaps. It has 3 columns:
- the language ID as used in the source file
- the language ID to be used in the generated file (e.g. "iw" -> "he")
- the encoding of the menu texts for this language
The conversion result is written to STDOUT.

The file "KBDFILES.map" is used to batch convert keymap files. It's
columns are:
- the encoding used for the keymap sounce file
- the name of the source file
- the name of the generated file
The output files are created in the TEMP sub-directory of the vt keymap
directory, in order to preserve (possibly uncommitted) keymap files in
/usr/src/share/vt/keymaps.

The convert-keymap.pl script can be directly executed by passing the
source file name and the encoding on the command line. It writes to
STDOUT and generates hex Unicode codepoints by default. (This can be
changed to decimal in the script.)

While written for the one-time conversion of the SYSCONS keymaps into
the format required for NEWCONS, I think these tools may be useful for
easy conversion of possible further SYSCONS keymap files, that have not
been committed to the source tree.

9 years agoZero buffer before request.
melifaro [Mon, 18 Aug 2014 08:07:50 +0000 (08:07 +0000)]
Zero buffer before request.

9 years ago/usr/libexec/ld.so.1 never was a thing on FreeBSD/arm. This was the
imp [Mon, 18 Aug 2014 02:45:06 +0000 (02:45 +0000)]
/usr/libexec/ld.so.1 never was a thing on FreeBSD/arm. This was the
FreeBSD 3.x and 4.x run time linker. FreeBSD/arm's first release was
5.0. Retire this long-dead code.

9 years agoExpand the elf brandelf infrastructure to give access to the whole ELF
imp [Mon, 18 Aug 2014 02:44:56 +0000 (02:44 +0000)]
Expand the elf brandelf infrastructure to give access to the whole ELF
header (Elf_Ehdr) to determine if a particular interpretor wants to
accept it or not. Use this mechanism to filter EABI arm on OABI arm
kernels, and vice versa. This method could also be used to implement
OABI on EABI arm kernels, if desired, or to allow a single mips kernel
to run o32, n32 and n64 binaries.

Differential Revision: https://reviews.freebsd.org/D609

9 years agoRename ca keyboard to ca-fr
emaste [Mon, 18 Aug 2014 01:49:42 +0000 (01:49 +0000)]
Rename ca keyboard to ca-fr

"ca" will shortly be used for the Canadian Multilingual keyboard.

9 years agoAdd LIBUTIL to DPADD
ngie [Mon, 18 Aug 2014 01:21:41 +0000 (01:21 +0000)]
Add LIBUTIL to DPADD

This will fix "make checkdpadd"

MFC after: 5 days
PR: 192759
Approved by: rpaulo (mentor)

9 years agoAdd -ll to LDADD to fix "make checkdpadd"
ngie [Mon, 18 Aug 2014 00:50:09 +0000 (00:50 +0000)]
Add -ll to LDADD to fix "make checkdpadd"

Phabric: D622
MFC after: 2 weeks
Approved by: rpaulo (mentor)

9 years agoFix typo in lib/atf/libatfc++/Makefile
ngie [Sun, 17 Aug 2014 23:30:45 +0000 (23:30 +0000)]
Fix typo in lib/atf/libatfc++/Makefile

LIBATFC should be LIBATF_C; this was missed in the initial import
(r241823)

PR: 192731
MFC after: 3 days
Phabric: D619
Approved by: rpaulo (mentor)

9 years agoAdd forgotten DPADD to ifconfig(8).
melifaro [Sun, 17 Aug 2014 20:06:47 +0000 (20:06 +0000)]
Add forgotten DPADD to ifconfig(8).

PR: 192760
Submitted by: yaneurabeya at gmail.com
MFC after: 2 weeks

9 years agoAttempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS.
se [Sun, 17 Aug 2014 19:54:21 +0000 (19:54 +0000)]
Attempt at converting the SYSCONS keymaps to Unicode for use with NEWCONS.
I have spent many hours comparing source and destination formats, and hope
to have caught the most severe conversion errors.

Files were converted with a Perl script which I'll shortly commit to the
tools directory. This script is a much enhanced version of the one
provided by ray@ and is expected to support the full kbdmap(5) syntax.

The naming convention used is:

 <2-letter country code>.<variant>.kbd

Only if there are multiple layouts for different languages:

 <2-letter country code>-<2-letter language code>.<variant>.kbd

In nearly all cases, the keyboards are country specific, only. Currently
there is only one case where the language was added ("ch-fr.kbd" for
the Swiss-French keyboard layout).

I choose to write Unicode character codes as hex numbers. While this
increases the diff to the SYSCONS keymap files for the trivial cases
(conversion from ISO8859-1), it really helps to verify the more complex
cases against a Unicode table (which is indexed by hex numbers).

This commit does not cover all files that have been converted, since I
need to sort out which ones to use, if there were several with different
source encodings to choose from.

Review and test of the keymap files is highly desirable before 10.1 is
released. I'd also appreciate educated opinions regarding the optimum
variant (to be made available as the default for each language).

Since there are no NEWCONS keymaps in 10-STABLE, I plan to MFC after
the minimum allowed delay of 3 days, to allow at least a few weeks to
test and improve what will be in the next release.

MFC after: 3 days

9 years agosh: Avoid overflow in atoi() when parsing HISTSIZE.
jilles [Sun, 17 Aug 2014 19:36:56 +0000 (19:36 +0000)]
sh: Avoid overflow in atoi() when parsing HISTSIZE.

Side effect: a non-numeric HISTSIZE now results in the default size (100)
instead of 0.

9 years agoRemove LOG_ODELAY because it does nothing.
neel [Sun, 17 Aug 2014 19:06:26 +0000 (19:06 +0000)]
Remove LOG_ODELAY because it does nothing.

Reviewed by: jilles
CR: https://reviews.freebsd.org/D611

9 years agoRemove keyboard entropy [1] from r270105.
bz [Sun, 17 Aug 2014 18:27:02 +0000 (18:27 +0000)]
Remove keyboard entropy [1] from r270105.

Reported by: ian [1]
(Pointy hat)^2 to: imp

9 years agoAdd missing license to at91_common.c. It was committed w/o a license.
imp [Sun, 17 Aug 2014 16:53:19 +0000 (16:53 +0000)]
Add missing license to at91_common.c. It was committed w/o a license.

Pointy hat to: imp@

9 years agoDefine at91_master_clock in only one file to eliminate warnings about
imp [Sun, 17 Aug 2014 16:53:14 +0000 (16:53 +0000)]
Define at91_master_clock in only one file to eliminate warnings about
it multiply defined commons.

9 years agoConvert the HL201 config file to use FDT.
imp [Sun, 17 Aug 2014 16:53:10 +0000 (16:53 +0000)]
Convert the HL201 config file to use FDT.

9 years agosh: Reject integer overflow in number and is_number.
jilles [Sun, 17 Aug 2014 16:40:29 +0000 (16:40 +0000)]
sh: Reject integer overflow in number and is_number.

9 years agosh: Don't hardcode relative paths in the tests stderr files.
jilles [Sun, 17 Aug 2014 14:26:12 +0000 (14:26 +0000)]
sh: Don't hardcode relative paths in the tests stderr files.

These paths have had to be adjusted to changes in the testsuite runner
several times, so modify the tests to remove the need for such adjustment.

A cp in functional_test.sh is now unneeded, but this matters little in
performance.

9 years agoAdd a few missing entries and fix entries that are obviously wrong.
se [Sun, 17 Aug 2014 11:59:23 +0000 (11:59 +0000)]
Add a few missing entries and fix entries that are obviously wrong.
The use of the old ISO language code "iw" for Hebrew was inconsistent
and it is replaced by the new language code "he" (which was already
used for the keyboard menu entry, but not for the menu heading or the
default font).

These changes are in preparation of the conversion of this file and
the keymap definitions to Unicode for use with NEWCONS.

9 years agostaticize two functions, and use proper format for a struct sglist
luigi [Sun, 17 Aug 2014 10:25:27 +0000 (10:25 +0000)]
staticize two functions, and use proper format for a struct sglist
(reported by bz)

9 years agoBring in the new automounter, similar to what's provided in most other
trasz [Sun, 17 Aug 2014 09:44:42 +0000 (09:44 +0000)]
Bring in the new automounter, similar to what's provided in most other
UNIX systems, eg. MacOS X and Solaris.  It uses Sun-compatible map format,
has proper kernel support, and LDAP integration.

There are still a few outstanding problems; they will be fixed shortly.

Reviewed by: allanjude@, emaste@, kib@, wblock@ (earlier versions)
Phabric: D523
MFC after: 2 weeks
Relnotes: yes
Sponsored by: The FreeBSD Foundation

9 years agoAdd missing DPADD to Makefile.
hselasky [Sun, 17 Aug 2014 06:28:57 +0000 (06:28 +0000)]
Add missing DPADD to Makefile.

PR: 192733

9 years agoWhen the initarm_* routines were renamed to platform_* and moved to their
ian [Sun, 17 Aug 2014 02:56:58 +0000 (02:56 +0000)]
When the initarm_* routines were renamed to platform_* and moved to their
own header file, the lovely block of comments explaining what the generic
init code expects of the soc implementations got lost, restore it.

9 years agoRename the old initarm_* functions to the new platform_* names. Also
ian [Sun, 17 Aug 2014 02:53:36 +0000 (02:53 +0000)]
Rename the old initarm_* functions to the new platform_* names.  Also
move the registration of the static device map table into the function
intended to do devmap init stuff.

9 years agoClean up unused definitions.
melifaro [Sat, 16 Aug 2014 22:55:58 +0000 (22:55 +0000)]
Clean up unused definitions.

9 years ago* Use standard net/sff8472.h header for sff bits and offsets.
melifaro [Sat, 16 Aug 2014 21:53:44 +0000 (21:53 +0000)]
* Use standard net/sff8472.h header for sff bits and offsets.
* Convert sff_8472_id to 'const char *' to please clang.

Pointed by: np

9 years agoFactor out the common code for function boundary tracing instead of
markj [Sat, 16 Aug 2014 21:42:55 +0000 (21:42 +0000)]
Factor out the common code for function boundary tracing instead of
duplicating the entire implementation for both x86 and powerpc. This makes
it easier to add support for other architectures and has no functional
impact.

Phabric: D613
Reviewed by: gnn, jhibbits, rpaulo
Tested by: jhibbits (powerpc)
MFC after: 2 weeks

9 years agoMove the imx6 sysctl temperature info to hw.imx6 where all the other
ian [Sat, 16 Aug 2014 20:44:45 +0000 (20:44 +0000)]
Move the imx6 sysctl temperature info to hw.imx6 where all the other
soc-wide info lives.  It was under dev.imx6_anatop.0.

What does anatop mean anyway?  Nobody seems to know, so it's probably
not where somebody will think to look for imx6 hardware info.

9 years agoAdd support for reading i2c SFP/SFP+ data from NIC driver and
melifaro [Sat, 16 Aug 2014 19:13:52 +0000 (19:13 +0000)]
Add support for reading i2c SFP/SFP+ data from NIC driver and
presenting most interesting fields via ifconfig -v.
This version supports Intel ixgbe driver only.

Tested on: Cisco,Intel,Mellanox,ModuleTech,Molex transceivers
MFC after: 2 weeks

9 years agoUpdate to the current version of netmap.
luigi [Sat, 16 Aug 2014 15:00:01 +0000 (15:00 +0000)]
Update to the current version of netmap.
Mostly bugfixes or features developed in the past 6 months,
so this is a 10.1 candidate.

Basically no user API changes (some bugfixes in sys/net/netmap_user.h).

In detail:

1. netmap support for virtio-net, including in netmap mode.
  Under bhyve and with a netmap backend [2] we reach over 1Mpps
  with standard APIs (e.g. libpcap), and 5-8 Mpps in netmap mode.

2. (kernel) add support for multiple memory allocators, so we can
  better partition physical and virtual interfaces giving access
  to separate users. The most visible effect is one additional
  argument to the various kernel functions to compute buffer
  addresses. All netmap-supported drivers are affected, but changes
  are mechanical and trivial

3. (kernel) simplify the prototype for *txsync() and *rxsync()
  driver methods. All netmap drivers affected, changes mostly mechanical.

4. add support for netmap-monitor ports. Think of it as a mirroring
  port on a physical switch: a netmap monitor port replicates traffic
  present on the main port. Restrictions apply. Drive carefully.

5. if_lem.c: support for various paravirtualization features,
  experimental and disabled by default.
  Most of these are described in our ANCS'13 paper [1].
  Paravirtualized support in netmap mode is new, and beats the
  numbers in the paper by a large factor (under qemu-kvm,
  we measured gues-host throughput up to 10-12 Mpps).

A lot of refactoring and additional documentation in the files
in sys/dev/netmap, but apart from #2 and #3 above, almost nothing
of this stuff is visible to other kernel parts.

Example programs in tools/tools/netmap have been updated with bugfixes
and to support more of the existing features.

This is meant to go into 10.1 so we plan an MFC before the Aug.22 deadline.

A lot of this code has been contributed by my colleagues at UNIPI,
including Giuseppe Lettieri, Vincenzo Maffione, Stefano Garzarella.

MFC after: 3 days.

9 years agoUse mount protocol version 3 by default for showmount and umount.
peter [Sat, 16 Aug 2014 14:56:11 +0000 (14:56 +0000)]
Use mount protocol version 3 by default for showmount and umount.
mount_nfs effectively uses mount protocol v3 by default already.
v1 mount protocol is being removed along with nfsv2 by a high profile NFS
appliance vendor and our legacy v1 mount protocol usage causes rpc errors.

9 years agoprint additional debugging info in virtqueue_dump()
luigi [Sat, 16 Aug 2014 13:13:17 +0000 (13:13 +0000)]
print additional debugging info in virtqueue_dump()
(not fundamental, but useful to debug performance issues on vtnet)

MFC after: 3 days

9 years agonet: move interface removal notification up in if_detach_internal
royger [Sat, 16 Aug 2014 10:47:24 +0000 (10:47 +0000)]
net: move interface removal notification up in if_detach_internal

This is needed to prevent having interfaces with ifp->if_addr == NULL
on bridge interfaces. Moving the notification event handlers up makes
sure the interfaces are removed before doing any more cleanup.

Sponsored by: Citrix Systems R&D
Reviewed by: melifaro
Differential Revision: https://reviews.freebsd.org/D598

net/if.c
 - Move interface removal notification up in if_detach_internal.

9 years agoComplete r254667, do not destroy pmap lock if KVA allocation failed.
kib [Sat, 16 Aug 2014 08:31:25 +0000 (08:31 +0000)]
Complete r254667, do not destroy pmap lock if KVA allocation failed.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>
MFC after: 1 week

9 years agoAdd if_ath_alq code into the non-module build.
adrian [Sat, 16 Aug 2014 03:05:02 +0000 (03:05 +0000)]
Add if_ath_alq code into the non-module build.

9 years agosh: Mask off shift distance (<< and >>) in arithmetic.
jilles [Fri, 15 Aug 2014 22:36:41 +0000 (22:36 +0000)]
sh: Mask off shift distance (<< and >>) in arithmetic.

In C, shift distances equal to or larger than the number of bits in the
operand result in undefined behaviour. As part of eliminating undefined
behaviour in arithmetic, mask off the distance like Java and JavaScript
specify and C on x86 usually does.

Assumption: conversion from unsigned to signed retains the two's complement
bits.
Assumption: uintmax_t has no padding bits.

9 years agoMake the USB and ZFS devd configuration files optional depending on the
ngie [Fri, 15 Aug 2014 21:35:31 +0000 (21:35 +0000)]
Make the USB and ZFS devd configuration files optional depending on the
values of MK_USB/MK_ZFS

Making zfs.conf optional resolves PR # 186971

PR: 186971
Phabric: D606
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division

9 years agoFix atmconfig compilation when MK_ATM == yes and MK_BSNMP == no
ngie [Fri, 15 Aug 2014 21:22:49 +0000 (21:22 +0000)]
Fix atmconfig compilation when MK_ATM == yes and MK_BSNMP == no

Makefile.inc1:
Always compile gensnmptree with bootstrap-tools when MK_BSNMP != no
instead of depending on a potentially stale tool installed on the build host

sbin/atm/atmconfig/Makefile:
- Always remove oid.h to avoid cluttering up the build/src tree.
- Consolidate all of the RESCUE/MK_BSNMP != no logic under one
conditional to improve readability
- Remove unnecessary ${.OBJDIR} prefixing for oid.h and use ${.TARGET} instead
  of spelling out oid.h
- Add a missing DPADD for ${LIBCRYPTO} when compiled MK_BSNMP == yes and
  MK_OPENSSL == yes and not compiling for /rescue/rescue

sbin/atm/atmconfig/main.c:
Change #ifndef RESCUE to #ifdef WITH_BSNMP in main.c to make it
clear that we're compiling bsnmp support into atmconfig

Approved by: jmmv (mentor)
Phabric: D579
PR: 143830
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoImplement the FDT static pinctl/pinmux spec for Atmel. This will
imp [Fri, 15 Aug 2014 16:08:52 +0000 (16:08 +0000)]
Implement the FDT static pinctl/pinmux spec for Atmel. This will
configure the mux and config registers for PIO devices based on what
we find in the FDT. I developed it per the spec that had been
committed to Linux in the January 2014 time frame and haven't
updated. In short, bundles of pins are activated in specific ways for
specific configurations, and we implement all of that.

What's not included is a MI device infrastructure, any dynamic
run-time changing of these pins, etc. Also not included are hooks into
all the drivers to enable the latter (static at boot no driver changes
are needed). These larger questions will need to be answered once we
have more drivers like this for more platforms, or somebody has a heck
of a lot of time to research a bunch of platforms, the Linux solution
(which is good, but has its warts), etc.

9 years agoCorrect the order of arguments passed to LIST_INSERT_AFTER().
markj [Fri, 15 Aug 2014 15:42:58 +0000 (15:42 +0000)]
Correct the order of arguments passed to LIST_INSERT_AFTER().

Reviewed by: kib
X-MFC-With: r269656

9 years agoDo not lookup source node twice when pf_map_addr() is used.
glebius [Fri, 15 Aug 2014 14:16:08 +0000 (14:16 +0000)]
Do not lookup source node twice when pf_map_addr() is used.

PR: 184003
Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

9 years agopf_map_addr() can fail and in this case we should drop the packet,
glebius [Fri, 15 Aug 2014 14:02:24 +0000 (14:02 +0000)]
pf_map_addr() can fail and in this case we should drop the packet,
otherwise bad consequences including a routing loop can occur.

Move pf_set_rt_ifp() earlier in state creation sequence and
inline it, cutting some extra code.

PR: 183997
Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

9 years agoRemove bogus ; at the end of the if condition in order to unbreak gcc builds
bz [Fri, 15 Aug 2014 10:01:33 +0000 (10:01 +0000)]
Remove bogus ; at the end of the if condition in order to unbreak gcc builds
after r270004.

MFC after: 4 days
X-MFX with: r270004

9 years agoImplement 'fast path' for the vm page fault handler. Or, it could be
kib [Fri, 15 Aug 2014 07:30:14 +0000 (07:30 +0000)]
Implement 'fast path' for the vm page fault handler.  Or, it could be
called a scalable path.  When several preconditions hold, the vm
object lock for the object containing the faulted page is taken in
read mode, instead of write, which allows parallel faults processing
in the region.

Namely, the fast path is taken when the faulted page already exists
and does not need copy on write, is already fully valid, and not busy.
For technical reasons, fast path is avoided when the fault is the
first write on the vnode object, or when the fault is for wiring or
debugger read or write.

On the fast path, pmap_enter(9) is passed the PMAP_ENTER_NOSLEEP flag,
since object lock is kept.  Pmap might fail to create the entry, in
which case the fallback to slow path is performed.

Reviewed by: alc
Tested by: pho (previous version)
Hardware provided and hosted by: The FreeBSD Foundation and
 Sentex Data Communications
Sponsored by: The FreeBSD Foundation
MFC after: 2 week

9 years agoFix synproxy with IPv6. pf_test6() was missing a check for M_SKIP_FIREWALL.
glebius [Fri, 15 Aug 2014 04:35:34 +0000 (04:35 +0000)]
Fix synproxy with IPv6. pf_test6() was missing a check for M_SKIP_FIREWALL.

PR: 127920
Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

9 years agoChange pr_output's prototype to avoid the need for explicit casts.
kevlo [Fri, 15 Aug 2014 02:43:02 +0000 (02:43 +0000)]
Change pr_output's prototype to avoid the need for explicit casts.
This is a follow up to r269699.

Phabric: D564
Reviewed by: jhb

9 years agoPrint the symbolic bit names for the status when we get a timeout.
imp [Thu, 14 Aug 2014 23:17:33 +0000 (23:17 +0000)]
Print the symbolic bit names for the status when we get a timeout.

9 years agoTry to clarify how file systems are exported for NFSv4.
rmacklem [Thu, 14 Aug 2014 22:52:05 +0000 (22:52 +0000)]
Try to clarify how file systems are exported for NFSv4.

Suggested by: rcarter@pinyon.org
MFC after: 1 week

9 years agoConvert devd's client socket to type SOCK_SEQPACKET.
asomers [Thu, 14 Aug 2014 22:33:56 +0000 (22:33 +0000)]
Convert devd's client socket to type SOCK_SEQPACKET.

This change consists of two merges from projects/zfsd/head along with the
addition of an ATF test case for the new functionality.

sbin/devd/tests/Makefile
sbin/devd/tests/client_test.c
Add ATF test cases for reading events from both devd socket types.

r266519:
sbin/devd/devd.8
sbin/devd/devd.cc
Create a new socket, of type SOCK_SEQPACKET, for communicating with
clients. SOCK_SEQPACKET sockets preserve record boundaries,
simplying code in the client. The old SOCK_STREAM socket is retained
for backwards-compatibility with existing clients.

r269993:
sbin/devd/devd.8
Fix grammar bug.

CR: https://reviews.freebsd.org/rS266519
MFC after: 5 days
Sponsored by: Spectra Logic

9 years agoSync list of supported devices in the man page with the driver.
gavin [Thu, 14 Aug 2014 19:15:20 +0000 (19:15 +0000)]
Sync list of supported devices in the man page with the driver.

MFC after: 1 week

9 years agoUpdate iwn(4) and iwnfw(4) man pages to reflect all available firmware.
gavin [Thu, 14 Aug 2014 19:14:24 +0000 (19:14 +0000)]
Update iwn(4) and iwnfw(4) man pages to reflect all available firmware.

MFC after: 1 week

9 years ago- Count global pf(4) statistics in counter(9).
glebius [Thu, 14 Aug 2014 18:57:46 +0000 (18:57 +0000)]
- Count global pf(4) statistics in counter(9).
- Do not count global number of states and of src_nodes,
  use uma_zone_get_cur() to obtain values.
- Struct pf_status becomes merely an ioctl API structure,
  and moves to netpfil/pf/pf.h with its constants.
- V_pf_status is now of type struct pf_kstatus.

Submitted by: Kajetan Staszkiewicz <vegeta tuxpowered.net>
Sponsored by: InnoGames GmbH

9 years agoUpdate i386/NOTES and amd64/NOTES files to contain the complete list of
gavin [Thu, 14 Aug 2014 18:29:55 +0000 (18:29 +0000)]
Update i386/NOTES and amd64/NOTES files to contain the complete list of
firmwares for iwn(4) and sort them.

MFC after: 1 week

9 years agoAllow iwn105fw and iwn135 firmwares to be compiled into the kernel.
gavin [Thu, 14 Aug 2014 18:16:27 +0000 (18:16 +0000)]
Allow iwn105fw and iwn135 firmwares to be compiled into the kernel.

MFC after: 1 week

9 years agoReword comment to match the interrupt mode names from the MPtable spec.
neel [Thu, 14 Aug 2014 18:03:38 +0000 (18:03 +0000)]
Reword comment to match the interrupt mode names from the MPtable spec.

Reviewed by: tychon

9 years agoUpdate the URL to the phabricator instance.
gjb [Thu, 14 Aug 2014 16:25:43 +0000 (16:25 +0000)]
Update the URL to the phabricator instance.

Sponsored by: The FreeBSD Foundation

9 years agocreate_$ARCH_diskimage never really took off. Collapse back down to
imp [Thu, 14 Aug 2014 16:17:30 +0000 (16:17 +0000)]
create_$ARCH_diskimage never really took off. Collapse back down to
just one.

9 years agoOnly install the boot loader if it actually exists. This is a stop-gap
imp [Thu, 14 Aug 2014 16:17:23 +0000 (16:17 +0000)]
Only install the boot loader if it actually exists. This is a stop-gap
change, since larger changes to use geom more exclusively to create
partitions is in th works.

9 years agoins is only set and unused, but only when we're not doing software
imp [Thu, 14 Aug 2014 16:01:51 +0000 (16:01 +0000)]
ins is only set and unused, but only when we're not doing software
single stepping. Only set it when we're doing that by bending
style(9) rules a little to avoid even worse #ifdef soup.

9 years agoDisable all inline warnings on gcc >= 4.3. Not sure exactly where the
imp [Thu, 14 Aug 2014 16:01:46 +0000 (16:01 +0000)]
Disable all inline warnings on gcc >= 4.3. Not sure exactly where the
cutover is, but we need better tools to cope with inline tuning per
compiler version than we have. This is a quick bandaid until such
tools are around.

9 years agoDelete pp_isadma. It isn't use, and the code that used it has been
imp [Thu, 14 Aug 2014 16:01:38 +0000 (16:01 +0000)]
Delete pp_isadma. It isn't use, and the code that used it has been
commented out (temporarily) since 1998 when this driver hit the
tree. Also, no need to compute the ethernet header and then never use
it.

9 years agoStreamline format extensions. Either the compiler supports them, and
imp [Thu, 14 Aug 2014 16:01:33 +0000 (16:01 +0000)]
Streamline format extensions. Either the compiler supports them, and
we enable them and format wordings. Or it doesn't, and we disable
format warnings because the kernel uses the extensions pervasively.

9 years agoAvoid pointless (but harmless) actions on unmanaged pages.
alc [Thu, 14 Aug 2014 15:46:15 +0000 (15:46 +0000)]
Avoid pointless (but harmless) actions on unmanaged pages.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

9 years agoSkip pgrep-j and pkill-j if jail or jls is not installed.
asomers [Thu, 14 Aug 2014 14:59:40 +0000 (14:59 +0000)]
Skip pgrep-j and pkill-j if jail or jls is not installed.

Even though jail is part of the base system, it can be disabled by src.conf
settings. Therefore, it should be listed as a required program for tests
that use it.

CR: D603
MFC after: 3 days
Sponsored by: Spectra Logic

9 years agoAdd support for NEWCONS to kbdmap and vidfont.
se [Thu, 14 Aug 2014 14:22:12 +0000 (14:22 +0000)]
Add support for NEWCONS to kbdmap and vidfont.

The path to keymaps and fonts is selected based on the existence and value
of "sysctl kern.vty".

MFC after: 1 week

9 years agoAdded 4K quirks for Corsair Force GT and Samsung 840 SSDs
smh [Thu, 14 Aug 2014 13:57:17 +0000 (13:57 +0000)]
Added 4K quirks for Corsair Force GT and Samsung 840 SSDs

MFC after: 1 week
Sponsored by: Multiplay

9 years agoFix euro symbol in copied keymaps
emaste [Thu, 14 Aug 2014 13:45:02 +0000 (13:45 +0000)]
Fix euro symbol in copied keymaps

These were copied from share/syscons/keymaps/??.iso.kbd.  They were
not actually ISO 8859-1 as assumed.  When interpreted as Unicode they
ended up with the generic currency sign (U+00A4) instead of the euro
(U+20AC).

Reported by: Claude Buisson, tijl@

9 years agoRenamed hw.ixgbe.unsupported_sfp -> hw.ix.unsupported_sfp
smh [Thu, 14 Aug 2014 13:25:05 +0000 (13:25 +0000)]
Renamed hw.ixgbe.unsupported_sfp -> hw.ix.unsupported_sfp

This now matches all other ixgbe sysctl / tunables.

Sponsored by: Multiplay

9 years agoAdd a new loader tunable, vm.kmem_zmax which allows a system administrator
delphij [Thu, 14 Aug 2014 05:31:39 +0000 (05:31 +0000)]
Add a new loader tunable, vm.kmem_zmax which allows a system administrator
to limit the maximum allocation size that malloc(9) would consider using
the UMA cache allocator as backend.

Suggested by: alfred
MFC after: 2 weeks

9 years agoRe-instate UMA cached backend for 4K - 64K allocations. New consumers
delphij [Thu, 14 Aug 2014 05:13:24 +0000 (05:13 +0000)]
Re-instate UMA cached backend for 4K - 64K allocations.  New consumers
like geli(4) uses malloc(9) to allocate temporary buffers that gets
free'ed shortly, causing frequent TLB shootdown as observed in hwpmc
supported flame graph.

Discussed with: jeff, alfred
MFC after: 1 week

9 years agoUse the max guest memory address when creating its iommu domain.
neel [Thu, 14 Aug 2014 05:00:45 +0000 (05:00 +0000)]
Use the max guest memory address when creating its iommu domain.

Also, assert that the GPA being mapped in the domain is less than its maxaddr.

Reviewed by: grehan
Pointed out by: Anish Gupta (akgupt3@gmail.com)

9 years agoBump version because challenge buffer size changed
ache [Thu, 14 Aug 2014 04:42:09 +0000 (04:42 +0000)]
Bump version because challenge buffer size changed

MFC after:      1 week

9 years agoAdd AIC to at91sam9260 support, now that it is needed for multipass to
imp [Thu, 14 Aug 2014 04:21:31 +0000 (04:21 +0000)]
Add AIC to at91sam9260 support, now that it is needed for multipass to
work. This gets my AT91SAM9260-based boards almost booting with
current in multi pass. The MCI driver is broken, but it is equally
broken before multi-pass.

9 years agoAdd support for multipass to Atmel, for both FDT and !FDT cases.
imp [Thu, 14 Aug 2014 04:21:25 +0000 (04:21 +0000)]
Add support for multipass to Atmel, for both FDT and !FDT cases.

9 years agoStart to add FDT support.
imp [Thu, 14 Aug 2014 04:21:20 +0000 (04:21 +0000)]
Start to add FDT support.

9 years agoAdd support for FDT and !FDT configs on Atmel, though FDT isn't
imp [Thu, 14 Aug 2014 04:21:14 +0000 (04:21 +0000)]
Add support for FDT and !FDT configs on Atmel, though FDT isn't
working yet.
Bump rev on arm Makefile since files.at91 uses new '!' operator.

9 years agoFrom https://sourceware.org/ml/newlib/2014/msg00113.html
imp [Thu, 14 Aug 2014 04:20:13 +0000 (04:20 +0000)]
From https://sourceware.org/ml/newlib/2014/msg00113.html
By Richard Earnshaw at ARM
>
>GCC has for a number of years provides a set of pre-defined macros for
>use with determining the ISA and features of the target during
>pre-processing.  However, the design was always somewhat cumbersome in
>that each new architecture revision created a new define and then
>removed the previous one.  This meant that it was necessary to keep
>updating the support code simply to recognise a new architecture being
>added.
>
>The ACLE specification (ARM C Language Extentions)
>(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.set.swdev/index.html)
>provides a much more suitable interface and GCC has supported this
>since gcc-4.8.
>
>This patch makes use of the ACLE pre-defines to map to the internal
>feature definitions.  To support older versions of GCC a compatibility
>header is provided that maps the traditional pre-defines onto the new
>ACLE ones.

Stop using __FreeBSD_ARCH_armv6__ and switch to __ARM_ARCH >= 6 in the
couple of places in tree. clang already implements ACLE. Add a define
that says we implement version 1.1, even though the implementation
isn't quite complete.

9 years agoStop telling people to directly report llvm or clang bugs upstream,
dim [Wed, 13 Aug 2014 21:38:29 +0000 (21:38 +0000)]
Stop telling people to directly report llvm or clang bugs upstream,
point them to the FreeBSD bug tracker instead, since we use our own
patches.

MFC after: 3 days

9 years agoUse "NO NAME" as the default unnamed label.
pfg [Wed, 13 Aug 2014 21:18:31 +0000 (21:18 +0000)]
Use "NO NAME" as the default unnamed label.

Microsoft recommends avoiding the use of spaces in the
string structures for FAT. Unfortunately they do just
that by default in the case of unlabeled filesystems.

Follow the default MS behavior to avoid confusion in
common tools like file(1). This was actually the
default behavior before r203868.

Obtained from: NetBSD (CVS rev. 1.39)
MFC after: 3 days

9 years agoRemove trailing whitespace
emaste [Wed, 13 Aug 2014 19:55:14 +0000 (19:55 +0000)]
Remove trailing whitespace

9 years agoMake the libbsdstat useful again.
adrian [Wed, 13 Aug 2014 19:43:22 +0000 (19:43 +0000)]
Make the libbsdstat useful again.

9 years agoCopy country-code .iso syscons keymaps for vt(4)
emaste [Wed, 13 Aug 2014 19:06:29 +0000 (19:06 +0000)]
Copy country-code .iso syscons keymaps for vt(4)

Existing syscons ISO 8859-1 keymaps (??.iso.kbd) are usable without
change as Unicode keymaps for vt(4).

Sponsored by: The FreeBSD Foundation

9 years agoSupplement r259111 by also using correct casts in gcc's emmintrin.h for
dim [Wed, 13 Aug 2014 16:42:44 +0000 (16:42 +0000)]
Supplement r259111 by also using correct casts in gcc's emmintrin.h for
the first argument of the following builtin function:

* __builtin_ia32_psrlqi128() takes __v2di instead of __v4si

This should fix the following errors when building the graphics/webp
port with base gcc:

lossless_sse2.c:403: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'
lossless_sse2.c:404: error: incompatible type for argument 1 of '__builtin_ia32_psrlqi128'

Reported by: Jos Chrispijn <ports@webrz.net>
MFC after: 3 days

9 years agoAdd support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
tuexen [Wed, 13 Aug 2014 15:50:16 +0000 (15:50 +0000)]
Add support for the SCTP_PR_STREAM_STATUS and SCTP_PR_ASSOC_STATUS
socket options. This includes managing the correspoing stat counters.
Add the SCTP_DETAILED_STR_STATS kernel option to control per policy
counters on every stream. The default is off and only an aggregated
counter is available. This is sufficient for the RTCWeb usecase.

MFC after: 1 week

9 years agoFixed ENOMEM description.
pluknet [Wed, 13 Aug 2014 14:49:51 +0000 (14:49 +0000)]
Fixed ENOMEM description.

MFC after: 1 week
Sponsored by: Nginx, Inc.

9 years agoAdd a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave
kib [Wed, 13 Aug 2014 05:53:41 +0000 (05:53 +0000)]
Add a knob LIBPTHREAD_BIGSTACK_MAIN, which instructs libthr to leave
the whole RLIMIT_STACK-sized region of the kernel-allocated stack as
the stack of main thread.

By default, the main thread stack is clamped at 2MB (4MB on 64bit
ABIs) and the rest is used for other threads stack allocation.  Since
there is no programmatic way to adjust the size of the main thread
stack, pthread_attr_setstacksize() is too late, the knob allows user
to manage the main stack size both for single-threaded and
multi-threaded processes with the rlimit.

Reported by: "Ivan A. Kosarev" <ivan@ivan-labs.com>
Tested by: dim
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoStyle.
kib [Wed, 13 Aug 2014 05:47:49 +0000 (05:47 +0000)]
Style.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 years agoIf vm_page_grab() allocates a new page, the page is not inserted into
kib [Wed, 13 Aug 2014 05:44:08 +0000 (05:44 +0000)]
If vm_page_grab() allocates a new page, the page is not inserted into
page queue even when the allocation is not wired.  It is
responsibility of the vm_page_grab() caller to ensure that the page
does not end on the vm_object queue but not on the pagedaemon queue,
which would effectively create unpageable unwired page.

In exec_map_first_page() and vm_imgact_hold_page(), activate the page
immediately after unbusying it, to avoid leak.

In the uiomove_object_page(), deactivate page before the object is
unlocked.  There is no leak, since the page is deactivated after
uiomove_fromphys() finished.  But allowing non-queued non-wired page
in the unlocked object queue makes it impossible to assert that leak
does not happen in other places.

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd missing BSD.tests.dist entry for lib/libutil to unbreak installworld with
ngie [Wed, 13 Aug 2014 05:15:28 +0000 (05:15 +0000)]
Add missing BSD.tests.dist entry for lib/libutil to unbreak installworld with
MK_TESTS == no

Phabric: D555
X-MFC with: r269904
Approved by: jmmv (mentor, implicit)
Pointyhat to: ngie

9 years agoIntegrate lib/libutil into the build/kyua
ngie [Wed, 13 Aug 2014 04:56:27 +0000 (04:56 +0000)]
Integrate lib/libutil into the build/kyua

Remove the .t wrappers

Rename all of the TAP test applications from test-<test> to
<test>_test to match the convention described in the TestSuite
wiki page

humanize_number_test.c:

- Fix -Wformat warnings with counter variables
- Fix minor style(9) issues:
-- Header sorting
-- Variable declaration alignment/sorting in main(..)
-- Fit the lines in <80 columns
- Fix an off by one index error in the testcase output [*]
- Remove unnecessary `extern char * optarg;` (this is already provided by
  unistd.h)

Phabric: D555
Approved by: jmmv (mentor)
MFC after: 2 weeks
Obtained from: EMC / Isilon Storage Division [*]
Submitted by: Casey Peel <cpeel@isilon.com> [*]
Sponsored by: EMC / Isilon Storage Division

9 years agoPort date/bin/tests to ATF
ngie [Wed, 13 Aug 2014 04:43:29 +0000 (04:43 +0000)]
Port date/bin/tests to ATF

Phabric: D545
Approved by: jmmv (mentor)
Submitted by: keramida (earlier version)
MFC after: 2 weeks
Sponsored by: Google, Inc
Sponsored by: EMC / Isilon Storage Division

9 years agoConvert bin/sh/tests to ATF
ngie [Wed, 13 Aug 2014 04:14:50 +0000 (04:14 +0000)]
Convert bin/sh/tests to ATF

The new code uses a "test discovery mechanism" to determine
what tests are available for execution

The test shell can be specified via:

  kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh

Sponsored by: EMC / Isilon Storage Division
Approved by: jmmv (mentor)
Reviewed by: jilles (maintainer)

9 years agoMinor style tweaks.
pfg [Wed, 13 Aug 2014 03:44:30 +0000 (03:44 +0000)]
Minor style tweaks.

Obtained from: OpenBSD (CVS rev. 1.7)
MFC after: 3 days

9 years agoMake sure the DTrace header files are built before depend and before
rpaulo [Wed, 13 Aug 2014 01:27:51 +0000 (01:27 +0000)]
Make sure the DTrace header files are built before depend and before
the build starts.

This adds a new variable DHDRS that contains a list of all DTrace
header files.  Then, we use the beforedepend hook to make sure the
heaeder files are built.

Introduce a beforebuild dependency (from projects/bmake) based on
feedback from Simon J. Gerraty.  This lets us generate the header
files without running make depend.

Reviewed by: sjg, imp
MFC after: 3 days

9 years agoFix typo when displaying the HPET timer unit number.
neel [Wed, 13 Aug 2014 00:18:16 +0000 (00:18 +0000)]
Fix typo when displaying the HPET timer unit number.

9 years agoMinor cleanup:
neel [Wed, 13 Aug 2014 00:14:26 +0000 (00:14 +0000)]
Minor cleanup:
- Set 'pirq_cold' to '0' on the first PIRQ allocation.
- Make assertions stronger.

Reviewed by: jhb
CR: https://phabric.freebsd.org/D592