]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoBump date. Missed in r289873.
Michael Tuexen [Sat, 24 Oct 2015 09:41:43 +0000 (09:41 +0000)]
Bump date. Missed in r289873.

MFC after: 1 week
X-MFC with: r289873

8 years agoAdd support to systat to display SCTP statistics.
Michael Tuexen [Sat, 24 Oct 2015 09:34:40 +0000 (09:34 +0000)]
Add support to systat to display SCTP statistics.

MFC after: 1 week

8 years agoReplace gcc reference with 'cc' and document the default ${CC}.
Bryan Drewery [Sat, 24 Oct 2015 05:16:30 +0000 (05:16 +0000)]
Replace gcc reference with 'cc' and document the default ${CC}.

MFC after: 1 week

8 years agoSort properly.
Bryan Drewery [Sat, 24 Oct 2015 05:00:20 +0000 (05:00 +0000)]
Sort properly.

MFC after: 1 week
X-MFC-With: r289870

8 years agoAdd bsd.crunchgen.mk to bsd.README.
Bryan Drewery [Sat, 24 Oct 2015 04:55:17 +0000 (04:55 +0000)]
Add bsd.crunchgen.mk to bsd.README.

MFC after: 1 week

8 years agoSlightly rework the comments and logic for default Clang/GCC.
Bryan Drewery [Sat, 24 Oct 2015 04:03:32 +0000 (04:03 +0000)]
Slightly rework the comments and logic for default Clang/GCC.

This is because the previous version was very obscure about the fact
that despite having Clang "on by default" for architectures such as powerpc, it
does not actually build due to the GCC it uses not having C++11 support.
Using an external compiler that supports C++11 does allow this to work.
This whole block should be rethought more given "on by default" is not
really default without extra work which could actually be surprising for
why Clang is showing up when using a newer GCC.

Sponsored by: EMC / Isilon Storage Division

8 years agoConfigs should not be under MK_INCLUDES control.
Bryan Drewery [Sat, 24 Oct 2015 04:03:29 +0000 (04:03 +0000)]
Configs should not be under MK_INCLUDES control.

'buildconfig' is connected to 'all', but 'installconfig' is only called
manually.  There is not much need to conditionalize this file right
now due to how it is hooked up and its impact on various build phases.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove an erroneous semicolon.
Mark Johnston [Sat, 24 Oct 2015 03:16:40 +0000 (03:16 +0000)]
Remove an erroneous semicolon.

MFC after: 3 days

8 years agoDWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count
Mark Johnston [Sat, 24 Oct 2015 03:14:36 +0000 (03:14 +0000)]
DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count
attribute rather than DW_AT_upper_bound. Teach ctfconvert about this so that
array type sizes are encoded correctly.

PR: 203772
MFC after: 1 week

8 years agoA few more whitespace, style, and comment cleanups. No functional changes.
Ian Lepore [Sat, 24 Oct 2015 03:01:47 +0000 (03:01 +0000)]
A few more whitespace, style, and comment cleanups.  No functional changes.

8 years agoBring in all the new(-ish) statistics code from armv6.
Ian Lepore [Sat, 24 Oct 2015 02:44:13 +0000 (02:44 +0000)]
Bring in all the new(-ish) statistics code from armv6.

8 years agoSince no room left in the _flags, reuse __SALC for O_APPEND.
Andrey A. Chernov [Sat, 24 Oct 2015 02:23:15 +0000 (02:23 +0000)]
Since no room left in the _flags, reuse __SALC for O_APPEND.
It helps to remove _fcntl() call from _ftello() and optimize seek position
calculation in _swrite().

MFC after:      3 weeks

8 years agoChange the preallocation of a busdma segment mapping array from per-tag to
Ian Lepore [Sat, 24 Oct 2015 02:18:14 +0000 (02:18 +0000)]
Change the preallocation of a busdma segment mapping array from per-tag to
per-map.  The per-tag scheme is not safe, and a mutex can't be used to
protect it because the mapping routines can't sleep.  Code brought in
from armv6 implementation.

8 years agonative-xtools: Replace common path with NXBDESTDIR.
Bryan Drewery [Sat, 24 Oct 2015 01:39:31 +0000 (01:39 +0000)]
native-xtools: Replace common path with NXBDESTDIR.

Also combine some mkdir calls.

Sponsored by: EMC / Isilon Storage Division

8 years agonative-xtools: Fix build with WITH_DEBUG_FILES.
Bryan Drewery [Fri, 23 Oct 2015 23:07:45 +0000 (23:07 +0000)]
native-xtools: Fix build with WITH_DEBUG_FILES.

Sponsored by: EMC / Isilon Storage Division

8 years agoInstead of all memory allocations using M_DEVBUF, use new categories
Ian Lepore [Fri, 23 Oct 2015 22:52:00 +0000 (22:52 +0000)]
Instead of all memory allocations using M_DEVBUF, use new categories
M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists),
and M_BOUNCE for bounce pages.

8 years agoInstead of all memory allocations using M_DEVBUF, use new categories
Ian Lepore [Fri, 23 Oct 2015 22:51:48 +0000 (22:51 +0000)]
Instead of all memory allocations using M_DEVBUF, use new categories
M_BUSDMA for allocations of metadata (tags, maps, segment tracking lists),
and M_BOUNCE for bounce pages.

8 years agoRework r289778 to always parallelize known targets, without ordering.
Bryan Drewery [Fri, 23 Oct 2015 21:30:27 +0000 (21:30 +0000)]
Rework r289778 to always parallelize known targets, without ordering.

- Rather than allow 'make clean*' to ignore dependencies, make a static
  list of targets in STANDALONE_SUBDIR_TARGETS that are known to be safe.
  This allows a user to override them if needed and avoids adding this feature
  to user-defined targets that are in ${SUBDIR_TARGETS}. [1]
- This now also allows to force SUBDIR_PARALLEL when calling these
  targets, since no dependencies are needed.

Reported by: ian [1]
Sponsored by: EMC / Isilon Storage Division
MFC after: 3 weeks
X-MFC-With: r289778

8 years agoMinor additions to Status Type 0 IOCB.
Alexander Motin [Fri, 23 Oct 2015 21:30:18 +0000 (21:30 +0000)]
Minor additions to Status Type 0 IOCB.

8 years agoCatch up to r232356: change the boundary constraint type to bus_addr_t.
Ian Lepore [Fri, 23 Oct 2015 21:29:37 +0000 (21:29 +0000)]
Catch up to r232356: change the boundary constraint type to bus_addr_t.
This code lived in the projects/armv6 branch when that change got applied
to all the other arches.

8 years agoAdd aarch64 files to the hwpmc(4) module build
Ed Maste [Fri, 23 Oct 2015 21:09:28 +0000 (21:09 +0000)]
Add aarch64 files to the hwpmc(4) module build

This was probably missed because FreeBSD/arm64 did not yet support
modules when aarch64 support was added to hwpmc(4).

Submitted by: andrew

8 years agoMissed addition for r289812.
Alexander Motin [Fri, 23 Oct 2015 21:01:46 +0000 (21:01 +0000)]
Missed addition for r289812.

8 years agoWhitespace and style nits, no functional changes.
Ian Lepore [Fri, 23 Oct 2015 20:49:34 +0000 (20:49 +0000)]
Whitespace and style nits, no functional changes.

The goal is to make these two files cosmetically alike so that the actual
implementation differences are visible.  The only changes which aren't
spaces<->tabs and rewrapping and reindenting lines are a couple fields
shuffled around in the tag and map structs so that everything is in the same
order in both versions (which should amount to no functional change).

8 years agoFix regression from r289734 that caused crunchgen "subdirs" to not be
Bryan Drewery [Fri, 23 Oct 2015 19:41:58 +0000 (19:41 +0000)]
Fix regression from r289734 that caused crunchgen "subdirs" to not be
properly recursed.

The .for loop was defining a ${__dir} variable that was being set at a
different evaluation time than the target itself, so every 'cd ${__dir}'
became the last value that was in ${__dir}.  This resulted in 'make obj'
not properly being ran in the tree that would leave .depend files
scattered around when 'make all' was ran in rescue/.

To fix this, define a CRUNCH_SRCDIR_* for every prog if it does not
already have one and then use that variable in every relevant place.
This allows simplifying some logic as well.

Reported by: emaste
X-MFC-With: r289734
MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFix various Coverity issues in sbin/savecore/savecore.c:
Alan Somers [Fri, 23 Oct 2015 19:28:24 +0000 (19:28 +0000)]
Fix various Coverity issues in sbin/savecore/savecore.c:

CID1009429: Fix unchecked return value from lseek while clearing dump
CID1007781: Fix file descriptor leak in DoFile
CID1007261: Don't send potentially unterminated string to syslog(3)

Coverity CID: 1009429
Coverity CID: 1007781
Coverity CID: 1007261
MFC after: 2 weeks
Sponsored by: Spectra Logic
Differential Revision: https://reviews.freebsd.org/D3991

8 years agoAdd partial support for QUERY TMF to CAM and isp(4).
Alexander Motin [Fri, 23 Oct 2015 18:34:18 +0000 (18:34 +0000)]
Add partial support for QUERY TMF to CAM and isp(4).

This change allows to decode respective functions in isp(4) in target mode
and pass them through CAM to CTL.  Unfortunately neither CAM nor isp(4)
support returning response info for those task management functions now.

On the other side I just have no initiator to test this functionality.

8 years agoMerge bmake 20151020
Simon J. Gerraty [Fri, 23 Oct 2015 17:38:01 +0000 (17:38 +0000)]
Merge bmake 20151020

8 years agorun(4): convert to ieee80211_tx_complete()
Andriy Voskoboinyk [Fri, 23 Oct 2015 17:35:03 +0000 (17:35 +0000)]
run(4): convert to ieee80211_tx_complete()

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

8 years agolldb: Add arm64 FreeBSD ProcessMonitor register context
Ed Maste [Fri, 23 Oct 2015 17:30:41 +0000 (17:30 +0000)]
lldb: Add arm64 FreeBSD ProcessMonitor register context

This is an adaptation of upstream LLDB commit r251088.

Sponsored by: The FreeBSD Foundation

8 years agodtc needs to be installed if MK_GPL_DTC is not set, which doesn't fit into the
Bryan Drewery [Fri, 23 Oct 2015 17:24:34 +0000 (17:24 +0000)]
dtc needs to be installed if MK_GPL_DTC is not set, which doesn't fit into the
SUBDIR.yes pattern well.

This fixes installation of the BSDL dtc after r288904.

Reported by: jhibbits
Discussed with: imp
Sponsored by: EMC / Isilon Storage Division

8 years agoImprove INOTs handling for 24xx and above chips.
Alexander Motin [Fri, 23 Oct 2015 16:54:24 +0000 (16:54 +0000)]
Improve INOTs handling for 24xx and above chips.

8 years agoresolver: abuse _res a little less
Eric van Gyzen [Fri, 23 Oct 2015 15:56:17 +0000 (15:56 +0000)]
resolver: abuse _res a little less

In the past, _res was a global variable.  Now, it's multiple function calls.
Several functions in the resolver use _res multiple times and therefore
call the function(s) far more than necessary.

Fix those callers to store the result of _res in a local variable.

Add __noinline to the definition of res_init() to avoid the code bloat
that these changes would have otherwise incurred.  Thanks to jilles
for noticing this.

Reviewed by: jilles
MFC after: 1 week
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D3887

8 years agoblkfront: add support for unmapped IO
Roger Pau Monné [Fri, 23 Oct 2015 15:46:42 +0000 (15:46 +0000)]
blkfront: add support for unmapped IO

Using unmapped IO is really beneficial when running inside of a VM,
since it avoids IPIs to other vCPUs in order to invalidate the
mappings.

This patch adds unmapped IO support to blkfront. The following tests
results have been obtained when running on a Xen host without HAP:

PVHVM
     3165.84 real      6354.17 user      4483.32 sys
PVHVM with unmapped IO
     2099.46 real      4624.52 user      2967.38 sys

This is because when running using shadow page tables TLB flushes and
range invalidations are much more expensive, so using unmapped IO
provides a very important performance boost.

Sponsored by: Citrix Systems R&D
MFC after: 2 weeks
X-MFC-with: r289834

8 years agosysctl(8): Fix style nits
Conrad Meyer [Fri, 23 Oct 2015 15:40:44 +0000 (15:40 +0000)]
sysctl(8): Fix style nits

Suggested by: bde
Sponsored by: EMC / Isilon Storage Division

8 years agox86/dma_bounce: rework _bus_dmamap_load_ma implementation
Roger Pau Monné [Fri, 23 Oct 2015 15:39:59 +0000 (15:39 +0000)]
x86/dma_bounce: rework _bus_dmamap_load_ma implementation

The implementation of bus_dmamap_load_ma_triv currently calls
_bus_dmamap_load_phys on each page that is part of the passed in buffer.
Since each page is treated as an individual buffer, the resulting behaviour
is different from the behaviour of _bus_dmamap_load_buffer. This breaks
certain drivers, like Xen blkfront.

If an unmapped buffer of size 4096 that starts at offset 13 into the first
page is passed to the current _bus_dmamap_load_ma implementation (so the ma
array contains two pages), the result is that two segments are created, one
with a size of 4083 and the other with size 13 (because two independant
calls to _bus_dmamap_load_phys are performed, one for each physical page).
If the same is done with a mapped buffer and calling _bus_dmamap_load_buffer
the result is that only one segment is created, with a size of 4096.

This patch relegates the usage of bus_dmamap_load_ma_triv in x86 bounce
buffer code to drivers requesting BUS_DMA_KEEP_PG_OFFSET and implements
_bus_dmamap_load_ma so that it's behaviour is the same as the mapped version
(_bus_dmamap_load_buffer). This patch only modifies the x86 bounce buffer
code, other arches are left untouched.

Reviewed by: kib, jah
Differential Revision: https://reviews.freebsd.org/D888
Sponsored by: Citrix Systems R&D

8 years agoarm64: remove exception instruction length assertion
Ed Maste [Fri, 23 Oct 2015 15:24:00 +0000 (15:24 +0000)]
arm64: remove exception instruction length assertion

From the (now removed) comment:

 * It is unclear in some cases if the bit is implementation defined.
 * The Foundation Model and QEMU disagree on if the IL bit should
 * be set when we are in a data fault from the same EL and the ISV
 * bit (bit 24) is also set.

Instead of adding even more special cases just remove the assertion.

Approved by: andrew
Sponsored by: The FreeBSD Foundation

8 years agosysctl(9): Document U8/U16 types from r289773
Conrad Meyer [Fri, 23 Oct 2015 15:08:16 +0000 (15:08 +0000)]
sysctl(9): Document U8/U16 types from r289773

Suggested by: ngie
Sponsored by: EMC / Isilon Storage Division

8 years agoBuild fix for non-i386 and non-amd64 platforms.
Hans Petter Selasky [Fri, 23 Oct 2015 14:52:05 +0000 (14:52 +0000)]
Build fix for non-i386 and non-amd64 platforms.

Sponsored by: Mellanox Technologies

8 years agoMove dtrace/opensolaris/zfs module option to common section
Ed Maste [Fri, 23 Oct 2015 12:59:54 +0000 (12:59 +0000)]
Move dtrace/opensolaris/zfs module option to common section

These are not target-specific modules, so the logic to build them should
be common.  This also enables them for arm64.

Sponsored by: The FreeBSD Foundation

8 years agoFix capitalization
Jason A. Harmening [Fri, 23 Oct 2015 12:06:06 +0000 (12:06 +0000)]
Fix capitalization

8 years agoRemove unclear comment about address truncation in busdma. Add (hopefully much clear...
Jason A. Harmening [Fri, 23 Oct 2015 12:03:25 +0000 (12:03 +0000)]
Remove unclear comment about address truncation in busdma.  Add (hopefully much clearer) comment at declaration of PHYS_TO_VM_PAGE().

Noted by: avg

8 years agoAdd CLFLUSHOPT instruction wrappers.
Konstantin Belousov [Fri, 23 Oct 2015 11:45:38 +0000 (11:45 +0000)]
Add CLFLUSHOPT instruction wrappers.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoDecode new values for CPUID leaf 2 cache and TLB descriptors, from the
Konstantin Belousov [Fri, 23 Oct 2015 11:43:56 +0000 (11:43 +0000)]
Decode new values for CPUID leaf 2 cache and TLB descriptors, from the
Intel SDM revision 56.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoFix build for the KTR-enabled kernels.
Konstantin Belousov [Fri, 23 Oct 2015 11:41:55 +0000 (11:41 +0000)]
Fix build for the KTR-enabled kernels.

Sponsored by: The FreeBSD Foundation

8 years agoFix kernel build by restoring a temporary variable which was not yet
Hans Petter Selasky [Fri, 23 Oct 2015 11:00:35 +0000 (11:00 +0000)]
Fix kernel build by restoring a temporary variable which was not yet
ripe for removal.

8 years agoFix LUN disable in CAM broken at r285155.
Alexander Motin [Fri, 23 Oct 2015 10:39:43 +0000 (10:39 +0000)]
Fix LUN disable in CAM broken at r285155.

MFC after: 1 week

8 years agoDisable full bus scan by CAM for FC adapters.
Alexander Motin [Fri, 23 Oct 2015 08:53:32 +0000 (08:53 +0000)]
Disable full bus scan by CAM for FC adapters.

FC port database code already notifies CAM about all devices.  Additional
full scan is just a waste of time, that by definition won't find anything
that is not present in port database.

8 years agourtwn(4): add DBM_ANTNOISE radiotap field
Andriy Voskoboinyk [Fri, 23 Oct 2015 08:44:40 +0000 (08:44 +0000)]
urtwn(4): add DBM_ANTNOISE radiotap field

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

8 years agoSome polishing and unification in ISR code.
Alexander Motin [Fri, 23 Oct 2015 08:26:45 +0000 (08:26 +0000)]
Some polishing and unification in ISR code.

8 years ago- Split one 4-byte R92C_CR register into 2-byte R92C_CR and 1-byte R92C_MSR
Andriy Voskoboinyk [Fri, 23 Oct 2015 08:26:26 +0000 (08:26 +0000)]
- Split one 4-byte R92C_CR register into 2-byte R92C_CR and 1-byte R92C_MSR
registers (they are used for different purposes).
- Wrap R92C_MSR modifications into urtwn_set_mode().

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

8 years agourtwn(4): fix the RSSI calculation for RTL8188EU.
Andriy Voskoboinyk [Fri, 23 Oct 2015 07:42:56 +0000 (07:42 +0000)]
urtwn(4): fix the RSSI calculation for RTL8188EU.

This change also reverts r252405 (causes integer underflow).

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

8 years agodpv(1) merged to stable/10 before release/10.2.0
Devin Teske [Fri, 23 Oct 2015 07:38:34 +0000 (07:38 +0000)]
dpv(1) merged to stable/10 before release/10.2.0

MFC after: 3 days
X-MFC-to: stable/10

8 years agofigpar(3) merged to stable/10 before release/10.2.0
Devin Teske [Fri, 23 Oct 2015 07:37:27 +0000 (07:37 +0000)]
figpar(3) merged to stable/10 before release/10.2.0

MFC after: 3 days
X-MFC-to: stable/10

8 years agoBump date/copyright after correcting HISTORY
Devin Teske [Fri, 23 Oct 2015 07:36:27 +0000 (07:36 +0000)]
Bump date/copyright after correcting HISTORY

MFC after: 3 days
X-MFC-to: stable/10
X-MFC-with: r289790

8 years agodpv(3) merged to stable/10 before release/10.2.0
Devin Teske [Fri, 23 Oct 2015 07:34:57 +0000 (07:34 +0000)]
dpv(3) merged to stable/10 before release/10.2.0

MFC after: 3 days
X-MFC-to: stable/10

8 years agoA miss from r289764.
Gleb Smirnoff [Fri, 23 Oct 2015 05:03:34 +0000 (05:03 +0000)]
A miss from r289764.

8 years agootus(4) - add missing ieee80211_free_node() call.
Adrian Chadd [Fri, 23 Oct 2015 02:09:23 +0000 (02:09 +0000)]
otus(4) - add missing ieee80211_free_node() call.

8 years agootus(4) - demagicify register names.
Adrian Chadd [Fri, 23 Oct 2015 02:08:47 +0000 (02:08 +0000)]
otus(4) - demagicify register names.

Obtained from: Linux carl9170 hw.h

8 years agootus(4): begin supporting raw transmit parameters in otus_tx()
Adrian Chadd [Fri, 23 Oct 2015 00:48:00 +0000 (00:48 +0000)]
otus(4): begin supporting raw transmit parameters in otus_tx()

* Add a comment about the parameters I should support, stolen shamelessly
  from iwn(4);
* Implement the rate bit for the raw transmit path;
* Print out the host-order versions of each of the transmit bits, so
  I have a hope in heck of debugging why things are going wrong.

This still doesn't fix 5GHz in the office but that's likely due to a lot
of other configuration parameters being 2GHz-specific.  That'll come next.

Tested:

* AR9170 + AR9103 (2/5GHz) 2x2, 5GHz association

8 years agoFor SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there is no need to
Bryan Drewery [Thu, 22 Oct 2015 23:41:56 +0000 (23:41 +0000)]
For SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there is no need to
respect SUBDIR_DEPEND_* or .WAIT.

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoioat_test: Add a colon (':') for style
Conrad Meyer [Thu, 22 Oct 2015 23:08:08 +0000 (23:08 +0000)]
ioat_test: Add a colon (':') for style

Missed in r289776.

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Clean up logging
Conrad Meyer [Thu, 22 Oct 2015 23:03:33 +0000 (23:03 +0000)]
ioat: Clean up logging

Replace custom Linux-like logging with a thin shim around
device_printf(), when the softc is available.

In ioat_test, shim around printf(9) instead.

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Use ffsll() now that it is broadly available
Conrad Meyer [Thu, 22 Oct 2015 23:03:24 +0000 (23:03 +0000)]
if_ntb: Use ffsll() now that it is broadly available

Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Add device introspection sysctl hierarchy
Conrad Meyer [Thu, 22 Oct 2015 23:03:15 +0000 (23:03 +0000)]
NTB: Add device introspection sysctl hierarchy

This should export all of the same information as the Linux ntb_hw_intel
debugfs info file, but with a bit more structure, in the sysctl tree
rooted at 'dev.ntb_hw.<N>.debug_info'.

Raw registers are marked as OPAQUE because reading them on some hardware
revisions may cause a hard lockup (NTB errata).  They can be read with
'sysctl -x dev.ntb_hw.<N>.debug_info.registers'.  On Xeon platforms,
some additional registers are available under 'registers.xeon_stats' and
'registers.xeon_hw_err'.  They are exported as big-endian values so that
the 'sysctl -x' output is legible.

Shrink the feature mask to 32 bits so we can use the %b formatter in
'debug_info.features'.

Sponsored by: EMC / Isilon Storage Division

8 years agoSysctl: Add common support for U8, U16 types
Conrad Meyer [Thu, 22 Oct 2015 23:03:06 +0000 (23:03 +0000)]
Sysctl: Add common support for U8, U16 types

Sponsored by: EMC / Isilon Storage Division

8 years agoFix installation of manpages with WITHOUT_COMPRESS broken since r284685.
Bryan Drewery [Thu, 22 Oct 2015 22:29:25 +0000 (22:29 +0000)]
Fix installation of manpages with WITHOUT_COMPRESS broken since r284685.

This partially reverts r284685.  An attempt was made in r285295 to fix this
but was not enough.  There were still $${} vars in the code that should have
been using the ${_page} and ${_sect} vars, but the bigger problem was that
.for cannot be used on .ALLSRC as it is not defined when the .for is evaluated.

Using ${MAN} here in a .for loop doesn't work either as the paths are not
expanded right for lib/libc/ subdirs despite having a .PATH set for all
of them.

Add some comments around long .else and .endif as well.

Sponsored by: EMC / Isilon Storage Division

8 years agoRegen for linux32 rename and linux64 systrace.
John Baldwin [Thu, 22 Oct 2015 21:33:37 +0000 (21:33 +0000)]
Regen for linux32 rename and linux64 systrace.

8 years agoMissing regen after last change to sys/kern/syscalls.master.
John Baldwin [Thu, 22 Oct 2015 21:30:39 +0000 (21:30 +0000)]
Missing regen after last change to sys/kern/syscalls.master.

8 years agoRename remaining linux32 symbols such as linux_sysent[] and
John Baldwin [Thu, 22 Oct 2015 21:28:20 +0000 (21:28 +0000)]
Rename remaining linux32 symbols such as linux_sysent[] and
linux_syscallnames[] from linux_* to linux32_* to avoid conflicts with
linux64.ko.  While here, add support for linux64 binaries to systrace.
- Update NOPROTO entries in amd64/linux/syscalls.master to match the
  main table to fix systrace build.
- Add a special case for union l_semun arguments to the systrace
  generation.
- The systrace_linux32 module now only builds the systrace_linux32.ko.
  module on amd64.
- Add a new systrace_linux module that builds on both i386 and amd64.
  For i386 it builds the existing systrace_linux.ko.  For amd64 it
  builds a systrace_linux.ko for 64-bit binaries.

Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D3954

8 years agoMerge r289055 to amd64/linux32:
John Baldwin [Thu, 22 Oct 2015 21:23:58 +0000 (21:23 +0000)]
Merge r289055 to amd64/linux32:

linux: fix handling of out-of-bounds syscall attempts

Due to an off by one the code would read an entry past the table, as
opposed to the last entry which contains the nosys handler.

8 years agoStop suggesting -grope argument when -grope argument was actually given
Baptiste Daroussin [Thu, 22 Oct 2015 21:13:35 +0000 (21:13 +0000)]
Stop suggesting -grope argument when -grope argument was actually given

8 years agolibkern: ffs, fls: s/4/3/ the 3rd BSD clause
Conrad Meyer [Thu, 22 Oct 2015 21:04:47 +0000 (21:04 +0000)]
libkern: ffs, fls: s/4/3/ the 3rd BSD clause

Approved by: emaste
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd libkern ffsll() for parity with flsll()
Conrad Meyer [Thu, 22 Oct 2015 20:28:37 +0000 (20:28 +0000)]
Add libkern ffsll() for parity with flsll()

Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3962

8 years agoMFV ntp-4.2.8p4 (r289715)
Gleb Smirnoff [Thu, 22 Oct 2015 19:42:57 +0000 (19:42 +0000)]
MFV ntp-4.2.8p4 (r289715)

Security:       VuXML: c4a18a12-77fc-11e5-a687-206a8a720317
Security: CVE-2015-7871
Security: CVE-2015-7855
Security: CVE-2015-7854
Security: CVE-2015-7853
Security: CVE-2015-7852
Security: CVE-2015-7851
Security: CVE-2015-7850
Security: CVE-2015-7849
Security: CVE-2015-7848
Security: CVE-2015-7701
Security: CVE-2015-7703
Security: CVE-2015-7704, CVE-2015-7705
Security: CVE-2015-7691, CVE-2015-7692, CVE-2015-7702
Security: http://support.ntp.org/bin/view/Main/SecurityNotice#October_2015_NTP_Security_Vulner
Sponsored by: Nginx, Inc.

8 years agoFix warning about redefined *_crunchdir_hostname target after r289734.
Bryan Drewery [Thu, 22 Oct 2015 18:05:11 +0000 (18:05 +0000)]
Fix warning about redefined *_crunchdir_hostname target after r289734.

'hostname' was in the build list twice.

X-MFC-With: r289734
MFC after: 2 weeks
Reported by: sbruno
Sponsored by: EMC / Isilon Storage Division

8 years agoUnbreak regression testing tools for net80211 crypto cipher modules
Andriy Voskoboinyk [Thu, 22 Oct 2015 17:08:12 +0000 (17:08 +0000)]
Unbreak regression testing tools for net80211 crypto cipher modules

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

8 years agogetenv.9: Document behavior of freeenv(NULL)
Conrad Meyer [Thu, 22 Oct 2015 16:46:30 +0000 (16:46 +0000)]
getenv.9: Document behavior of freeenv(NULL)

Fix a couple igor(1)-indicated spelling issues while here.

Suggested by: jhb
Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Fix some attach/detach issues
Conrad Meyer [Thu, 22 Oct 2015 16:46:21 +0000 (16:46 +0000)]
ioat: Fix some attach/detach issues

Don't run the selftest until after we've enabled bus mastering, or the
DMA engine can't copy anything for our test.

Create the ioat_test device on attach, if so tuned.  Destroy the
ioat_test device on teardown.

Replace deprecated 'CALLOUT_MPSAFE' with correct '1' in callout_init().

Sponsored by: EMC / Isilon Storage Division

8 years agoUse pmap_quick* functions in armv6 busdma, for bounce buffers and cache maintenance...
Jason A. Harmening [Thu, 22 Oct 2015 16:38:01 +0000 (16:38 +0000)]
Use pmap_quick* functions in armv6 busdma, for bounce buffers and cache maintenance.  This makes it safe to sync buffers that have no VA mapping associated with the busdma map, but may have other mappings, possibly on different CPUs.  This also makes it safe to sync unmapped bounce buffers in non-sleepable thread contexts.

Similar to r286787 for x86, this treats userspace buffers the same as unmapped buffers and no longer borrows the UVA for sync operations.

Submitted by:  Svatopluk Kraus <onwahe@gmail.com> (earlier revision)
Tested by: Svatopluk Kraus
Differential Revision: https://reviews.freebsd.org/D3869

8 years agourtwn(4): replace hardcoded rate indices with their names
Andriy Voskoboinyk [Thu, 22 Oct 2015 15:42:53 +0000 (15:42 +0000)]
urtwn(4): replace hardcoded rate indices with their names

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

8 years agowtap: remove some obsolete radiotap(9) code
Andriy Voskoboinyk [Thu, 22 Oct 2015 15:20:33 +0000 (15:20 +0000)]
wtap: remove some obsolete radiotap(9) code

This code is not needed since r192468.

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

8 years agoCommit the right board file - use the right name + hints.
Adrian Chadd [Thu, 22 Oct 2015 15:15:45 +0000 (15:15 +0000)]
Commit the right board file - use the right name + hints.

8 years agoRemove residual verbosity.
Alexander Motin [Thu, 22 Oct 2015 15:13:47 +0000 (15:13 +0000)]
Remove residual verbosity.

firmware_register() already reports errors.

8 years agoInitialize radiotap header fields before calling ieee80211_radiotap_rx()
Andriy Voskoboinyk [Thu, 22 Oct 2015 12:15:40 +0000 (12:15 +0000)]
Initialize radiotap header fields before calling ieee80211_radiotap_rx()

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

8 years agoAdd support for CloudABI on ARM64.
Ed Schouten [Thu, 22 Oct 2015 11:09:25 +0000 (11:09 +0000)]
Add support for CloudABI on ARM64.

It turns out that it is pretty easy to make CloudABI work on ARM64. We
essentially only need to copy over the sysvec from AMD64 and ensure that
we use ARM64 specific registers.

As there is an overlap between function argument and return registers,
we do need to extend cloudabi64_schedtail() to only set its values if
we're actually forking. Not when we're creating a new thread.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D3917

8 years ago-C and -c allow at most one input file. Ensure this is the case when the
Gabor Kovesdan [Thu, 22 Oct 2015 10:57:15 +0000 (10:57 +0000)]
-C and -c allow at most one input file. Ensure this is the case when the
input files are specified through --files0-from.

Submitted by: tim@OpenBSD
Obtained from: OpenBSD
MFC after: 1 week

8 years ago- Fix a bug which prevented dnssl[0-9] and rdnss[0-9] parameters from
Hiroki Sato [Thu, 22 Oct 2015 09:55:40 +0000 (09:55 +0000)]
- Fix a bug which prevented dnssl[0-9] and rdnss[0-9] parameters from
  working.

- Fix a pointer calculation for padding when multiple dnssl[0-9]
  parameters are specified [*].

Reported by: http://bugs.dragonflybsd.org/issues/2847 [*]

8 years agoRename linuxapi[.ko] into linuxkpi[.ko], to reflect that it is a
Hans Petter Selasky [Thu, 22 Oct 2015 09:50:45 +0000 (09:50 +0000)]
Rename linuxapi[.ko] into linuxkpi[.ko], to reflect that it is a
kernel programming interface module, KPI, to avoid confusion with the
existing Linux userspace binary compatibility shims. Bump the
FreeBSD_version number.

Reviewed by: np @
Suggested by: dumbbell @
Sponsored by: Mellanox Technologies

8 years agoAdd a way to distinguish between forking and thread creation in schedtail.
Ed Schouten [Thu, 22 Oct 2015 09:33:34 +0000 (09:33 +0000)]
Add a way to distinguish between forking and thread creation in schedtail.

For CloudABI we need to initialize the registers of new threads
differently based on whether the thread got created through a fork or
through simple thread creation.

Add a flag, TDP_FORKING, that is set by do_fork() and cleared by
fork_exit(). This can be tested against in schedtail.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D3973

8 years agoRefactoring: move out generic bits from cloudabi64_sysvec.c.
Ed Schouten [Thu, 22 Oct 2015 09:07:53 +0000 (09:07 +0000)]
Refactoring: move out generic bits from cloudabi64_sysvec.c.

In order to make it easier to support CloudABI on ARM64, move out all of
the bits from the AMD64 cloudabi_sysvec.c into a new file
cloudabi_module.c that would otherwise remain identical. This reduces
the AMD64 specific code to just ~160 lines.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D3974

8 years agoExit with a user-friendly message instead of tripping an assert
Enji Cooper [Thu, 22 Oct 2015 08:37:11 +0000 (08:37 +0000)]
Exit with a user-friendly message instead of tripping an assert
if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..)

MFC after: 1 week
PR: 203884
Reviewed by: grehan
Submitted by: William Orr <will@worrbase.com>

8 years agoAdd support for the TP-Link TL-WR740N v4.
Adrian Chadd [Thu, 22 Oct 2015 08:08:06 +0000 (08:08 +0000)]
Add support for the TP-Link TL-WR740N v4.

This is an AR9331 part based on the AP121 reference design but with
32MB RAM.  Yes, it has 4MB flash and it has no USB, so clever hacks
are required to get it up and working.

But boot/work it does.

8 years agoarge: use 1-byte TX and RX alignment for AR9330/AR9331.
Adrian Chadd [Thu, 22 Oct 2015 08:02:27 +0000 (08:02 +0000)]
arge: use 1-byte TX and RX alignment for AR9330/AR9331.

This part seems to work bug-free with single byte TX/RX buffer alignment.

This drops the CPU requirement to bridge 100mbit iperf from 100% CPU
to ~ 50% CPU.

Tested:

* AP121 (AR9330) SoC, highly magic netbooted kernel + USB rootfs
  due to 4mb flash, 16mb RAM; doing bridging between arge0 and arge1.

Notes:

* Yes, I likely can also turn this on for the AR934x SoC family now.

  But since hardware design apparently follows similar branching
  strategies to software design, I'll go and make sure all the AR934x's
  that made it out into shipping products work before I flip it on.

8 years agoRevise "create_test_inputs" to simplify the file structure as
Enji Cooper [Thu, 22 Oct 2015 07:22:05 +0000 (07:22 +0000)]
Revise "create_test_inputs" to simplify the file structure as
these testcases don't need to be nested as much as bin/ls/ls_tests.sh
do when verifying ls -a, ls -A, etc. This allows the tests to make
all paths relative to the top of the temporary directory instead of
always tacking on $ATF_TMPDIR, thus complicating things unnecessarily

Create non-empty files in create_test_inputs as well now, similar to
create_test_inputs2 in bin/ls/ls_tests.sh

Compare the input files to the output file contents using diff where
possible:
- Skip over the fifo comparison for now because it always fails
- Skip over the symlink comparison on cd9660 because it always fails
  today

Sponsored by: EMC / Isilon Storage Division
MFC after: 2 weeks
X-MFC with: r289739

8 years agoCorrectly reintroduce the rudimentary smoke tests I botched up
Enji Cooper [Thu, 22 Oct 2015 05:32:45 +0000 (05:32 +0000)]
Correctly reintroduce the rudimentary smoke tests I botched up
in r289684

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoParallelize build-tools.
Bryan Drewery [Thu, 22 Oct 2015 05:01:14 +0000 (05:01 +0000)]
Parallelize build-tools.

MFC after: 3 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoFix incorrect defined() usage from style clean up in r289735.
Bryan Drewery [Thu, 22 Oct 2015 04:52:37 +0000 (04:52 +0000)]
Fix incorrect defined() usage from style clean up in r289735.

Submitted by: ngie
MFC after: 2 weeks
X-MFC-With: r289735
Sponsored by: EMC / Isilon Storage Division

8 years agoDocument that we use {} for variable expansion.
Bryan Drewery [Thu, 22 Oct 2015 04:50:52 +0000 (04:50 +0000)]
Document that we use {} for variable expansion.

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

8 years agoFix style. Namely use {} rather than ().
Bryan Drewery [Thu, 22 Oct 2015 04:47:52 +0000 (04:47 +0000)]
Fix style.  Namely use {} rather than ().

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoRewrite crunchgen target handling for progs so that it can be parallelized.
Bryan Drewery [Thu, 22 Oct 2015 04:42:17 +0000 (04:42 +0000)]
Rewrite crunchgen target handling for progs so that it can be parallelized.

This covers 'clean', 'cleandepend', 'cleandir', 'obj', 'objlink' and
'build-tools'.

This uses the same method as bsd.subdir.mk.

MFC after: 2 weeks
X-MFC-With: r289731
Sponsored by: EMC / Isilon Storage Division