]> xenbits.xensource.com Git - people/liuw/freebsd.git/log
people/liuw/freebsd.git
9 years agoFix various Coverity issues in sbin/savecore/savecore.c:
asomers [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

9 years agoAdd partial support for QUERY TMF to CAM and isp(4).
mav [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.

9 years agoMerge bmake 20151020
sjg [Fri, 23 Oct 2015 17:38:01 +0000 (17:38 +0000)]
Merge bmake 20151020

9 years agorun(4): convert to ieee80211_tx_complete()
avos [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

9 years agolldb: Add arm64 FreeBSD ProcessMonitor register context
emaste [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

9 years agodtc needs to be installed if MK_GPL_DTC is not set, which doesn't fit into the
bdrewery [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

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

9 years agoresolver: abuse _res a little less
vangyzen [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

9 years agoblkfront: add support for unmapped IO
royger [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

9 years agosysctl(8): Fix style nits
cem [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

9 years agox86/dma_bounce: rework _bus_dmamap_load_ma implementation
royger [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

9 years agoarm64: remove exception instruction length assertion
emaste [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

9 years agosysctl(9): Document U8/U16 types from r289773
cem [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

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

Sponsored by: Mellanox Technologies

9 years agoMove dtrace/opensolaris/zfs module option to common section
emaste [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

9 years agoFix capitalization
jah [Fri, 23 Oct 2015 12:06:06 +0000 (12:06 +0000)]
Fix capitalization

9 years agoRemove unclear comment about address truncation in busdma. Add (hopefully much clear...
jah [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

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

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoDecode new values for CPUID leaf 2 cache and TLB descriptors, from the
kib [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

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

Sponsored by: The FreeBSD Foundation

9 years agoFix kernel build by restoring a temporary variable which was not yet
hselasky [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.

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

MFC after: 1 week

9 years agoDisable full bus scan by CAM for FC adapters.
mav [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.

9 years agourtwn(4): add DBM_ANTNOISE radiotap field
avos [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

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

9 years ago- Split one 4-byte R92C_CR register into 2-byte R92C_CR and 1-byte R92C_MSR
avos [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

9 years agourtwn(4): fix the RSSI calculation for RTL8188EU.
avos [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

9 years agodpv(1) merged to stable/10 before release/10.2.0
dteske [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

9 years agofigpar(3) merged to stable/10 before release/10.2.0
dteske [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

9 years agoBump date/copyright after correcting HISTORY
dteske [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

9 years agodpv(3) merged to stable/10 before release/10.2.0
dteske [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

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

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

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

Obtained from: Linux carl9170 hw.h

9 years agootus(4): begin supporting raw transmit parameters in otus_tx()
adrian [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

9 years agoFor SUBDIR_PARALLEL, when doing 'make clean*' or 'make obj' there is no need to
bdrewery [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

9 years agoioat_test: Add a colon (':') for style
cem [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

9 years agoioat: Clean up logging
cem [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

9 years agoif_ntb: Use ffsll() now that it is broadly available
cem [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

9 years agoNTB: Add device introspection sysctl hierarchy
cem [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

9 years agoSysctl: Add common support for U8, U16 types
cem [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

9 years agoFix installation of manpages with WITHOUT_COMPRESS broken since r284685.
bdrewery [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

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

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

9 years agoRename remaining linux32 symbols such as linux_sysent[] and
jhb [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

9 years agoMerge r289055 to amd64/linux32:
jhb [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.

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

9 years agolibkern: ffs, fls: s/4/3/ the 3rd BSD clause
cem [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

9 years agoAdd libkern ffsll() for parity with flsll()
cem [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

9 years agoMFV ntp-4.2.8p4 (r289715)
glebius [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.

9 years agoFix warning about redefined *_crunchdir_hostname target after r289734.
bdrewery [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

9 years agoUnbreak regression testing tools for net80211 crypto cipher modules
avos [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

9 years agogetenv.9: Document behavior of freeenv(NULL)
cem [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

9 years agoioat: Fix some attach/detach issues
cem [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

9 years agoUse pmap_quick* functions in armv6 busdma, for bounce buffers and cache maintenance...
jah [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

9 years agourtwn(4): replace hardcoded rate indices with their names
avos [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

9 years agowtap: remove some obsolete radiotap(9) code
avos [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

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

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

firmware_register() already reports errors.

9 years agoInitialize radiotap header fields before calling ieee80211_radiotap_rx()
avos [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

9 years agoAdd support for CloudABI on ARM64.
ed [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

9 years ago-C and -c allow at most one input file. Ensure this is the case when the
gabor [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

9 years ago- Fix a bug which prevented dnssl[0-9] and rdnss[0-9] parameters from
hrs [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 [*]

9 years agoRename linuxapi[.ko] into linuxkpi[.ko], to reflect that it is a
hselasky [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

9 years agoAdd a way to distinguish between forking and thread creation in schedtail.
ed [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

9 years agoRefactoring: move out generic bits from cloudabi64_sysvec.c.
ed [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

9 years agoExit with a user-friendly message instead of tripping an assert
ngie [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>

9 years agoAdd support for the TP-Link TL-WR740N v4.
adrian [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.

9 years agoarge: use 1-byte TX and RX alignment for AR9330/AR9331.
adrian [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.

9 years agoRevise "create_test_inputs" to simplify the file structure as
ngie [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

9 years agoCorrectly reintroduce the rudimentary smoke tests I botched up
ngie [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

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

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

9 years agoFix incorrect defined() usage from style clean up in r289735.
bdrewery [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

9 years agoDocument that we use {} for variable expansion.
bdrewery [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

9 years agoFix style. Namely use {} rather than ().
bdrewery [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

9 years agoRewrite crunchgen target handling for progs so that it can be parallelized.
bdrewery [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

9 years agoImprove flexibility of ioat_test / ioatcontrol(8)
cem [Thu, 22 Oct 2015 04:38:05 +0000 (04:38 +0000)]
Improve flexibility of ioat_test / ioatcontrol(8)

The test logic now preallocates memory before running the test.

The buffer size is now configurable.  Post-copy verification is
configurable.  The number of copies to chain into one transaction (one
interrupt) is configurable.

A 'duration' mode is added, which repeats the test until the duration
has elapsed, reporting the B/s and transactions completed.

ioatcontrol.8 has been updated to document the new arguments.

Initial limits (on this particular Broadwell-DE) (and when the
interrupts are working) seem to be: 256 interrupts/sec or ~6 GB/s,
whichever limit is more restrictive.

Unfortunately, it seems the interrupt-reset handling on Broadwell isn't
working as intended.  That will be fixed in a later commit.

Sponsored by: EMC / Isilon Storage Division

9 years agoioat: Define IOAT_XFERCAP_VALID_MASK and use in ioat_read_xfercap
cem [Thu, 22 Oct 2015 04:33:05 +0000 (04:33 +0000)]
ioat: Define IOAT_XFERCAP_VALID_MASK and use in ioat_read_xfercap

Instead of ANDing a magic constant later.

Sponsored by: EMC / Isilon Storage Division

9 years agoClean up some bsd.crunchgen.mk issues.
bdrewery [Thu, 22 Oct 2015 04:28:22 +0000 (04:28 +0000)]
Clean up some bsd.crunchgen.mk issues.

- Remove handling of 'make -P' since that is for fmake only.
- Add '+' where appropriate for sub-make calls.
- Pass MK_TESTS=no to all of the sub-makes to prevent recursing into test
  directories for targets such as 'obj', 'clean', 'depend', etc.

Sponsored by: EMC / Isilon Storage Division

9 years agoRemove more disconnected libgpib items missed in r276214.
bdrewery [Thu, 22 Oct 2015 03:51:25 +0000 (03:51 +0000)]
Remove more disconnected libgpib items missed in r276214.

Sponsored by: EMC / Isilon Storage Division

9 years agoFix IEEE80211_ADDR_COPY() usage.
kevlo [Thu, 22 Oct 2015 01:36:16 +0000 (01:36 +0000)]
Fix IEEE80211_ADDR_COPY() usage.

Reviewed by: adrian

9 years agoWarn that NOCLEAN is deprecated - use NO_CLEAN instead
emaste [Thu, 22 Oct 2015 01:32:11 +0000 (01:32 +0000)]
Warn that NOCLEAN is deprecated - use NO_CLEAN instead

NO_CLEAN has been the correct spelling for over a decade.

9 years agoAdd FDT compatibility to the icee driver.
ian [Thu, 22 Oct 2015 01:04:31 +0000 (01:04 +0000)]
Add FDT compatibility to the icee driver.

The FDT bindings for eeprom parts don't include any metadata about the
device other than the part name encoded in the compatible property.
Instead, a driver is required to have a compiled-in table of information
about the various parts (page size, device capacity, addressing scheme).  So
much for FDT being an abstract description of hardware characteristics, huh?

In addition to the FDT-specific changes, this also switches to using the
newer iicbus_transfer_excl() mechanism which holds bus ownership for the
duration of the transfer.  Previously this code held the bus across all
the transfers needed to complete the user's IO request, which could be
up to 128KB of data which might occupy the bus for 10-20 seconds.  Now the
bus will be released and re-aquired between every page-sized (8-256 byte)
transfer, making this driver a much nicer citizen on the i2c bus.

The hint-based configuration mechanism is still in place for non-FDT systems.

Michal Meloun contributed some of the code for these changes.

9 years agoAdd iicbus_transfer_excl(), a helper routine to do an i2c bus transaction
ian [Thu, 22 Oct 2015 00:54:59 +0000 (00:54 +0000)]
Add iicbus_transfer_excl(), a helper routine to do an i2c bus transaction
while holding exclusive ownership of the bus.  This is the routine most
slave drivers should use unless they have a need to acquire and hold the
bus across a series of related operations that involves multiple transfers.

9 years agoLet SUBDIR_OVERRIDE with 'make buildworld' be more useful.
bdrewery [Thu, 22 Oct 2015 00:07:48 +0000 (00:07 +0000)]
Let SUBDIR_OVERRIDE with 'make buildworld' be more useful.

Now it can be used to effectively "build in a subdir".  It will use the
'cross-tools', 'libraries', and 'includes' phases of 'buildworld' to properly
setup a WORLDTMP to use.  Then it will build 'everything' only in the
listed SUBDIR_OVERRIDE directories.  It is still required to list custom
library directories in LOCAL_LIB_DIRS if SUBDIR_OVERRIDE is something
that contains libraries outside of the normal area (such as
SUBDIR_OVERRIDE=contrib/ofed needing LOCAL_LIB_DIRS=contrib/ofed/usr.lib)

Without these changes, SUBDIR_OVERRIDE with buildworld was broken or hit
obscure failures due to missing libraries, includes, or cross compiler.

SUBDIR_OVERRIDE with 'make <target that is not buildworld>' will continue to
work as it did before although its usefulness is questionable.

With a fully populated WORLDTMP, building with a SUBDIR_OVERRIDE with
-DNO_CLEAN only takes a few minutes to start building the target
directories.  This is still much better than building unneeded things via
'everything' when testing small subset changes.  A BUILDFAST or
SKIPWORLDTMP might make sense for this as well.

- Add in '_worldtmp' as we still need to create WORLDTMP as later targets,
  such as '_libraries' and '_includes' use it.  This probably was avoiding
  calling '_worldtmp' to not remove WORLDTMP for debugging purposes, but
  -DNO_CLEAN can be used for that.

- '_legacy' must be included since '_build-tools' uses -legacy.
  The SUBDIR_OVERRIDE change came in r95509, while -legacy being part
  of build-tools came in r113136.

- 'bootstrap-tools' is still skipped as this feature is not for
   upgrades.

- Fix buildworld combined with SUBDIR_OVERRIDE not installing all includes.

  The original change for SUBDIR_OVERRIDE in r95509 kept '_includes'
  and '_libraries' as building everything possible as the SUBDIR_OVERRIDE
  could need anything from them.  However in r96462 the real 'includes'
  target was changed from manual sub-makes to just recursing 'includes'
  on SUBDIR, thus not all includes have been installed into WORLDTMP since then
  when combined with 'buildworld'.

  This is not done unless calling 'make buildworld' as it would be
  unexpected to have it go into all directories when doing 'make
  SUBDIR_OVERRIDE=mydir includes'.

- Also need to build the cross-compiler so it is used with --sysroot.
  If this is burdensome then telling the build to use the local compiler
  as an external compiler (thus using a proper --sysroot to WORLDTMP) is
  possible by setting CC=/usr/bin/cc, CXX=/usr/bin/c++, etc.

- Don't build the lib32 distribution with SUBDIR_OVERRIDE in buildworld
  since it won't contain anything related to SUBDIR_OVERRIDE.  Testing
  of the lib32 build can be done with 'make build32'.

- Document these changes in build.7

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

9 years agoAdd myself (avos) to committers-src.dot
avos [Wed, 21 Oct 2015 22:31:17 +0000 (22:31 +0000)]
Add myself (avos) to committers-src.dot

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

9 years agoTag bmake 20151020
sjg [Wed, 21 Oct 2015 22:14:57 +0000 (22:14 +0000)]
Tag bmake 20151020

9 years agoImport bmake-20151020
sjg [Wed, 21 Oct 2015 22:14:23 +0000 (22:14 +0000)]
Import bmake-20151020

9 years agoi915_gem_do_execbuffer() holds the pages backing each relocation region for
jhb [Wed, 21 Oct 2015 20:49:45 +0000 (20:49 +0000)]
i915_gem_do_execbuffer() holds the pages backing each relocation region for
various reasons while executing user commands.  After these commands are
completed, the pages backing the relocation regions are unheld.

Since relocation regions do not have to be page aligned, the code in
validate_exec_list() allocates 2 extra page pointers in the array of
held pages populated by vm_fault_quick_hold_pages().  However, the cleanup
code that unheld the pages always assumed that only the buffer size /
PAGE_SIZE pages were used.  This meant that non-page aligned buffers would
not unheld the last 1 or 2 pages in the list.  Fix this by saving the
number of held pages returned by vm_fault_quick_hold_pages() for each
relocation region and using this count during cleanup.

Reviewed by: dumbbell, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D3965

9 years agoif_tap: correct typo in sysctl description (Enably)
emaste [Wed, 21 Oct 2015 19:56:16 +0000 (19:56 +0000)]
if_tap: correct typo in sysctl description (Enably)

Sponsored by: The FreeBSD Foundation

9 years agoUse pmap_quick* functions in arm64 busdma to make bounce buffer synchronization more...
jah [Wed, 21 Oct 2015 19:44:20 +0000 (19:44 +0000)]
Use pmap_quick* functions in arm64 busdma to make bounce buffer synchronization more flexible and avoid borrowing UVAs for userspace buffers.  This is mostly equivalent to r286785 and r286787 for x86.

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

9 years agoTreat mbufs as cacheline-aligned. Even when the transfer begins at an
ian [Wed, 21 Oct 2015 19:24:20 +0000 (19:24 +0000)]
Treat mbufs as cacheline-aligned.  Even when the transfer begins at an
offset within the buffer to align the L3 headers we know the buffer itself
was allocated and sized on cacheline boundaries and we don't need to
preserve partitial cachelines at the start and end of the buffer when
doing busdma sync operations.

9 years agoMerge NTP 4.2.8p4 into dist.
glebius [Wed, 21 Oct 2015 19:16:13 +0000 (19:16 +0000)]
Merge NTP 4.2.8p4 into dist.

9 years agoarm64: Enable CTF for DTrace support
emaste [Wed, 21 Oct 2015 19:08:16 +0000 (19:08 +0000)]
arm64: Enable CTF for DTrace support

Sponsored by: The FreeBSD Foundation

9 years agoFix my change in r289435 causing 'etc' to be added to SUBDIR when using
bdrewery [Wed, 21 Oct 2015 18:58:46 +0000 (18:58 +0000)]
Fix my change in r289435 causing 'etc' to be added to SUBDIR when using
SUBDIR_OVERRIDE.

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

9 years agoBuild ofw_bus_if.h for modules that need it on arm64
emaste [Wed, 21 Oct 2015 18:30:42 +0000 (18:30 +0000)]
Build ofw_bus_if.h for modules that need it on arm64

9 years agoMove FREEBSD-* files out of dist into vendor/ntp.
glebius [Wed, 21 Oct 2015 17:49:54 +0000 (17:49 +0000)]
Move FREEBSD-* files out of dist into vendor/ntp.

9 years agoFree memory back into the categories it was allocated from.
ian [Wed, 21 Oct 2015 17:41:20 +0000 (17:41 +0000)]
Free memory back into the categories it was allocated from.

Noticed by: sbruno
Pointy hat: ian

9 years agoPass proper device to pci_read_config().
mav [Wed, 21 Oct 2015 17:27:43 +0000 (17:27 +0000)]
Pass proper device to pci_read_config().

For some reason JMicron driver was different from others at this point.

9 years agoAdd missing forward declaration of struct image_params.
ed [Wed, 21 Oct 2015 16:32:01 +0000 (16:32 +0000)]
Add missing forward declaration of struct image_params.