bdrewery [Wed, 31 Aug 2016 19:30:59 +0000 (19:30 +0000)]
DIRDEPS_BUILD: Add some missing dirctories to the build.
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 31 Aug 2016 19:30:52 +0000 (19:30 +0000)]
Add a 'make print-dir' that simply traverses all directories and prints them.
This is useful for finding connected directories.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 31 Aug 2016 19:30:46 +0000 (19:30 +0000)]
DIRDEPS_BUILD: Update dependencies.
Sponsored by: EMC / Isilon Storage Division
bdrewery [Wed, 31 Aug 2016 19:30:00 +0000 (19:30 +0000)]
DIRDEPS_BUILD: Avoid cyclic dependency with libc++.
The DIRDEPS_BUILD does not have a 'make includes' phase, so it would
otherwise want libc++ to be fully built/staged before building
libgcc. Using the header directly works.
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
ache [Wed, 31 Aug 2016 18:49:50 +0000 (18:49 +0000)]
'addrlen' does not matter when we need to find the first non-zero bit in
the byte from the left and 'addrlen' already counted in 'lim'.
PR: 212121
Submitted by: Herbie.Robinson@stratus.com
MFC after: 7 days
emaste [Wed, 31 Aug 2016 18:37:51 +0000 (18:37 +0000)]
Regnerate after r305140, getdtablesize in capability mode
Sponsored by: The FreeBSD Foundation
loos [Wed, 31 Aug 2016 18:35:41 +0000 (18:35 +0000)]
Fix the build.
Works better when the file with the #define is actually included...
emaste [Wed, 31 Aug 2016 18:33:15 +0000 (18:33 +0000)]
Allow getdtablesize in capability mode
getdtablesize is "trivial global state" and is similar to
getrlimit(RLIMIT_NOFILE), so should be permitted in capability mode.
Reviewed by: oshogbo
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7719
cem [Wed, 31 Aug 2016 18:10:41 +0000 (18:10 +0000)]
df(1): Allow duplicate -l flags gracefully
Rather than producing a misleading error message when duplicate -l flags are
provided to df(1), simply ignore extra flags and proceed as if only one was
specified. This seems most reasonable given the usage for -l:
-l Only display information about locally-mounted file systems.
l and t flags still conflict, as before.
PR: 208169
Reported by: by at reorigin.com
Reviewed by: allanjude
allanjude [Wed, 31 Aug 2016 17:52:11 +0000 (17:52 +0000)]
Eliminate unnecessary loop in _cap_check()
Calling cap_rights_contains() several times with the same inputs is not
going to produce a different output. The variable being iterated, i, is
never used inside the for loop.
The loop is actually done in cap_rights_contains()
Submitted by: Ryan Moeller <ryan@freqlabs.com>
Reviewed by: oshogbo, ed
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D7369
jmcneill [Wed, 31 Aug 2016 16:56:54 +0000 (16:56 +0000)]
Add Allwinner A64 (sun50i) and Pine64 dts files.
Reviewed by: andrew, imp, manu, wca
Differential Revision: https://reviews.freebsd.org/D7169
ache [Wed, 31 Aug 2016 15:47:58 +0000 (15:47 +0000)]
Apply the same qsort() usage fix as in r304911 getaddrinfo.c
qsort() can't be stabilized with just return(-1) alone.
MFC after: 3 days
imp [Wed, 31 Aug 2016 15:32:52 +0000 (15:32 +0000)]
Remove accidentally committed stray comment.
Noticed by: dteske@
emaste [Wed, 31 Aug 2016 15:05:04 +0000 (15:05 +0000)]
Update to ELF Tool Chain r3490
Improvements include:
* readelf: report all relocation types in rel/rela for MIPS N64
* readelf: add ELFOSABI_ARM_AEABI
* elfdump: add ELFOSABI_ARM_AEABI and ELFOSABI_ARM
* Add recent RISC-V relocations
* elfcopy: use elftc_timestamp, to support SOURCE_DATE_EPOCH
Sponsored by: The FreeBSD Foundation
kib [Wed, 31 Aug 2016 14:49:58 +0000 (14:49 +0000)]
Make swapoff reliable.
The swap_pager_swapoff() function uses trylock for the object lock
before pagein, which means that either i/o to md(4) over swap, or
intensive page faults over swap pager objects might prevent swapoff()
from making any progress. Then the retry < 100 check fails and machine
panics.
If trylock fails, acquire the object lock in the blockable way and
restart the hash bucket walk. Keep retries logic for now.
Reported and tested by: pho
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D7688
andrew [Wed, 31 Aug 2016 13:58:32 +0000 (13:58 +0000)]
Also handle instruction traps. We might hit these when the page we are
executing is being promoted to a superpage.
Obtained from: ABT Systems Ltd
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
emaste [Wed, 31 Aug 2016 13:50:23 +0000 (13:50 +0000)]
Import ELF Tool Chain snapshot at revision 3490
From http://svn.code.sf.net/p/elftoolchain/code/
bapt [Wed, 31 Aug 2016 13:16:40 +0000 (13:16 +0000)]
Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi
Add a new 'netproto' variable which can be set for now to
NET_TFTP or NET_NFS (default to NET_NONE)
From the dhcp options if one sets the root-path option to:
"ip:path", the loader will consider it is booting over NFS
(meaning same behaviour as the default current behaviour)
if the dhcp option "tftp server address" is set (option 150)
the loader will consider it is booting over tftpfs, it will then
consider the root-path options with 2 possible case
1. "path" then the IP of the tftp server will be the one passed by
the option 150, and the files will be retrieved under "path" on the tftp
server
2. "ip:path" then the IP of the tftp server will be the one passed in
the option "overwritting the IP from the option 150.
We could not "abuse" the rootpath option in the form or tftp://ip:path because
this is already used for other purpose by iPXE preventing any chainload from
iPXE to the FreeBSD loader.
Given at each open(), the loader loops over all available filesystems and keep
the "best" error, we needed to prevent tftpfs to fallback on nfs and vice versa.
the tftpfs and nfs implementation in libstand now return EINVAL early if
'netproto' for that purpose.
Reviewed by: tsoome
Relnotes: yes
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D7628
mjg [Wed, 31 Aug 2016 12:29:04 +0000 (12:29 +0000)]
fd: effectively revert r305091
Turns out fd_lastfile can survive being -1 for some processes, giving
incorrect results with the cast.
Noted by: cem
mav [Wed, 31 Aug 2016 11:55:31 +0000 (11:55 +0000)]
Fix kernel panic when inheriting properties without default.
There are two writable hidden properties "iscsioptions" and "stmf_sbd_lu",
that have no default string value. Attempt to unset them or replicate
caused kernel panic. This simple bandaid seems fixes the problem nicely.
MFC after: 2 weeks
ae [Wed, 31 Aug 2016 11:51:52 +0000 (11:51 +0000)]
Remove redundant sanity checks from ipsec[46]_common_input_cb().
This check already has been done in the each protocol callback.
bde [Wed, 31 Aug 2016 11:10:39 +0000 (11:10 +0000)]
Add some locking to sc_cngetc().
Keyboard input needs Giant locking, and that is not possible to do
correctly here. Use mtx_trylock() and proceed unlocked as before if
we can't acquire Giant (non-recursively), except in kdb mode don't
even try to acquire Giant. Everything here is a hack, but it often
works. Even if mtx_trylock() succeeds, this might be a LOR.
Keyboard input also needs screen locking, to handle screen updates
and switches. Add this, using the same simplistic screen locking
as for sc_cnputc().
Giant must be acquired before the screen lock, and the screen lock
must be dropped when calling the keyboard driver (else it would get a
harmless LOR if it tries to acquire Giant). It was intended that sc
cn open/close hide the locking calls, and they do for i/o functions
functions except for this complication.
Non-console keyboard input is still only Giant-locked, with screen
locking in some called functions. This is correct for the keyboard
parts only.
When Giant cannot be acquired properly, atkbd and kbdmux tend to race
and work (they assume that the caller acquired Giant properly and don't
try to acquire it again or check that it has been acquired, and the
races rarely matter), while ukbd tends to deadlock or panic (since it
does the opposite, and has other usb threads to deadlock with).
The keyboard (Giant) locking here does very little, but the screen
locking completes screen locking for console mode except for not
detecting or handling deadlock.
jmcneill [Wed, 31 Aug 2016 10:45:53 +0000 (10:45 +0000)]
Add support for Allwinner A64 USB PHY.
Reviewed by: manu
bz [Wed, 31 Aug 2016 10:45:33 +0000 (10:45 +0000)]
After r305113, try to properly replace the magic numbers with
proper #defines for this driver (not using the wrong header).
tsoome [Wed, 31 Aug 2016 09:23:09 +0000 (09:23 +0000)]
recvtftp() is broken for large files, report file size
The tftp download for large files will cause internal block id
to wrap to 0 as the data type is unsigned short.
Also provide file size information for stat.
PR: 200500
Reported by: tsoome
Reviewed by: allanjude
Approved by: allanjude (mentor)
Differential Revision: https://reviews.freebsd.org/D7660
loos [Wed, 31 Aug 2016 07:42:46 +0000 (07:42 +0000)]
Add a driver for the AM335x bandgap sensor, an on-die temperature sensor
as part of the AM335x control module extension.
TI says that the bandgap sensor is not very accurate on AM335x, but in our
tests it seems to be a good reference for the SoC temperature.
TI details:
http://processors.wiki.ti.com/index.php/AM335x_Thermal_Considerations#Measuring_Case_Temperature
Sponsored by: Rubicon Communications, LLC (Netgate)
loos [Wed, 31 Aug 2016 07:22:14 +0000 (07:22 +0000)]
Allow the use of control module extensions to cope with specific platform
features.
Sponsored by: Rubicon Communications, LLC (Netgate)
loos [Wed, 31 Aug 2016 07:03:06 +0000 (07:03 +0000)]
Replace more magic numbers with the proper register names.
Sponsored by: Rubicon Communications, LLC (Netgate)
loos [Wed, 31 Aug 2016 06:46:47 +0000 (06:46 +0000)]
Replace a magic number with the proper register name.
Sponsored by: Rubicon Communications, LLC (Netgate)
sephe [Wed, 31 Aug 2016 06:00:20 +0000 (06:00 +0000)]
hyperv/timesync: Rework time adjustment policy
- By default, adjust time upon SYNC request. It can be disabled
through hw.hvtimesync.ignore_sync_req. SYNC request will be
sent by hypervisor the host is resumed, rebooted, etc.
- By default, adjust time upon SAMPLE request, if there is 100ms
difference between VM time and hypervisor time. This can be
disabled through hw.hvtimesync.sample_drift.
And nuke the unnecessary task, since channel callback is running
in a Hyper-V taskqueue nowadays.
Submitted by: YanZhe Chen <t-yachen microsoft com>
Discussed with: Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com>, sephe
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7707
sephe [Wed, 31 Aug 2016 05:27:30 +0000 (05:27 +0000)]
hyperv/hn: Consolidate NVS transaction execution.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7704
nwhitehorn [Wed, 31 Aug 2016 04:03:55 +0000 (04:03 +0000)]
Back out misfired extra file in r305108.
nwhitehorn [Wed, 31 Aug 2016 04:02:52 +0000 (04:02 +0000)]
Refix operation on sparse CPU mappings as in r302372, temporarily broken
by r304716.
PR: kern/210106
MFC after: 2 days
imp [Wed, 31 Aug 2016 03:55:50 +0000 (03:55 +0000)]
Create a hook 'post-initialize' for people that want to define
something (perhaps in loader.rc.local) that can read in .conf files
after all the other .conf files have been read and override settings
in them. This is quite handy if the .conf file name is determined
while the loader is running, but might be generically useful for other
things. If this hook exists, call it, otherwise don't do anything.
Doing it in these functions ensures that this file is reliably
read. It also works around a defect in forth where s" isn't allowed
outside a function (well, in a compile context) leading to gross
workarounds if one were to hack loader.rc like:
: maybe-some-func s" some-func" sfind if execute else drop then ;
maybe-some-func
which somehow seems worse. Though I'm sure there's some clever forthy
way of doing that with a macro.
Sponsored by: Netflix, Inc
gonzo [Wed, 31 Aug 2016 01:04:57 +0000 (01:04 +0000)]
Update VCHIQ driver to upstream version
4eda74f2
PR: 211525
Submitted by: Sylvain Garrigues <sylvain@sylvaingarrigues.com>
bapt [Wed, 31 Aug 2016 00:11:35 +0000 (00:11 +0000)]
Revert 305098
Was a wrong assumption from me badly look at the errors cross toolchain was
telling me
bapt [Wed, 31 Aug 2016 00:04:09 +0000 (00:04 +0000)]
Make libc++.so ldscript sysroot friendly
cognet [Tue, 30 Aug 2016 23:32:38 +0000 (23:32 +0000)]
Nuke obio_bs_tag, it was used before it was initialized, and
arm_base_bs_tag is the same, anyway.
cognet [Tue, 30 Aug 2016 23:30:26 +0000 (23:30 +0000)]
Some old arm ports don't load the kernel at the beginning of the memory,
because the bootloader, ie redboot, won't let them do so, and so used the
memory before the kernel for early memory allocation, such as pagetables,
stacks, etc...
Make a bit of an effort to try to get that memory mapped.
bdrewery [Tue, 30 Aug 2016 22:48:05 +0000 (22:48 +0000)]
AUTO_OBJ: Support SRCS/DPSRCS that contain '/' and require a nested OBJDIR.
This is to be used by the new clang3.9 build and extends functionality
added to 'make obj' in r279980.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
cognet [Tue, 30 Aug 2016 22:32:33 +0000 (22:32 +0000)]
Garbage collect bits forgotten in r295267.
mjg [Tue, 30 Aug 2016 21:53:22 +0000 (21:53 +0000)]
fd: add fdeget_locked and use in kern_descrip
pfg [Tue, 30 Aug 2016 21:51:53 +0000 (21:51 +0000)]
MFV r302423:
Bring older verbatim version of cpuid.h
This file is used regularly in FreeBSD builds but we usually use the
similar file provided by clang.
By providing the older file introduced in GCC 4.3, we hope to mimic
better what is provided by an external toolchain.
Obtained from: GCC-4_3-branch (SVN rev. 129548, pre GPLv3)
mjg [Tue, 30 Aug 2016 21:48:10 +0000 (21:48 +0000)]
fd: simplify fd testing in fget_locked by casting to u_int
jilles [Tue, 30 Aug 2016 21:43:57 +0000 (21:43 +0000)]
getvfsbyname(3): Remove [EFAULT] error.
Since r101651 in 2002, getvfsbyname() has written *vfc using userland
memcpy(), so the [EFAULT] error no longer occurs.
MFC after: 1 week
dim [Tue, 30 Aug 2016 20:27:22 +0000 (20:27 +0000)]
Fix warnings in telnet about invalid constant conversions, e.g.:
contrib/telnet/telnet/commands.c:2914:13: error: implicit conversion
from 'int' to 'char' changes value from 137 to -119
[-Werror,-Wconstant-conversion]
*lsrp++ = IPOPT_SSRR;
~ ^~~~~~~~~~
/usr/include/netinet/ip.h:152:21: note: expanded from macro 'IPOPT_SSRR'
#define IPOPT_SSRR 137 /* strict source route */
^~~
contrib/telnet/telnet/commands.c:2916:13: error: implicit conversion
from 'int' to 'char' changes value from 131 to -125
[-Werror,-Wconstant-conversion]
*lsrp++ = IPOPT_LSRR;
~ ^~~~~~~~~~
/usr/include/netinet/ip.h:148:21: note: expanded from macro 'IPOPT_LSRR'
#define IPOPT_LSRR 131 /* loose source route */
^~~
Use unsigned char buffers instead.
MFC after: 1 week
dim [Tue, 30 Aug 2016 20:24:50 +0000 (20:24 +0000)]
Fix warnings in tnftp about invalid constant conversions, e.g.:
contrib/tnftp/src/ftp.c:2067:11: error: implicit conversion from 'int'
to 'char' changes value from 255 to -1 [-Werror,-Wconstant-conversion]
buf[0] = IAC;
~ ^~~
/usr/include/arpa/telnet.h:39:13: note: expanded from macro 'IAC'
#define IAC 255 /* interpret as command: */
^~~
contrib/tnftp/src/ftp.c:2068:11: error: implicit conversion from 'int'
to 'char' changes value from 244 to -12 [-Werror,-Wconstant-conversion]
buf[1] = IP;
~ ^~
/usr/include/arpa/telnet.h:50:12: note: expanded from macro 'IP'
#define IP 244 /* interrupt process--permanently */
^~~
Use an unsigned char buffer instead.
MFC after: 1 week
oshogbo [Tue, 30 Aug 2016 19:58:41 +0000 (19:58 +0000)]
Fix Capsicum syscalls test suite.
pfg [Tue, 30 Aug 2016 19:39:33 +0000 (19:39 +0000)]
libcpp: Complete the __COUNTER__ support with upstream implementation.
We brought an original __COUNTER__ implementation in r228474, however, it
was missing documentation and it had a different behaviour for precompiled
headers with respect to the upstream version. Since the upstream version
is under the same license as GCC4.2, bring the missing pieces to reduce
differences against upstream.
Optained from: GCC pre-4.3 (rev. 125041 ; GPLv2)
bdrewery [Tue, 30 Aug 2016 19:26:07 +0000 (19:26 +0000)]
Reduce duplicated logic for !SMP
Sponsored by: EMC / Isilon Storage Division
emaste [Tue, 30 Aug 2016 19:20:26 +0000 (19:20 +0000)]
iscsi_initiator: make logout_req::reason unsigned char
Previously this reported an error from Clang 3.9.0: implict conversion
from 'int' to 'char' changes value from 128 to -128.
Discussed with: dim, trasz
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7699
dim [Tue, 30 Aug 2016 19:02:15 +0000 (19:02 +0000)]
Squelch clang 3.9.0 warnings about BASE (which is 32768) being converted
to -32768 when it is used as an argument to mp_itom(), in both libtelnet
and newkey. This code has been wrong since r26238 (!), so after almost
20 years it is rather useless to try to correct it.
MFC after: 1 week
imp [Tue, 30 Aug 2016 18:01:26 +0000 (18:01 +0000)]
The code only converts from bpbHugeSectors to bpbSectors if the sum of
the hidden and huge sectors is less than or equal MAXU16. When
formatting in Windows bpbSectors is still used for 63488 sectors and
2048 hidden (sum > MAXU16). The hidden sectors count is the number of
sectors before the FAT16 Boot Record so it shouldn't affect the sector
count. Attached patch (huge_sec_conversion.patch) to only check for
bpb.bpbHugeSectors <= MAXU16 when converting to bpbSectors.
Submitted by: Guy Yur
PR: 183234
imp [Tue, 30 Aug 2016 18:01:19 +0000 (18:01 +0000)]
Remove CHS alignment. It's not needed and causes problems for the BBB
boot partition. NetBSD removed it in 1.10 in their repo some time ago.
Submitted by: Guy Yur
PR: 183234
andrew [Tue, 30 Aug 2016 16:45:15 +0000 (16:45 +0000)]
Because we need to use a break-before-make sequence when promoting pages
there is a short period where functions that walk the kernel page table
without locking them may see an invalid entry. One solution would be to add
locking to these functions, however some may be called from locations where
we are unable to sleep.
Until a better solution can be found stop promoting pages in the kernel
pmap so these functions work as expected.
Obtained from: ABT Systems Ltd
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
gnn [Tue, 30 Aug 2016 14:28:35 +0000 (14:28 +0000)]
Update cryptotest for modern algorithms
Reviewed by: cem
Sponsored by: Rubicon Communications, LLC (Netgate)
Differential Revision: https://reviews.freebsd.org/D7598
lidl [Tue, 30 Aug 2016 14:09:24 +0000 (14:09 +0000)]
Add refactored blacklist support to sshd
Change the calls to of blacklist_init() and blacklist_notify to be
macros defined in the blacklist_client.h file. This avoids
the need for #ifdef USE_BLACKLIST / #endif except in the
blacklist.c file.
Remove redundent initialization attempts from within
blacklist_notify - everything always goes through
blacklistd_init().
Added UseBlacklist option to sshd, which defaults to off.
To enable the functionality, use '-o UseBlacklist=yes' on
the command line, or uncomment in the sshd_config file.
Reviewed by: des
Approved by: des
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7051
araujo [Tue, 30 Aug 2016 12:40:12 +0000 (12:40 +0000)]
Invert calloc(3) argument order.
Reviewed by: grehan, mav
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D7613
bde [Tue, 30 Aug 2016 12:36:14 +0000 (12:36 +0000)]
Fix keyboard polling "on/off" to support recursion. vt depends on
this, and sc will soon depend on it again.
The on/off request is passed without modification to lower layers,
so the bug was smaller in this layer than in in lower layers (the
sequence on;on;off left polling off when it should be on, but the
sequence on;on;off;on;off... doesn't allow the interrupt handler
to eat the input after an "off" that should't turn off polled mode,
provided lower layers don't have the bug, since this layer is virtual.
The bug was small in lower layers too. Normally everything is Giant
locked for keyboards, and this locks out the interrupt handler in
on;on;off;on;off... sequences. However, PR 211884 says that fixing
this bug in ukbd in r303765 apparently causes the eating-by-interrupt
behaviour that the fix is to prevent.
Discussed with: emax
bde [Tue, 30 Aug 2016 10:57:19 +0000 (10:57 +0000)]
Start adding locking to sc_cngetc().
Restore an splx() lost in r228644. We aren't nearly ready to remove
spl's. They give hints about missing locking. This lost one was
misplaced. Dropping it early for convenience gave race windows for
accesses to the fkey buffer. Giant locking accidentally fixed this
for non-console cases.
Put the spl's around the whole function. Since there are many returns
that would need splx() just before them for a direct fix, split the
function into a wrapper that does the spl's and a "locked" function
that does the work.
Return earlier when no keyboard is attached to match the ordering in a
planned version. This breaks the dubious feature of returning keys
from the fkey buffer after the keyboard has gone away. Losing the keys
wouldn't matter, but we keep them too long now.
jmcneill [Tue, 30 Aug 2016 10:21:32 +0000 (10:21 +0000)]
Add support for Allwinner A64 watchdog timer.
kevlo [Tue, 30 Aug 2016 08:34:49 +0000 (08:34 +0000)]
Update a comment to reflect r305051.
markj [Tue, 30 Aug 2016 05:56:21 +0000 (05:56 +0000)]
Restore swap pager readahead after r292373.
The removal of vm_fault_additional_pages() meant that a hard fault on
a swap-backed page would result in only that page being read in. This
change implements readahead and readbehind for the swap pager in
swap_pager_getpages(). swap_pager_haspage() is modified to return the
largest contiguous non-resident range of pages containing the requested
range.
Reviewed by: alc, kib
Tested by: pho
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D7677
markj [Tue, 30 Aug 2016 05:50:42 +0000 (05:50 +0000)]
Recursively enumerate anonymous structs and unions in ctf_member_info().
Previously, ctf_member_info() would ignore members belonging to an
anonymous struct or union. This made it impossible to, for example, trace
the m_next field of an mbuf using DTrace.
Reported and tested by: gallatin
MFC after: 2 weeks
sephe [Tue, 30 Aug 2016 05:47:58 +0000 (05:47 +0000)]
hyperv/hn: Remove unnecessary NULL check.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7690
sephe [Tue, 30 Aug 2016 05:35:19 +0000 (05:35 +0000)]
hyperv/hn: Log packet message alignment.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7689
sephe [Tue, 30 Aug 2016 05:21:34 +0000 (05:21 +0000)]
hyperv/hn: Remove the useless rndis_device and related bits
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7687
kevlo [Tue, 30 Aug 2016 05:15:42 +0000 (05:15 +0000)]
Zap M_IOVEC.
Reviewed by: Matthew Macy
sephe [Tue, 30 Aug 2016 05:09:26 +0000 (05:09 +0000)]
hyperv/hn: Switch to new RNDIS transaction execution for halt.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7686
sephe [Tue, 30 Aug 2016 04:04:29 +0000 (04:04 +0000)]
hyperv/hn: Factor out func to exec RNDIS transaction w/o checking result
It will be used by RNDIS HALT and RESET.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7685
sephe [Tue, 30 Aug 2016 03:55:43 +0000 (03:55 +0000)]
hyperv/hn: Remove unused function
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7684
sephe [Tue, 30 Aug 2016 03:40:22 +0000 (03:40 +0000)]
hyperv/hn: Switch to new RNDIS set for RX filters.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7683
sephe [Tue, 30 Aug 2016 03:11:07 +0000 (03:11 +0000)]
net/rndis: Packet types are defined by NDIS; not RNDIS specific.
Reviewed by: hps
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7681
sephe [Tue, 30 Aug 2016 03:03:19 +0000 (03:03 +0000)]
hyperv/hn: Indentation and field comment fixup for ndis.h.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7680
sephe [Tue, 30 Aug 2016 02:55:07 +0000 (02:55 +0000)]
hyperv/hn: Move OIDs to net/rndis.h; they are standard NDIS OIDs.
Actually all OIDs defined in net/rndis.h are standard NDIS OIDs.
While I'm here, use the verbose macro name as in NDIS spec.
MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7679
jhibbits [Tue, 30 Aug 2016 02:09:40 +0000 (02:09 +0000)]
Attach and LAW problems to fix
Summary:
1) Attach problem - mpc85xx_probe() relies on fact that 0xfff0 mask matches all
QorIQ CPUs what is not true since e6500. This shall be reworked to match against
all supported CPUs.
2) There is no any reason for operating system to re-program or anyhow else
touch the LAWs programmed by firmware (u-boot). Right now mpc85xx_attach()
removes all LaW entries except for DRAM. This causes MCE to be generated when
later any of driver maps DTB-provided hardware addresses which do not exist
anymore because corresponding LaWs were removed.
Submitted by: Ivan Krivonos <int0dster_AT_gmail.com>
Differential Revision: https://reviews.freebsd.org/D7663
ngie [Tue, 30 Aug 2016 02:04:55 +0000 (02:04 +0000)]
Filter certain compile-time options into -DATF_BUILD_*
Items filtered through are:
- Constant defines (-D)
- Include flags (-I)
- Linker flags (-L)
- Optimization level (-O)
- Warnings / linker flags (-W)
- Preprocessor options (-f)
This fixes the scenario hit by the Jenkins job where it's infecting
the build with --sysroot, etc options from the Jenkins build in the
tests.
Prefix all intermediate variables (_CFLAGS, etc) with "ATF_BUILD" [*].
MFC after: 2 weeks
Reported by: Jenkins
Requested by: jmmv
Reviewed by: jmmv
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7702
jhibbits [Tue, 30 Aug 2016 01:58:49 +0000 (01:58 +0000)]
Add support for NXP/Freescale etsec2 ethernet controller
Adding the compatible property check isn't enough. Device trees for eTSEC2
devices are missing a 'reg' property on the eTSEC node itself, relegating it to
the queue group child nodes.
Still left to do: add Multigroup mode support (see QorIQ reference manuals s for
SoCs with eTSEC2).
MFC after: 2 weeks
Relnotes: Yes
gonzo [Tue, 30 Aug 2016 01:31:03 +0000 (01:31 +0000)]
Fix TI PRUSS driver panic with INVARIANTS enabled
Value passed as islocked argument to knlist_add should
be consistent with actual lock state so add lock/unlock
calls around knlist_add
PR: 212120
Submitted by: Manuel Stuhn
nwhitehorn [Tue, 30 Aug 2016 00:47:21 +0000 (00:47 +0000)]
Some versions of SLOF do not append the partition number to the boot
device argument to the stage-1 bootloader. In such cases, boot1 would
only try to read the entire device rather than checking for partitions.
Instead of panic'ing, fall back to reading the partitions as normal in
such situations. This was preventing boot of installed systems on some
versions of PowerKVM.
PR: kern/211599
MFC after: 2 days
jhb [Mon, 29 Aug 2016 22:48:36 +0000 (22:48 +0000)]
Implement 'devctl clear driver' to undo a previous 'devctl set driver'.
Add a new 'clear driver' command for devctl along with the accompanying
ioctl and devctl_clear_driver() library routine to reset a device to
use a wildcard devclass instead of a fixed devclass. This can be used
to undo a previous 'set driver' command. After the device's name has
been reset to permit wildcard names, it is reprobed so that it can
attach to newly-available (to it) device drivers.
MFC after: 1 month
Sponsored by: Chelsio Communications
ngie [Mon, 29 Aug 2016 22:47:53 +0000 (22:47 +0000)]
Minor Makefile simplifications for lib/atf/...
- Replace uses of `${.CURDIR:H:H:H}` with ${SRCTOP}
- Use built-in :H operator instead of ".." when enumerating paths.
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
jhb [Mon, 29 Aug 2016 22:47:14 +0000 (22:47 +0000)]
Use device_verbose() to undo device_quiet() when detaching from t[45]iovX.
The device quiet flag is not automatically reset on detach, so it is
inherited by other device drivers (e.g. when switching a device driver
over to ppt for PCI pass through). Cope with this behavior by explicitly
marking the device verbose during detach so that the next driver can make
its own decision.
Sponsored by: Chelsio Communications
ngie [Mon, 29 Aug 2016 22:38:18 +0000 (22:38 +0000)]
Fix typo
atf_tc_expect_fail should have been atf_expect_fail per atf-sh-api(3)
PR: 212193
Pointyhat to: ngie
Sponsored by: EMC / Isilon Storage Division
cem [Mon, 29 Aug 2016 20:51:34 +0000 (20:51 +0000)]
ioat(4): Add additional CTR tracing during reset
cem [Mon, 29 Aug 2016 20:46:33 +0000 (20:46 +0000)]
ioat(4): Don't "complete" DMA descriptors prematurely
In r304602, I mistakenly removed the ioat_process_events check that we weren't
processing events before the hardware had completed the descriptor
("last_seen"). Reinstate that logic.
Keep the defensive loop condition and additionally make sure we've actually
completed a descriptor before blindly chasing the ring around.
In reset, queue and finish the startup command before allowing any event
processing or submission to occur. Avoid potential missed callouts by
requeueing the poll later.
jmcneill [Mon, 29 Aug 2016 20:01:53 +0000 (20:01 +0000)]
When the EFI implementation (like U-Boot) does not support WaitForKey, we
can emulate efi_cons_poll(0 with a flag and caching the last key read with
ReadKeyStroke. This fixes the loader.efi countdown timer on Pine64 (and
other U-Boot + EFI using platforms).
Reviewed by: imp, manu
Differential Revision: https://reviews.freebsd.org/D7670
kib [Mon, 29 Aug 2016 19:53:13 +0000 (19:53 +0000)]
Typesetting fixes.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
dim [Mon, 29 Aug 2016 19:40:46 +0000 (19:40 +0000)]
Avoid undefined behavior when calling va_start() in bnep_send_control(),
by making the 'type' parameter a plain unsigned.
MFC after: 3 days
kib [Mon, 29 Aug 2016 19:33:07 +0000 (19:33 +0000)]
Restore the requirement of setting errno to zero before calling
ptrace(2). Describe the behaviour of automatically zeroing errno as
historical feature.
Requested by: ache, jhb
Reviewed by: ache, bjk
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
ngie [Mon, 29 Aug 2016 19:10:58 +0000 (19:10 +0000)]
Remove redundant declarations and simplify ../ in pathing
- TESTSBASE and LOCALBASE are already defined in bsd.tests.mk
- TESTSDIR is automatically divined as ${TESTSBASE}${RELDIR:H} after
r289158.
- Replace SRCDIR with SRCTOP
MFC after: 1 week
X-MFC with: r305019
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 29 Aug 2016 19:07:48 +0000 (19:07 +0000)]
Remove unnecessary variable (SRCDIR) replaced by SRCTOP in Makefile.common
MFC after: 1 week
X-MFC with: r305018
Sponsored by: EMC / Isilon Storage Division
ngie [Mon, 29 Aug 2016 19:06:40 +0000 (19:06 +0000)]
Use SRCTOP instead of a homegrown definition for it (SRCDIR)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
dim [Mon, 29 Aug 2016 18:55:06 +0000 (18:55 +0000)]
Fix the zfsd unittest:
* TESTSDIR is supposed to be under cddl/usr.sbin, not cddl/sbin
* DevdCtl::EventBuffer no longer exists, so remove its forward
declaration
MFC after: 3 days
X-MFC-With: r305013
kib [Mon, 29 Aug 2016 18:53:51 +0000 (18:53 +0000)]
Remove commented out mention of ptrace.S.
After r305012 the asm wrapper is not needed.
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
dim [Mon, 29 Aug 2016 18:51:49 +0000 (18:51 +0000)]
Add an empty virtual destructor to zfsd's Vdev class. This is needed
because the class has virtual functions, and the compiler-generated
default destructor is non-virtual.
Reviewed by: asomers
MFC after: 3 days
kib [Mon, 29 Aug 2016 18:47:51 +0000 (18:47 +0000)]
Rewrite ptrace(2) wrappers in C.
Besides removing hand-translation to assembler, this also adds missing
wrappers for arm64 and risc-v.
Reviewed by: emaste, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D7694
ngie [Mon, 29 Aug 2016 18:46:04 +0000 (18:46 +0000)]
Expect sub testcases 2-4 in :tests_time_rotate to fail today due to changes
to newsyslog, etc made in the past month.
The issue is being root-caused as part of the bug noted below. This commit
will need to be partially reverted once the issue has been found/fixed
PR: 212160
Reported by: Jenkins
Sponsored by: EMC / Isilon Storage Division
bde [Mon, 29 Aug 2016 18:41:06 +0000 (18:41 +0000)]
Add screen locking calls to sc cn grab and ungrab. The locking functions
just use the same mutex locking as sc cn putc so they have the same
defects.
The locking calls to acquire the lock are actually in sc cn open and close.
Ungrab has to unlock, although this opens a race window.
Change the direct mutex lock calls in sc cn putc to the new locking
functions via the open and close functions. Putc also has to unlock, but
doesn't keep the screen open like grab. Screen open and close reduce to
locking, except screen open for grab also attempts to switch the screen.
Keyboard locking is more difficult and still null, even when keyboard
input calls screen functions, except some of the functions have locks
too deep to work right.
This organization gives a single place to fix some of the locking.
bdrewery [Mon, 29 Aug 2016 18:31:34 +0000 (18:31 +0000)]
Allow parallelizing clean/cleandepend/depend with all.
This now makes 'make -jX clean all install' safe.
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division