]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoActually garbage collect the unused code, as mentioned in r297147, which
ian [Mon, 21 Mar 2016 14:39:03 +0000 (14:39 +0000)]
Actually garbage collect the unused code, as mentioned in r297147, which
this change should have been part of.

8 years agoGarbage collect the bswap routines from libstand. The declaration was
ian [Mon, 21 Mar 2016 14:21:32 +0000 (14:21 +0000)]
Garbage collect the bswap routines from libstand.  The declaration was
wrapped in an i386 ifdef with a comment questioning their usefulness even
there.  It turns out they aren't referenced anywhere, but their presence
prevents using sys/endian.h in libstand code.

These days, sys/endian.h provides much better support for such things, using
compiler builtins and inline functions (and creating connections between
libstand code and header files from sys/ would not be breaking new ground).

8 years agoUnquote NANO_PACKAGE_LIST so that it actually can be a list and so
phk [Mon, 21 Mar 2016 08:30:58 +0000 (08:30 +0000)]
Unquote NANO_PACKAGE_LIST so that it actually can be a list and so
that the default value of "*" works.

8 years agoo "avaliable" -> "available".
maxim [Mon, 21 Mar 2016 08:03:50 +0000 (08:03 +0000)]
o "avaliable" -> "available".

PR: 208141
Submitted by: Tyler Littlefield

8 years agohyperv/vmbus: Implement bus_child_pnpinfo_str method
sephe [Mon, 21 Mar 2016 07:16:30 +0000 (07:16 +0000)]
hyperv/vmbus: Implement bus_child_pnpinfo_str method

Submitted by: Jun Su <junsu microsoft com>
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5669

8 years agohyperv: Factor out snprinf_hv_guid()
sephe [Mon, 21 Mar 2016 06:54:21 +0000 (06:54 +0000)]
hyperv: Factor out snprinf_hv_guid()

Submitted by: Ju Sun <junsu microsoft com>
Reviewed by: Dexuan Cui <decui microsoft com>, sephe
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5651

8 years agoLock pshared_lock shared around fork, to ensure that the COW snapshot
kib [Mon, 21 Mar 2016 06:52:35 +0000 (06:52 +0000)]
Lock pshared_lock shared around fork, to ensure that the COW snapshot
of the pshared hash in child is consistent and can be safely used.

Reported and tested by: "Oleg V. Nauman" <oleg@opentransfer.com>
Sponsored by: The FreeBSD Foundation

8 years agoProvide more information on failing checks in mutex_assert_is_owned()
kib [Mon, 21 Mar 2016 06:48:11 +0000 (06:48 +0000)]
Provide more information on failing checks in mutex_assert_is_owned()
and mutex_assert_not_owned().  snprintf() use in this context should
be safe.

Sponsored by: The FreeBSD Foundation

8 years agoFrom libthr, remove special and strange code to set up session and
kib [Mon, 21 Mar 2016 06:46:16 +0000 (06:46 +0000)]
From libthr, remove special and strange code to set up session and
control terminal, activated when running with pid 1.  It is
application duty to handle this, and unsuspecting init replacements
which are linked with libthr would be broken by this.

The pre-resolving of getpid() is restored, just in case.

Reviewed by: jilles
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoImplement process-shared spinlocks.
kib [Mon, 21 Mar 2016 06:40:54 +0000 (06:40 +0000)]
Implement process-shared spinlocks.

Sponsored by: The FreeBSD Foundation

8 years agoFix typo.
kib [Mon, 21 Mar 2016 05:59:05 +0000 (05:59 +0000)]
Fix typo.

MFC after: 3 days

8 years agoRemove from NOTES - it's built as a module now.
adrian [Mon, 21 Mar 2016 05:51:21 +0000 (05:51 +0000)]
Remove from NOTES - it's built as a module now.

Noticed by: sephe

8 years agoUse the internal references for ADC, this fixes the ADC readings on uBMC.
loos [Mon, 21 Mar 2016 03:39:38 +0000 (03:39 +0000)]
Use the internal references for ADC, this fixes the ADC readings on uBMC.

Tested on BBB and uBMC.

Sponsored by: Rubicon Communications (Netgate)

8 years agoEnable multicast addresses on vlan ports. Fixes the reception of broadcast
loos [Mon, 21 Mar 2016 03:16:56 +0000 (03:16 +0000)]
Enable multicast addresses on vlan ports.  Fixes the reception of broadcast
packets on vlan aware mode.

Sponsored by: Rubicon Communications (Netgate)

8 years agoRemove urtwn/urtwnfw; it's built as a module now.
adrian [Mon, 21 Mar 2016 02:38:21 +0000 (02:38 +0000)]
Remove urtwn/urtwnfw; it's built as a module now.

8 years agoi915: disable GEN6_MBCTL write in gen6_init_clock_gating
emaste [Mon, 21 Mar 2016 00:59:30 +0000 (00:59 +0000)]
i915: disable GEN6_MBCTL write in gen6_init_clock_gating

This write came from Linux commit b4ae3f22d238 which has been implicated
in Sandy Bridge power consumption issues (albeit under different
conditions on Linux). Disabling it restores normal power consumption on
my Sandy Bridge laptop (Thinkpad X220).

PR: 207889
Reviewed by: cem, dumbbell
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5665

8 years agoFix fallout from r292180 (Dec 2015)... ensure that every driver which has
ian [Mon, 21 Mar 2016 00:52:24 +0000 (00:52 +0000)]
Fix fallout from r292180 (Dec 2015)... ensure that every driver which has
a DRIVER_MODULE() referencing mmc_driver has a MODULE_DEPEND() on mmc.  This
is because the kernel linker only searches for symbols in dependent modules,
so loading sdhci_pci (and other bus-flavors of sdhci) would fail when mmc
was not compiled into the kernel (even if you hand-loaded mmc first).

(Thanks to jilles@ for providing the vital clue about the kernel linker.)

8 years agoiw_cxgbe/libcxgb4: Pull in many applicable fixes from the upstream Linux
np [Mon, 21 Mar 2016 00:29:45 +0000 (00:29 +0000)]
iw_cxgbe/libcxgb4: Pull in many applicable fixes from the upstream Linux
iWARP driver and userspace library to the FreeBSD iw_cxgbe and libcxgb4.

This commit includes internal changesets 6785 8111 8149 8478 8617 8648
8650 9110 9143 9440 9511 9894 10164 10261 10450 10980 10981 10982 11730
11792 12218 12220 12222 12223 12225 12226 12227 12228 12229 12654.

Submitted by: Krishnamraju Eraparaju @ Chelsio
Sponsored by: Chelsio Communications

8 years agoIt appears nfs_mountroot() will use the env var "boot.netif.mtu" if it
ian [Sun, 20 Mar 2016 21:48:26 +0000 (21:48 +0000)]
It appears nfs_mountroot() will use the env var "boot.netif.mtu" if it
exists, so mention that along with all the other boot.netif vars.

8 years agoCheck bsd_to_linux_statfs() return value. Forgotten in r297070.
dchagin [Sun, 20 Mar 2016 19:06:21 +0000 (19:06 +0000)]
Check bsd_to_linux_statfs() return value. Forgotten in r297070.

MFC after: 1 week

8 years agoReturn EOVERFLOW in case when actual statfs values are large enough and
dchagin [Sun, 20 Mar 2016 18:31:30 +0000 (18:31 +0000)]
Return EOVERFLOW in case when actual statfs values are large enough and
not fit into 32 bit fileds of a Linux struct statfs.

PR: 181012
MFC after: 1 week

8 years agoNow that urtwn is its own device, and it'll get hotplug loaded by
adrian [Sun, 20 Mar 2016 17:53:30 +0000 (17:53 +0000)]
Now that urtwn is its own device, and it'll get hotplug loaded by
devd/ifconfig/etc, don't build it in the kernel.

This should fix the build as well!

Notice by: dchagin

8 years agoRemove FREEBSD_BOOT_LOADER that already exists in std.armv6 config file.
ian [Sun, 20 Mar 2016 16:48:29 +0000 (16:48 +0000)]
Remove FREEBSD_BOOT_LOADER that already exists in std.armv6 config file.

PR: 207728
Submitted by: Jia-Shiun Li <jiashiun@gmail.com>

8 years agoConvert a long to rman_res_t, fixing a sign extension bug.
jhibbits [Sun, 20 Mar 2016 14:21:07 +0000 (14:21 +0000)]
Convert a long to rman_res_t, fixing a sign extension bug.

ahci.c had one signed long, which was passed into rman, rather than u_long.
After the switch of rman_res_t from size u_long to size uintmax_t, the sign
extension caused ranges to get messed up, and ahcich* to not attach.

There may be more signed longs used in this way, which will be fixed as they're
reported.

Reported by: pho

8 years agoWhitespaces, style(9) fixes. No functional changes.
dchagin [Sun, 20 Mar 2016 14:06:27 +0000 (14:06 +0000)]
Whitespaces, style(9) fixes. No functional changes.

MFC after: 1 week

8 years agoRegen for r297061 (fstatfs64 Linux syscall).
dchagin [Sun, 20 Mar 2016 13:23:01 +0000 (13:23 +0000)]
Regen for r297061 (fstatfs64 Linux syscall).

MFC after: 1 week

8 years agoImplement fstatfs64 system call.
dchagin [Sun, 20 Mar 2016 13:21:20 +0000 (13:21 +0000)]
Implement fstatfs64 system call.

PR: 181012
Submitted by: John Wehle
MFC after: 1 week

8 years agoRework r296543:
dchagin [Sun, 20 Mar 2016 11:40:52 +0000 (11:40 +0000)]
Rework r296543:

1. Limit secs to INT32_MAX / 2 to avoid errors from kern_setitimer().
   Assert that kern_setitimer() returns 0.
   Remove bogus cast of secs.
   Fix style(9) issues.

2. Increment the return value if the remaining tv_usec value more than 500000 as a Linux does.

Pointed out by: [1] Bruce Evans

MFC after: 1 week

8 years ago[urtwn] migrate urtwn out into sys/dev/urtwn/ .
adrian [Sun, 20 Mar 2016 03:54:57 +0000 (03:54 +0000)]
[urtwn] migrate urtwn out into sys/dev/urtwn/ .

There's some upcoming work to add new chipset support here and I'd
like to only add 802.11n support to one driver, instead of both
urtwn and rtwn.

There's also missing support for things like 802.11n, some powersave
work, bluetooth integration/coexistence, etc, and also newer parts
(like 8192EU, maybe some 11ac parts, not sure yet.)

So, this is hopefully the first step in a longer set of steps to unify
rtwn/urtwn and extend it with more interesting chipset and functionality
support.

Reviewed by: kevlo

8 years agolocaledef(1): minor sorting to match Illumos.
pfg [Sun, 20 Mar 2016 03:27:06 +0000 (03:27 +0000)]
localedef(1): minor sorting to match Illumos.

Illumos recently included space in 'print' class. We already had
this but the code had slight sorting differences. Move it some
lines up to reduce diffs with Illumos.

No functional change.

Reference:
https://illumos.org/issues/5227

8 years agoUpdate fetch.1 and fetch.3 to reflect libfetch's actual use of CA bundles
grembo [Sat, 19 Mar 2016 11:55:21 +0000 (11:55 +0000)]
Update fetch.1 and fetch.3 to reflect libfetch's actual use of CA bundles

Reviewed by: wblock
Approved by: wblock
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D5558

8 years agoFix incorrect (fortunately bigger) malloc size.
mav [Sat, 19 Mar 2016 11:48:06 +0000 (11:48 +0000)]
Fix incorrect (fortunately bigger) malloc size.

Submitted by: pfg
MFC after: 1 week

8 years agoAdd IDs for Intel Wellsburg USB controllers.
mav [Sat, 19 Mar 2016 09:20:18 +0000 (09:20 +0000)]
Add IDs for Intel Wellsburg USB controllers.

MFC after: 1 week

8 years ago[net80211] Add VHT Transmit Power Envelope element - 802.11ac-2013 8.4.2.164
adrian [Sat, 19 Mar 2016 04:37:33 +0000 (04:37 +0000)]
[net80211] Add VHT Transmit Power Envelope element - 802.11ac-2013 8.4.2.164

This .. seems inconsistently transmitted from various vendors.

8 years agoAllow pci_host_generic to be compiled into ARM kernels, used, e.g., in
bz [Fri, 18 Mar 2016 23:55:25 +0000 (23:55 +0000)]
Allow pci_host_generic to be compiled into ARM kernels, used, e.g., in
simulators.

Sponsored by: DARPA/AFRL

8 years agoCount the input and output packets.
loos [Fri, 18 Mar 2016 20:24:31 +0000 (20:24 +0000)]
Count the input and output packets.

Sponsored by: Rubicon Communications (Netgate)

8 years agoIncrease the arbitrary limit of TX segments.
loos [Fri, 18 Mar 2016 20:09:54 +0000 (20:09 +0000)]
Increase the arbitrary limit of TX segments.

Sponsored by: Rubicon Communications (Netgate)

8 years agoSet the destination port in all TX segments.
loos [Fri, 18 Mar 2016 20:04:34 +0000 (20:04 +0000)]
Set the destination port in all TX segments.

Sponsored by: Rubicon Communications (Netgate)

8 years agoUpdate to bmake-20160315
sjg [Fri, 18 Mar 2016 20:03:09 +0000 (20:03 +0000)]
Update to bmake-20160315

Archive member handling works again
meta mode, treat missing reads as for writes.

Update dirdeps.mk - much improved startup time.
Update meta.stage.mk - avoid ln when chmod required.

8 years agoCheck IPI status more frequently when waiting.
jhb [Fri, 18 Mar 2016 19:48:49 +0000 (19:48 +0000)]
Check IPI status more frequently when waiting.

An IPI cannot be sent via the local APIC if a previous IPI is still
being delivered.  Attempts to send an IPI will wait for a pending IPI
to clear.  Prior to r278325 these checks used a spin loop with a
hardcoded maximum count which broke AP startup on some systems.
However, r278325 also enforced a minimum latency of 5 microseconds if an
IPI was still pending which resulted in a measurable performance hit.
This change reduces that minimum latency to 1 microsecond.

Tested by: stas
MFC after: 3 days

8 years agoConvert the printfs here from %lx to %jx as well after r297000 in order
bz [Fri, 18 Mar 2016 19:36:43 +0000 (19:36 +0000)]
Convert the printfs here from %lx to %jx as well after r297000 in order
to be able to compile this into arm kernels.

Sponsored by: DARPA/AFRL

8 years agoaio_qphysio(): Avoid uninitialized pointer read on error.
pfg [Fri, 18 Mar 2016 19:04:01 +0000 (19:04 +0000)]
aio_qphysio(): Avoid uninitialized pointer read on error.

For the !unmap case it may happen that pbuf gets called unreferenced
when vm_fault_quick_hold_pages() fails.
Initialize it so it doesn't cause trouble.

CID: 1352776
Reviewed by: jhb
MFC after: 1 week

8 years agoMove the opt_ files to be included first so their definitions can be used
andrew [Fri, 18 Mar 2016 16:32:22 +0000 (16:32 +0000)]
Move the opt_ files to be included first so their definitions can be used
from within all further included files.

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

8 years agoRename COUNT_IPI to INTR_IPI_COUNT to reduce the diff with intrng.
andrew [Fri, 18 Mar 2016 16:29:58 +0000 (16:29 +0000)]
Rename COUNT_IPI to INTR_IPI_COUNT to reduce the diff with intrng.

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

8 years agoReduce the diff with intrng by renaming similar functions. This is a noop,
andrew [Fri, 18 Mar 2016 16:18:29 +0000 (16:18 +0000)]
Reduce the diff with intrng by renaming similar functions. This is a noop,
but will help move to use the common interrupt handling code later.

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

8 years agoo Restore some good whitespace killed in the previous commit.
maxim [Fri, 18 Mar 2016 15:44:21 +0000 (15:44 +0000)]
o Restore some good whitespace killed in the previous commit.

Spotted by: bjk

8 years agoTEGRA: Connect TEGRA124 to universe build.
mmel [Fri, 18 Mar 2016 15:27:57 +0000 (15:27 +0000)]
TEGRA: Connect TEGRA124 to universe build.

8 years agoo Kill EoL whitespaces.
maxim [Fri, 18 Mar 2016 15:07:43 +0000 (15:07 +0000)]
o Kill EoL whitespaces.

8 years agoo No need to resolve a mask that we get with ICMP_MASKREPLY,
maxim [Fri, 18 Mar 2016 15:06:50 +0000 (15:06 +0000)]
o No need to resolve a mask that we get with ICMP_MASKREPLY,
pass it directly to inet_ntoa(3).

8 years ago Add the ability to print out ht emodule specific information in likely formats.
julian [Fri, 18 Mar 2016 14:49:11 +0000 (14:49 +0000)]
 Add the ability to print out ht emodule specific information in likely formats.
Among other things this gives us the ability to find outthe syscall number of a dynamically loaded syscall that has a dynamicly allocated vector number.

MFC after: 1 week
Sponsored by: Panzura inc.

8 years agoAdd lock assertion.
trasz [Fri, 18 Mar 2016 13:26:16 +0000 (13:26 +0000)]
Add lock assertion.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoRemove the invalid L0_BLOCK definition. ARMv8 doesn't support block
andrew [Fri, 18 Mar 2016 10:01:25 +0000 (10:01 +0000)]
Remove the invalid L0_BLOCK definition. ARMv8 doesn't support block
translation in the level 0 descriptor.

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

8 years agoAdd a special case for NTFS to the -media autofs(5) map.
trasz [Fri, 18 Mar 2016 09:54:09 +0000 (09:54 +0000)]
Add a special case for NTFS to the -media autofs(5) map.

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

8 years agoChange a little to match what appears to be the right way of specifying an argument
julian [Fri, 18 Mar 2016 09:17:54 +0000 (09:17 +0000)]
Change a little to match what appears to be the right way of specifying an argument
(from looking at other man pages)

MFC after: 1 week
Sponsored by:  Panzura inc

8 years agoFix handling of net.inet.ipsec.dfbit=2 variable.
ae [Fri, 18 Mar 2016 09:03:00 +0000 (09:03 +0000)]
Fix handling of net.inet.ipsec.dfbit=2 variable.
IP_DF macro is in host bytes order, but ip_off field is in network bytes
order. So, use htons() for correct check.

8 years agoUse the right argumant name
julian [Fri, 18 Mar 2016 08:47:17 +0000 (08:47 +0000)]
Use the right argumant name

MFC after: 1 week
Sponsored by: Panzura inc

8 years agoAdd a few details that make it easier to use this macro.
julian [Fri, 18 Mar 2016 07:59:38 +0000 (07:59 +0000)]
Add a few details that make it easier to use this macro.

MFC after: 1 week
Sponsored by: Panzura inc

8 years agoTEGRA: Fix tegra_pcie driver after rman_res_t size change.
mmel [Fri, 18 Mar 2016 07:13:09 +0000 (07:13 +0000)]
TEGRA: Fix tegra_pcie driver after rman_res_t size change.

8 years agoAdd parsing for AP channel report IE.
adrian [Fri, 18 Mar 2016 04:22:07 +0000 (04:22 +0000)]
Add parsing for AP channel report IE.

Eg:

TP-LINK_D579                     60:e3:27:e1:d5:79   10   54M  -72:-95   100 EP   SSID<TP-LINK_D579> RATES<B2,B4,B11,B22,18,36,72,108>
    DSPARMS<10> XRATES<12,24,48,96> COUNTRY<US  1-11,20> APCHANREP<class 32, chan:[1,2,3,4,5,6,7]> APCHANREP<class 33, chan:[5,6,7,8,9,10,11]>
    TIM<050400010000> ERP<0x4> HTCAP<cap 0x106e param 0x17 mcsset[0-15,32] extcap 0x0 txbf 0x0 antenna 0x0> HTINFO<ctl 10, 7,0,0,0 basicmcs[]>
    ???<4a0e14000a002c01c800140005001900> RSN<v1 mc:AES-CCMP uc:AES-CCMP km:8021X-PSK>
    WME<qosinfo 0x0 BE[aifsn 3 cwmin 4 cwmax 10 txop 0] BK[aifsn 7 cwmin 4 cwmax 10 txop 0] VO[aifsn 2 cwmin 3 cwmax 4 txop 94] VI[aifsn 2 cwmin 2 cwmax 3 txop 47]>
    BSSLOAD<sta count 0, chan load 11, aac 18> VEN<dd07000c4300000000>

8 years agoRemove duplicate LE_READ_4() definition.
adrian [Fri, 18 Mar 2016 04:09:27 +0000 (04:09 +0000)]
Remove duplicate LE_READ_4() definition.

Tested:

* typed 'make', seemed to work.

8 years ago[net80211] IE 127 is not MESHEXTCAP, just EXTCAP.
adrian [Fri, 18 Mar 2016 04:00:57 +0000 (04:00 +0000)]
[net80211] IE 127 is not MESHEXTCAP, just EXTCAP.

It's not a mesh extended capabilities; it's just extended capabilities.
This is from 802.11-2012 8.4.2.29 (Extended Capabilities element.)

8 years agoDecode VHTCAP, VHTINFO and BSSLOAD.
adrian [Fri, 18 Mar 2016 03:55:57 +0000 (03:55 +0000)]
Decode VHTCAP, VHTINFO and BSSLOAD.

BSSLOAD is based on work from Idwer Vollering.

Obtained from: Idwer Vollering <vidwer@gmail.com> (bssload)

8 years agoAdd initial 802.11ac IEs and fields.
adrian [Fri, 18 Mar 2016 03:55:00 +0000 (03:55 +0000)]
Add initial 802.11ac IEs and fields.

This is a subset of what's in the linux 802.11ac implementation.

I've verified that the bits that mention an 802.11ac draft are
still the same in 802.11ac-2013 and noted it accordingly.

This is for the most part one big no-op.

Obtained from: 802.11ac-2013.pdf

8 years agoForgot lib32 libdevinfo.so.5
jhibbits [Fri, 18 Mar 2016 02:59:10 +0000 (02:59 +0000)]
Forgot lib32 libdevinfo.so.5

8 years agoAdd old libdevinfo.so version to OLD_LIBS
jhibbits [Fri, 18 Mar 2016 02:56:07 +0000 (02:56 +0000)]
Add old libdevinfo.so version to OLD_LIBS

8 years agoBump libdevinfo SHLIB_MAJOR, forgotten in r297000.
jhibbits [Fri, 18 Mar 2016 01:53:00 +0000 (01:53 +0000)]
Bump libdevinfo SHLIB_MAJOR, forgotten in r297000.

Spotted by: bapt

8 years agoIncrease booke bus max address to 36-bits.
jhibbits [Fri, 18 Mar 2016 01:30:58 +0000 (01:30 +0000)]
Increase booke bus max address to 36-bits.

Sponsored by: Alex Perez/Inertial Computing

8 years agoUse uintmax_t (typedef'd to rman_res_t type) for rman ranges.
jhibbits [Fri, 18 Mar 2016 01:28:41 +0000 (01:28 +0000)]
Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.

On some architectures, u_long isn't large enough for resource definitions.
Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but
type `long' is only 32-bit.  This extends rman's resources to uintmax_t.  With
this change, any resource can feasibly be placed anywhere in physical memory
(within the constraints of the driver).

Why uintmax_t and not something machine dependent, or uint64_t?  Though it's
possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on
32-bit architectures.  64-bit architectures should have plenty of RAM to absorb
the increase on resource sizes if and when this occurs, and the number of
resources on memory-constrained systems should be sufficiently small as to not
pose a drastic overhead.  That being said, uintmax_t was chosen for source
clarity.  If it's specified as uint64_t, all printf()-like calls would either
need casts to uintmax_t, or be littered with PRI*64 macros.  Casts to uintmax_t
aren't horrible, but it would also bake into the API for
resource_list_print_type() either a hidden assumption that entries get cast to
uintmax_t for printing, or these calls would need the PRI*64 macros.  Since
source code is meant to be read more often than written, I chose the clearest
path of simply using uintmax_t.

Tested on a PowerPC p5020-based board, which places all device resources in
0xfxxxxxxxx, and has 8GB RAM.
Regression tested on qemu-system-i386
Regression tested on qemu-system-mips (malta profile)

Tested PAE and devinfo on virtualbox (live CD)

Special thanks to bz for his testing on ARM.

Reviewed By: bz, jhb (previous)
Relnotes: Yes
Sponsored by: Alex Perez/Inertial Computing
Differential Revision: https://reviews.freebsd.org/D4544

8 years agoAdd ummax()/ummin() to libkern.
jhibbits [Fri, 18 Mar 2016 01:26:55 +0000 (01:26 +0000)]
Add ummax()/ummin() to libkern.

This is committed in isolation from a larger patch so that it can be MFC'd
separately if needed.

8 years agoAdd support for dual emac mode.
loos [Thu, 17 Mar 2016 19:35:08 +0000 (19:35 +0000)]
Add support for dual emac mode.

In dual emac mode, the CPSW subsystem provides two independent ethernets.

This is implemented (as recommended by TI's TRM) with a mixture of switch
settings (vlans) and specific features of CPSW subsystem.

The driver was splitted to accommodate the shared parts (RX and TX rings
for example) while it still provides two independent ethernets.

Each of the ethernet ports driver has it's own set of MDIO registers among
the other private settings.

Previously this driver always operate in promisc mode, now the Switch ALE
(address table entry) is properly initialized and enabled.

The driver is also tested (and known to work) with both ports operating in
single port mode (active_slave 0 or 1).

Tested on uBMC (dual emac mode, both ports in single mode, giga and fast
ethernet) and BBB (single port, fast ethernet).

Sponsored by: Rubicon Communications (Netgate)

8 years agoModify defrouter_remove() to perform the router lookup before removal.
markj [Thu, 17 Mar 2016 19:01:44 +0000 (19:01 +0000)]
Modify defrouter_remove() to perform the router lookup before removal.

This allows some simplification of its callers. No functional change
intended.

Tested by: Larry Rosenman (as part of a larger change)
MFC after: 1 month

8 years agoRemove unused variables dtrace_in_probe and dtrace_in_probe_addr.
markj [Thu, 17 Mar 2016 18:55:54 +0000 (18:55 +0000)]
Remove unused variables dtrace_in_probe and dtrace_in_probe_addr.

8 years agoRemove 50% ZFS conditional from bsdinstall/zfsboot
allanjude [Thu, 17 Mar 2016 17:53:38 +0000 (17:53 +0000)]
Remove 50% ZFS conditional from bsdinstall/zfsboot

Remove the requirement that the resulting partition table be atleast 50% ZFS

PR: 208094
Requested by: brooks
Sponsored by: ScaleEngine Inc.

8 years agoAdd missing curly brackets in for loop.
hselasky [Thu, 17 Mar 2016 12:30:21 +0000 (12:30 +0000)]
Add missing curly brackets in for loop.

Sponsored by: Mellanox Technologies
MFC after: 1 week

8 years agoReduce the number of local variables. Remove redundant check that inp
ae [Thu, 17 Mar 2016 11:10:44 +0000 (11:10 +0000)]
Reduce the number of local variables. Remove redundant check that inp
pointer isn't NULL, it is safe, because we are handling IPV6_PKTINFO
socket option in this block of code. Also, use in6ifa_withaddr() instead
of ifa_withaddr().

8 years agoChange in6_selectsrc() to allow usage of non-local IPv6 addresses in
ae [Thu, 17 Mar 2016 10:59:30 +0000 (10:59 +0000)]
Change in6_selectsrc() to allow usage of non-local IPv6 addresses in
IPV6_PKTINFO ancillary data when IPV6_BINDANY socket option is set.

Submitted by: n_hibma
MFC after: 2 weeks

8 years agoAdd paragraph about isp(4) improvements.
mav [Thu, 17 Mar 2016 09:04:07 +0000 (09:04 +0000)]
Add paragraph about isp(4) improvements.

8 years agoA20: Gpiobus can be attached only after full gpio driver initialization.
mmel [Thu, 17 Mar 2016 08:57:41 +0000 (08:57 +0000)]
A20: Gpiobus can be attached only after full gpio driver initialization.
While i'm in, remove now unused global variable.

Submited by: Emmanuel Vadot <manu@bidouilliste.com>

8 years agoMake it an error to build an ARM kernel with COMPAT_FREEBSDn where n < 10.
andrew [Thu, 17 Mar 2016 08:40:58 +0000 (08:40 +0000)]
Make it an error to build an ARM kernel with COMPAT_FREEBSDn where n < 10.
We changed the ABI for ARM in 10, an removed support for the old ABI in 11,
as such binaries from these releases are unable to be run on a head kernel.

Reviewed by: bz, emast
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D5652

8 years agoFixes a few style(9) issues, remove extra blank lines.
loos [Thu, 17 Mar 2016 06:23:48 +0000 (06:23 +0000)]
Fixes a few style(9) issues, remove extra blank lines.

No functional changes.

Sponsored by: Rubicon Comunications (Netgate)

8 years agoxo_config.h no longer in contrib, so -I's needed
sjg [Thu, 17 Mar 2016 04:21:57 +0000 (04:21 +0000)]
xo_config.h no longer in contrib, so -I's needed

PR: /homes/sjg/commit-logs/freebsd/libxo/xo_config.diff
Reviewed by: jkim

8 years agocxgbe(4): Tidy up PAUSE frame accounting.
np [Thu, 17 Mar 2016 01:15:16 +0000 (01:15 +0000)]
cxgbe(4): Tidy up PAUSE frame accounting.

Figure out if the chip is counting PAUSE frames in the "normal" stats
and take them out if it is.  This fixes a bug in the tx stats because
the default hardware behavior is different for Tx and Rx but the driver
was treating both the same way.  The result was that OPACKETS, OBYTES,
and OMCASTS were under-reported (if tx_pause > 0) before this change.

Note that the mac_stats sysctl still gives you the raw value of these
statistics straight from the device registers.

8 years ago[net80211] Add some more missing IEs.
adrian [Thu, 17 Mar 2016 01:09:21 +0000 (01:09 +0000)]
[net80211] Add some more missing IEs.

There are a /lot/ more missing; I'll chase these down over time.

Obtained from: 802.11-2012 standard

8 years agofail(9): Only gather/print stacks if STACK is enabled
cem [Thu, 17 Mar 2016 01:05:53 +0000 (01:05 +0000)]
fail(9): Only gather/print stacks if STACK is enabled

This is a follow-up fix to the earlier r296927.

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

8 years agoWe need libutil
sjg [Thu, 17 Mar 2016 00:37:04 +0000 (00:37 +0000)]
We need libutil

and make it feasible to at least build the tests in situ

8 years agoBring down 0.4.5 vendor files and other catchups with the distribution tarball.
obrien [Wed, 16 Mar 2016 23:59:29 +0000 (23:59 +0000)]
Bring down 0.4.5 vendor files and other catchups with the distribution tarball.

Reviewed by: phil

8 years agoMove generated file from contrib to build directory.
phil [Wed, 16 Mar 2016 23:50:41 +0000 (23:50 +0000)]
Move generated file from contrib to build directory.

Reviewed by: obrien
Approved by: sjg

8 years agoMore closely match the
obrien [Wed, 16 Mar 2016 23:39:55 +0000 (23:39 +0000)]
More closely match the
https://github.com/Juniper/libxo/releases/download/0.4.5/libxo-0.4.5.tar.gz
tarball.

Reviewed by: phil

8 years agoImplement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot
allanjude [Wed, 16 Mar 2016 23:12:19 +0000 (23:12 +0000)]
Implement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot

Allows booting from a GELI encrypted root file system, via UFS or ZFS

Reviewed by: gnn, smh (previous version), delphij (previous version)
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4593

8 years agoMoving libxo to properly tracked, 3rd-Party imported handling.
obrien [Wed, 16 Mar 2016 23:06:34 +0000 (23:06 +0000)]
Moving libxo to properly tracked, 3rd-Party imported handling.

Reviewed by: phil, sjg

8 years agoDue to invalid use of a signed intermediate value in the bounds checking
glebius [Wed, 16 Mar 2016 22:33:12 +0000 (22:33 +0000)]
Due to invalid use of a signed intermediate value in the bounds checking
during argument validity verification, unbound zero'ing of the process LDT
and adjacent memory can be initiated from usermode.

Submitted by: CORE Security
Patch by: kib
Security: SA-16:15

8 years agocxgbe(4): Enable PFs 0-3, and allow creation of SR-IOV VFs on these PFs
np [Wed, 16 Mar 2016 19:46:22 +0000 (19:46 +0000)]
cxgbe(4): Enable PFs 0-3, and allow creation of SR-IOV VFs on these PFs
in the default configuration files.

8 years agocxgbe(4): Enable additional capabilities in the default configuration
np [Wed, 16 Mar 2016 19:43:44 +0000 (19:43 +0000)]
cxgbe(4): Enable additional capabilities in the default configuration
files.  All features with FreeBSD drivers of some kind are now in the
default configuration.

8 years agocxgbe(4): Update some register settings in the default configuration
np [Wed, 16 Mar 2016 19:41:00 +0000 (19:41 +0000)]
cxgbe(4): Update some register settings in the default configuration
files to match the "uwire" configuration.

8 years agocxgbe(4): Remove a couple of pointless assignments in sysctl_meminfo.
np [Wed, 16 Mar 2016 19:36:11 +0000 (19:36 +0000)]
cxgbe(4): Remove a couple of pointless assignments in sysctl_meminfo.
Do not display range if start = stop (this is a workaround for some
unused regions).

8 years agoRemove armeb FreeBSD 6 compat shim
emaste [Wed, 16 Mar 2016 18:55:17 +0000 (18:55 +0000)]
Remove armeb FreeBSD 6 compat shim

r296861 addressed a build failure due to undefined SYS_freebsd6_lseek
by adding a COMPAT_FREEBSD6 conditional, but we do not support FreeBSD 6
compatibility on armeb anyway so remove it completely.

Reviewed by: andrew, bz
Differential Revision: https://reviews.freebsd.org/D5643

8 years agoRemove incorrect BUGS entry about asserting lock not held.
bdrewery [Wed, 16 Mar 2016 18:39:48 +0000 (18:39 +0000)]
Remove incorrect BUGS entry about asserting lock not held.

For non-WITNESS< assertion support for SA_UNLOCKED was added in r125421 and
made to panic in r126316.

MFC after: 1 week

8 years agoFix debug printf
imp [Wed, 16 Mar 2016 16:56:28 +0000 (16:56 +0000)]
Fix debug printf

8 years agoRemove old COMPAT_FREEBSD options from the ARM kernel configs. We replaced
andrew [Wed, 16 Mar 2016 15:31:09 +0000 (15:31 +0000)]
Remove old COMPAT_FREEBSD options from the ARM kernel configs. We replaced
the ABI in 10.0, and have removed support for the old ABI in 11. As such
any of these options to provide compatibility prior to 10 are unneeded.

Sponsored by: ABT Systems Ltd

8 years agoPacify Coverity in a better way, to avoid write-only variable when building
trasz [Wed, 16 Mar 2016 14:00:45 +0000 (14:00 +0000)]
Pacify Coverity in a better way, to avoid write-only variable when building
without INVARIANTS.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation