]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoAdd missing directory for /usr/share/doc/legal/intel_iwn/ used by
bdrewery [Thu, 15 Oct 2015 23:41:47 +0000 (23:41 +0000)]
Add missing directory for /usr/share/doc/legal/intel_iwn/ used by
share/doc/legal/intel_iwn.  Exposed by r289391.

MFC after: 3 weeks
X-MFC-With: 289391
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd more SUBDIR_PARALLEL.
bdrewery [Thu, 15 Oct 2015 22:55:08 +0000 (22:55 +0000)]
Add more SUBDIR_PARALLEL.

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

8 years agoMake installing to a non-existent directory an error.
bdrewery [Thu, 15 Oct 2015 22:49:56 +0000 (22:49 +0000)]
Make installing to a non-existent directory an error.

Before this, if a file was installed to DESTDIR/some/dir and that directory
was missing due to not having ran 'make distrib-dirs' yet, the file would
be installed as 'some/dir'.  For something like bsd.incs.mk with INCLUDEDIR
being a sub-directory of /usr/include, this could result in all of the headers
being installed to a file rather than getting a directory of them.

Now it will error that the file/directory does not exist rather than hide
the issue.

Another option being discussed is to implement GNU's install -D flag which
would auto create any missing directories.

This is a mitigation of the problem.  The proper order to the build is to
run 'make distrib-dirs' first, but that can be forgotten if building from
a sub-directory after updating the source code to the latest revision.

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

8 years agoFix buildworld with clean objdir after r289351.
bdrewery [Thu, 15 Oct 2015 21:21:41 +0000 (21:21 +0000)]
Fix buildworld with clean objdir after r289351.

Sponsored by: EMC / Isilon Storage Division

8 years agolibstdc++ also snook in incorrectly in r267511, despite not being a real
bdrewery [Thu, 15 Oct 2015 20:49:20 +0000 (20:49 +0000)]
libstdc++ also snook in incorrectly in r267511, despite not being a real
subdir.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove unneeded libg++ reference that came in with r267511 based on a removed
bdrewery [Thu, 15 Oct 2015 20:46:34 +0000 (20:46 +0000)]
Remove unneeded libg++ reference that came in with r267511 based on a removed
comment.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix another ++= parsed as '+=', missed in r289384.
bdrewery [Thu, 15 Oct 2015 20:40:23 +0000 (20:40 +0000)]
Fix another ++= parsed as '+=', missed in r289384.

Sponsored by: EMC / Isilon Storage Division

8 years agoLet the SUBDIR_DEPEND*c++ variables actually work rather than being parsed
bdrewery [Thu, 15 Oct 2015 20:27:15 +0000 (20:27 +0000)]
Let the SUBDIR_DEPEND*c++ variables actually work rather than being parsed
as a +=.  These were safe due to a .WAIT very early on.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove empty directory c++filt leftover from r286332.
bdrewery [Thu, 15 Oct 2015 19:51:34 +0000 (19:51 +0000)]
Remove empty directory c++filt leftover from r286332.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove directories disconnected since r169718.
bdrewery [Thu, 15 Oct 2015 19:49:09 +0000 (19:49 +0000)]
Remove directories disconnected since r169718.

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

8 years agoMark sub-make targets as .MAKE and .PHONY to handle -n and always-build properly.
bdrewery [Thu, 15 Oct 2015 19:13:53 +0000 (19:13 +0000)]
Mark sub-make targets as .MAKE and .PHONY to handle -n and always-build properly.

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

8 years agoRevert r289302, invalid pages can be queued, e.g. by vfs_vmio_unwire().
kib [Thu, 15 Oct 2015 19:07:38 +0000 (19:07 +0000)]
Revert r289302, invalid pages can be queued, e.g. by vfs_vmio_unwire().

Found by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation

8 years agonewfs_msdos: move mkfs_msdos to separate file for later use in makefs
emaste [Thu, 15 Oct 2015 19:00:33 +0000 (19:00 +0000)]
newfs_msdos: move mkfs_msdos to separate file for later use in makefs

Sponsored by: The FreeBSD Foundation

8 years agoFix wrong use of .for; the iteration variable is not used in the loop.
bdrewery [Thu, 15 Oct 2015 18:55:43 +0000 (18:55 +0000)]
Fix wrong use of .for; the iteration variable is not used in the loop.

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

8 years agoRemove excess .else
bdrewery [Thu, 15 Oct 2015 18:53:26 +0000 (18:53 +0000)]
Remove excess .else

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

8 years agoProperly set the return value for casueword to 0 upon success.
ed [Thu, 15 Oct 2015 17:50:28 +0000 (17:50 +0000)]
Properly set the return value for casueword to 0 upon success.

While trying to get multithreading working for CloudABI on aarch64, I
noticed that compare-and-exchange operations in kernelspace would always
fail. It turns out that we don't properly set the return value to 0 when
the compare and exchange succeeds.

Approved by: andrew
Differential Revision: https://reviews.freebsd.org/D3899

8 years agoARM userspace accessors, e.g. {s,f}uword(9), copy{in,out}(9),
kib [Thu, 15 Oct 2015 17:40:39 +0000 (17:40 +0000)]
ARM userspace accessors, e.g. {s,f}uword(9), copy{in,out}(9),
casuword(9) and others, use LDRT and STRT instructions to access
memory with the privileges of userspace.  If the *RT instruction
faults on the kernel address, then additional checks must be done to
not confuse the VM system with invalid kernel-mode faults.

Put ARM on line with other FreeBSD architectures and disallow usermode
buffers which intersect with the kernel address space in advance,
before any accesses are performed.  In other words, vm_fault(9) is no
longer called when e.g. suword(9) stores to invalid (i.e. not
userspace) address.

Also, switch ARM to use fueword(9) and casueword(9).

Note: there is a pending patch in D3617, which adds the special
processing for faults from LDRT and STRT.  The addition of the
processing is useful for potential other uses of the instructions and
for completeness, but standard userspace accessors are better served
by not allowing such faults beforehand.

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3816
MFC after: 2 weeks

8 years agonewfs_msdos: rework option parsing to match NetBSD
emaste [Thu, 15 Oct 2015 16:19:00 +0000 (16:19 +0000)]
newfs_msdos: rework option parsing to match NetBSD

NetBSD split newfs_msdos in two so that they can reuse the file system
creation part in makefs. This change is a step on the path of bringing
that support to FreeBSD.

Reviewed by: kib, pfg
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3905

8 years agoMFV r289312: 2605 want to resume interrupted zfs send
mav [Thu, 15 Oct 2015 08:47:32 +0000 (08:47 +0000)]
MFV r289312: 2605 want to resume interrupted zfs send

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Arne Jansen <sensille@gmx.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8

For more info, see:
 - slides http://www.slideshare.net/MatthewAhrens/openzfs-send-and-receive
 - video https://www.youtube.com/watch?v=iY44jPMvxog
 - manpage changes (for zfs resume -s and zfs send -t)
 - upcoming talk at the OpenZFS Developer Summit

The TL;DR is:
Use "zfs receive -s" to save the partially received state on failure.
On failure, get the receive token with "zfs get receive_resume_token <fs>"
Resume the send with "zfs send -t <token_value>"

Relnotes: yes

8 years agoConsider top-level targets to be .PHONY as bmake won't build them
bdrewery [Thu, 15 Oct 2015 05:32:56 +0000 (05:32 +0000)]
Consider top-level targets to be .PHONY as bmake won't build them
otherwise if a file with the same name is found in the directory.

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

8 years agoAdd temporary workaround for .MAKE being applied to _worldtmp, since r251750.
bdrewery [Thu, 15 Oct 2015 05:26:11 +0000 (05:26 +0000)]
Add temporary workaround for .MAKE being applied to _worldtmp, since r251750.

This was causing files to be removed from the objdir when -n was used.
_worldtmp makes no sub-make calls.

A more comprehensive solution is coming involving fine-grained '+' where
appropriate.

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

8 years agoAdd support for the BCM57765 card reader.
adrian [Thu, 15 Oct 2015 04:22:56 +0000 (04:22 +0000)]
Add support for the BCM57765 card reader.

This patch adds support for the BCM57765[2] card reader function included in
Broadcom's BCM57766 ethernet/sd3.0 controller. This controller is commonly
found in laptops and Apple hardware (MBP, iMac, etc).

The BCM57765 chipset is almost fully compatible with the SD3.0 spec, but
does not support deriving a frequency below 781KHz from its default base
clock via the standard SD3.0-configured 10-bit clock divisor.

If such a divisor is set, card identification (which requires a 400KHz
clock frequency) will time out[1].

As a work-around, I've made use of an undocumented device-specific clock
control register to switch the controller to a 63MHz clock source when
targeting clock speeds below 781KHz; the clock source is likewise switched
back to the 200MHz clock when targeting speeds greater than 781KHz.

Additionally, this patch fixes a small sdhci_pci bug; the
sdhci_pci_softc->quirks flag was not copied to the sdhci_slot, resulting in
`quirk` behavior not being applied by sdhci.c.

[1] A number of Linux/FreeBSD users have noted that bringing up the chipsets'
associated ethernet interface will allow SD cards to enumerate (slowly).
This is a controller implementation side-effect triggered by the ethernet
driver's reading of the hardware statistics registers.

[2] This may also fix card detection when using the BCM57785 chipset, but I
don't have access to the BCM57785 chipset and can't verify.

I actually snagged some BCM57785 hardware recently (2012 Retina MacBook Pro)
and can confirm that this also fixes card enumeration with the BCM57785
chipset; with the patch, I can boot off of the internal sdcard reader.

PR: kern/203385
Submitted by: Landon Fuller <landon@landonf.org>

8 years ago/usr/tests is part of the base system (for *.debug files)
emaste [Thu, 15 Oct 2015 02:52:30 +0000 (02:52 +0000)]
/usr/tests is part of the base system (for *.debug files)

Sponsored by: The FreeBSD Foundation

8 years ago2nd try, after r289319:
bz [Thu, 15 Oct 2015 01:51:10 +0000 (01:51 +0000)]
2nd try, after r289319:

HWPMC depends on pmu.c even if device pmu is not specified.
Would be great if we could just automatically enabled "device pmu"
if we try to compile in HWPMC.

Also several old kernel cnfigurations seem to have HWPMC enabled but are
pre-FDT and thus fail.  So make pmu.c depend on fdt in case of hwpmc as
well.

MFC after: 2 weeks
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D3877

8 years agoAdd debug file extension to freebsd-update(8) after r288176
emaste [Thu, 15 Oct 2015 01:48:52 +0000 (01:48 +0000)]
Add debug file extension to freebsd-update(8) after r288176

Reviewed by: delphij
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3784

8 years agoCreate /usr/tests *.debug file directory hierarchy
emaste [Thu, 15 Oct 2015 01:46:55 +0000 (01:46 +0000)]
Create /usr/tests *.debug file directory hierarchy

Reviewed by: bdrewery, ngie
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3896

8 years agoHopefully also unbreak VIMAGE kernels replacing the &V_... with
bz [Thu, 15 Oct 2015 01:44:32 +0000 (01:44 +0000)]
Hopefully also unbreak VIMAGE kernels replacing the &V_... with
&VNET_NAME(...).
Everything else is just a whitespace wrapping change.

8 years agomkimg: support fat16b partitions (MBR type 06h)
emaste [Thu, 15 Oct 2015 01:09:14 +0000 (01:09 +0000)]
mkimg: support fat16b partitions (MBR type 06h)

Reviewed by: marcel
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3894

8 years agoNTB: MFV 1db97f25: Pull out platform detection logic
cem [Wed, 14 Oct 2015 23:48:16 +0000 (23:48 +0000)]
NTB: MFV 1db97f25: Pull out platform detection logic

Pull out read of PPD and platform detection logic to new functions,
ntb_detect_xeon(), ntb_detect_soc().  No functional change -- mostly
this is just shuffling the code to more closely match the Linux driver.
Linux commit log:

To simplify some of the platform detection code. Move the platform
detection to a function to be called earlier.

Authored by: Dave Jiang
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Abstract doorbell register access
cem [Wed, 14 Oct 2015 23:48:03 +0000 (23:48 +0000)]
NTB: Abstract doorbell register access

The doorbell registers (and associated mask) are 16-bit on Xeon but
64-bit on SoC.  Abstract IO access to doorbell registers with
'db_ioread' and 'db_iowrite' (names and idea borrowed from the dual
BSD/GPL Linux driver).

Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: MFV 3cc5ba19: Add alignment check to meet hardware requirement
cem [Wed, 14 Oct 2015 23:47:52 +0000 (23:47 +0000)]
if_ntb: MFV 3cc5ba19: Add alignment check to meet hardware requirement

Original Linux commit log:

The NTB translate register must have the value to be BAR size aligned.
This alignment check make sure that the DMA memory allocated has the
proper alignment. Another requirement for NTB to function properly with
memory window BAR size greater or equal to 4M is to use the CMA feature
in 3.16 kernel with the appropriate CONFIG_CMA_ALIGNMENT and
CONFIG_CMA_SIZE_MBYTES set.

Authored by: Dave Jiang
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV a1413cfb: correct the spread of queues over mw's
cem [Wed, 14 Oct 2015 23:47:35 +0000 (23:47 +0000)]
NTB: MFV a1413cfb: correct the spread of queues over mw's

The detection of an uneven number of queues on the given memory windows
was not correct.  The mw_num is zero based and the mod should be
division to spread them evenly over the mw's.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Remap MSI-X messages over available slots
cem [Wed, 14 Oct 2015 23:47:23 +0000 (23:47 +0000)]
NTB: Remap MSI-X messages over available slots

Remap MSI-X messages over available slots rather than falling back to
legacy INTx when fewer MSI-X slots are available than were requested.

N.B. the Linux driver does *not* do this.

To aid in testing, a tunable 'hw.ntb.force_remap_mode' has been added.
It defaults to off (0).  When the tunable is enabled and sufficient
slots were available, the driver restricts the number of slots by one
and remaps the MSI-X messages over the remaining slots.

In case this is actually not okay (as I don't yet have access to this
hardware to test), a tunable 'hw.ntb.prefer_intx_to_remap' has been
added.  It defaults to off (0).  When the tunable is enabled and fewer
slots are available than requested, fall back to legacy INTx mode rather
than attempting to remap MSI-X messages.

Suggested by: jhb
Reviewed by: jhb (earlier version)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: Reserve link event doorbell callback on Xeon
cem [Wed, 14 Oct 2015 23:47:08 +0000 (23:47 +0000)]
NTB: Reserve link event doorbell callback on Xeon

Consumers that registered on this bit would never see a callback and it
is likely a mistake.

This does not affect if_ntb, which limits itself to a single doorbell
callback.

8 years agoNTB: MFV 53a788a7: Split ntb_setup_interrupts() into SOC, Xeon, and legacy routines
cem [Wed, 14 Oct 2015 23:46:15 +0000 (23:46 +0000)]
NTB: MFV 53a788a7: Split ntb_setup_interrupts() into SOC, Xeon, and legacy routines

The names don't line up 100% with Linux.  Our routines are named
ntb_setup_interrupts, ntb_setup_xeon_msix, ntb_setup_soc_msix, and
ntb_setup_legacy_interrupt.  Linux SNB = FreeBSD Xeon; Linux BWD =
FreeBSD SOC.  Original Linux commit log:

This is an cleanup effort to make ntb_setup_msix() more readable - use
ntb_setup_bwd_msix() to init MSI-Xs on BWD hardware and
ntb_setup_snb_msix() - on SNB hardware.

Function ntb_setup_snb_msix() also initializes MSI-Xs the way it should
has been done - looping pci_enable_msix() until success or failure.

Authored by: Alexander Gordeev
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoif_ntb: Cleanup style
cem [Wed, 14 Oct 2015 23:45:35 +0000 (23:45 +0000)]
if_ntb: Cleanup style

8 years agoNTB: MFV 403c63cb: client event cleanup
cem [Wed, 14 Oct 2015 23:44:42 +0000 (23:44 +0000)]
NTB: MFV 403c63cb: client event cleanup

Provide a better event interface between the client and transport.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoiw_cxgbe: use correct RFC number.
np [Wed, 14 Oct 2015 23:29:19 +0000 (23:29 +0000)]
iw_cxgbe: use correct RFC number.

8 years agoDeprecate MD5 checksum generation in favor of SHA512.
gjb [Wed, 14 Oct 2015 22:33:11 +0000 (22:33 +0000)]
Deprecate MD5 checksum generation in favor of SHA512.

This was discussed during the 10.2-RELEASE cycle, however
since we were nearing the end of the cycle, we decided to
defer this change until after 10.2-RELEASE.

Reminded by: so (delphij), jmg
MFC after: 5 days
Sponsored by: The FreeBSD Foundation

8 years agoAdd Ubiquiti EdgeRouter Lite (ERL) kernel config file
emaste [Wed, 14 Oct 2015 21:10:05 +0000 (21:10 +0000)]
Add Ubiquiti EdgeRouter Lite (ERL) kernel config file

The ERL is a fairly cheap (~$100 USD) and readily available dual core
MIPS64 device so it makes a useful MIPS reference platform.

This is based in part on the kernel config generated by the mkerlimage
script from http://rtfm.net/FreeBSD/ERL/.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3884

8 years agoAdd missing targets to PHONY_NOTMAIN.
bdrewery [Wed, 14 Oct 2015 20:38:51 +0000 (20:38 +0000)]
Add missing targets to PHONY_NOTMAIN.

- buildconfig, installconfig (missed in r289085)
- files (missed in r241298)

Sponsored by: EMC / Isilon Storage Division

8 years agoRecurse on 'buildconfig' and 'installconfig'. Remove the 'config' pseudo target.
bdrewery [Wed, 14 Oct 2015 20:30:32 +0000 (20:30 +0000)]
Recurse on 'buildconfig' and 'installconfig'.  Remove the 'config' pseudo target.

The 'config' target isn't really needed right now so just remove it to avoid
any clashes with config(8) building.  It's also likely misspelled and should
be 'configs' if we decide to add it back.  This was just a convenience
target recently added.

Sponsored by: EMC / Isilon Storage Division

8 years agoRe-indent the ALL_SUBDIR_TARGETS list
bdrewery [Wed, 14 Oct 2015 20:28:15 +0000 (20:28 +0000)]
Re-indent the ALL_SUBDIR_TARGETS list

8 years agoFix test-fenv:test_dfl_env when run on some amd64 CPUs
ngie [Wed, 14 Oct 2015 20:22:12 +0000 (20:22 +0000)]
Fix test-fenv:test_dfl_env when run on some amd64 CPUs

Compare the fields that the AMD [1] and Intel [2] specs say will be
set once fnstenv returns.

Not all amd64 capable processors zero out the env.__x87.__other field
(example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the
env.__x87.__other field will contain after fnstenv is executed, so the values
in env.__x87.__other could be filled with arbitrary data depending on how the
CPU-specific implementation of fnstenv.

1. http://support.amd.com/TechDocs/26569_APM_v5.pdf
2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf

Discussed with: kib, Anton Rang <anton.rang@isilon.com>
Reviewed by: Daniel O'Connor <darius@dons.net.au> (earlier patch; pre-generalization)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Reported by: Bill Morchin <wmorchin@isilon.com>

8 years agoRevert r289282 for now as the interaction with a directory containing
bdrewery [Wed, 14 Oct 2015 19:30:04 +0000 (19:30 +0000)]
Revert r289282 for now as the interaction with a directory containing
bsd.files.mk and bsd.subdir.mk is recursing too many times.

8 years ago/libexec subdirs are part of the base system (for *.debug files)
emaste [Wed, 14 Oct 2015 19:19:44 +0000 (19:19 +0000)]
/libexec subdirs are part of the base system (for *.debug files)

Sponsored by: The FreeBSD Foundation

8 years agoAdd mtree entry for casper .debug files
emaste [Wed, 14 Oct 2015 19:14:05 +0000 (19:14 +0000)]
Add mtree entry for casper .debug files

This was missed in r258838.

Sponsored by: The FreeBSD Foundation

8 years agoRevert r289319 as it seems some ARM kernels include HWPMC but no FDT.
bz [Wed, 14 Oct 2015 18:53:34 +0000 (18:53 +0000)]
Revert r289319 as it seems some ARM kernels include HWPMC but no FDT.
To me that seems broken as certain interrupts will never be handled
properly.  I'll re-open D3877 and we can seek a better solution and
try again.  For now go back to that state and avoid compile time errors.

8 years agoFix the dependencies to be similar to TCP as without TCP, e.g., NOIP kernels
bz [Wed, 14 Oct 2015 18:32:06 +0000 (18:32 +0000)]
Fix the dependencies to be similar to TCP as without TCP, e.g., NOIP kernels
this will otherwise fail.

8 years agoProperly define functions withut argument and wrap for { for style purposes
bz [Wed, 14 Oct 2015 18:30:04 +0000 (18:30 +0000)]
Properly define functions withut argument and wrap for { for style purposes
as followed in the rest of the file.  This will hopefully make gcc more happy.

8 years agoAdd Makefile missed in r289236
ngie [Wed, 14 Oct 2015 18:29:53 +0000 (18:29 +0000)]
Add Makefile missed in r289236

8 years agoAllow PT_NOTES segments to be located anywhere in the executable
kib [Wed, 14 Oct 2015 18:29:21 +0000 (18:29 +0000)]
Allow PT_NOTES segments to be located anywhere in the executable
image.

The dynamic linker still requires that program headers of the
executable or dso are mapped by a PT_LOAD segment.

Reviewed by: emaste, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D3871

8 years agoRedirect all stdout from run to stderr so failures can be debugged
ngie [Wed, 14 Oct 2015 18:29:00 +0000 (18:29 +0000)]
Redirect all stdout from run to stderr so failures can be debugged

8 years agoAllow PT_INTERP and PT_NOTES segments to be located anywhere in the
kib [Wed, 14 Oct 2015 18:27:35 +0000 (18:27 +0000)]
Allow PT_INTERP and PT_NOTES segments to be located anywhere in the
executable image.  Keep one page (arbitrary) limit on the max allowed
size of the PT_NOTES.

The ELF image activators still require that program headers of the
executable are fully contained in the first page of the image file.

Reviewed by: emaste, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D3871

8 years agoApply r3505 (s/SIGQUIT/SIGTERM/ in man page)
des [Wed, 14 Oct 2015 18:08:38 +0000 (18:08 +0000)]
Apply r3505 (s/SIGQUIT/SIGTERM/ in man page)

PR: 203580

8 years agoNow that we can detect the Cortex-A8 properly, fix the event list
bz [Wed, 14 Oct 2015 17:20:19 +0000 (17:20 +0000)]
Now that we can detect the Cortex-A8 properly, fix the event list
according to the Cortex-A8 TRM r3p2 section 3.2.49.
The A8 list differs from the "ARM-v7 common" list, given the A8
was an earlier model.

There is still more work to be done for other Cortex-Ax version as
andrew points out, but I am just trying to fix A8 for now for teaching.

MFC after: 2 weeks
Sponsored by: DARPA/AFRL
Obtained from: Cambridge/L41
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D3876

8 years agoHWPMC depends on pmu.c even if device pmu is not specified.
bz [Wed, 14 Oct 2015 17:07:24 +0000 (17:07 +0000)]
HWPMC depends on pmu.c even if device pmu is not specified.
Would be great if we could just automatically enabled "device pmu"
if we try to compile in HWPMC.

MFC after: 2 weeks
Sponsored by: DARPA/AFRL
Reviewed by: andrew
Differential Revision: https://reviews.freebsd.org/D3877

8 years agoFor the Cortex-A8 use the a8 and not the a9 events table.
bz [Wed, 14 Oct 2015 16:56:25 +0000 (16:56 +0000)]
For the Cortex-A8 use the a8 and not the a9 events table.

MFC after: 2 weeks
Sponsored by: DARPA/AFRL
Differential Revision: https://reviews.freebsd.org/D3882

8 years agopf: Fix TSO issues
kp [Wed, 14 Oct 2015 16:21:41 +0000 (16:21 +0000)]
pf: Fix TSO issues

In certain configurations (mostly but not exclusively as a VM on Xen) pf
produced packets with an invalid TCP checksum.

The problem was that pf could only handle packets with a full checksum. The
FreeBSD IP stack produces TCP packets with a pseudo-header checksum (only
addresses, length and protocol).
Certain network interfaces expect to see the pseudo-header checksum, so they
end up producing packets with invalid checksums.

To fix this stop calculating the full checksum and teach pf to only update TCP
checksums if TSO is disabled or the change affects the pseudo-header checksum.

PR: 154428, 193579, 198868
Reviewed by: sbruno
MFC after: 1 week
Relnotes: yes
Sponsored by: RootBSD
Differential Revision: https://reviews.freebsd.org/D3779

8 years agoresolver: automatically reload /etc/resolv.conf
vangyzen [Wed, 14 Oct 2015 14:26:44 +0000 (14:26 +0000)]
resolver: automatically reload /etc/resolv.conf

On each resolver query, use stat(2) to see if the modification time
of /etc/resolv.conf has changed.  If so, reload the file and reinitialize
the resolver library.  However, only call stat(2) if at least two seconds
have passed since the last call to stat(2), since calling it on every
query could kill performance.

This new behavior is enabled by default.  Add a "reload-period" option
to disable it or change the period of the test.

Document this behavior and option in resolv.conf(5).

Polish the man page just enough to appease igor.

https://lists.freebsd.org/pipermail/freebsd-arch/2015-October/017342.html

Reviewed by: kp, wblock
Discussed with: jilles, imp, alfred
MFC after: 1 month
Relnotes: yes
Sponsored by: Dell Inc.
Differential Revision: https://reviews.freebsd.org/D3867

8 years agoMFV r289311: 5764 "zfs send -nv" directs output to stderr
mav [Wed, 14 Oct 2015 11:52:58 +0000 (11:52 +0000)]
MFV r289311: 5764 "zfs send -nv" directs output to stderr

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Basil Crow <basil.crow@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Manoj Joseph <manoj.joseph@delphix.com>

illumos/illumos-gate@dc5f28a3c341db7c241bba77ddc109c141072f27

8 years ago4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R
mav [Wed, 14 Oct 2015 11:12:47 +0000 (11:12 +0000)]
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f

8 years agoMFV r289308: 6267 dn_bonus evicted too early
mav [Wed, 14 Oct 2015 10:38:05 +0000 (10:38 +0000)]
MFV r289308: 6267 dn_bonus evicted too early

Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Xin LI <delphij@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Justin T. Gibbs <gibbs@FreeBSD.org>

illumos/illumos-gate@d2058105c61ec61df3a2dd3f839fed8c3fe7bfd6

8 years ago6267 dn_bonus evicted too early
mav [Wed, 14 Oct 2015 10:36:43 +0000 (10:36 +0000)]
6267 dn_bonus evicted too early

Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Xin LI <delphij@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Justin T. Gibbs <gibbs@FreeBSD.org>

illumos/illumos-gate@d2058105c61ec61df3a2dd3f839fed8c3fe7bfd6

8 years agoMFV r289306: 6295 metaslab_condense's dbgmsg should include vdev id
mav [Wed, 14 Oct 2015 10:31:50 +0000 (10:31 +0000)]
MFV r289306: 6295 metaslab_condense's dbgmsg should include vdev id

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Joe Stein <joe.stein@delphix.com>

illumos/illumos-gate@daec38ecb4fb5e73e4ca9e99be84f6b8c50c02fa

8 years ago6295 metaslab_condense's dbgmsg should include vdev id
mav [Wed, 14 Oct 2015 10:30:24 +0000 (10:30 +0000)]
6295 metaslab_condense's dbgmsg should include vdev id

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Joe Stein <joe.stein@delphix.com>

illumos/illumos-gate@daec38ecb4fb5e73e4ca9e99be84f6b8c50c02fa

8 years agoMFV r289304: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()
mav [Wed, 14 Oct 2015 10:28:29 +0000 (10:28 +0000)]
MFV r289304: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@8fe00bfb8790ad51653f67b01d5ac14256cbb404

8 years ago6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()
mav [Wed, 14 Oct 2015 10:21:21 +0000 (10:21 +0000)]
6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@8fe00bfb8790ad51653f67b01d5ac14256cbb404

8 years agoInvalid pages should not appear on the inactive queue. Change the
kib [Wed, 14 Oct 2015 09:03:32 +0000 (09:03 +0000)]
Invalid pages should not appear on the inactive queue.  Change the
check into an assertion.

Reviewed by: alc
Tested by: pho
Sponsored by: The FreeBSD Foundation

8 years agoIntegrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs
ngie [Wed, 14 Oct 2015 08:16:15 +0000 (08:16 +0000)]
Integrate tools/regression/vfs into the FreeBSD test suite as tests/sys/vfs

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

8 years agoMFV r289298: 6286 ZFS internal error when set large block on bootfs
mav [Wed, 14 Oct 2015 07:50:08 +0000 (07:50 +0000)]
MFV r289298: 6286 ZFS internal error when set large block on bootfs

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@6de9bb5603e65b16816b7ab29e39bac820e2da2b

8 years ago6286 ZFS internal error when set large block on bootfs
mav [Wed, 14 Oct 2015 07:48:39 +0000 (07:48 +0000)]
6286 ZFS internal error when set large block on bootfs

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@6de9bb5603e65b16816b7ab29e39bac820e2da2b

8 years agoMFV r289296: 6288 dmu_buf_will_dirty could be faster
mav [Wed, 14 Oct 2015 07:45:44 +0000 (07:45 +0000)]
MFV r289296: 6288 dmu_buf_will_dirty could be faster

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@0f2e7d03b8f588387cb8dd8dd500cbe5ff4484e0

8 years ago6288 dmu_buf_will_dirty could be faster
mav [Wed, 14 Oct 2015 07:44:19 +0000 (07:44 +0000)]
6288 dmu_buf_will_dirty could be faster

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@0f2e7d03b8f588387cb8dd8dd500cbe5ff4484e0

8 years agoMFV r289294: 5219 l2arc_write_buffers() may write beyond target_sz
mav [Wed, 14 Oct 2015 07:37:02 +0000 (07:37 +0000)]
MFV r289294: 5219 l2arc_write_buffers() may write beyond target_sz

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Saso Kiselkov <skiselkov@gmail.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Reviewed by: Justin Gibbs <gibbs@FreeBSD.org>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Andriy Gapon <avg@freebsd.org>

illumos/illumos-gate@d7d9a6d919f92d74ea0510a53f8441396048e800

8 years ago5219 l2arc_write_buffers() may write beyond target_sz
mav [Wed, 14 Oct 2015 07:28:36 +0000 (07:28 +0000)]
5219 l2arc_write_buffers() may write beyond target_sz

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Saso Kiselkov <skiselkov@gmail.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Reviewed by: Justin Gibbs <gibbs@FreeBSD.org>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Andriy Gapon <avg@freebsd.org>

illumos/illumos-gate@d7d9a6d919f92d74ea0510a53f8441396048e800

8 years agoFix an unnecessarily aggressive behavior where mtu clamping begins on first
hiren [Wed, 14 Oct 2015 06:57:28 +0000 (06:57 +0000)]
Fix an unnecessarily aggressive behavior where mtu clamping begins on first
retransmission timeout (rto) when blackhole detection is enabled.  Make
sure it only happens when the second attempt to send the same segment also fails
with rto.

Also make sure that each mtu probing stage (usually 1448 -> 1188 -> 524) follows
the same pattern and gets 2 chances (rto) before further clamping down.

Note: RFC4821 doesn't specify implementation details on how this situation
should be handled.

Differential Revision: https://reviews.freebsd.org/D3434
Reviewed by: sbruno, gnn (previous version)
MFC after: 2 weeks
Sponsored by: Limelight Networks

8 years agoFix support for building a PROG_CXX, and PROG, directly.
bdrewery [Wed, 14 Oct 2015 05:50:16 +0000 (05:50 +0000)]
Fix support for building a PROG_CXX, and PROG, directly.

For example in lib/atf/libatf-c++/tests/detail it is now possible to
run 'make application_test'.  This was intended to worked for PROGS,
but lacked support for PROGS_CXX.

Also fix redefining the main PROG target to recurse.  This isn't needed
since the main process is setting PROG/PROG_CXX to handle it directly
via bsd.prog.mk.

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

8 years agoFix date.
adrian [Wed, 14 Oct 2015 05:16:56 +0000 (05:16 +0000)]
Fix date.

Noticed by: bdrewery

8 years agoFollow-up r288218 by ensuring common objects are built before recursing.
bdrewery [Wed, 14 Oct 2015 04:42:05 +0000 (04:42 +0000)]
Follow-up r288218 by ensuring common objects are built before recursing.

Some example where this is a problem:
  lib/atf/libatf-c++/tests/Makefile:SRCS.${_T}=   ${_T}.cpp test_helpers.cpp
  lib/atf/libatf-c++/tests/detail/Makefile:SRCS.${_T}=    ${_T}.cpp test_helpers.cpp
  lib/atf/libatf-c/tests/Makefile:SRCS.${_T}=     ${_T}.c test_helpers.c
  lib/atf/libatf-c/tests/detail/Makefile:SRCS.${_T}=      ${_T}.c test_helpers.c
  lib/libpam/libpam/tests/Makefile:SRCS.${test} = ${test}.c ${COMMONSRC}

A similar change may be needed for FILES, SCRIPTS, or INCS, but for now stay
with just SRCS.

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

8 years agorsu(4) manpage updates: add me, add 802.11n support, update caveats.
adrian [Wed, 14 Oct 2015 02:43:04 +0000 (02:43 +0000)]
rsu(4) manpage updates: add me, add 802.11n support, update caveats.

* Add that I indeed added 802.11n support.
* Update caveats - we support 1x1, 1x2 and 2x2 operation now, but
  there's no transmit aggregation support.

8 years agoReplace the out-of-place includes/files/config handling in bsd.subdir.mk with
bdrewery [Wed, 14 Oct 2015 02:37:30 +0000 (02:37 +0000)]
Replace the out-of-place includes/files/config handling in bsd.subdir.mk with
more typical ALL_SUBDIR_TARGETS entries and target hooks in bsd.incs.mk,
bsd.files.mk and bsd.confs.mk.

This allows the targets to be NOPs if unneeded and still work with the
shortcut 'make includes' to build and then install in a parallel-safe manner.

Sort and re-indent the ALL_SUBDIR_TARGETS with the new entries.

Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV e8aeb60c: Disable interrupts and poll under high load
cem [Wed, 14 Oct 2015 02:14:45 +0000 (02:14 +0000)]
NTB: MFV e8aeb60c: Disable interrupts and poll under high load

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV 78958433: Enable Snoop on Primary Side
cem [Wed, 14 Oct 2015 02:14:15 +0000 (02:14 +0000)]
NTB: MFV 78958433: Enable Snoop on Primary Side

Enable Snoop from Primary to Secondary side on BAR23 and BAR45 on all
TLPs.  Previously, Snoop was only enabled from Secondary to Primary
side.  This can have a performance improvement on some workloads.

Also, make the code more obvious about how the link is being enabled.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoParallelize the buffer cache and rewrite getnewbuf(). This results in a
jeff [Wed, 14 Oct 2015 02:10:07 +0000 (02:10 +0000)]
Parallelize the buffer cache and rewrite getnewbuf().  This results in a
8x performance improvement in a micro benchmark on a 4 socket machine.

 - Get buffer headers from a per-cpu uma cache that sits in from of the
   free queue.
 - Use a per-cpu quantum cache in vmem to eliminate contention for kva.
 - Use multiple clean queues according to buffer cache size to eliminate
   clean queue lock contention.
 - Introduce a bufspace daemon that attempts to prevent getnewbuf() callers
   from blocking or doing direct recycling.
 - Close some bufspace allocation races that could lead to endless
   recycling.
 - Further the transition to a more modern style of small functions grouped
   by prefix in order to improve growing complexity.

Sponsored by: EMC / Isilon
Reviewed by: kib
Tested by: pho

8 years agoCorrect a comment in bsd.incs.mk forgotten in r274662 and copied into bsd.confs.mk.
bdrewery [Wed, 14 Oct 2015 00:43:29 +0000 (00:43 +0000)]
Correct a comment in bsd.incs.mk forgotten in r274662 and copied into bsd.confs.mk.

The bsd.confs.mk may be wrong but for now fix it.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd a note about the mysterious files/includes/config block.
bdrewery [Wed, 14 Oct 2015 00:36:33 +0000 (00:36 +0000)]
Add a note about the mysterious files/includes/config block.

This originated from r96668.

8 years agoThere are times when it would be really nice to have a record of the last few
hiren [Wed, 14 Oct 2015 00:35:37 +0000 (00:35 +0000)]
There are times when it would be really nice to have a record of the last few
packets and/or state transitions from each TCP socket. That would help with
narrowing down certain problems we see in the field that are hard to reproduce
without understanding the history of how we got into a certain state. This
change provides just that.

It saves copies of the last N packets in a list in the tcpcb. When the tcpcb is
destroyed, the list is freed. I thought this was likely to be more
performance-friendly than saving copies of the tcpcb. Plus, with the packets,
you should be able to reverse-engineer what happened to the tcpcb.

To enable the feature, you will need to compile a kernel with the TCPPCAP
option. Even then, the feature defaults to being deactivated. You can activate
it by setting a positive value for the number of captured packets. You can do
that on either a global basis or on a per-socket basis (via a setsockopt call).

There is no way to get the packets out of the kernel other than using kmem or
getting a coredump. I thought that would help some of the legal/privacy concerns
regarding such a feature. However, it should be possible to add a future effort
to export them in PCAP format.

I tested this at low scale, and found that there were no mbuf leaks and the peak
mbuf usage appeared to be unchanged with and without the feature.

The main performance concern I can envision is the number of mbufs that would be
used on systems with a large number of sockets. If you save five packets per
direction per socket and have 3,000 sockets, that will consume at least 30,000
mbufs just to keep these packets. I tried to reduce the concerns associated with
this by limiting the number of clusters (not mbufs) that could be used for this
feature. Again, in my testing, that appears to work correctly.

Differential Revision: D3100
Submitted by: Jonathan Looney <jlooney at juniper dot net>
Reviewed by: gnn, hiren

8 years agoAdd WITHOUT_LLDB for src.conf(5)
emaste [Wed, 14 Oct 2015 00:23:31 +0000 (00:23 +0000)]
Add WITHOUT_LLDB for src.conf(5)

It will be enabled by default on certain architectures.

8 years agoNTB: MFV 58b88920: Document HW errata
cem [Tue, 13 Oct 2015 23:43:06 +0000 (23:43 +0000)]
NTB: MFV 58b88920: Document HW errata

Add a comment describing the necessary ordering of modifications to the
NTB Limit and Base registers.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV fca4d518: Fix ntb_transport link down race
cem [Tue, 13 Oct 2015 23:42:13 +0000 (23:42 +0000)]
NTB: MFV fca4d518: Fix ntb_transport link down race

A WARN_ON is being hit in ntb_qp_link_work due to the NTB transport link
being down while the ntb qp link is still active.  This is caused by the
transport link being brought down prior to the qp link worker thread
being terminated.  To correct this, shutdown the qp's prior to bringing
the transport link down.  Also, only call the qp worker thread if it is
in interrupt context, otherwise call the function directly.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV 9fec60c4: Fix NTB-RP Link Up
cem [Tue, 13 Oct 2015 23:41:40 +0000 (23:41 +0000)]
NTB: MFV 9fec60c4: Fix NTB-RP Link Up

The Xeon NTB-RP setup, the transparent side does not get a link up/down
interrupt.  Since the presence of a NTB device on the transparent side
means that we have a NTB link up, we can work around the lack of an
interrupt by simply calling the link up function to notify the upper
layers.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV c529aa30: Xeon Doorbell errata workaround
cem [Tue, 13 Oct 2015 23:41:06 +0000 (23:41 +0000)]
NTB: MFV c529aa30: Xeon Doorbell errata workaround

Modifications to the 14th bit of the B2BDOORBELL register will not be
mirrored to the remote system due to a hardware issue.  To get around
the issue, shrink the number of available doorbell bits by 1.  The max
number of doorbells was being used as a way to referencing the Link
Doorbell bit.  Since this would no longer work, the driver must now
explicitly reference that bit.

This does not affect the xeon_errata_workaround case, as it is not using
the b2bdoorbell register.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoUse chroot(2) instead of using prefixes for files.
delphij [Tue, 13 Oct 2015 22:55:17 +0000 (22:55 +0000)]
Use chroot(2) instead of using prefixes for files.

Previously, the code prefixes the chroot path to actual file paths to
simulate the effect.  This, however, will not work for tzset(3) which
expects the current system have a working set of timezone data files,
and that is not always the case.

This changeset simplifies the handling of paths and use an actual
chroot(2) call to implement the effect.

PR: bin/197313
MFC after: 2 weeks

8 years agoNTB: MFV f9a2cf89: Comment Fix
cem [Tue, 13 Oct 2015 20:55:21 +0000 (20:55 +0000)]
NTB: MFV f9a2cf89: Comment Fix

Add "data" ntb_register_db_callback parameter description comment and
correct poor speling.

Authored by: Jon Mason
Obtained from: Linux (Dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: MFV b1ef0043: Remove References of non-B2B BWD HW
cem [Tue, 13 Oct 2015 20:54:38 +0000 (20:54 +0000)]
NTB: MFV b1ef0043: Remove References of non-B2B BWD HW

NTB-RP is not a supported configuration on BWD hardware.  Remove the
code attempting to set it up.

Authored by: Jon Mason
Obtained from: Linux (dual BSD/GPL driver)
Sponsored by: EMC / Isilon Storage Division

8 years agoFix two memory leaks in config(8).
rpaulo [Tue, 13 Oct 2015 20:25:03 +0000 (20:25 +0000)]
Fix two memory leaks in config(8).

PR: 202145
Submitted by: Kurt Lidl <lidl pix.net>

8 years agoif_ntb: Fix build on i386
cem [Tue, 13 Oct 2015 19:46:54 +0000 (19:46 +0000)]
if_ntb: Fix build on i386

Sponsored by: EMC / Isilon Storage Division

8 years agoioat: Use correct macro, fix build on i386
cem [Tue, 13 Oct 2015 19:46:12 +0000 (19:46 +0000)]
ioat: Use correct macro, fix build on i386

Sponsored by: EMC / Isilon Storage Division

8 years agoNTB: (partial) MFV ed6c24ed: NTB-RP support
cem [Tue, 13 Oct 2015 19:45:29 +0000 (19:45 +0000)]
NTB: (partial) MFV ed6c24ed: NTB-RP support

This commit does not actually add NTB-RP support.  Mostly it serves to
shuffle code around to match the Linux driver.  Original Linux commit
log follows:

Add support for Non-Transparent Bridge connected to a PCI-E Root Port on
the remote system (also known as NTB-RP mode).  This allows for a NTB
enabled system to be connected to a non-NTB enabled system/slot.

Modifications to the registers and BARs/MWs on the Secondary side by the
remote system are reflected into registers on the Primary side for the
local system.  Similarly, modifications of registers and BARs/MWs on
Primary side by the local system are reflected into registers on the
Secondary side for the Remote System.  This allows communication between
the 2 sides via these registers and BARs/MWs.

Note: there is not a fix for the Xeon Errata (that was already worked
around in NTB-B2B mode) for NTB-RP mode.  Due to this limitation, NTB-RP
will not work on the Secondary side with the Xeon Errata workaround
enabled.  To get around this, disable the workaround via the
xeon_errata_workaround=0 modparm.  However, this can cause the hang
described in the errata.

Authored by: Jon Mason
Obtained from: Linux
Sponsored by: EMC / Isilon Storage Division