]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoMFC r308225: dev/cpuctl: put debug output under CPUCTL_DEBUG rather than DEBUG
avg [Thu, 10 Nov 2016 11:14:46 +0000 (11:14 +0000)]
MFC r308225: dev/cpuctl: put debug output under CPUCTL_DEBUG rather than DEBUG

7 years agoMFC r308314:
pfg [Wed, 9 Nov 2016 18:00:50 +0000 (18:00 +0000)]
MFC r308314:
sed(1): add LEGACY_BSDSED_COMPAT compile-time flag.

In r297602, which included a __FreeBSD_version bump to 1100105, we changed
sed 'i' and 'a' from discarding whitespaces to conform with what GNU and
sysvish sed do.

There are arguments in favor of keeping the old behavior but the new
behavior is also useful for migration purposes. It seems important to at
least consider the case of developers depending on the previous behavior
so add a CFLAG to enable the old behavior.

PR: 213474

7 years agoMFC r308228:
kib [Wed, 9 Nov 2016 16:46:57 +0000 (16:46 +0000)]
MFC r308228:
Remove remnants of the recursive sleep support.

7 years agoMFC r308211:
kib [Wed, 9 Nov 2016 16:45:06 +0000 (16:45 +0000)]
MFC r308211:
Remove tautological casts.

7 years agoMFC r308210:
kib [Wed, 9 Nov 2016 16:42:15 +0000 (16:42 +0000)]
MFC r308210:
Style fixes.

7 years agoMFC r308375:
dim [Wed, 9 Nov 2016 08:08:02 +0000 (08:08 +0000)]
MFC r308375:

Pull in r278002 from upstream llvm trunk (by Silviu Baranga):

  [AArch64] PR28877: Don't assume we're running after legalization when
  creating vcvtfp2fxs

  Summary:
  The DAG combine transformation that was generating the
  aarch64_neon_vcvtfp2fxs node was assuming that all inputs where legal
  and wasn't accounting that the input could be a v4f64 if we're trying
  to do the transformation before legalization. We now bail out in this
  case.

  All illegal types besides v4f64 were already rejected.

  Fixes https://llvm.org/bugs/show_bug.cgi?id=28877

  Reviewers: jmolloy

  Subscribers: aemerson, rengolin, llvm-commits

  Differential Revision: https://reviews.llvm.org/D23261

This fixes several ports on AArch64.

Requested by: andrew

7 years agoMFC: r307891
rmacklem [Tue, 8 Nov 2016 21:15:50 +0000 (21:15 +0000)]
MFC: r307891
Fix the man page to reflect the change done by r307890 to mountd.c
so that the "-n" option uses the sysctl for the new NFS server.
This is a content change.

7 years agoMFC: r307890
rmacklem [Tue, 8 Nov 2016 21:09:48 +0000 (21:09 +0000)]
MFC: r307890
mountd(8) was erroneously setting the sysctl for the old NFS server
when the new/default NFS server was running, for the "-n" option.

This patch fixes the problem for head and stable/11. For stable/10 the
patch will need to be modified when MFC'd, since the stable/10 mountd.c
handles both old and new NFS servers.
Since the new NFS server uses vfs.nfsd.nfs_privport == 0 by default,
there wouldn't have been many users affected by the code not setting
it to 0 when the "-n" option was specified.

7 years agoMFC r307857: Fix panic after ZVOL renamed to name invalid for DEVFS.
mav [Tue, 8 Nov 2016 20:57:46 +0000 (20:57 +0000)]
MFC r307857: Fix panic after ZVOL renamed to name invalid for DEVFS.

7 years agoMFC r308175: Revisit blacklistd support in ftpd
lidl [Tue, 8 Nov 2016 20:12:13 +0000 (20:12 +0000)]
MFC r308175: Revisit blacklistd support in ftpd

Enhance blacklistd support to not log anything by default,
unless blacklistd support is enabled on the command line.
Document new flag in man page, cleanup patches to be less
intrusive in code.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r307866:
kib [Tue, 8 Nov 2016 09:51:55 +0000 (09:51 +0000)]
MFC r307866:
Handle broadcast NMIs.

MFC r307880:
Follow-up to r307866.

MFC r308030:
Use correct cpu id in the banner.

7 years agoMFC r307903,307904,308039,308050: vmm/svm: iopm_bitmap and msr_bitmap
avg [Tue, 8 Nov 2016 07:18:33 +0000 (07:18 +0000)]
MFC r307903,307904,308039,308050: vmm/svm: iopm_bitmap and msr_bitmap
must be contiguous in physical memory

7 years agoMFC 305836: Remove 'cpu' and 'cpu_class' on amd64.
jhb [Tue, 8 Nov 2016 06:13:22 +0000 (06:13 +0000)]
MFC 305836: Remove 'cpu' and 'cpu_class' on amd64.

The 'cpu' and 'cpu_class' variables were always set to the same value
on amd64 and are legacy holdovers from i386.  Remove them entirely on
amd64.

Requested by: kib (MFC)

7 years agoMFC r307966:
jch [Mon, 7 Nov 2016 18:29:21 +0000 (18:29 +0000)]
MFC r307966:

Remove an extraneous call to soisconnected() in syncache_socket(),
introduced with r261242.  The useful and expected soisconnected()
call is done in tcp_do_segment().

Has been found as part of unrelated PR:212920 investigation.

Improve slightly (~2%) the maximum number of TCP accept per second.

Tested by: kevin.bowling_kev009.com, jch
Approved by: gnn, hiren
MFC after: 1 week
Sponsored by: Verisign, Inc
Differential Revision: https://reviews.freebsd.org/D8072

7 years agoMerge bde improvements for ddb on x86, mostly for single-stepping and
kib [Mon, 7 Nov 2016 12:10:17 +0000 (12:10 +0000)]
Merge bde improvements for ddb on x86, mostly for single-stepping and
vm86 mode.

MFC r304085 (by bde):
Fix the variables $esp, $ds, $es, $fs, $gs and $ss in vm86 mode.  Fix
PC_REGS() so that printing of instructions works in some useful cases.

MFC r304962 (by bde):
Expand error messages: print symbol names, parentheses and shift tokens,
and negative shift counts.  Fix error messages.

MFC r305612 (by bde):
Fix single-stepping of instructions emulated by vm86.

MFC r305661 (by bde):
Give the full syntax of the 'count' arg for all commmands that support
it. Give the full syntax of the 'addr' arg for these commands and some
others.  Rename it from 'address' for the generic command. Fix
description of how 'count' is supposed to work for the 'break'
command.

Don't (mis)describe the syntax of the comma for the 'step' command.

Expand the description for the generic command.

Give the full syntax for the 'examine' command.  It was also missing
the possible values for the modifier.

MFC r305663 (by bde):
Fix stopping when the specified breakpoint count is reached.

MFC r305665 (by bde):
Pass the trap type and code down from db_trap() to db_stop_at_pc() so
that the latter can easily determine what the trap type actually is
after callers are fixed to encode the type unambigously.

MFC r305807 (by bde):
Use the MI macro TRAPF_USERMODE() instead of open-coded checks for
SEL_UPL and sometimes PSL_VM.  Fix logic errors in treating vm86
bioscall mode as kernel mode.  The main place checked all the
necessary flags, but put the necessary parentheses for the PSL_VM and
PCB_VM86CALL checks in the wrong place.

MFC r305811 (by bz):
Try to fix LINT builds after r305807.

MFC r305840 (by bde):
Abort single stepping in ddb if the trap is not for single-stepping.

MFC r305862 (by bde):
Ifdef the new dr6 variable for KDB.

MFC r305864 (by bde):
Statically initialize the run mode to the one that will become current
on first entry. Don't reset to the run mode to STEP_NONE when
stopping, and remove STEP_NONE.

MFC r305865 (by bde):
Fix decoding of tf_rsp on amd64, and move TF_HAS_STACKREGS() to the
i386-only section, and fix a comment about the amd64 kernel trapframe
not having stackregs.

MFC r305897 (by bde):
Silently ignore unexpected single-step traps.

MFC r306311 (by bde):
Determine the operand/address size of %cs in a new function
db_segsize().  Use db_segsize() to set the default operand/address
size for disassembling.

Fix db_print_loc_and_inst() to ask for the normal format and not the
alternate in normal operation. Use db_segsize() to avoid trying to
print a garbage stack trace if %cs is 16 bits.

7 years agoMFC r302797 (by markj):
kib [Mon, 7 Nov 2016 11:16:23 +0000 (11:16 +0000)]
MFC r302797 (by markj):
Document DDB's "alltrace" and "show all trace" commands.

7 years agoMFC r307518:
hselasky [Mon, 7 Nov 2016 08:36:06 +0000 (08:36 +0000)]
MFC r307518:
Fix device delete child function.

When detaching device trees parent devices must be detached prior to
detaching its children. This is because parent devices can have
pointers to the child devices in their softcs which are not
invalidated by device_delete_child(). This can cause use after free
issues and panic().

Device drivers implementing trees, must ensure its detach function
detaches or deletes all its children before returning.

While at it remove now redundant device_detach() calls before
device_delete_child() and device_delete_children(), mostly in
the USB controller drivers.

Tested by: Jan Henrik Sylvester <me@janh.de>
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D8070

7 years agoMFC r308031:
hselasky [Mon, 7 Nov 2016 08:22:44 +0000 (08:22 +0000)]
MFC r308031:
Fix indentation and remove duplicate queue stopped stats increment.

Found by: Ryan Stone <rysto32@gmail.com>
Sponsored by: Mellanox Technologies

7 years agoMFC r308144 and r308165:
hselasky [Mon, 7 Nov 2016 08:14:29 +0000 (08:14 +0000)]
MFC r308144 and r308165:
Fixes for virtual T-axis buttons.

Make sure the virtual T-axis buttons gets cleared for USB mice which has
less than 6 buttons.

Make sure the virtual T-axis buttons generate button release event(s)
for continuous tilting.

PR: 213919
PR: 213957

7 years agoMFC r307804-r307805
gonzo [Sun, 6 Nov 2016 21:41:26 +0000 (21:41 +0000)]
MFC r307804-r307805

r307804:
EVDEV: Add shortcut functions for event types

Add wrappers around generic evdev_push_event for specific event types:
EV_KEY/EV_REL/EV_ABS etc...

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>

r307805:
EVDEV: ums evdev support improvements: locking and event reporting

- Use ums lock as evdev lock
- Do not cap axes values to sysmouse limits for evdev reports
- Do not map T-axis events to buttons for evdev reports
- Use shortcuts for event reporting

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
MFC after: 1 week

7 years agoMFC r306899, r307059, r307151
gonzo [Sun, 6 Nov 2016 18:40:12 +0000 (18:40 +0000)]
MFC r306899, r307059, r307151

r306899:
Fix release MSI method for ARM GIC

r307059:
INTRNG - fix MSI/MSIX release path

Use isrc in attached MSI data structure instead of using map's
isrc directly. map's isrc is set to NULL on IRQ deactivation
which happens prior to pci_release_msi so MSI_RELEASE_MSI
receives array of NULLs

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D8206

r307151:
INTRNG: Propagate IRQ activation error to API consumer

Keep resource state consistent with INTRNG state - if intr_activate_irq
fails - deactivate resource and propagate error to calling function

Reviewed by: mmel

7 years agoMFC r308174, r308261
alc [Sun, 6 Nov 2016 17:17:52 +0000 (17:17 +0000)]
MFC r308174, r308261
  Move and revise a comment about the relation between the object's paging-
  in-progress count and the vnode.  Prior to r188331, we always acquired
  the vnode lock before incrementing the object's paging-in-progress count.
  Now, we increment it before attempting to acquire the vnode lock with
  LK_NOWAIT, but we never sleep acquiring the vnode lock while we have the
  count incremented.

  In vm_fault()'s loop over the shadow chain, move a comment describing our
  invariants to a better place.  Also, add two comments concerning the
  relationship between the map and vnode locks.

7 years agoMFC r306551,r307557:
mmel [Sun, 6 Nov 2016 15:25:46 +0000 (15:25 +0000)]
MFC r306551,r307557:

  r306551:
    TEGRA: Fix bindings for cpufreq and coretemp drivers, it was broken in
    r306477.  Correct a description for coretemp driver.
  r307557:
    TEGRA: Attach cpufreq and coretemp drivers only on tegra124 SoC.  It's
    needed by GENERIC kernel.

7 years agoMFC r304970:
jhibbits [Sun, 6 Nov 2016 15:12:05 +0000 (15:12 +0000)]
MFC r304970:

Check all compatible strings on uart devices in powerpc

Summary:
Some device trees put "fsl,ns16650" first in the compatible list.  This causes
the probe code to choke, even though the device is compatible with ns16650, and
has it listed later in the tree.

Reviewed by:    nwhitehorn
Differential Revision: https://reviews.freebsd.org/D7676

7 years agoMFC r307768: jedec_ts: a driver for thermal sensors on memory modules
avg [Sun, 6 Nov 2016 13:53:50 +0000 (13:53 +0000)]
MFC r307768: jedec_ts: a driver for thermal sensors on memory modules

7 years agoMFC r307348: aibs / atk0110: add support for querying sensors via GGRP and GITM
avg [Sun, 6 Nov 2016 13:50:55 +0000 (13:50 +0000)]
MFC r307348: aibs / atk0110: add support for querying sensors via GGRP and GITM

7 years agoMFC r308114:
kib [Sun, 6 Nov 2016 12:56:07 +0000 (12:56 +0000)]
MFC r308114:
Change remained internal uses of boolean_t to bool in vm/vm_fault.c.

7 years agoMFC r308113:
kib [Sun, 6 Nov 2016 12:52:13 +0000 (12:52 +0000)]
MFC r308113:
Remove vm_pager_has_page() declaration.

7 years agoMFC r308109:
kib [Sun, 6 Nov 2016 12:49:15 +0000 (12:49 +0000)]
MFC r308109:
Remove vnode_locked label and goto.

7 years agoMFC r308108:
kib [Sun, 6 Nov 2016 12:45:19 +0000 (12:45 +0000)]
MFC r308108:
Split long line instead of unindenting it.  Add KASSERT() verifying
that a device object with the same handle has the same ops vector.

7 years agoMFC r308096, r308098, r308112
alc [Sun, 6 Nov 2016 05:57:44 +0000 (05:57 +0000)]
MFC r308096, r308098, r308112
  With one exception, "hardfault" is used like a "bool".  Change that
  exception and make it a "bool".

  The "lookup_still_valid" field is used as a "bool".  Make it one.

  Convert vm_fault_hold()'s Boolean variables that are only used
  internally to "bool".  Add a comment describing why the one
  remaining "boolean_t" was not converted.

  Merge and sort vm_fault_hold()'s "int" variable definitions.

7 years agoMFC: r302481
bapt [Sun, 6 Nov 2016 00:35:43 +0000 (00:35 +0000)]
MFC: r302481

Revert the change from errx/strerror to errc to appease gcc 4.2

I have forgotten this part in r307794

Reported by: lidl

7 years agoMFC r306460:
gonzo [Sat, 5 Nov 2016 22:09:21 +0000 (22:09 +0000)]
MFC r306460:

Add dtb module for Jetson-TK1 board

7 years agoMFC r306710:
markj [Sat, 5 Nov 2016 20:23:18 +0000 (20:23 +0000)]
MFC r306710:
CAM ccbq sanity: checks on insert and remove

7 years agoMFC r306529:
markj [Sat, 5 Nov 2016 20:22:12 +0000 (20:22 +0000)]
MFC r306529:
cam_periph_ccbwait could return while ccb in progress

7 years agoMFC r308097:
markj [Sat, 5 Nov 2016 20:15:58 +0000 (20:15 +0000)]
MFC r308097:
Fix WITNESS hints for pagequeue locks.

7 years agoMFC r307800, r307801
cy [Sat, 5 Nov 2016 17:02:38 +0000 (17:02 +0000)]
MFC r307800, r307801

r307800:

  Sources from the "current" build tree and generated sources in the
  object tree should be used instead of sources and headers from the
  already installed source tree on the build host.

  This was noticed while addressing issues in the upcoming amd update.

r307801:

  Align whitespace.

  r307801 is related to r307800 however it was a separate commit to
  HEAD in order to maintain a separation between the functional change
  and a correction of style.

7 years agoRemove A10 kernel config file, this should have been done in rr308273
manu [Sat, 5 Nov 2016 14:16:32 +0000 (14:16 +0000)]
Remove A10 kernel config file, this should have been done in rr308273

7 years agoMFC r306897,r306898:
mmel [Sat, 5 Nov 2016 11:01:56 +0000 (11:01 +0000)]
MFC r306897,r306898:

  r306897:
    Fix MSI allocation for NVidia Tegra
  r306898:
    Fix release MSI method for NVidia Tegra PCI controller

7 years agoMFC r307556,r307637:
mmel [Sat, 5 Nov 2016 11:00:19 +0000 (11:00 +0000)]
MFC r307556,r307637:

  r307556:
    TEGRA: Really implement early printf. The original version was cut&pasted
    from another SoC.
  r307637:
    TEGRA: Raise minimum voltage for CPU, original 0.9 V was too optimistic.
    While I'm in, remove duplicated line from CPU frequency table.

7 years agoMFC r306447,r306477:
mmel [Sat, 5 Nov 2016 10:56:32 +0000 (10:56 +0000)]
MFC r306447,r306477:

  r306447:
    TEGRA: Rename (cut & pasted) genahci to tegra_ahci. Make device class
    definition static.
  r306477:
    TEGRA: Prepare Tegra subtree for inclusion into ARM generic kernel.
     - use DEFINE_CLASS_0() for driver classes - unify driver names - cleanup
     driver definitions and bindings

7 years agoMFC r302961,r304460,r304461:
mmel [Sat, 5 Nov 2016 10:48:44 +0000 (10:48 +0000)]
MFC r302961,r304460,r304461:

  r302961:
    TEGRA: Subclass Tegra PCIE driver from ofw_pci base driver.  Remove now
    redundant code.
  r304460:
    TEGRA: Implement MSI/MSIX interrupts for pcie controller.
  r304461:
    TEGRA: Remove forgotten debug printf.

7 years agoMFC r304459,r305527:
mmel [Sat, 5 Nov 2016 10:23:02 +0000 (10:23 +0000)]
MFC r304459,r305527:

  r304459:
    INTRNG: Rework handling with resources. Partially revert r301453.
     - Read interrupt properties at bus enumeration time and store
       it into global mapping table.
     - At bus_activate_resource() time, given mapping entry is resolved and
       connected to real interrupt source. A copy of mapping entry is attached
       to given resource.
     - At bus_setup_intr() time, mapping entry stored in resource is used
       for delivery of requested interrupt configuration.
     - For MSI/MSIX interrupts, mapping entry is created within
       pci_alloc_msi()/pci_alloc_msix() call.
     - For legacy PCI interrupts, mapping entry must be created within
       pcib_route_interrupt() by pcib driver itself.
  r305527:
    Fix MIPS INTRNG (both FDT and non-FDT) behaviour broken by r304459

7 years agoMFC r308094:
kib [Sat, 5 Nov 2016 10:09:21 +0000 (10:09 +0000)]
MFC r308094:
Add unlock_vp() helper.

MFC r308095 (by markj):
Add one more use of unlock_vp().

7 years agoMFC r306782-r306783
bapt [Sat, 5 Nov 2016 09:46:48 +0000 (09:46 +0000)]
MFC r306782-r306783

r306782:
localedef: Fix ctype dump (fixed wide spread errors)

This commit is from John Marino in dragonfly with the following commit log:

====
This was a CTYPE encoding error involving consecutive points of the same
ctype.  It was reported by myself to Illumos over a year ago but I was
unsure if it was only happening on BSD.  Given the cause, the bug is also
present on Illumos.

Basically, if consecutive points were of the exact same ctype, they would
be defined as a range regardless.  For example, all of these would be
considered equivalent:

  <A> ... <C>, <H>  (converts to <A> .. <H>)
  <A>, <B>, <H>     (converts to <A> .. <H>)
  <A>, <J> ... <H>  (converts to <A> .. <H>)

So all the points that shouldn't have been defined got "bridged" by the
extreme points.

The effects were recently reported to FreeBSD on PR 213013.  There are
countless places were the ctype flags are misdefined, so this is a major
fix that has to be MFC'd.
====

This reveals a bad change I did on the testsuite: while 0x07FF is a valid
unicode it is not used yet (reserved for future use)

PR: 213013
Submitted by: marino@
Reported by: Kurtis Rader <krader@skepticism.us>
Obtained from: Dragonfly
MFC after: 1 month

r306783:
localedef: Improve cc_list parsing

original commit log:
=====
I had originally suspected the parsing of ctype definition files as being
the source of the ctype flag mis-definitions, but it wasn't.  In the
process, I simplified the cc_list parsing so I'm committing the no-impact
improvement separately.  It removes some parsing redundancies and
won't parse partial range definitions anymore.
====

Submitted by: marino
Obtained from: Dragonfly
MFC after: 1 month

7 years agoMFC r307558:
mmel [Sat, 5 Nov 2016 04:40:58 +0000 (04:40 +0000)]
MFC r307558:

  REGULATOR: Move functions for handling with regulator ranges to common file.
  They can be useful for other PMICs.

7 years agoMFC r306667,r306668:
mmel [Sat, 5 Nov 2016 04:36:12 +0000 (04:36 +0000)]
MFC r306667,r306668:

  r306667:
    ARM: Add atomic_swap_64(). It's need by linuxkpi and drm-next-4.7.
  r306668:
    ARM: Add mising early clobber modifier in atomic_swap_32().

7 years agoMFC r306666:
mmel [Sat, 5 Nov 2016 04:32:46 +0000 (04:32 +0000)]
MFC r306666:

  TEGRA: Fix PCIe link timeout.

7 years agoMFC r306902:
mmel [Sat, 5 Nov 2016 04:30:44 +0000 (04:30 +0000)]
MFC r306902:

  ARM: Remove unused includes.

7 years agoMFC r302523,r302528:
mmel [Sat, 5 Nov 2016 04:17:32 +0000 (04:17 +0000)]
MFC r302523,r302528:

  r302523:
    Add clk_get_by_ofw_node_index, which is like clk_get_by_ofw_index but
    operates on a specific OF node instead of the pass in device's OF node.
  r302528:
    EXTRES: Add OF node as argument to all <foo>_get_by_ofw_<bar>() functions.
    In some cases, the driver must handle given properties located in specific
    OF subnode. Instead of creating duplicate set of function, add 'node' as
    argument to existing functions, defaulting it to device OF node.

7 years agoMFC r308270:
gjb [Fri, 4 Nov 2016 17:55:50 +0000 (17:55 +0000)]
MFC r308270:
 MFV r308265: Update tzdata to 2016i.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r305689:
manu [Fri, 4 Nov 2016 01:56:29 +0000 (01:56 +0000)]
MFC r305689:

a10_mmc: Remove completly the PIO code now all access is done by DMA.
Rename registers as in the manual.
Do a hard reset of the controller before a soft one.
Since DMA is always used remove dependancy on allwinner_soc_family, it was used
to differentiate SoC as the fdt compatible string were the same.

Tested on A10, A20, H3 and A64.

Reviewed by: jmcneill
Differential Revision: https://reviews.freebsd.org/D6868

7 years agoMFC r302522, r302591-r302592 (by jmcneill)
manu [Fri, 4 Nov 2016 01:50:59 +0000 (01:50 +0000)]
MFC r302522, r302591-r302592 (by jmcneill)

r302522:
Align descriptors and data buffers to 32 bits. This restriction is
described in the A20 (and later) user manuals.

r302591:
Add support for arm64. The allwinner_soc_family() function is not available
on arm64 and all SoCs using the old FIFO register location are 32-bit only,
so unconditionally use the new location for arm64.

Reviewed by: andrew, manu

r302592:
Return early from bus_dmamap_load callback if the error indicator is set.

Reviewed by: andrew, manu

7 years agoMFC r305739-r305740
manu [Fri, 4 Nov 2016 01:12:32 +0000 (01:12 +0000)]
MFC r305739-r305740

r305739:
Use "generic" ALLWINNER_UP kernel config for Cubieboard release.

Reviewed by: gjb
MFC after: 2 week

r305740:
Remove CUBIEBOARD kernel config file.
Every Allwinner board should either use ALLWINNER (SMP) or ALLWINER_UP kernel
config files.

MFC after: 2 week

7 years agoMFC r304710:
manu [Fri, 4 Nov 2016 01:06:14 +0000 (01:06 +0000)]
MFC r304710:

Allwinner: Add thermal sensor driver for A10/A20
The thermal sensor lives in the touch screen controller. Touch screen part
isn't done for now.
Temperature is read every ~2 seconds and exposed via sysctl.

7 years agoMFC r304566:
manu [Fri, 4 Nov 2016 00:58:37 +0000 (00:58 +0000)]
MFC r304566:

allwinner: Remove a20/a20_cpu_cfg.c from the build.
This was needed when we used the SoC specific timer and not the generic-timer.

7 years agoMFC r304318, r304464
manu [Fri, 4 Nov 2016 00:54:21 +0000 (00:54 +0000)]
MFC r304318, r304464

r304318:
Rename allwinner_machdep.{c.h} to aw_machdep.{c.h}  as all allwinner source
files are name aw_*

r304464:
Allwinner: Move a10_padconf.c into a10 subdirectory.

7 years agoMFC r304316:
manu [Fri, 4 Nov 2016 00:43:12 +0000 (00:43 +0000)]
MFC r304316:

Rename kernel config A10 into ALLWINNER_UP as it is intend to work with all
Allwinner Uniprocessor SoC.
As of now it works with A10 and A13 (and possibly R8 as it is the same as the A13).
Move files.a10 into a1o subdirectory as it should be.
Rename std.a10 into std.allwinner_up

7 years agoMFC r304297:
manu [Fri, 4 Nov 2016 00:34:12 +0000 (00:34 +0000)]
MFC r304297:

Add sun5i-a13-olinuxino to the build.

7 years agoMFC r304291:
manu [Fri, 4 Nov 2016 00:32:25 +0000 (00:32 +0000)]
MFC r304291:

Remove pullup settings for MMC pins, this is not needed since r304290

7 years agoMFC r304023:
trasz [Thu, 3 Nov 2016 15:04:16 +0000 (15:04 +0000)]
MFC r304023:

Print vnode details when vnode locking assertion gets triggered.

7 years agoMFC r305834:
trasz [Thu, 3 Nov 2016 15:01:23 +0000 (15:01 +0000)]
MFC r305834:

Change the getnewvnode(9) tag for nullfs from "null" to "nullfs".
It's more consistent, and besides, the "null" alone looks weird.

MFC after: 1 month

7 years agoMFC r304570:
trasz [Thu, 3 Nov 2016 14:58:26 +0000 (14:58 +0000)]
MFC r304570:

Add the "-n" flag to cron(8), to prevent it from daemonizing.
This makes it possible to use it with external supervisors.
The "-n" flag name is compatible with Linux, NetBSD, and OpenBSD.

7 years agoMFC r302624:
trasz [Thu, 3 Nov 2016 14:49:26 +0000 (14:49 +0000)]
MFC r302624:

Add some .Xrs to getloginclass(2).

7 years agoMFC r303476:
trasz [Thu, 3 Nov 2016 14:48:10 +0000 (14:48 +0000)]
MFC r303476:

Fix MTP description in the comment.

7 years agoMFC r303477:
trasz [Thu, 3 Nov 2016 14:45:58 +0000 (14:45 +0000)]
MFC r303477:

Improve error message.

7 years agoMFC r303478:
trasz [Thu, 3 Nov 2016 14:43:30 +0000 (14:43 +0000)]
MFC r303478:

Remove write-only variable.

7 years agoMFC r303961:
trasz [Thu, 3 Nov 2016 14:40:34 +0000 (14:40 +0000)]
MFC r303961:

Implement autofs_print(), for improved debugging experience.

7 years agoMFC r306071:
trasz [Thu, 3 Nov 2016 14:36:57 +0000 (14:36 +0000)]
MFC r306071:

Fix bug introduced with r302388, which could cause processes accessing
automounted shares to hang with "vfs_busy" wchan.

(As a workaround one can run 'automount -u' from cron.)

7 years agoMFC r307994: 3746 ZRLs are racy
avg [Thu, 3 Nov 2016 08:54:04 +0000 (08:54 +0000)]
MFC r307994: 3746 ZRLs are racy

PR: 204037

7 years agoMFC r307182,307191,307192: rc.d/zfsbe: new script designed for BE support
avg [Thu, 3 Nov 2016 08:34:24 +0000 (08:34 +0000)]
MFC r307182,307191,307192: rc.d/zfsbe: new script designed for BE support

7 years agoMFC: r307694
rmacklem [Thu, 3 Nov 2016 00:50:20 +0000 (00:50 +0000)]
MFC: r307694
A problem w.r.t. interoperation between the FreeBSD NFSv4.1 server with
delegations enabled and the Linux NFSv4.1 client was reported in
reviews.freebsd.org/D7891.
I believe that the FreeBSD server behaviour conforms to the RFC and that
the Linux client has a bug. Therefore, I do not think the proposed patch
is appropriate. When nfsrv_writedelegifpos is non-zero, the FreeBSD
server will issue a write delegation for a read open if possible.
The Linux client then erroneously assumes that the credentials used for
the read open can write the file.
This patch reverses the default value for nfsrv_writedelegifpos to 0 so
that the default behaviour is Linux compatible and adds a sysctl that can
be used to set nfsrv_writedelegifpos.

This change should only affect users that are mounting a FreeBSD server
with delegations enabled (they are not enabled by default) with a Linux
NFSv4.1 client mount.

7 years agoMFC r308148, r308150, r308156:
gjb [Thu, 3 Nov 2016 00:34:37 +0000 (00:34 +0000)]
MFC r308148, r308150, r308156:

 r308148:
  Fix packaging calendar(1) files.

 r308150:
  Fix packaging /usr/share/examples/etc.

 r308156:
  Fix packaging /usr/lib{,32}/libgcc_eh{,_p}.a.

Sponsored by: The FreeBSD Foundation

7 years agoDocument SA-16:33-35.
gjb [Wed, 2 Nov 2016 18:11:06 +0000 (18:11 +0000)]
Document SA-16:33-35.

Sponsored by: The FreeBSD Foundation

7 years agoMFC r307626:
kib [Wed, 2 Nov 2016 08:46:04 +0000 (08:46 +0000)]
MFC r307626:
Add FFS pager, which uses buffer cache read operation to validate pages.

For now, the pager is disabled by default in the stable branch.

7 years agoMFC r307649:
kib [Wed, 2 Nov 2016 08:41:01 +0000 (08:41 +0000)]
MFC r307649:
Partial workaround for Intel PCI adapters reading past the end of the
host-programmed DMA regions.

7 years agoMFC r308197: MFV r308196:
delphij [Wed, 2 Nov 2016 06:56:35 +0000 (06:56 +0000)]
MFC r308197: MFV r308196:

Fix OpenSSH remote Denial of Service vulnerability.

Security: CVE-2016-8858

7 years agoMFC r307545
hiren [Tue, 1 Nov 2016 22:40:25 +0000 (22:40 +0000)]
MFC r307545
Make sure tcp_mss() has the same check as tcp_mss_update() to have t_maxseg set
to at least 64.

This is still just a coverup to avoid kernel panic and not an actual fix.

PR: 213232
Sponsored by: Limelight Networks

7 years agoMFC r307861:
mm [Mon, 31 Oct 2016 21:57:18 +0000 (21:57 +0000)]
MFC r307861:
Update libarchive to 3.2.2

Most of the post-3.2.1 fixes have already been merged. This update contains
just the version bump and some fixes to the test framework.

7 years agoMFC r307785:
bapt [Mon, 31 Oct 2016 18:27:38 +0000 (18:27 +0000)]
MFC r307785:

Import pci_vendors 2016.10.20

7 years agoDocument EN-16:17-18, SA-16:26-32
gjb [Mon, 31 Oct 2016 16:44:31 +0000 (16:44 +0000)]
Document EN-16:17-18, SA-16:26-32

Sponsored by: The FreeBSD Foundation

7 years agoMFC r308038:
sbruno [Mon, 31 Oct 2016 15:46:06 +0000 (15:46 +0000)]
MFC r308038:

  The buffer address is always overwritten in the extended descriptor format,
  we have to refresh it ... always.  This fixes problems reported in NetMap
  with em(4) devices after conversion to extended descriptor format in
  svn r293331.

7 years agoMFC r307523: Make pass driver better support CAM_CDB_POINTER flag.
mav [Mon, 31 Oct 2016 07:21:07 +0000 (07:21 +0000)]
MFC r307523: Make pass driver better support CAM_CDB_POINTER flag.

Previously pass driver just ignored the flag, making random kernel code
access user-space pointer, sometime causing crashes even for correctly
written applications if user-level context was switched or swapped out.
This patch tries to copyin the CDB into kernel space to avoid it.

7 years agoMFC r306712
alc [Sun, 30 Oct 2016 18:33:57 +0000 (18:33 +0000)]
MFC r306712
  Make the page daemon's notion of what kind of pass is being performed
  by vm_pageout_scan() local to vm_pageout_worker().  There is no reason
  to store the pass in the NUMA domain structure.

7 years agoMFC r306706
alc [Sun, 30 Oct 2016 18:11:35 +0000 (18:11 +0000)]
MFC r306706
  Change vm_pageout_scan() to return a value indicating whether the free page
  target was met.

  Previously, vm_pageout_worker() itself checked the length of the free page
  queues to determine whether vm_pageout_scan(pass >= 1)'s inactive queue scan
  freed enough pages to meet the free page target.  Specifically,
  vm_pageout_worker() used vm_paging_needed().  The trouble with
  vm_paging_needed() is that it compares the length of the free page queues to
  the wakeup threshold for the page daemon, which is much lower than the free
  page target.  Consequently, vm_pageout_worker() could conclude that the
  inactive queue scan succeeded in meeting its free page target when in fact
  it did not; and rather than immediately triggering an all-out laundering
  pass over the inactive queue, vm_pageout_worker() would go back to sleep
  waiting for the free page count to fall below the page daemon wakeup
  threshold again, at which point it will perform another limited (pass == 1)
  scan over the inactive queue.

  Changing vm_pageout_worker() to use vm_page_count_target() instead of
  vm_paging_needed() won't work because any page allocations that happen
  concurrently with the inactive queue scan will result in the free page count
  being below the target at the end of a successful scan.  Instead, having
  vm_pageout_scan() return a value indicating success or failure is the most
  straightforward fix.

7 years agoMFC r307821:
kib [Sun, 30 Oct 2016 11:42:05 +0000 (11:42 +0000)]
MFC r307821:
Use proper type for local variable.

PR: 212520

7 years agoMFC r307227 and r307343:
ed [Sat, 29 Oct 2016 14:41:22 +0000 (14:41 +0000)]
MFC r307227 and r307343:

  Improve typing of POSIX search tree functions.

  Back in 2015 when I reimplemented these functions to use an AVL tree, I
  was annoyed by the weakness of the typing of these functions. Both tree
  nodes and keys are represented by 'void *', meaning that things like the
  documentation for these functions are an absolute train wreck.

  To make things worse, users of these functions need to cast the return
  value of tfind()/tsearch() from 'void *' to 'type_of_key **' in order to
  access the key. Technically speaking such casts violate aliasing rules.
  I've observed actual breakages as a result of this by enabling features
  like LTO.

  I've filed a bug report at the Austin Group. Looking at the way the bug
  got resolved, they made a pretty good step in the right direction. A new
  type 'posix_tnode' has been added to correspond to tree nodes. It is
  still defined as 'void' for source-level compatibility, but in the very
  far future it could be replaced by a proper structure type containing a
  key pointer.

7 years agoMFC r306456: Add #ifdef _KERNEL around send_holes_without_birth_time sysctl.
mav [Sat, 29 Oct 2016 08:55:56 +0000 (08:55 +0000)]
MFC r306456: Add #ifdef _KERNEL around send_holes_without_birth_time sysctl.

7 years agoMFC r306425: MFV r306423:
mav [Sat, 29 Oct 2016 08:55:13 +0000 (08:55 +0000)]
MFC r306425: MFV r306423:
7402 Create tunable to ignore hole_birth feature

Until we can resolve the numerous hole_birth bugs that have cropped up
recently, and come up with a way going forwards to protect users from
corruption, we should disable the hole_birth feature.  Using a tunable
allows those who are confident that their data is correct to continue to
take advantage of the feature.

Closes #188

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>

7 years agoMFC r306424: MFV r306422:
mav [Sat, 29 Oct 2016 08:53:38 +0000 (08:53 +0000)]
MFC r306424: MFV r306422:
7254 ztest failed assertion in ztest_dataset_dirobj_verify: dirobjs + 1 == usedobjs

dsl_dataset_space is looking at the ds_bp's fill count while
dmu_objset_write_ready() is concurrently modifying it. This fix adds an
rrwlock to protect the ds_bp.

Closes #180

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>

7 years agoMFC r307507, r307509, r307515:
mav [Sat, 29 Oct 2016 08:47:23 +0000 (08:47 +0000)]
MFC r307507, r307509, r307515:
Consider device as clean even if SYNCHRONIZE CACHE failed.

If device reservation was preempted by other initiator, our sync request
will always fail.  Without this change CAM tried to sync cache on every
following device close, including numerous GEOM tasting opens/closes,
causing lots of useless noise in logs.

7 years agoMFC r307374: Add LU option to control reported provisioning type.
mav [Sat, 29 Oct 2016 08:44:09 +0000 (08:44 +0000)]
MFC r307374: Add LU option to control reported provisioning type.

7 years agoMFC r307350: Add LUN options to limit UNMAP and WRITE SAME sizes.
mav [Sat, 29 Oct 2016 08:43:34 +0000 (08:43 +0000)]
MFC r307350: Add LUN options to limit UNMAP and WRITE SAME sizes.

CTL itself has no limits on on UNMAP and WRITE SAME sizes.  But depending
on backends large requests may take too much time.  To avoid that new
configuration options allow to hint initiator maximal sizes it should not
exceed.

7 years agoMFC r304918: Decode some new ATA commands found in ACS-3.
mav [Sat, 29 Oct 2016 08:40:47 +0000 (08:40 +0000)]
MFC r304918: Decode some new ATA commands found in ACS-3.

7 years agoMFC r307731: Add names for some DASP devices.
mav [Fri, 28 Oct 2016 19:45:39 +0000 (19:45 +0000)]
MFC r307731: Add names for some DASP devices.

7 years agoCorrected non-portable reuse of va_list in dt_printf()
gnn [Fri, 28 Oct 2016 16:27:58 +0000 (16:27 +0000)]
Corrected non-portable reuse of va_list in dt_printf()

Submitted by:   Graeme Jenkinson
Reviewed by:    markj

7 years agobump __FreeBSD_version for libzfs_core.h
avg [Fri, 28 Oct 2016 15:20:53 +0000 (15:20 +0000)]
bump __FreeBSD_version for libzfs_core.h

Direct commit.

7 years agoMFC r307141: remove a few stray spaces from sys/param.h
avg [Fri, 28 Oct 2016 15:17:53 +0000 (15:17 +0000)]
MFC r307141: remove a few stray spaces from sys/param.h

7 years agoMFC r307131: install header files required development with libzfs_core
avg [Fri, 28 Oct 2016 15:15:27 +0000 (15:15 +0000)]
MFC r307131: install header files required development with libzfs_core

7 years agoMFC r307130: smbus: allow child devices to be added via hints
avg [Fri, 28 Oct 2016 14:50:23 +0000 (14:50 +0000)]
MFC r307130: smbus: allow child devices to be added via hints