]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoEnable linker error if libcrypto.so contains a relocation against text. It
jkim [Wed, 11 May 2016 16:45:58 +0000 (16:45 +0000)]
Enable linker error if libcrypto.so contains a relocation against text.  It
is position independent on all platforms since r299389.

Submitted by: kib

8 years agoffs_bswap: Copy one UFS dinode member at a time
cem [Wed, 11 May 2016 16:42:13 +0000 (16:42 +0000)]
ffs_bswap: Copy one UFS dinode member at a time

No functional change.

Reported by: Coverity
CIDs: 974635, 974636, 977396, 977397, 977398, 977399
Sponsored by: EMC / Isilon Storage Division

8 years agofsck_ffs: Don't overrun mount device buffer
cem [Wed, 11 May 2016 16:20:23 +0000 (16:20 +0000)]
fsck_ffs: Don't overrun mount device buffer

Maybe this case is impossible.  Either way, when attempting to "/dev/"-prefix a
non-global device name, check that we do not overrun the f_mntfromname buffer.

In this case, truncating (with strlcpy or similar) would not be useful, since
the f_mntfromname result of getmntpt() is passed directly to open(2) later.

Reported by: Coverity
CID: 1006789
Sponsored by: EMC / Isilon Storage Division

8 years agocompat/opensolaris: Don't redefined off64_t if already defined
cem [Wed, 11 May 2016 16:05:32 +0000 (16:05 +0000)]
compat/opensolaris: Don't redefined off64_t if already defined

A follow-up to r299456.

Reported by: gjb
Sponsored by: EMC / Isilon Storage Division

8 years agoFix buffer overrun in gcore(1) NT_PRPSINFO
cem [Wed, 11 May 2016 15:31:31 +0000 (15:31 +0000)]
Fix buffer overrun in gcore(1) NT_PRPSINFO

Use size of destination buffer, rather than a constant that may or may not
correspond to the source buffer, to restrict the length of copied strings.  In
particular, pr_fname has 16+1 characters but MAXCOMLEN is 18+1.

Use strlcpy instead of strncpy to ensure the result is nul-terminated.  This
seems to be what is expected of these fields.

Reported by: Coverity
CIDs: 10113021011378
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd data barriers to the arm64 bus_dmamap_sync function. We need these
andrew [Wed, 11 May 2016 14:59:54 +0000 (14:59 +0000)]
Add data barriers to the arm64 bus_dmamap_sync function. We need these
to ensure ordering between the CPU and device. As the CPU and DMA target
may be in different shareability domains they need to be full system
barriers.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agolibc: Add fopencookie(3) wrapper around funopen(3)
cem [Wed, 11 May 2016 14:38:27 +0000 (14:38 +0000)]
libc: Add fopencookie(3) wrapper around funopen(3)

Reviewed by: jhb, oshogbo
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D6282

8 years agolibrpcsec_gss: remove redundant code.
pfg [Wed, 11 May 2016 14:37:33 +0000 (14:37 +0000)]
librpcsec_gss: remove redundant code.

We have identical code no matter the expression behind the if.
Avoid the desision altogether and keep doing what is expected.

Reviewed by: dfr
CID: 1305689

8 years agoMFV r299453: 6765 zfs_zaccess_delete() comments do not accurately reflect
mav [Wed, 11 May 2016 13:53:29 +0000 (13:53 +0000)]
MFV r299453: 6765 zfs_zaccess_delete() comments do not accurately reflect
delete permissions for ACLs

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Author: Kevin Crowe <kevin.crowe@nexenta.com>

openzfs/openzfs@a40149b935cbbe87bf95e2cc44b3bc99d400513a

8 years agoMFV r299451: 6764 zfs issues with inheritance flags during chmod(2) with
mav [Wed, 11 May 2016 13:50:34 +0000 (13:50 +0000)]
MFV r299451: 6764 zfs issues with inheritance flags during chmod(2) with
aclmode=passthrough

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Author: Albert Lee <trisk@nexenta.com>

openzfs/openzfs@1bcf0d240bdebed61b4261f7c0ee323e07c8dfac

8 years agoMFV r299449: 6763 aclinherit=restricted masks inherited permissions by group
mav [Wed, 11 May 2016 13:48:15 +0000 (13:48 +0000)]
MFV r299449: 6763 aclinherit=restricted masks inherited permissions by group
perms (groupmask)

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Author: Albert Lee <trisk@nexenta.com>

openzfs/openzfs@eebb483d0cd68bdc4cf03c01fdeba9af160c17af

8 years agoMFV r299442: 6762 POSIX write should imply DELETE_CHILD on directories - and
mav [Wed, 11 May 2016 13:43:20 +0000 (13:43 +0000)]
MFV r299442: 6762 POSIX write should imply DELETE_CHILD on directories - and
some additional considerations

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Author: Kevin Crowe <kevin.crowe@nexenta.com>

openzfs/openzfs@d316fffc9c361532a482208561bbb614dac7f916

8 years agoAdd support for MTU chaning and Jumbo frames to VNIC
zbb [Wed, 11 May 2016 13:42:20 +0000 (13:42 +0000)]
Add support for MTU chaning and Jumbo frames to VNIC

Enable previously added code for MTU handling (based on
Cavium 1.0 driver released on BSD license).
This commit enables possibility to change MTU on VNIC driver.

Obtained from: Semihalf
Sponsored by:  Cavium

8 years agoFix deadlock in VNIC when using single CPU only
zbb [Wed, 11 May 2016 13:38:29 +0000 (13:38 +0000)]
Fix deadlock in VNIC when using single CPU only

Number of free Tx descriptors does not need to be locked since
it can be modified atomically between SND and CQ tasks.
It will also block Tx routine from sending packets while CQ will not
be able to free descriptors.

Obtained from: Semihalf
Sponsored by: Cavium
Differential Revision: https://reviews.freebsd.org/D6266

8 years agoFix I/O coherence issues on ThunderX when SMP is disabled
zbb [Wed, 11 May 2016 13:23:56 +0000 (13:23 +0000)]
Fix I/O coherence issues on ThunderX when SMP is disabled

To maintain coherence between cache and DMA memory appropriate
shareability flags need to be set in the PTE regardless of SMP
option.

Reviewed by: wma
Obtained from: Semihalf
Sponsored by: Cavium
Differential Revision: https://reviews.freebsd.org/D6231

8 years agoAdd HW RSS support to VNIC driver
zbb [Wed, 11 May 2016 13:22:13 +0000 (13:22 +0000)]
Add HW RSS support to VNIC driver

Based on v1.0 driver provided by Cavium under BSD license.
Support in-hardware RSS to distribute IP, UDP and TCP traffic
among available RX Queues and hence multiple CPUs.

Reviewed by: wma
Obtained from: Semihalf
Sponsored by: Cavium
Differential Revision: https://reviews.freebsd.org/D6230

8 years agoBind CQ interrupts and tasks to separate CPUs in VNIC
zbb [Wed, 11 May 2016 13:20:29 +0000 (13:20 +0000)]
Bind CQ interrupts and tasks to separate CPUs in VNIC

Delegate interrupts and completion tasks on separate CPUs
for each VNIC.

Reviewed by: wma
Obtained from: Semihalf
Sponsored by: Cavium
Differential Revision: https://reviews.freebsd.org/D6229

8 years agoMFV r299440: 6736 ZFS per-vdev ZAPs
mav [Wed, 11 May 2016 12:54:00 +0000 (12:54 +0000)]
MFV r299440: 6736 ZFS per-vdev ZAPs

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Don Brady <don.brady@intel.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Joe Stein <joe.stein@delphix.com>

openzfs/openzfs@215198a6ad15cf4832370e2f19247abeb36b951a

8 years agoMFV r299438: 6842 Fix empty xattr dir causing lockup
mav [Wed, 11 May 2016 12:46:07 +0000 (12:46 +0000)]
MFV r299438: 6842 Fix empty xattr dir causing lockup

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Chunwei Chen <tuxoko@gmail.com>

openzfs/openzfs@02525cd08fb3730fff3a69cb5376443d481f7839

8 years agoMFV r299436: 6843 Make xattr dir truncate and remove in one tx
mav [Wed, 11 May 2016 12:43:54 +0000 (12:43 +0000)]
MFV r299436: 6843 Make xattr dir truncate and remove in one tx

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Chunwei Chen <tuxoko@gmail.com>

openzfs/openzfs@399cc7d5d9aff97c714b708af3e3f0280ceab93f

8 years agoMFV r299434: 6841 Undirty freed spill blocks
mav [Wed, 11 May 2016 12:38:07 +0000 (12:38 +0000)]
MFV r299434: 6841 Undirty freed spill blocks

Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Tim Chase <tim@chase2k.com>

openzfs/openzfs@445e67805dd2ca6c3a2363b2ec9e163c62370233

8 years agoReturn a proper error code instead of panicing when an I/O vector
hselasky [Wed, 11 May 2016 10:50:59 +0000 (10:50 +0000)]
Return a proper error code instead of panicing when an I/O vector
having the wrong number of entries is detected.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAdd more IDR and IDA related functions to the LinuxKPI.
hselasky [Wed, 11 May 2016 10:40:04 +0000 (10:40 +0000)]
Add more IDR and IDA related functions to the LinuxKPI.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoFactor out common code into "idr_find_layer_locked()" and fix inverted
hselasky [Wed, 11 May 2016 10:35:15 +0000 (10:35 +0000)]
Factor out common code into "idr_find_layer_locked()" and fix inverted
bitmap test for free entry in "idr_replace()".

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoxen/resume: only send BITMAP IPIs if CPUs > 1
royger [Wed, 11 May 2016 10:10:25 +0000 (10:10 +0000)]
xen/resume: only send BITMAP IPIs if CPUs > 1

This is quite harmless on HEAD, but it's worse on stable/10 where
lapic_ipi_vectored is the local APIC native IPI implementation. On
stable/10 cpu_ops.ipi_vectored should be used instead.

MFC after: 5 days
Sponsored by: Citrix Systems R&D

8 years agoAdd missing destruction of mutex.
hselasky [Wed, 11 May 2016 10:06:58 +0000 (10:06 +0000)]
Add missing destruction of mutex.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoFix memory leak possible in error case.
ae [Wed, 11 May 2016 10:04:32 +0000 (10:04 +0000)]
Fix memory leak possible in error case.
Use free_rule() instead of free(), it will also release memory allocated
for rule counters.

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

8 years agoWhen rerooting, take the init(8) path from argv[0] instead of fetching
trasz [Wed, 11 May 2016 10:03:13 +0000 (10:03 +0000)]
When rerooting, take the init(8) path from argv[0] instead of fetching
it via kern.proc.pathname sysctl(2).  In some cases - booting from NFS
or rerooting after replacing the init binary with a new one - the sysctl
would fail.  In other cases - after upgrading, which moves the old init
to /sbin/init.bak - it would return /sbin/init.bak, which is the actual
path of the running init, instead of /sbin/init.

Reported by: Melissa Jenkins <melissa-freebsd at littlebluecar.co.uk>, jilles@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL checks after M_WAITOK allocations from sys/mips/.
trasz [Wed, 11 May 2016 09:42:24 +0000 (09:42 +0000)]
Remove NULL checks after M_WAITOK allocations from sys/mips/.

Reviewed by: adrian@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6301

8 years agoWhen rerooting, ignore ESRCH returned from kill(2). I couldn't reproduce
trasz [Wed, 11 May 2016 09:30:18 +0000 (09:30 +0000)]
When rerooting, ignore ESRCH returned from kill(2).  I couldn't reproduce
this by myself, but apparently it sometimes happens when rerooting from
single user mode.

Reported by: jilles@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoCosmetic fixes for growfs(8) - remove unneeded capitalization and a spurious
trasz [Wed, 11 May 2016 09:26:23 +0000 (09:26 +0000)]
Cosmetic fixes for growfs(8) - remove unneeded capitalization and a spurious
newline, clarify a message.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd more atomic LinuxKPI functions.
hselasky [Wed, 11 May 2016 07:58:43 +0000 (07:58 +0000)]
Add more atomic LinuxKPI functions.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoMake sdhci(4) work after suspend/resume for chipsets that require
trasz [Wed, 11 May 2016 07:50:35 +0000 (07:50 +0000)]
Make sdhci(4) work after suspend/resume for chipsets that require
the frequency quirk. This makes it work on eg ThinkPad T420.

Without it, after resume one can see this:

mmc0: ACMD42 failed, RESULT: 4
mmcsd0: Error indicated: 1 Timeout
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
mmcsd0: Error indicated: 2 Bad CRC
sdhci_pci0-slot0: Got data interrupt 0x00200000, but there is no active command.
sdhci_pci0-slot0: ============== REGISTER DUMP ==============
sdhci_pci0-slot0: Sys addr: 0x06317200 | Version: 0x00000502
sdhci_pci0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000010
sdhci_pci0-slot0: Argument: 0x00000200 | Trn mode: 0x00000037
sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000007
sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000
sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000007
sdhci_pci0-slot0: Timeout: 0x0000000d | Int stat: 0x00000000
sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci_pci0-slot0: Caps: 0x21e8c8b2 | Max curr: 0x00000040
sdhci_pci0-slot0: ===========================================
sdhci_pci0-slot0: Got data interrupt 0x00200000, but there is no active command.
sdhci_pci0-slot0: ============== REGISTER DUMP ==============
sdhci_pci0-slot0: Sys addr: 0x06317200 | Version: 0x00000502
sdhci_pci0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000001
sdhci_pci0-slot0: Argument: 0x00000040 | Trn mode: 0x00000013
sdhci_pci0-slot0: Present: 0x01ff0000 | Host ctl: 0x00000007
sdhci_pci0-slot0: Power: 0x0000000f | Blk gap: 0x00000000
sdhci_pci0-slot0: Wake-up: 0x00000000 | Clock: 0x00000007
sdhci_pci0-slot0: Timeout: 0x0000000d | Int stat: 0x00000000
autofs_flush: /net flushed
sdhci_pci0-slot0: Int enab: 0x01ff00fb | Sig enab: 0x01ff00fb
autofs_flush: /media flushed
sdhci_pci0-slot0: AC12 err: 0x00000000 | Slot int: 0x00000000
sdhci_pci0-slot0: Caps: 0x21e8c8b2 | Max curr: 0x00000040
sdhci_pci0-slot0: ===========================================

Afterwards all operations on /dev/mmcsd0 fail with EIO.

Reviewed by: jhb@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6265

8 years agoUse vfs_hash_ref(9) to eliminate LK_EXCLOTHER kludge. As a
kib [Wed, 11 May 2016 06:35:46 +0000 (06:35 +0000)]
Use vfs_hash_ref(9) to eliminate LK_EXCLOTHER kludge.  As a
consequence, the nfs client override of VOP_LOCK1() is no longer
needed.

Reviewed and tested by: rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoAdd vfs_hash_ref(9) function, which finds a vnode by the hash value
kib [Wed, 11 May 2016 06:32:22 +0000 (06:32 +0000)]
Add vfs_hash_ref(9) function, which finds a vnode by the hash value
and returns it referenced.

The function is similar to vfs_hash_get(9), but unlike the later,
returned vnode is not locked.  This operation cannot be requested with
the vget(9) flags.

Reviewed and tested by: rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agosfxge(4): update unicast filter insertion algorithm
arybchik [Wed, 11 May 2016 06:29:07 +0000 (06:29 +0000)]
sfxge(4): update unicast filter insertion algorithm

As unicast filters are not chained, we should always try to insert the
specific filter for our MAC address, and then try to insert the unicast
mis-match filter if that fails or all unicast has been requested.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6295

8 years agosfxge(4): fix efx_filter_reconfigure parameter type
arybchik [Wed, 11 May 2016 06:28:08 +0000 (06:28 +0000)]
sfxge(4): fix efx_filter_reconfigure parameter type

This caused signed/unsigned errors in some subsequent patches.
The only value passed to this is a uint32_t.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6294

8 years ago[siba] add r4 and r8 sprom formats for core_pwr_info.
adrian [Wed, 11 May 2016 06:27:46 +0000 (06:27 +0000)]
[siba] add r4 and r8 sprom formats for core_pwr_info.

The upcoming bwn(4) N-PHY support requires this (among other things that
are (hopefully) upcoming.)

Obtained from: Linux ssb (definitions)

8 years agoStyle: wrap long lines.
kib [Wed, 11 May 2016 06:27:00 +0000 (06:27 +0000)]
Style: wrap long lines.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agosfxge(4): make efx_sram_test Siena-only
arybchik [Wed, 11 May 2016 06:21:07 +0000 (06:21 +0000)]
sfxge(4): make efx_sram_test Siena-only

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6293

8 years agosfxge(4): add new Emerald board sensors to common code
arybchik [Wed, 11 May 2016 06:19:53 +0000 (06:19 +0000)]
sfxge(4): add new Emerald board sensors to common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6292

8 years agosfxge(4): simplify efx_mac_select
arybchik [Wed, 11 May 2016 06:19:05 +0000 (06:19 +0000)]
sfxge(4): simplify efx_mac_select

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6291

8 years agosfxge(4): remove Falcon specific EV_GLOBAL support
arybchik [Wed, 11 May 2016 06:18:15 +0000 (06:18 +0000)]
sfxge(4): remove Falcon specific EV_GLOBAL support

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6290

8 years agosfxge(4): remove Falcon-specific code paths from common code
arybchik [Wed, 11 May 2016 06:16:53 +0000 (06:16 +0000)]
sfxge(4): remove Falcon-specific code paths from common code

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6289

8 years agosfxge(4): add TLV format buffer manipulation functions for V3 licensing
arybchik [Wed, 11 May 2016 06:15:07 +0000 (06:15 +0000)]
sfxge(4): add TLV format buffer manipulation functions for V3 licensing

The licensing partition for V3 licensing will use the standard TLV format,
so Medford licensing operations on the staging buffer are implemented using
the TLV functions.

Submitted by:   Richard Houldsworth <rhouldsworth at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D6288

8 years agohyperv/hn: Extract RSS hash value and type.
sephe [Wed, 11 May 2016 03:31:25 +0000 (03:31 +0000)]
hyperv/hn: Extract RSS hash value and type.

MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6287

8 years agoDon't mark the initial portal registers as fully mapped.
jhibbits [Wed, 11 May 2016 00:41:40 +0000 (00:41 +0000)]
Don't mark the initial portal registers as fully mapped.

BMan and QMan will do this at attach time.  Even though the registers are mapped
now, dpaa_portal_map_registers() will be called at BMan and QMan attach time,
updating the mappings to be private, and in the case of cache-enabled registers,
marked as coherent memory mappings.

8 years agoUse DEVMETHOD_END instead of its value to indicate end of methods table
gonzo [Wed, 11 May 2016 00:34:43 +0000 (00:34 +0000)]
Use DEVMETHOD_END instead of its value to indicate end of methods table

8 years agoUse GPIO pin management API in gpiobacklight
gonzo [Wed, 11 May 2016 00:26:52 +0000 (00:26 +0000)]
Use GPIO pin management API in gpiobacklight

- Get rid of hack with re-parenting gpio-leds node to gpiobus
- Use gpio_pin_set_active to enable/disable backlight, it automatically
    takes care of active-low pins

8 years agoRename siba -> siba_s5, to specifically reference that it's for the
adrian [Tue, 10 May 2016 22:38:39 +0000 (22:38 +0000)]
Rename siba -> siba_s5, to specifically reference that it's for the
legacy siba sentry5 cpu glue.

The siba_cc code is the hard-coded chipcommon bits for the sentry s5,
which will eventually be replaced with the more flexible bhnd sipa/cc
code.

bwn, etc uses siba_bwn, which doesn't use siba or siba_cc to do anything.

8 years agoChange the default installation directory for modules to /boot/modules.
jhb [Tue, 10 May 2016 22:32:23 +0000 (22:32 +0000)]
Change the default installation directory for modules to /boot/modules.

Kernel installs always override KMODDIR when installing modules, so
this default setting is only used for standalone module builds.  Many
out-of-tree modules manually override KMODDIR already to avoid placing
modules in /boot/kernel.  This now makes that behavior the default.

Discussed on: arch@
Reviewed by: imp
Relnotes: yes

8 years agoAllow orm(4) to be disabled from probing/attaching by a hints entry:
bz [Tue, 10 May 2016 22:28:06 +0000 (22:28 +0000)]
Allow orm(4) to be disabled from probing/attaching by a hints entry:
hint.orm.0.disabled=1

Suggested by: jhb
Reviewed by: jhb
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D6307

8 years agoMove vm_domain_rr_selectdomain() under #ifdef VM_NUMA_ALLOC.
jhb [Tue, 10 May 2016 22:25:55 +0000 (22:25 +0000)]
Move vm_domain_rr_selectdomain() under #ifdef VM_NUMA_ALLOC.

The function had a null function body in the !VM_NUMA_ALLOC case but
also wasn't called in the !VM_NUMA_ALLOC case.

Suggested by: ngie

8 years agoMake libcrypto.so position independent on i386.
jkim [Tue, 10 May 2016 20:31:09 +0000 (20:31 +0000)]
Make libcrypto.so position independent on i386.

8 years agoFix DTrace test ATF wrapper generation.
markj [Tue, 10 May 2016 20:25:49 +0000 (20:25 +0000)]
Fix DTrace test ATF wrapper generation.

8 years agonetipsec: Fix minor style nit
cem [Tue, 10 May 2016 20:14:11 +0000 (20:14 +0000)]
netipsec: Fix minor style nit

Coverity points out that 'continue' is equivalent to 'break' in a do {}
while(false) loop.

Reported by: Coverity
CID: 1354983
Sponsored by: EMC / Isilon Storage Division

8 years agosdiff(1): Fix potential NULL deref in cleanup path
cem [Tue, 10 May 2016 20:09:40 +0000 (20:09 +0000)]
sdiff(1): Fix potential NULL deref in cleanup path

In the presence of the --diff-pid argument, it is possible for 'diffpipe' to be
NULL.  Only fclose() it if it was initialized.

Reported by: Coverity
CID: 1355183
Sponsored by: EMC / Isilon Storage Division

8 years agoPass device tree node as a part of gpio_pin_get_by_ofw_XXX API
gonzo [Tue, 10 May 2016 20:02:03 +0000 (20:02 +0000)]
Pass device tree node as a part of gpio_pin_get_by_ofw_XXX API

Current API assumes that "gpios" property belongs to the device's node but for
some binding it's not true: gpiokeys has set of child nodes with this property.

Patch adds new argument instead of replacing device_t because device_t will be
used to track ownership for allocated pins

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D6277

8 years agoWhen PLATFORM_SMP is enabled, check if tunable hw.ncpu is set and valid
manu [Tue, 10 May 2016 19:11:25 +0000 (19:11 +0000)]
When PLATFORM_SMP is enabled, check if tunable hw.ncpu is set and valid
(>= 1 and <= real ncores) and set mp_ncpus to it.

Approved by: andrew (mentor)
Differential Revision: https://reviews.freebsd.org/D6151

8 years agoUpdate the example growfs(8) manual page to include information on how
trasz [Tue, 10 May 2016 18:28:38 +0000 (18:28 +0000)]
Update the example growfs(8) manual page to include information on how
to make the system "notice" the updated disk size.

(Relnotes, since I've forget to set it for "camcontrol reprobe", and
it's worth mentioning.)

MFC after: 1 month
Relnotes: yes
Sponsored by: The FreeBSD Foundation

8 years agoEnsure waiting loops terminate during cold boot. This fixes boot with
hselasky [Tue, 10 May 2016 18:18:29 +0000 (18:18 +0000)]
Ensure waiting loops terminate during cold boot. This fixes boot with
MacBookPro and i915kms_load="YES" in /boot/loader.conf.

A lowlevel timeout in one of the display ports caused an infinite wait
because a ticks/jiffies comparison was constant. The clock subsystem
which makes ticks/jiffies increment is started after the initial
driver probing is done. Refer to sys/kernel.h and SI_SUB_DRIVERS vs
SI_SUB_CLOCKS .

Discussed with: kmacy @

8 years agoMerge a20_mp_start_ap and a31_mp_start_ap into one function.
manu [Tue, 10 May 2016 18:00:37 +0000 (18:00 +0000)]
Merge a20_mp_start_ap and a31_mp_start_ap into one function.
This function works with all smp non-multicluster allwinner SoC (A20, A31, A31S and H3).

Approved by: cognet (mentor)
Differential Revision: https://reviews.freebsd.org/D6269

8 years agoImplement ioremap_wt() and use that in the MEMREMAP_WT case for i386
hselasky [Tue, 10 May 2016 17:51:17 +0000 (17:51 +0000)]
Implement ioremap_wt() and use that in the MEMREMAP_WT case for i386
and amd64.

Suggested by: cem @
Discussed with: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agosed.1: Correction for the case insensitive case.
pfg [Tue, 10 May 2016 17:01:51 +0000 (17:01 +0000)]
sed.1: Correction for the case insensitive case.

Use the capital I instead of the lowercase.

Submitted by: Mikhail T.
PR: 195929
MFC after: 2 weeks

8 years agoaic7xxx: minor spelling fixes.
pfg [Tue, 10 May 2016 16:40:19 +0000 (16:40 +0000)]
aic7xxx: minor spelling fixes.

Affects mostly comments but also a visible text string,

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

8 years agoFix kernel LINT build after r299363.
hselasky [Tue, 10 May 2016 16:31:18 +0000 (16:31 +0000)]
Fix kernel LINT build after r299363.

Define shadowing macros the same way to avoid macro redefinition
compile error(s) for now.

Approved by: np @

8 years agoAllow sleepable allocations in enclosure daemon threads.
mav [Tue, 10 May 2016 16:20:36 +0000 (16:20 +0000)]
Allow sleepable allocations in enclosure daemon threads.

There were at least two places where M_NOWAIT was used without NULL check.
This change should fix NULL-dereference panic there and possibly improve
operation in other ways under memory pressure.

MFC after: 2 weeks

8 years agoAdd a missing section to a cross-reference.
jhb [Tue, 10 May 2016 16:13:54 +0000 (16:13 +0000)]
Add a missing section to a cross-reference.

While here, add bus_space(9) to the SEE ALSO section.

8 years agoAdd "camcontrol reprobe" subcommand, and implement it for da(4).
trasz [Tue, 10 May 2016 15:46:33 +0000 (15:46 +0000)]
Add "camcontrol reprobe" subcommand, and implement it for da(4).
This makes it possible to manually force updating capacity data
after the disk got resized. Without it it might be neccessary to
reboot before FreeBSD notices updated disk size under eg VMWare.

Discussed with: imp@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6108

8 years agoPush the logic to talk with the MSI/MSI-X interrupt controller to the FDT
andrew [Tue, 10 May 2016 15:45:59 +0000 (15:45 +0000)]
Push the logic to talk with the MSI/MSI-X interrupt controller to the FDT
attachment. This is where it will live when we import intrng as it will
need to look at either the msi-parent or msi-map FDT properties.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL checks after M_WAITOK allocations from mpr(4).
trasz [Tue, 10 May 2016 15:04:24 +0000 (15:04 +0000)]
Remove NULL checks after M_WAITOK allocations from mpr(4).

Reviewed by: asomers@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6297

8 years agosiba depends on bhndbus; add the device to the kernel config.
bz [Tue, 10 May 2016 14:59:48 +0000 (14:59 +0000)]
siba depends on bhndbus; add the device to the kernel config.
This gets us past compiling and now only linking is failing on builtins.

8 years agoRemove NULL checks after M_WAITOK allocations from mps(4).
trasz [Tue, 10 May 2016 14:57:14 +0000 (14:57 +0000)]
Remove NULL checks after M_WAITOK allocations from mps(4).

Reviewed by: asomers@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6296

8 years agobsdinstall/zfsboot: Do not mirror swap when swapsize is 0
allanjude [Tue, 10 May 2016 14:38:43 +0000 (14:38 +0000)]
bsdinstall/zfsboot: Do not mirror swap when swapsize is 0

PR: 209415
Submitted by: Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after: 2 weeks

8 years agoCapitalize "LDAP" in the description field of the _ypldap entry.
bcr [Tue, 10 May 2016 12:47:36 +0000 (12:47 +0000)]
Capitalize "LDAP" in the description field of the _ypldap entry.

Reviewed by: bapt
MFC after: 5 days
Differential Revision: https://reviews.freebsd.org/D5267

8 years agoAdd more LinuxKPI I/O functions.
hselasky [Tue, 10 May 2016 12:04:57 +0000 (12:04 +0000)]
Add more LinuxKPI I/O functions.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoUse function macros when possible to avoid stray substitutions.
hselasky [Tue, 10 May 2016 11:39:36 +0000 (11:39 +0000)]
Use function macros when possible to avoid stray substitutions.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:35:03 +0000 (11:35 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoAdd missing semicolon and properly wrap macro argument.
hselasky [Tue, 10 May 2016 11:34:22 +0000 (11:34 +0000)]
Add missing semicolon and properly wrap macro argument.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAllow the argument for the cpu_to_xxxp() and xxx_to_cpup() macros to
hselasky [Tue, 10 May 2016 11:31:00 +0000 (11:31 +0000)]
Allow the argument for the cpu_to_xxxp() and xxx_to_cpup() macros to
point to a constant.

Obtained from: kmacy @
MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoDirectly set the NONBLOCK flags when creating the socket
bapt [Tue, 10 May 2016 11:18:53 +0000 (11:18 +0000)]
Directly set the NONBLOCK flags when creating the socket

No functional changes

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:17:36 +0000 (11:17 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:17:19 +0000 (11:17 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:12:31 +0000 (11:12 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:11:23 +0000 (11:11 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: NetBSD

8 years agoRename getline with get_line to avoid collision with getline(3)
bapt [Tue, 10 May 2016 11:09:26 +0000 (11:09 +0000)]
Rename getline with get_line to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: OpenBSD

8 years agoRemove misc NULL checks after M_WAITOK allocations.
trasz [Tue, 10 May 2016 10:26:07 +0000 (10:26 +0000)]
Remove misc NULL checks after M_WAITOK allocations.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL check after M_WAITOK allocations from mfi(4).
trasz [Tue, 10 May 2016 10:24:35 +0000 (10:24 +0000)]
Remove NULL check after M_WAITOK allocations from mfi(4).

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove NULL checks after M_WAITOK allocations from firewire.
trasz [Tue, 10 May 2016 10:21:03 +0000 (10:21 +0000)]
Remove NULL checks after M_WAITOK allocations from firewire.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoAdd locking annotations to amd64 struct md_page members.
kib [Tue, 10 May 2016 09:58:51 +0000 (09:58 +0000)]
Add locking annotations to amd64 struct md_page members.

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

8 years agoRefactor the root mount hold code and add the wait to etc/rc.d/fsck.
trasz [Tue, 10 May 2016 08:44:44 +0000 (08:44 +0000)]
Refactor the root mount hold code and add the wait to etc/rc.d/fsck.
This fixes mounting (non-root) USB drives on boot with fsck enabled
(with non-zero 'Pass#' field in fstab(5)).

Reported by: Graham Menhennitt <graham at menhennitt.com.au>
Reviewed by: jilles@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D6221

8 years agoFix previous commit to report proper error code.
mav [Tue, 10 May 2016 08:37:41 +0000 (08:37 +0000)]
Fix previous commit to report proper error code.

MFC after: 2 weeks

8 years agoValidate XCOPY range offsets and lengths.
mav [Tue, 10 May 2016 08:28:16 +0000 (08:28 +0000)]
Validate XCOPY range offsets and lengths.

MFC after: 2 weeks

8 years agoMore XCOPY parameters validation.
mav [Tue, 10 May 2016 08:08:39 +0000 (08:08 +0000)]
More XCOPY parameters validation.

MFC after: 2 weeks

8 years agosfxge(4): cleanup: fix typo
arybchik [Tue, 10 May 2016 08:00:40 +0000 (08:00 +0000)]
sfxge(4): cleanup: fix typo

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agosfxge(4): cleanup: remove unneeded include files
arybchik [Tue, 10 May 2016 07:59:23 +0000 (07:59 +0000)]
sfxge(4): cleanup: remove unneeded include files

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week

8 years agoRename dprintf into dbg_printf to avoid collision with dprintf(3)
bapt [Tue, 10 May 2016 07:52:17 +0000 (07:52 +0000)]
Rename dprintf into dbg_printf to avoid collision with dprintf(3)

When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agorename getline into zgetline to avoid collision with getline(3)
bapt [Tue, 10 May 2016 07:50:57 +0000 (07:50 +0000)]
rename getline into zgetline to avoid collision with getline(3)

When getline(3) in 2009 was added a _WITH_GETLINE guard has also been added.
This rename is made in preparation for the removal of this guard

Obtained from: NetBSD

8 years agoRename dprintf into dbg_printf to avoid collision with dprintf(3)
bapt [Tue, 10 May 2016 07:45:44 +0000 (07:45 +0000)]
Rename dprintf into dbg_printf to avoid collision with dprintf(3)

When dprintf(3) in 2009 was added a _WITH_DPRINTF guard has also been added.
This rename is made in preparation for the removal of this guard

8 years agosfxge(4): cleanup: remove unused efx_infer_family()
arybchik [Tue, 10 May 2016 07:42:18 +0000 (07:42 +0000)]
sfxge(4): cleanup: remove unused efx_infer_family()

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      1 week