]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMerge ^/head r295845 through r295901.
Dimitry Andric [Mon, 22 Feb 2016 22:21:53 +0000 (22:21 +0000)]
Merge ^/head r295845 through r295901.

8 years agoFix a problem in ld, causing it to sometimes print messages similar to
Dimitry Andric [Mon, 22 Feb 2016 22:16:32 +0000 (22:16 +0000)]
Fix a problem in ld, causing it to sometimes print messages similar to
"invalid string offset 65521 >= 27261 for section `.strtab'". for object
files produced by recent versions of clang.

In BFD's elf_create_symbuf() function, the size of the symbol buffer
('ssymbuf') is not calculated correctly, and the initial value for the
'ssym' variable is off by one, since 'ssymbuf' has shndx_count + 1
members.

MFC after: 1 week

8 years agoFix the usr.sbin/iostat build with GCC, broken by r295768
Alan Somers [Mon, 22 Feb 2016 21:40:53 +0000 (21:40 +0000)]
Fix the usr.sbin/iostat build with GCC, broken by r295768

Renamed some local variables for compatibility with -Wshadow

Reported by: Andrew Turner
Tested by: ken
MFC after: 4 weeks
X-MFC-with: 295768
Sponsored by: Spectra Logic Corp

8 years agoAlways remove .depend.* in case switching between FAST_DEPEND on/off.
Bryan Drewery [Mon, 22 Feb 2016 21:01:25 +0000 (21:01 +0000)]
Always remove .depend.* in case switching between FAST_DEPEND on/off.

This was missed in r295666.

Sponsored by: EMC / Isilon Storage Division

8 years agoIf the user has set a u-boot env var named rootpath, automatically
Ian Lepore [Mon, 22 Feb 2016 18:53:55 +0000 (18:53 +0000)]
If the user has set a u-boot env var named rootpath, automatically
import it into the loader(8) env as dhcp.root-path, so that it overrides
any dhcp/bootp server-provided path.

Now if you have a dhcp server available you can easily net-boot a u-boot
system even if you don't control the dhcp server config, by setting just
two variables in the u-boot env:

  loaderdev=net
  rootpath=<nfsserverip>:<pathname>

Previously you had to either accept all the dhcp parameters from the
server without the ability to locally provide the rootpath, or you had
to forego dhcp and set more vars (ipaddr, netmask, serverip, rootpath).

8 years agoAdd basic trap handlers for illegal instruction and breakpoint
Ruslan Bukin [Mon, 22 Feb 2016 14:54:50 +0000 (14:54 +0000)]
Add basic trap handlers for illegal instruction and breakpoint
exceptions.

8 years agoFix comment.
Ruslan Bukin [Mon, 22 Feb 2016 14:19:45 +0000 (14:19 +0000)]
Fix comment.

8 years agoRemove duplicates.
Ruslan Bukin [Mon, 22 Feb 2016 14:13:05 +0000 (14:13 +0000)]
Remove duplicates.

8 years agoProvide stack(9) MD stubs for RISC-V so ktr(9) can be compiled in.
Ruslan Bukin [Mon, 22 Feb 2016 14:01:46 +0000 (14:01 +0000)]
Provide stack(9) MD stubs for RISC-V so ktr(9) can be compiled in.

8 years agoFix ktrace call.
Ruslan Bukin [Mon, 22 Feb 2016 13:52:08 +0000 (13:52 +0000)]
Fix ktrace call.

8 years agoAdd Intel 10Gb support to ARM64 GENERIC kernel config
Wojciech Macek [Mon, 22 Feb 2016 13:34:43 +0000 (13:34 +0000)]
Add Intel 10Gb support to ARM64 GENERIC kernel config

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           zbb
Differential revision: https://reviews.freebsd.org/D5347

8 years agoRemove armv6 specific part from armv4 specific file and update comment.
Svatopluk Kraus [Mon, 22 Feb 2016 12:57:08 +0000 (12:57 +0000)]
Remove armv6 specific part from armv4 specific file and update comment.
No functional change.

8 years agoMove ARM_L2_PIPT option to std.armv6 for all armv6 platforms.
Svatopluk Kraus [Mon, 22 Feb 2016 11:47:28 +0000 (11:47 +0000)]
Move ARM_L2_PIPT option to std.armv6 for all armv6 platforms.
Only L2 PIPT cache is supported for __ARM_ARCH >= 6.

In fact, this is just a pure proclamation as this option is used
only in armv4 specific files now.

8 years agoAs <machine/vm.h> is included from <vm/vm.h>, there is no need to
Svatopluk Kraus [Mon, 22 Feb 2016 09:10:23 +0000 (09:10 +0000)]
As <machine/vm.h> is included from <vm/vm.h>, there is no need to
include it explicitly when <vm/vm.h> is already included.

Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D5380

8 years agoAs <machine/vmparam.h> is included from <vm/vm_param.h>, there is no
Svatopluk Kraus [Mon, 22 Feb 2016 09:08:04 +0000 (09:08 +0000)]
As <machine/vmparam.h> is included from <vm/vm_param.h>, there is no
need to include it explicitly when <vm/vm_param.h> is already included.

Suggested by: alc
Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D5379

8 years agoAs <machine/param.h> is included from <sys/param.h>, there is no need
Svatopluk Kraus [Mon, 22 Feb 2016 09:04:36 +0000 (09:04 +0000)]
As <machine/param.h> is included from <sys/param.h>, there is no need
to include it explicitly when <sys/param.h> is already included.

Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D5378

8 years agoAs <machine/pmap.h> is included from <vm/pmap.h>, there is no need to
Svatopluk Kraus [Mon, 22 Feb 2016 09:02:20 +0000 (09:02 +0000)]
As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to
include it explicitly when <vm/pmap.h> is already included.

Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D5373

8 years agohyperv/hn: Add TX method for txeof processing.
Sepherosa Ziehau [Mon, 22 Feb 2016 06:28:18 +0000 (06:28 +0000)]
hyperv/hn: Add TX method for txeof processing.

Preamble to implement ifnet.if_transmit method.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5346

8 years agohyperv/hn: Staticize and rename packet TX done function
Sepherosa Ziehau [Mon, 22 Feb 2016 06:22:47 +0000 (06:22 +0000)]
hyperv/hn: Staticize and rename packet TX done function

It is only used in hv_netvsc_drv_freebsd.c; and rename it to hn_tx_done()
mainly to reserve "xmit" for ifnet.if_transmit implement.

While I'm here, remove unapplied comment.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5345

8 years agohyperv/hn: Rename TX related function and struct fields a bit
Sepherosa Ziehau [Mon, 22 Feb 2016 06:17:26 +0000 (06:17 +0000)]
hyperv/hn: Rename TX related function and struct fields a bit

Preamble to implement the ifnet.if_transmit method.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5344

8 years agourtwn: shutdown the device properly
Andriy Voskoboinyk [Mon, 22 Feb 2016 01:15:02 +0000 (01:15 +0000)]
urtwn: shutdown the device properly

- R92C path: NetBSD (mostly)
- R88E path: TP-Link driver

Tested with RTL8188EU and RTL8188CUS.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5198

8 years agoifnet lock was changed to use sx(9) long time ago.
Pyun YongHyeon [Mon, 22 Feb 2016 00:58:04 +0000 (00:58 +0000)]
ifnet lock was changed to use sx(9) long time ago.
Don't hold a driver lock for if_free(9).

8 years agourtwn: add an option to compile the driver without firmware specific code
Andriy Voskoboinyk [Mon, 22 Feb 2016 00:48:53 +0000 (00:48 +0000)]
urtwn: add an option to compile the driver without firmware specific code

- Add URTWN_WITHOUT_UCODE option (will disable any firmware specific code
when set).
- Do not exclude the driver from build when MK_SOURCELESS_UCODE is set
(URTWN_WITHOUT_UCODE will be enforced unconditionally).
- Do not abort initialization when firmware cannot be loaded;
behave like the URTWN_WITHOUT_UCODE option was set.
- Drop some unused variables from urtwn_softc structure.

Tested with RTL8188EU and RTL8188CUS in HOSTAP and STA modes.

Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4849

8 years agoMake efi_time and EFI_GetTimeOfDay static, neither are used by other parts
Andrew Turner [Sun, 21 Feb 2016 21:20:23 +0000 (21:20 +0000)]
Make efi_time and EFI_GetTimeOfDay static, neither are used by other parts
of the efi code.

Sponsored by: ABT Systems Ltd

8 years agosh: Don't hash alias name when there are no aliases.
Jilles Tjoelker [Sun, 21 Feb 2016 20:58:24 +0000 (20:58 +0000)]
sh: Don't hash alias name when there are no aliases.

8 years agoDocument the ability to override compiled-in env and hints using variables
Ian Lepore [Sun, 21 Feb 2016 18:58:05 +0000 (18:58 +0000)]
Document the ability to override compiled-in env and hints using variables
in the bootloader-provided env.

8 years agosh: Optimize setprompt(0).
Jilles Tjoelker [Sun, 21 Feb 2016 18:54:17 +0000 (18:54 +0000)]
sh: Optimize setprompt(0).

Avoid doing work to print an empty prompt (such as when reading scripts).

8 years agortwn: import r290048.
Andriy Voskoboinyk [Sun, 21 Feb 2016 18:51:48 +0000 (18:51 +0000)]
rtwn: import r290048.

- Fix scanning from AUTH state.

Tested by: Simone Mario Lombardo <evil.lombo@gmail.com>

PR: 203105
Reviewed by: kevlo
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D4820

8 years agoAllow a dynamic env to override a compiled-in static env by passing in the
Ian Lepore [Sun, 21 Feb 2016 18:35:01 +0000 (18:35 +0000)]
Allow a dynamic env to override a compiled-in static env by passing in the
override indication in the env data.

Submitted by: bde

8 years agoMinor style cleanups.
Ian Lepore [Sun, 21 Feb 2016 18:17:09 +0000 (18:17 +0000)]
Minor style cleanups.

Submitted by: bde

8 years agosh: Remove unnecessary flushouts while reading script.
Jilles Tjoelker [Sun, 21 Feb 2016 16:48:37 +0000 (16:48 +0000)]
sh: Remove unnecessary flushouts while reading script.

Output is flushed when a builtin is done or immediately after writing it
(error messages, set -v output, prompts).

8 years agoostiInitiatorIOCompleted(): wrong sizeof() argument.
Pedro F. Giffuni [Sun, 21 Feb 2016 16:45:22 +0000 (16:45 +0000)]
ostiInitiatorIOCompleted(): wrong sizeof() argument.

Detected by: PVS Static Analysis
CID: 13316011331523

8 years agoUpdate compiler-rt to release_38 branch r261369.
Dimitry Andric [Sun, 21 Feb 2016 16:27:55 +0000 (16:27 +0000)]
Update compiler-rt to release_38 branch r261369.

8 years agoUpdate llvm and clang to release_38 branch r261369.
Dimitry Andric [Sun, 21 Feb 2016 16:23:44 +0000 (16:23 +0000)]
Update llvm and clang to release_38 branch r261369.

8 years agoUnconditionally set e_ident[OSABI]=ELFOSABI_FREEBSD in arm binary headers.
Ian Lepore [Sun, 21 Feb 2016 14:59:24 +0000 (14:59 +0000)]
Unconditionally set e_ident[OSABI]=ELFOSABI_FREEBSD in arm binary headers.

When the armv6 support was imported from a project branch, this complex
conditional logic and related #define'd values came along, but it's really
not clear what the intent of it all was.  The effect, however, was that
OSABI was always set to zero, which is "UNIX System V ABI".  Having the wrong
value there causes pkg(8) to avoid looking inside arm elf binaries to
determine shared-lib required/provides info for packaging.

8 years agoImplement /proc/$$/limits.
Dag-Erling Smørgrav [Sun, 21 Feb 2016 14:56:05 +0000 (14:56 +0000)]
Implement /proc/$$/limits.

PR: 207386
Submitted by: Szymon Śliwa <knight.erraunt@gmail.com>
MFC after: 3 weeks

8 years agoMake the "invalid numeric value" error message actually displayable
Edward Tomasz Napierala [Sun, 21 Feb 2016 14:36:50 +0000 (14:36 +0000)]
Make the "invalid numeric value" error message actually displayable
(was a dead code before).

Submitted by: bde@ (earlier version)
Reviewed by: bde@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoVendor import of compiler-rt release_38 branch r261369:
Dimitry Andric [Sun, 21 Feb 2016 13:53:12 +0000 (13:53 +0000)]
Vendor import of compiler-rt release_38 branch r261369:
https://llvm.org/svn/llvm-project/compiler-rt/branches/release_38@261369

8 years agoVendor import of clang release_38 branch r261369:
Dimitry Andric [Sun, 21 Feb 2016 13:52:32 +0000 (13:52 +0000)]
Vendor import of clang release_38 branch r261369:
https://llvm.org/svn/llvm-project/cfe/branches/release_38@261369

8 years agoVendor import of llvm release_38 branch r261369:
Dimitry Andric [Sun, 21 Feb 2016 13:51:43 +0000 (13:51 +0000)]
Vendor import of llvm release_38 branch r261369:
https://llvm.org/svn/llvm-project/llvm/branches/release_38@261369

8 years agoMerge ^/head r295601 through r295844.
Dimitry Andric [Sun, 21 Feb 2016 13:49:26 +0000 (13:49 +0000)]
Merge ^/head r295601 through r295844.

8 years agoFix "invalid type '(null)'" usage messages in zfs(8) and zpool(8).
Dimitry Andric [Sun, 21 Feb 2016 13:03:58 +0000 (13:03 +0000)]
Fix "invalid type '(null)'" usage messages in zfs(8) and zpool(8).

Currently, zfs(8) and zpool(8) print "invalid type '(null)'" or similar
messages, if you pass in invalid types, sources or column names for "zfs
get", "zfs list" and "zpool get".  This is because the commands use
getsubopt(3), and in case of failure, they print 'value', which is NULL
when sub options don't match.

They should print 'suboptarg' instead, which is the documented way to
get at the non-matching sub option value.

Reviewed by: smh
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D5365

8 years agoAdd a missing call to dev_cleanup from the arm64 loader.efi.
Andrew Turner [Sat, 20 Feb 2016 17:29:04 +0000 (17:29 +0000)]
Add a missing call to dev_cleanup from the arm64 loader.efi.

Sponsored by: ABT Systems Ltd

8 years agoSome BIOSes ACPI bytecode needs to take (sleepable) acpi mutex for
Konstantin Belousov [Sat, 20 Feb 2016 13:37:04 +0000 (13:37 +0000)]
Some BIOSes ACPI bytecode needs to take (sleepable) acpi mutex for
acpi_GetInteger() execution.  Intel DMAR interrupt remapping code
needs to know UID of the HPET to properly route the FSB interrupts
from the HPET, even when interrupt remapping is disabled, and the code
is executed under some non-sleepable mutexes.

Cache HPET UIDs in the device softc at the attach time and provide
lock-less method to get UID, use the method from the dmar hpet
handling code instead of calling GetInteger().

Reported and tested by: Larry Rosenman <ler@lerctr.org>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoSwitch /dev/hpet to use make_dev_s(9). Device needs si_drv1
Konstantin Belousov [Sat, 20 Feb 2016 13:21:59 +0000 (13:21 +0000)]
Switch /dev/hpet to use make_dev_s(9).  Device needs si_drv1
initializated, do it correctly even though hpet cannot be loaded as
module.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoin pf_print_state_parts, do not use skw->proto to print the protocol but our
Kristof Provost [Sat, 20 Feb 2016 12:53:53 +0000 (12:53 +0000)]
in pf_print_state_parts, do not use skw->proto to print the protocol but our
local copy proto that we very carefully set beforehands. skw being NULL is
perfectly valid there.

Obtained from: OpenBSD (henning)

8 years agoRevert r295756:
Zbigniew Bodek [Sat, 20 Feb 2016 12:28:20 +0000 (12:28 +0000)]
Revert r295756:
Extract common code from PowerPC's ofw_pci

Import portions of the PowerPC OF PCI implementation into
new file "ofw_pci.c", common for other platforms. The files ofw_pci.c and
ofw_pci.h from sys/powerpc/ofw no longer exist. All required declarations
are moved to sys/dev/ofw/ofw_pci.h.

This creates a new ofw_pci_write_ivar() function and modifies
ofw_pci_nranges(), ofw_pci_read_ivar(), ofw_pci_route_interrupt()
methods.
Most functions contain existing ppc implementations in the majority
unchanged. Now there is no need to have multiple identical copies
of methods for various architectures.

Submitted by:  Marcin Mazurek <mma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Annapurna Labs
Reviewed by:   jhibbits, mmel
Differential Revision: https://reviews.freebsd.org/D4879

This needs to return to the drawing board as it breaks both
PowerPC and Sparc64 build.

Pointed out by: jhibbits

8 years agoifconfig(8): can't use 'name' or 'description' when creating interface with auto...
Kristof Provost [Sat, 20 Feb 2016 11:36:35 +0000 (11:36 +0000)]
ifconfig(8): can't use 'name' or 'description' when creating interface with auto numbering

If one does 'ifconfig tap create name blah', it will return error because the
'name' command doesn't properly populate the request sent to ioctl(...). The
'description' command has the same bug, and is also fixed with this patch.

If one does 'ifconfig tap create mtu 9000 name blah', it DOES work, but 'tap0'
(or other sequence number) is echoed, instead of the expected 'blah'. (assuming
the name change actually succeeded)

Submitted by: Marie Helene Kvello-Aune <marieheleneka@gmail.com>
Differential Revision: https://reviews.freebsd.org/D5341

8 years agoRename busdma_machdep.c to busdma_machdep-v4.c, pmap.c to pmap-v4.c
Svatopluk Kraus [Sat, 20 Feb 2016 07:45:21 +0000 (07:45 +0000)]
Rename busdma_machdep.c to busdma_machdep-v4.c, pmap.c to pmap-v4.c
and trap.c to trap-v4.c to be plain and consistent with other armv4
specific files.

8 years agoFix the definition of RM_MAX_END.
Justin Hibbits [Sat, 20 Feb 2016 01:34:13 +0000 (01:34 +0000)]
Fix the definition of RM_MAX_END.

Even though casting from signed to unsigned is well-defined in C, it's better to
first cast to the larger unsigned type, then negate.

8 years agoIntroduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.
Justin Hibbits [Sat, 20 Feb 2016 01:32:58 +0000 (01:32 +0000)]
Introduce a RMAN_IS_DEFAULT_RANGE() macro, and use it.

This simplifies checking for default resource range for bus_alloc_resource(),
and improves readability.

This is part of, and related to, the migration of rman_res_t from u_long to
uintmax_t.

Discussed with: jhb
Suggested by: marcel

8 years agoixl(4)/ixlv(4): Revert m_collapse() in ixl_xmit() to m_defrag().
Eric Joyner [Fri, 19 Feb 2016 22:48:20 +0000 (22:48 +0000)]
ixl(4)/ixlv(4): Revert m_collapse() in ixl_xmit() to m_defrag().

The m_collapse() call would fail when transmitting medium-sized packets
when the interface mtu was set to 9000, so revert back to m_defrag(),
which does not fail.

Differential Revision: https://reviews.freebsd.org/D5207
Tested by: jeffrey.e.pieper@intel.com
Sponsored by: Intel Corporation

8 years agoRemove dead code. Code Cleanup. Improve clarity in debug messages
David C Somayajulu [Fri, 19 Feb 2016 22:46:52 +0000 (22:46 +0000)]
Remove dead code. Code Cleanup. Improve clarity in debug messages

MFC after:5 days

8 years agoixl(4): Fix errors in queue interrupt setup in MSIX mode.
Eric Joyner [Fri, 19 Feb 2016 22:45:09 +0000 (22:45 +0000)]
ixl(4): Fix errors in queue interrupt setup in MSIX mode.

- I40E_PFINT_DYN_CTLN needs to be cleared, and not have a queue index
  written to it.
- The interrupt linked list for each queue is changed to only include
  the queue's Rx and Tx queues.

Differential Revision: https://reviews.freebsd.org/D5206
Reviewed by: sbruno
Tested by: jeffrey.e.pieper@intel.com
Sponsored by: Intel Corporation

8 years agoixl(4): Remove unsupported device IDs.
Eric Joyner [Fri, 19 Feb 2016 22:33:50 +0000 (22:33 +0000)]
ixl(4): Remove unsupported device IDs.

There is no official support for 20G SKUs on FreeBSD, and the KX_A
device ID was never used.

Differential Revision: https://reviews.freebsd.org/D5204
Reviewed by: sbruno, jeffrey.e.pieper@intel.com
Sponsored by: Intel Corporation

8 years agoDIRDEPS_BUILD: Enable the post-build footer/stats display.
Bryan Drewery [Fri, 19 Feb 2016 22:28:45 +0000 (22:28 +0000)]
DIRDEPS_BUILD: Enable the post-build footer/stats display.

There is no real downside to this and it is useful to have enabled.

Sponsored by: EMC / Isilon Storage Division

8 years agoixl(4): Fix two important RSS bugs.
Eric Joyner [Fri, 19 Feb 2016 21:58:14 +0000 (21:58 +0000)]
ixl(4): Fix two important RSS bugs.

- Change tc_mapping field to assign 64 queues instead of 16 to the PF's VSI;
  add comments to describe how this is done.

- Set hash lut size to 512 when setting filter control; the lut size defaults
  to 128 if this isn't set.

Differential Revision: https://reviews.freebsd.org/D5203
Reviewed by: gallatin
Tested by: jeffrey.e.pieper@intel.com
Sponsored by: Intel Corporation

8 years agosh: Rework code to remove '\0' from shell input.
Jilles Tjoelker [Fri, 19 Feb 2016 21:53:12 +0000 (21:53 +0000)]
sh: Rework code to remove '\0' from shell input.

This fixes bugs where '\0' was not removed correctly and speeds up the
parser.

8 years agoModified the use of bxe_grc_dump() function so that it can be invoked directly at...
David C Somayajulu [Fri, 19 Feb 2016 21:32:49 +0000 (21:32 +0000)]
Modified the use of bxe_grc_dump() function so that it can be invoked directly at any potential error path, where a fwdump is needed. The fwdump (a.k.a grcdump) is stored in a driver buffer. The sysctl grcdump_done indicates if a fwdump was taken and waiting to be retrieved.
The sysctl trigger_grcdump can be used to manually trigger a fwdump.

MFC after:5 days

8 years agoqlxgb: fix mismatch.
Pedro F. Giffuni [Fri, 19 Feb 2016 18:05:02 +0000 (18:05 +0000)]
qlxgb: fix mismatch.

Found by: PVS Static Analysis
Reviewed by: davidcs
MFC after: 1 month

8 years agosh: Add tests for comments in sh -c.
Jilles Tjoelker [Fri, 19 Feb 2016 16:56:07 +0000 (16:56 +0000)]
sh: Add tests for comments in sh -c.

8 years agoFix syntax error introduced in previous commit where I removed one
Stefan Eßer [Fri, 19 Feb 2016 16:53:21 +0000 (16:53 +0000)]
Fix syntax error introduced in previous commit where I removed one
character to few. I should have waited for the kernel compile to finish,
even though the change seemed so trivial.

8 years agoRemove redundant check for "(dinfo != NULL)", it has already been performed
Stefan Eßer [Fri, 19 Feb 2016 16:43:03 +0000 (16:43 +0000)]
Remove redundant check for "(dinfo != NULL)", it has already been performed
as the first part of this complex loop conditional.

Found by:    PVS Static Analysis

8 years agoExt2: cleanup setting of ctime/mtime/birthtime.
Pedro F. Giffuni [Fri, 19 Feb 2016 15:53:08 +0000 (15:53 +0000)]
Ext2: cleanup setting of ctime/mtime/birthtime.

This adopts the same change as r291936 for UFS.
Directly clear IN_ACCESS or IN_UPDATE when user supplied the time, and
copy the value into the inode.

This keeps the behaviour cleaner and is consistent with UFS.

Reviewed by: bde
MFC after: 1 month (only 10)

8 years agofirewire: fix a mismatch introduced in r230558.
Pedro F. Giffuni [Fri, 19 Feb 2016 15:35:20 +0000 (15:35 +0000)]
firewire: fix a mismatch introduced in r230558.

Found by: PVS Static Analysis
Reviewed by: sbruno
MFC after: 1 month

8 years agoRemove objcopy in WITHOUT_TOOLCHAIN if it's from elftoolchain
Ed Maste [Fri, 19 Feb 2016 15:11:54 +0000 (15:11 +0000)]
Remove objcopy in WITHOUT_TOOLCHAIN if it's from elftoolchain

8 years agoAdd initial support for the Allwinner A31i and A31s. This just adds the
Andrew Turner [Fri, 19 Feb 2016 14:15:31 +0000 (14:15 +0000)]
Add initial support for the Allwinner A31i and A31s. This just adds the
FDT platform code to detect when we are booting on one of these SoCs. The
driver changes will be added shortly.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision: https://reviews.freebsd.org/D5338

8 years agoInclude ofw_bus_subr.h before ofw_pci.h for the definition of struct
Andrew Turner [Fri, 19 Feb 2016 14:05:28 +0000 (14:05 +0000)]
Include ofw_bus_subr.h before ofw_pci.h for the definition of struct
ofw_bus_iinfo.

Sponsored by: ABT Systems Ltd

8 years agoFix possible out-of-bounds access detected by Ulrich Spörleins "scan-build".
Stefan Eßer [Fri, 19 Feb 2016 14:01:35 +0000 (14:01 +0000)]
Fix possible out-of-bounds access detected by Ulrich Spörleins "scan-build".
Some invalid PCI device selectors could cause read access to an initialized
variable next to the array (local loop index variable).

While here, the parser has been made more strict with regard to the syntax
of PCI device selectors as documented in the man-page. E.g. "pci:" used to
be interpreted as "pci0:0".

MFC after: 3 days

8 years agoUse the SCTP level pointer, not the interface level.
Michael Tuexen [Fri, 19 Feb 2016 11:25:18 +0000 (11:25 +0000)]
Use the SCTP level pointer, not the interface level.

MFC after: 3 days

8 years agoRemove not used static function pmap_kenter_attr().
Svatopluk Kraus [Fri, 19 Feb 2016 10:40:04 +0000 (10:40 +0000)]
Remove not used static function pmap_kenter_attr().

8 years agoRemove not used definitions and fix some style nits.
Svatopluk Kraus [Fri, 19 Feb 2016 10:32:17 +0000 (10:32 +0000)]
Remove not used definitions and fix some style nits.
No functional changes.

8 years agoRemove AP_KRW definition not needed after r295801.
Svatopluk Kraus [Fri, 19 Feb 2016 09:52:11 +0000 (09:52 +0000)]
Remove AP_KRW definition not needed after r295801.

8 years agoRename pte.h to pte-v4.h and start including directly either pte-v4.h
Svatopluk Kraus [Fri, 19 Feb 2016 09:23:32 +0000 (09:23 +0000)]
Rename pte.h to pte-v4.h and start including directly either pte-v4.h
or pte-v6.h in files which needs it.

There are quite internal definitions in pte-v4.h and pte-v6.h headers
specific for corresponding pmap implementation. These headers should be
included only in very few files and an intention is to not hide for
which implementation such files are.

Further, sys/arm/arm/elf_trampoline.c is an example of file which
uses armv4 like pmap implementation for both armv4 and armv6 platforms.
This is another reason why pte.h which includes specific header
according to __ARM_ARCH is not created.

8 years agoRemove O_SYNC from the options passed to dbmopen().
Stefan Eßer [Fri, 19 Feb 2016 08:42:13 +0000 (08:42 +0000)]
Remove O_SYNC from the options passed to dbmopen().

The output file is created as a temporary file that is moved over the
existing file after completion. Thus there is no need to immediately
flush all created db records to the temporary file.

This speeds up creation of the termcap db by a factor of 40 on my
ZFS based /etc filesytem (from 25 seconds to 0.6 seconds).

I have compared multiple output files created with and without O_SYNC
and they came out identical each time.  Nonetheless it might be best
to MFC this change and the similar one for services_mkdb (r295465) at
the same time when the changes to hash.c in review D5186 are merged.

MFC:  1 week

8 years agoMove common definitions from both pmap-v4.h and pmap-v6.h into pmap.h.
Svatopluk Kraus [Fri, 19 Feb 2016 08:41:47 +0000 (08:41 +0000)]
Move common definitions from both pmap-v4.h and pmap-v6.h into pmap.h.
(1) MI interface needed for vm subsystem.
(2) MD interface created for ARM architecture to be used in files
    shared by armv4 and armv6 platforms.

8 years agoRename pmap.h to pmap-v4.h and remove pmap-v6.h include from it.
Svatopluk Kraus [Fri, 19 Feb 2016 08:35:29 +0000 (08:35 +0000)]
Rename pmap.h to pmap-v4.h and remove pmap-v6.h include from it.
Create new pmap.h which includes specific header according to
__ARM_ARCH.

Note that <machine/pmap.h> is included from <vm/pmap.h> so one common
<machine/pmap.h> must exist.

8 years agoRemove sys/types.h
Kevin Lo [Fri, 19 Feb 2016 06:50:00 +0000 (06:50 +0000)]
Remove sys/types.h

8 years agoFix regression introduced on 272446r.
Marcelo Araujo [Fri, 19 Feb 2016 06:35:53 +0000 (06:35 +0000)]
Fix regression introduced on 272446r.

lagg(4) supports the protocol none, where it disables any traffic without
disabling the lagg(4) interface itself.

PR: 206921
Submitted by: Pushkar Kothavade <pushkarbk@gmail.com>
Reviewed by: rpokala
Approved by: bapt (mentor)
MFC after: 3 weeks
Sponsored by: gandi.net
Differential Revision: https://reviews.freebsd.org/D5076

8 years agonet80211: add few missing subtype names.
Andriy Voskoboinyk [Fri, 19 Feb 2016 05:59:38 +0000 (05:59 +0000)]
net80211: add few missing subtype names.

- Add definitions for Timing Advertisement and Control Wrapper frames.
- Refresh ieee80211_mgt_subtype_name and ieee80211_ctl_subtype_name
arrays.
- Count Timing Advertisement frames as discarded management frames in all
modes.

Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D5331

8 years agohyperv/hn: Free the txdesc buf_ring when the TX ring is destroyed
Sepherosa Ziehau [Fri, 19 Feb 2016 05:13:56 +0000 (05:13 +0000)]
hyperv/hn: Free the txdesc buf_ring when the TX ring is destroyed

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5318

8 years agohyperv/hn: Enable IP header checksum offloading for WIN8 (WinServ2012)
Sepherosa Ziehau [Fri, 19 Feb 2016 05:08:44 +0000 (05:08 +0000)]
hyperv/hn: Enable IP header checksum offloading for WIN8 (WinServ2012)

Tested on Windows Server 2012.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5317

8 years agohyperv/hn: Add option to bind TX taskqueues to the specified CPU
Sepherosa Ziehau [Fri, 19 Feb 2016 05:03:17 +0000 (05:03 +0000)]
hyperv/hn: Add option to bind TX taskqueues to the specified CPU

It will be used to help tracking host side transmission ring selection
issue; and it will be turned on by default, once we have concrete result.

Reviewed by: adrian, Jun Su <junsu microsoft com>
Approved by: adrian (mento)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5316

8 years agodocument some ACPI related sysctls.
Adrian Chadd [Fri, 19 Feb 2016 05:02:17 +0000 (05:02 +0000)]
document some ACPI related sysctls.

Submitted by: Oliver Pinter <oliver.pinter@hardenedbsd.org>
Sponsored by: HardenedBSD
Differential Revision: https://reviews.freebsd.org/D5263

8 years agoReplace several bus_alloc_resource() calls using default arguments with bus_alloc_res...
Justin Hibbits [Fri, 19 Feb 2016 03:37:56 +0000 (03:37 +0000)]
Replace several bus_alloc_resource() calls using default arguments with bus_alloc_resource_any()

Since these calls only use default arguments, bus_alloc_resource_any() is the
right call.

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

8 years agoRemove bogus cast.
Kevin Lo [Fri, 19 Feb 2016 01:57:51 +0000 (01:57 +0000)]
Remove bogus cast.

8 years agoAdd missing parentheses.
Kevin Lo [Fri, 19 Feb 2016 01:56:59 +0000 (01:56 +0000)]
Add missing parentheses.

Found by: PVS-Studio

8 years agoEnsure that we test the event condition when a disabled kevent is enabled.
Mark Johnston [Fri, 19 Feb 2016 01:49:33 +0000 (01:49 +0000)]
Ensure that we test the event condition when a disabled kevent is enabled.

r274560 modified kqueue_register() to only test the event condition if the
corresponding knote is not disabled. However, this check takes place before
the EV_ENABLE flag is used to clear the KN_DISABLED flag on the knote, so
enabling a previously-disabled kevent would not result in a notification for
a triggered event. This change fixes the problem by testing for EV_ENABLED
before possibly checking the event condition.

This change also updates a kqueue regression test to exercise this case.

PR: 206368
Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5307

8 years agoReturn an error if both EV_ENABLE and EV_DISABLE are specified for a kevent.
Mark Johnston [Fri, 19 Feb 2016 01:35:01 +0000 (01:35 +0000)]
Return an error if both EV_ENABLE and EV_DISABLE are specified for a kevent.

Currently, this combination results in EV_DISABLE being ignored.

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D5307

8 years ago- language tightening
Jason Helfman [Fri, 19 Feb 2016 01:08:03 +0000 (01:08 +0000)]
- language tightening
- cleanup SEE ALSO section (thanks brueffer@)

Approved by: wblock (mentor)
Differential Revision: https://reviews.freebsd.org/D5335

8 years agoFix section number of .Xr geom_uzip in r295782.
Maxim Sobolev [Fri, 19 Feb 2016 01:06:45 +0000 (01:06 +0000)]
Fix section number of .Xr geom_uzip in r295782.

MFC after: 1 months
(together with r295782)

8 years agoClear up confision as to who the original historical authors of code
Maxim Sobolev [Fri, 19 Feb 2016 01:00:48 +0000 (01:00 +0000)]
Clear up confision as to who the original historical authors of code
and manual page were.

For whatever reason it listed myself as a primary author, which is
just not true.

Also, majority of the manpage is copied verbatim from the geom_uzip(4),
contributed by ceri, with only minor adjustments from loos, so put ceri
back into the copyright secrion where he belongs and reflect that in the
AUTHORS section.

For what it's worth, I think this one should be deleted and LZMA
support just folded back into geom_uzip(4) / mkuzip(4) whete it really
belongs.

MFC after: 1 month

8 years agoFAST_DEPEND: Apply conditional -MF from r291945 to kernel as well.
Bryan Drewery [Fri, 19 Feb 2016 00:41:41 +0000 (00:41 +0000)]
FAST_DEPEND: Apply conditional -MF from r291945 to kernel as well.

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Add dependencies somehow missed in r295681.
Bryan Drewery [Fri, 19 Feb 2016 00:41:38 +0000 (00:41 +0000)]
DIRDEPS_BUILD: Add dependencies somehow missed in r295681.

Sponsored by: EMC / Isilon Storage Division

8 years agoAvoid reading .depend.* in simple cases where not needed.
Bryan Drewery [Fri, 19 Feb 2016 00:41:24 +0000 (00:41 +0000)]
Avoid reading .depend.* in simple cases where not needed.

This will speed up some tree-walks with FAST_DEPEND which otherwise
would include length(SRCS) .depend files.

This also uses a trick suggested by sjg@ to still read them in when
specifying _V_READ_DEPEND=1 in the env/make args.

Sponsored by: EMC / Isilon Storage Division

8 years agocxgbe: catch up with the latest hardware-related definitions.
Navdeep Parhar [Fri, 19 Feb 2016 00:29:16 +0000 (00:29 +0000)]
cxgbe: catch up with the latest hardware-related definitions.

Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

8 years agoRemove a bogus bzero() call.
Jung-uk Kim [Thu, 18 Feb 2016 23:32:11 +0000 (23:32 +0000)]
Remove a bogus bzero() call.

Found by: PVS-Studio

8 years agoOptimize ROL and ROR emulations and fix comments.
Jung-uk Kim [Thu, 18 Feb 2016 23:03:37 +0000 (23:03 +0000)]
Optimize ROL and ROR emulations and fix comments.

8 years agoSilence VPS-Studio errors (V646). These is no functional change.
Jung-uk Kim [Thu, 18 Feb 2016 23:00:01 +0000 (23:00 +0000)]
Silence VPS-Studio errors (V646).  These is no functional change.

8 years ago- add dma(8) to examples in mailer.conf(5)
Jason Helfman [Thu, 18 Feb 2016 22:40:24 +0000 (22:40 +0000)]
- add dma(8) to examples in mailer.conf(5)

PR: 207026
Submitted by: lifanov@mail.lifanov.com
Approved by: wblock (mentor)
Differential Revision: https://reviews.freebsd.org/D5259