]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agohyperv/hn: Reorganize synthetic parts attach code.
sephe [Tue, 13 Sep 2016 05:54:31 +0000 (05:54 +0000)]
hyperv/hn: Reorganize synthetic parts attach code.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7860

7 years agohyperv/hn: Regroup synthetic parts attach code.
sephe [Tue, 13 Sep 2016 05:41:13 +0000 (05:41 +0000)]
hyperv/hn: Regroup synthetic parts attach code.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7859

7 years agohyperv/hn: Reorganize channel attach/detach code.
sephe [Tue, 13 Sep 2016 05:27:36 +0000 (05:27 +0000)]
hyperv/hn: Reorganize channel attach/detach code.

This paves the way for further attach/detach code reorganization.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7858

7 years agoAdd another badly-needed simple example to the pw(8) man page.
wblock [Tue, 13 Sep 2016 02:18:29 +0000 (02:18 +0000)]
Add another badly-needed simple example to the pw(8) man page.

7 years agonet80211: fix possible panic in adhoc mode (INIT -> RUN state transition).
avos [Mon, 12 Sep 2016 23:00:31 +0000 (23:00 +0000)]
net80211: fix possible panic in adhoc mode (INIT -> RUN state transition).

In case if there is already running interface, a second non-sta
interface will omit scanning, going directly to RUN state. Handle
this case for adhoc mode appropriately.

Tested with RTL8821AU, 2 vaps in IBSS mode.

7 years agofd: add fget_cap and fget_cap_locked primitives
oshogbo [Mon, 12 Sep 2016 22:46:19 +0000 (22:46 +0000)]
fd: add fget_cap and fget_cap_locked primitives

They can be used to obtain capabilities along with a referenced fp.

Reviewed by: mjg@

7 years agoFixup whitespace, repace space with a tab.
cy [Mon, 12 Sep 2016 19:31:14 +0000 (19:31 +0000)]
Fixup whitespace, repace space with a tab.

X-MFC-with: Upcoming amd update.

7 years agoRemove explicit device_verbose() from the t4iov driver detach routine
jhb [Mon, 12 Sep 2016 18:07:06 +0000 (18:07 +0000)]
Remove explicit device_verbose() from the t4iov driver detach routine
now that this case is handled generically.

7 years agoMake device_quiet() an attachment property.
jhb [Mon, 12 Sep 2016 18:06:42 +0000 (18:06 +0000)]
Make device_quiet() an attachment property.

In particular, reset the DF_QUIET flag when detaching from a device so
that a driver that marks a device quiet doesn't dictate policy for a
different driver that may claim the device in the future.

Reviewed by: rpokala, wblock
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D7803

7 years agoRemove semicolon from the end of the macro definition
gonzo [Mon, 12 Sep 2016 17:29:20 +0000 (17:29 +0000)]
Remove semicolon from the end of the macro definition

Reported by: hans

7 years agourtwn: fix possible driver hang when beacon miss is detected.
avos [Mon, 12 Sep 2016 16:46:14 +0000 (16:46 +0000)]
urtwn: fix possible driver hang when beacon miss is detected.

7 years agoFix typo in comment.
kib [Mon, 12 Sep 2016 16:44:21 +0000 (16:44 +0000)]
Fix typo in comment.

MFC after: 3 days

7 years agoAdd SMP support for MTI Malta 34kf CPU.
br [Mon, 12 Sep 2016 16:38:51 +0000 (16:38 +0000)]
Add SMP support for MTI Malta 34kf CPU.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoRemove CUBIEBOARD kernel config file.
manu [Mon, 12 Sep 2016 16:13:27 +0000 (16:13 +0000)]
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 agoUse "generic" ALLWINNER_UP kernel config for Cubieboard release.
manu [Mon, 12 Sep 2016 16:10:47 +0000 (16:10 +0000)]
Use "generic" ALLWINNER_UP kernel config for Cubieboard release.

Reviewed by: gjb
MFC after: 2 week

7 years agobspatch: remove superfluous newlines from errx strings
emaste [Mon, 12 Sep 2016 14:28:38 +0000 (14:28 +0000)]
bspatch: remove superfluous newlines from errx strings

7 years agohyperv/hn: Pull ether address and link status extraction up.
sephe [Mon, 12 Sep 2016 06:12:28 +0000 (06:12 +0000)]
hyperv/hn: Pull ether address and link status extraction up.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7831

7 years agohyperv/hn: Reorganize RNDIS attach
sephe [Mon, 12 Sep 2016 05:59:39 +0000 (05:59 +0000)]
hyperv/hn: Reorganize RNDIS attach

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7830

7 years agohyperv/hn: Reorganize sub-channel allocation.
sephe [Mon, 12 Sep 2016 05:37:44 +0000 (05:37 +0000)]
hyperv/hn: Reorganize sub-channel allocation.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7829

7 years agohyperv/hn: Function rename.
sephe [Mon, 12 Sep 2016 05:28:50 +0000 (05:28 +0000)]
hyperv/hn: Function rename.

- Minor style changes.
- Nuke unnecessary indirection.
- Nuke unapplied comment.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7827

7 years agoReport the Silicon Revisions for the AM335x SoCs correctly.
imp [Mon, 12 Sep 2016 05:19:56 +0000 (05:19 +0000)]
Report the Silicon Revisions for the AM335x SoCs correctly.

7 years agohyperv/hn: Rename chimney sending buffer connect/disconnect functions.
sephe [Mon, 12 Sep 2016 05:18:30 +0000 (05:18 +0000)]
hyperv/hn: Rename chimney sending buffer connect/disconnect functions.

Minor cleanup and wording in error messages.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7825

7 years agohyperv/hn: Rename RXBUF connect/disconnect functions.
sephe [Mon, 12 Sep 2016 05:09:45 +0000 (05:09 +0000)]
hyperv/hn: Rename RXBUF connect/disconnect functions.

Minor cleanup and wording in error messages.

MFC after: 1 week
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7823

7 years ago[ath_hal] quieten a bit of the boot messages - this stuff has been working for a...
adrian [Mon, 12 Sep 2016 04:58:59 +0000 (04:58 +0000)]
[ath_hal] quieten a bit of the boot messages - this stuff has been working for a while.

7 years agox86: Use sx lock for interrupt sources.
sephe [Mon, 12 Sep 2016 04:57:58 +0000 (04:57 +0000)]
x86: Use sx lock for interrupt sources.

- Certain pic_assign_cpu, e.g. msi_assign_cpu can have quite a long
  call chain.  For msi_assign_cpu, mutex makes complex PCI bridge
  drivers more tricky, e.g. sleep can note be called, etc, it will
  be pretty tricky for upcoming Hyper-V PCI bridge driver for PCI
  pass-through.
- It is not used on any hot code path nor non-sleepable context, so
  sx should have the same effect as mutex.

PIC list is still protected by mutex to keep suspend/resume work.

Discussed with: jhb
Reviewed by: jhb
MFC after: 3 weeks
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D7784

7 years ago[ath] set the relevant TOA/TOD locationing bits when trying to do locationing.
adrian [Mon, 12 Sep 2016 04:55:13 +0000 (04:55 +0000)]
[ath] set the relevant TOA/TOD locationing bits when trying to do locationing.

* Don't do RTS/CTS - experiments show that we get ACK frames for each of them
  and this ends up causing the timestamps to look all funny.
* Set the HAL_TXDESC_POS bit, so the AR9300 HAL sets up the hardware to return
  location and CSI information.

7 years ago[ath] tweak the TX EDMA debugging a bit.
adrian [Mon, 12 Sep 2016 04:50:40 +0000 (04:50 +0000)]
[ath] tweak the TX EDMA debugging a bit.

I've used this to debug some amusing issues with the EDMA code.

Tested:

* AR9380, STA mode
* AR9380, TDMA mode (master, slave)

7 years agoCleanup evdev support for TI ADC/TS
gonzo [Mon, 12 Sep 2016 01:18:25 +0000 (01:18 +0000)]
Cleanup evdev support for TI ADC/TS

- evdev_set_methods call is not required if actual methods are no-ops
- evdev_set_serial is also optional if there is no meaningful input device
    identifier
- evdev_set_id on the other hand is mandatory, so set virtual bus with
    dummy vendor/product/version

Suggested by: Vladimir Kondratiev

7 years agocxgbe(4): Catch up with the rename of tlscaps -> cryptocaps. TLS is one
np [Mon, 12 Sep 2016 00:15:40 +0000 (00:15 +0000)]
cxgbe(4): Catch up with the rename of tlscaps -> cryptocaps.  TLS is one
of the capabilities of the crypto engine in T6.

Sponsored by: Chelsio Communications

7 years agocxgbe(4): Add support for additional port types and link speeds.
np [Sun, 11 Sep 2016 23:08:57 +0000 (23:08 +0000)]
cxgbe(4): Add support for additional port types and link speeds.

Sponsored by: Chelsio Communications.

7 years agoioat(4): Start poll timer when descriptors are released to HW
cem [Sun, 11 Sep 2016 20:15:41 +0000 (20:15 +0000)]
ioat(4): Start poll timer when descriptors are released to HW

Rather than when the software creates the descriptors.

Sponsored by: Dell EMC Isilon

7 years agoioat(4): De-spam ioat_process_events KTR logs
cem [Sun, 11 Sep 2016 20:14:19 +0000 (20:14 +0000)]
ioat(4): De-spam ioat_process_events KTR logs

Sponsored by: Dell EMC Isilon

7 years agoAdd more obsolete files
antoine [Sun, 11 Sep 2016 19:51:32 +0000 (19:51 +0000)]
Add more obsolete files

7 years agoAdd evdev support to TI ADC/touchscreen driver
gonzo [Sun, 11 Sep 2016 19:08:21 +0000 (19:08 +0000)]
Add evdev support to TI ADC/touchscreen driver

Add generic evdev support to touchscreen part of ti_adc: two absolute
coordinates + button touch to indicate pen position. Pressure value
reporting is not implemented yet.

Tested on: Beaglebone Black + 4DCAPE-43T + tslib

7 years agoDirectly set the O_NONBLOCK flags via open(2)
bapt [Sun, 11 Sep 2016 18:58:44 +0000 (18:58 +0000)]
Directly set the O_NONBLOCK flags via open(2)

7 years agoAdd evdev protocol implementation
gonzo [Sun, 11 Sep 2016 18:56:38 +0000 (18:56 +0000)]
Add evdev protocol implementation

evdev is a generic input event interface compatible with Linux
evdev API at ioctl level. It allows using unmodified (apart from
header name) input evdev drivers in Xorg, Wayland, Qt.

This commit has only generic kernel API. evdev support for individual
hardware drivers like ukbd, ums, atkbd, etc. will be committed later.

Project was started by Jakub Klama as part of GSoC 2014. Jakub's
evdev implementation was later used as a base, updated and finished
by Vladimir Kondratiev.

Submitted by: Vladimir Kondratiev <wulf@cicgroup.ru>
Reviewed by: adrian, hans
Differential Revision: https://reviews.freebsd.org/D6998

7 years agocxgbe(4): Rename the debug_flags driver tunable/sysctl to dflags.
np [Sun, 11 Sep 2016 18:05:37 +0000 (18:05 +0000)]
cxgbe(4): Rename the debug_flags driver tunable/sysctl to dflags.
Tunables that end with _flags are special.

Sponsored by: Chelsio Communications

7 years agocxgbe(4): Deal with the slightly different SGE_STAT_CFG in T6.
np [Sun, 11 Sep 2016 17:57:53 +0000 (17:57 +0000)]
cxgbe(4): Deal with the slightly different SGE_STAT_CFG in T6.

Sponsored by: Chelsio Communications

7 years agocxgbe(4): Use smaller min/max bursts for fl descriptors with a T6.
np [Sun, 11 Sep 2016 17:51:17 +0000 (17:51 +0000)]
cxgbe(4): Use smaller min/max bursts for fl descriptors with a T6.

Sponsored by: Chelsio Communications

7 years agoMFV r268120:
allanjude [Sun, 11 Sep 2016 17:48:06 +0000 (17:48 +0000)]
MFV r268120:
  4936 lz4 could theoretically overflow a pointer with a certain input

  illumos/illumos-gate@58d0718061c87e3d647c891ec5281b93c08dba4e

Reviewed by: delphij
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D7850

7 years agoMark libifconfig as private until the API/ABI is stable
allanjude [Sun, 11 Sep 2016 17:44:35 +0000 (17:44 +0000)]
Mark libifconfig as private until the API/ABI is stable

libifconfig is still experimental and under active development.
To avoid making any ABI promises, mark the library as private

Suggested by: bapt
Reviewed by: kp

7 years agocxgbe(4): Update the pad_boundary calculation for T6, which has a
np [Sun, 11 Sep 2016 17:22:54 +0000 (17:22 +0000)]
cxgbe(4): Update the pad_boundary calculation for T6, which has a
different range of boundaries.

Sponsored by: Chelsio Communications

7 years agocxgbe(4): Use correct macro for header length with T6 ASICs. This
np [Sun, 11 Sep 2016 16:11:51 +0000 (16:11 +0000)]
cxgbe(4): Use correct macro for header length with T6 ASICs.  This
affects the transmit of the VF driver only.

Sponsored by: Chelsio Communications

7 years agocxgbe(4): Set up fl_starve_threshold2 accurately for T6.
np [Sun, 11 Sep 2016 16:06:17 +0000 (16:06 +0000)]
cxgbe(4): Set up fl_starve_threshold2 accurately for T6.

Sponsored by: Chelsio Communications

7 years agoAdd FPU_KERN_NOCTX flag to the fpu_kern_enter() function on amd64.
kib [Sun, 11 Sep 2016 09:14:07 +0000 (09:14 +0000)]
Add FPU_KERN_NOCTX flag to the fpu_kern_enter() function on amd64.

The flag specifies that the block which uses FPU must be executed in
critical section, i.e. take no context switches, and does not need an
FPU save area during the execution.

It is intended to be applied around fast and short code pathes where
save area allocation is impossible or undesirable, due to context or
due to the relative cost of calculation vs. allocation.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agocap_enter.2: describe flag returned by cap_getmode
emaste [Sun, 11 Sep 2016 01:11:47 +0000 (01:11 +0000)]
cap_enter.2: describe flag returned by cap_getmode

Previously the flag returned by cap_getmode was not described explicitly
in the man page.

Reviewed by: wblock
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D7822

7 years agoa10_mmc: Remove completly the PIO code now all access is done by DMA.
manu [Sat, 10 Sep 2016 17:45:35 +0000 (17:45 +0000)]
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 agoVarious changes to pmap_ts_referenced()
alc [Sat, 10 Sep 2016 16:49:25 +0000 (16:49 +0000)]
Various changes to pmap_ts_referenced()

Move PMAP_TS_REFERENCED_MAX out of the various pmap implementations and
into vm/pmap.h, and describe what its purpose is.  Eliminate the archaic
"XXX" comment about its value.  I don't believe that its exact value, e.g.,
5 versus 6, matters.

Update the arm64 and riscv pmap implementations of pmap_ts_referenced()
to opportunistically update the page's dirty field.

On amd64, use the PDE value already cached in a local variable rather than
dereferencing a pointer again and again.

Reviewed by: kib, markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D7836

7 years agocache: improve scalability by introducing bucket locks
mjg [Sat, 10 Sep 2016 16:29:53 +0000 (16:29 +0000)]
cache: improve scalability by introducing bucket locks

An array of bucket locks is added.

All modifications still require the global cache_lock to be held for
writing. However, most readers only need the relevant bucket lock and in
effect can run concurrently to the writer as long as they use a
different lock. See the added comment for more details.

This is an intermediate step towards removal of the global lock.

Reviewed by: kib
Tested by: pho

7 years agoSwitch random_get_pseudo_bytes() shim to arc4rand().
mav [Sat, 10 Sep 2016 09:37:41 +0000 (09:37 +0000)]
Switch random_get_pseudo_bytes() shim to arc4rand().

Our shim for Solaris random_get_bytes() uses read_random(), that looks
reasonable, since it guaranties reliably seeded random data.  On the other
side Solaris random_get_pseudo_bytes() does not provide this guarantie,
and its original Solaris implementation is equivalent to our arc4rand(),
using software crypto without stressing slower hardware RNG.

7 years agoFix build
kib [Sat, 10 Sep 2016 09:00:12 +0000 (09:00 +0000)]
Fix build

7 years agoAdd ehci to the MPC85XX build
jhibbits [Sat, 10 Sep 2016 01:09:58 +0000 (01:09 +0000)]
Add ehci to the MPC85XX build

Many QorIQ and MPC85xx SoCs have USB support, so add it to the kernel.

MFC after: 1 week

7 years agowait: Do not copyout uninitialized status/rusage/wrusage.
jilles [Fri, 9 Sep 2016 21:58:48 +0000 (21:58 +0000)]
wait: Do not copyout uninitialized status/rusage/wrusage.

If wait4() or wait6() return 0 because of WNOHANG, the status, rusage and
wrusage information should not be returned.

PR: 212048
Reported by: Casey Lucas
MFC after: 2 weeks

7 years agolocks: add backoff for spin mutexes and thread lock
mjg [Fri, 9 Sep 2016 19:13:02 +0000 (19:13 +0000)]
locks: add backoff for spin mutexes and thread lock

Reviewed by: jhb

7 years agoFix regression from r304644 which could cause .WAITs in SUBDIR to be ignored.
bdrewery [Fri, 9 Sep 2016 18:49:45 +0000 (18:49 +0000)]
Fix regression from r304644 which could cause .WAITs in SUBDIR to be ignored.

This was possible if a STANDALONE_SUBDIR_TARGET item came in
SUBDIR_TARGETS before 'all', which would then cause SUBDIR to
have all .WAIT's removed.

Sponsored by: Dell EMC Isilon

7 years agoANSIfy uipc_syscalls.c
emaste [Fri, 9 Sep 2016 17:40:26 +0000 (17:40 +0000)]
ANSIfy uipc_syscalls.c

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

7 years agocxgbe(4): Avoid a NULL dereference in the clearstats ioctl handler.
np [Fri, 9 Sep 2016 17:15:16 +0000 (17:15 +0000)]
cxgbe(4): Avoid a NULL dereference in the clearstats ioctl handler.
Port softc's are not initialized when the adapter is in recovery mode.

7 years agoFix spelling in comment.
brooks [Fri, 9 Sep 2016 16:18:44 +0000 (16:18 +0000)]
Fix spelling in comment.

Submitted by: brueffer

7 years agoPass the trap type and code down from db_trap() to db_stop_at_pc() so
bde [Fri, 9 Sep 2016 15:53:42 +0000 (15:53 +0000)]
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.

ddb currently barely understands breakpoints, and it treats all
non-breakpoints as single-step traps.  This works OK for stopping
after every instruction when single-stepping, but is broken for
single-stepping with a count > 1 (especially with a large count).
ddb needs to stop on the first non-single-step trap while single-
stepping.  Otherwise, ddb doesn't even stop the first time for
fatal traps and external breakpoints like the one in kdb_enter().

7 years agoAdd support for SMP on MIPS Malta platform.
br [Fri, 9 Sep 2016 14:50:44 +0000 (14:50 +0000)]
Add support for SMP on MIPS Malta platform.
Tested in QEMU on Malta32, Malta64.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoFix stopping when the specified breakpoint count is reached. The
bde [Fri, 9 Sep 2016 14:09:50 +0000 (14:09 +0000)]
Fix stopping when the specified breakpoint count is reached.  The
countdown was done correctly, but the action when the count was not
reduced to 0 was to fall through to generic code which almost always
stopped.

7 years agoGive the full syntax of the 'count' arg for all commmands that support
bde [Fri, 9 Sep 2016 13:23:07 +0000 (13:23 +0000)]
Give the full syntax of the 'count' arg for all commmands that support
it.  This arg is most interesting for the 'break' command where it
never worked, and for the step command where it is powerful but too
fragile to use much.

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.

Fix mdoc syntax error for the 'search' command.

Remove FUD about consequences of not having a trap handler for the
'search' command.

7 years agonullfs: plug vnode ref leak in null_vptocnp
mjg [Fri, 9 Sep 2016 10:40:55 +0000 (10:40 +0000)]
nullfs: plug vnode ref leak in null_vptocnp

The lower vnode is already referenced and nodeget is supposed to consume
the reference. Thus the extra vref call was causing a leak.

Reported by: pho
Reviewed by: kib
MFC after: 1 week

7 years agocxgbe(4): Do not prescreen frames before attempting LRO.
np [Fri, 9 Sep 2016 07:34:14 +0000 (07:34 +0000)]
cxgbe(4): Do not prescreen frames before attempting LRO.

Sponsored by: Chelsio Communications

7 years agoProperly patch up dirname()/basename() calls to not clobber ent->log.
ed [Fri, 9 Sep 2016 07:10:50 +0000 (07:10 +0000)]
Properly patch up dirname()/basename() calls to not clobber ent->log.

It turns out that we had a couple of more calls to dirname()/basename()
in newsyslog(8) that assume the input isn't clobbered. This is bad,
because it apparently breaks log rotation now that the new dirname()
implementation has been merged.

Fix this by first copying the input and then calling
dirname()/basename(). While there, improve the naming of variables in
this function a bit.

Reported by: Ryan Steinmetz, gjb
Reviewed by: bdrewery, allanjude
Differential Revision: https://reviews.freebsd.org/D7838

7 years ago[gpio] include intr.h when building with INTRNG.
adrian [Fri, 9 Sep 2016 04:54:41 +0000 (04:54 +0000)]
[gpio] include intr.h when building with INTRNG.

Trying to build a MIPS platform that uses INTRNG needs this
for this to work right in gpiobusvar.h :

#ifdef INTRNG
struct intr_map_data_gpio {
        struct intr_map_data    hdr;
...
};
#endif

7 years ago[net80211] add in ToA/ToD based location mbuf tags for some experimenting.
adrian [Fri, 9 Sep 2016 04:47:48 +0000 (04:47 +0000)]
[net80211] add in ToA/ToD based location mbuf tags for some experimenting.

7 years ago[ath_hal] fixes for finer grain timestamping, some 11n macros
adrian [Fri, 9 Sep 2016 04:45:25 +0000 (04:45 +0000)]
[ath_hal] fixes for finer grain timestamping, some 11n macros

* change the HT_RC_2_MCS to do MCS0..23
* Use it when looking up the ht20/ht40 array for bits-per-symbol
* add a clk_to_psec (picoseconds) routine, so we can get sub-microsecond
  accuracy for the math
* .. and make that + clk_to_usec public, so higher layer code that is
  returning clocks (eg the ANI diag routines, some upcoming locationing
  experiments) can be converted to microseconds.

Whilst here, add a comment in ar5416 so i or someone else can revisit the
latency values.

7 years agoCorrect the type of db_cmd_loop_done.
jhibbits [Fri, 9 Sep 2016 04:16:53 +0000 (04:16 +0000)]
Correct the type of db_cmd_loop_done.

On big endian hardware that uses 1 byte bool a type mismatch of bool vs int will
cause the least signifcant byte of db_cmd_loop_done to be set, but the MSB to be
read, and read as 0.  This causes ddb to stay in an infinite loop.

MFC after: 1 week

7 years agoMissed part of patch
sjg [Fri, 9 Sep 2016 02:02:13 +0000 (02:02 +0000)]
Missed part of patch

7 years agoUpdate to latest dirdeps.mk
sjg [Fri, 9 Sep 2016 01:21:35 +0000 (01:21 +0000)]
Update to latest dirdeps.mk

Take advantage of new bmake feature to only consider Makefile.depend
as invalidating DIRDEPS_CACHE.

When bootstrapping allow more filtering via .MAKE.DEPENDFILE_BOOTSTRAP_SED

Move some comments back to where they make sense.

meta.sys.mk: add META_COOKIE_TOUCH and META_NOPHONY to better handle some
targets in meta mode vs non-meta mode.
Also use .MAKE.META.IGNORE_PATHS to ignore mtime of makefiles - which do
not matter in meta mode.

7 years agoUpdate to bmake-20170818
sjg [Fri, 9 Sep 2016 01:09:39 +0000 (01:09 +0000)]
Update to bmake-20170818

This version has some new knobs for dealing with troublesome targets
in meta mode.

7 years agoReduce duplicate NOASM and PSEUDO definitions
brooks [Thu, 8 Sep 2016 22:38:20 +0000 (22:38 +0000)]
Reduce duplicate NOASM and PSEUDO definitions

The initial value of NOASM is nearly the same in all cases and the
initial value of PSEUDO is the same in all cases so reduce duplication
(and hopefully, future merge conflicts) by machine independent defaults.

Also document the PSEUDO variable.

Reviewed by: jhb, kib
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D7820

7 years agoAdd new directories added in r305626 to fix "make installworld".
jkim [Thu, 8 Sep 2016 21:59:34 +0000 (21:59 +0000)]
Add new directories added in r305626 to fix "make installworld".

7 years agointro(2),_exit(2): Update for reaper (procctl(PROC_REAP_ACQUIRE)).
jilles [Thu, 8 Sep 2016 21:50:03 +0000 (21:50 +0000)]
intro(2),_exit(2): Update for reaper (procctl(PROC_REAP_ACQUIRE)).

MFC after: 1 week

7 years agoqueue(3): Enhance queue debugging macros
cem [Thu, 8 Sep 2016 21:20:01 +0000 (21:20 +0000)]
queue(3): Enhance queue debugging macros

Split the QUEUE_MACRO_DEBUG into QUEUE_MACRO_DEBUG_TRACE and
QUEUE_MACRO_DEBUG_TRASH.

Add the debug macrso QMD_IS_TRASHED() and QMD_SLIST_CHECK_PREVPTR().

Document these in queue.3.

Reviewed by: emaste
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D3984

7 years agoMove libcasper tests from regression/capsicum/libcasper/ to
oshogbo [Thu, 8 Sep 2016 20:01:26 +0000 (20:01 +0000)]
Move libcasper tests from regression/capsicum/libcasper/ to
lib/libcasper/service/${service_name}/tests.

Reviewed by: emaste, ngie
Differential Revision: https://reviews.freebsd.org/D7759

7 years agoDon't check aq64_minfree which is unsigned for negative values.
jhb [Thu, 8 Sep 2016 19:47:57 +0000 (19:47 +0000)]
Don't check aq64_minfree which is unsigned for negative values.

This fixes a tautological comparison warning.

Reviewed by: rwatson
Differential Revision: https://reviews.freebsd.org/D7682

7 years agoDocument PCI_HP and PCI_IOV kernel options and various tunables in pci(4).
jhb [Thu, 8 Sep 2016 19:42:49 +0000 (19:42 +0000)]
Document PCI_HP and PCI_IOV kernel options and various tunables in pci(4).

Describe PCI-related kernel options for HotPlug and SR-IOV support in the
pci(4) manual page.  While here, add a section describing the various
tunables supported by the PCI bus driver as well.

Reviewed by: wblock
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7754

7 years agoSprinkle DOINGASYNC() checks so as to do delayed writes for async
bde [Thu, 8 Sep 2016 17:40:40 +0000 (17:40 +0000)]
Sprinkle DOINGASYNC() checks so as to do delayed writes for async
mounts in almost all cases instead of in most cases.  Don't override
DOINGASYNC() by any condition except IO_SYNC.

Fix previous sprinking of DOINGASYNC() checks.  Don't override IO_SYNC
by DOINGASYNC().  In ffs_write() and ffs_extwrite(), there were
intentional overrides that just broke O_SYNC of data.  In
ffs_truncate(), there are 5 calls to ffs_update(), 4 with
apparently-unintentional overrides and 1 without; this had no effect
due to the main async mount hack descibed below.

Fix 1 place in ffs_truncate() where the caller's IO_ASYNC was overridden
for the soft updates case too (to do a delayed write instead of a sync
write).  This is supposed to be the only change that affects anything
except async mounts.

In ffs_update(), remove the 19 year old efficiency hack of ignoring
the waitfor flag for async mounts, so that fsync() almost works for
async mounts.  All callers are supposed to be fixed to not ask for a
sync update unless they are for fsync() or [I]O_SYNC operations.
fsync() now almost works for async mounts.  It used to sync the data
but not the most important metdata (the inode).  It still doesn't sync
associated directories.

This gave 10-20% fewer writes for my makeworld benchmark with async
mounted tmp and obj directories from an already small number.

Style fixes:
- in ffs_balloc.c, remove rotted quadruplicated comments about the
  simplest part of the DOING*() decisions and rearrange the nearly-
  quadruplicated code to be more nearly so.
- in ufs_vnops.c, use a consistent style with less negative logic and
  no manual "optimization" of || to | in DOING*() expressions.

Reviewed by: kib (previous version)

7 years agoAllow the use of soft-interrupts for sending IPIs.
br [Thu, 8 Sep 2016 17:37:13 +0000 (17:37 +0000)]
Allow the use of soft-interrupts for sending IPIs.
This will be required for SMP support on MIPS Malta platform.

Reviewed by: adrian
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D7835

7 years agoetcupdate: preserve the metadata of the destination file
vangyzen [Thu, 8 Sep 2016 15:53:49 +0000 (15:53 +0000)]
etcupdate: preserve the metadata of the destination file

When using diff3 to perform a three-way merge, etcupdate lost the destination
file's metadata. The metadata from the temporary file were used instead.
This was unpleasant for rc.d scripts, which require execute permission.
Use "cat >" to overwrite the destination file's contents while preserving its
metadata.

Reviewed by: bapt
Sponsored by: Dell Technologies
Differential Revision: https://reviews.freebsd.org/D7817

7 years ago- Fix typo
gabor [Thu, 8 Sep 2016 14:50:23 +0000 (14:50 +0000)]
- Fix typo

PR: 211245
Submitted by: Christoph Schonweiler <public2016@hauptsignal.at>
MFC after: 5 days

7 years agoFix single-stepping of instructions emulated by vm86.
bde [Thu, 8 Sep 2016 14:43:39 +0000 (14:43 +0000)]
Fix single-stepping of instructions emulated by vm86.

In vm86.c, fix 2 (rarely used) cases where the return code lost the
single-step indicator.  While here, fix 2 misspellings of PSL_T as
PSL_TF (TF is the CPU manufacturer's spelling, but we use T).

In trap.c, turn T_PROTFLT and T_STKFLT into T_TRCTRAP if
vm86_emulate() asked for this (it does this when the instruction is
being traced and was successully emulated).  In the kernel case, we
used to deliver the trap as SIGTRAP to the process, where it always
terminated the process; now we deliver the trap as T_TRCTRAP to kdb,
where it normally gives single-stepping.  In the user case, the only
difference is that we now clear PSL_T and initialize ucode properly.

Reviewed by: kib

7 years agoUpdate capabilities.conf comment
emaste [Thu, 8 Sep 2016 14:04:04 +0000 (14:04 +0000)]
Update capabilities.conf comment

getdtablesize is per-process state, not global state

7 years agoDon't report to devd statuses that CAM doesn't consider errors.
mav [Thu, 8 Sep 2016 13:33:33 +0000 (13:33 +0000)]
Don't report to devd statuses that CAM doesn't consider errors.

Some statuses, such as "ATA pass through information available", are part
part of absolutely normal operation and do not worth reporting.

MFC after: 2 weeks

7 years ago"Extended copy information available" is not an error either.
mav [Thu, 8 Sep 2016 13:03:49 +0000 (13:03 +0000)]
"Extended copy information available" is not an error either.

MFC after: 2 weeks

7 years ago"ATA pass through information available" is not an error.
mav [Thu, 8 Sep 2016 12:58:33 +0000 (12:58 +0000)]
"ATA pass through information available" is not an error.

MFC after: 2 weeks

7 years agoTrap msr/mrs instructions. These are privileged arm64 instructions and
andrew [Thu, 8 Sep 2016 12:53:01 +0000 (12:53 +0000)]
Trap msr/mrs instructions. These are privileged arm64 instructions and
shouldn't normally be used.

Obtained from: ABT Systems Ltd
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agointpm: make sure to register smbus driver before intpm driver
avg [Thu, 8 Sep 2016 12:43:24 +0000 (12:43 +0000)]
intpm: make sure to register smbus driver before intpm driver

Otherwise we can fail to create an smbus child of intpm.

MFC after: 1 week

7 years agoDon't panic when we don't handle a userland exception, not all we may see
andrew [Thu, 8 Sep 2016 12:39:03 +0000 (12:39 +0000)]
Don't panic when we don't handle a userland exception, not all we may see
are currently handled.

Obtained from: ABT Systems Ltd
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

7 years agointpm: better clean up resources after a failed attachment
avg [Thu, 8 Sep 2016 12:27:34 +0000 (12:27 +0000)]
intpm: better clean up resources after a failed attachment

bus_generic_detach() fails when called from attach method
thus preventing further clean up actions.

MFC after: 1 week

7 years agointpm: do not try attaching to unsupported controller revisions
avg [Thu, 8 Sep 2016 12:24:46 +0000 (12:24 +0000)]
intpm: do not try attaching to unsupported controller revisions

While there set a different device description for the controllers
found in various FCHs (Hudson, Bolton, CPU integrated).

MFC after: 1 week

7 years agointpm: fix attachment to supported AMD FCHs
avg [Thu, 8 Sep 2016 12:12:39 +0000 (12:12 +0000)]
intpm: fix attachment to supported AMD FCHs

7 years agoOn rename, do not perform truncation of dirhash if the vnode
kib [Thu, 8 Sep 2016 12:09:34 +0000 (12:09 +0000)]
On rename, do not perform truncation of dirhash if the vnode
truncation failed.

Doing so resulted in inconsistent state of the ufs dirhash with regard
to the actual directory inode state, and could lead to spurious ENOENT
errors for lookups of existing files in production kernels, or
assertion failures in the debugging kernels.

Change the logic of calling ufsdirhash_dirtrunc() to be same as in
ufs_direnter().  Execute UFS_TRUNCATE() first, log error, and only do
dirtrunc() if UFS_TRUNCATE() succeeded.

Note that the problem was exacerbated by the bug in the
flush_newblk_dep() function (see r305599), which caused in the spurios
errors from ffs_sync() and then ffs_truncate().

In collaboration with: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoamdsbwd.4: update supported hardware list
avg [Thu, 8 Sep 2016 12:09:13 +0000 (12:09 +0000)]
amdsbwd.4: update supported hardware list

And place it into its own section.

MFC after: 1 week

7 years agoDo not leak transient ENOLCK error from flush_newblk_dep() loop.
kib [Thu, 8 Sep 2016 12:08:54 +0000 (12:08 +0000)]
Do not leak transient ENOLCK error from flush_newblk_dep() loop.

The buffer lock is retried on failed LK_SLEEPFAIL attempt, and error
from the failed attempt is irrelevant.  But since there is path after
retry which does not clear error, it is possible to return spurious
error from the function.

The issue resulted in a spurious failure of softdep_sync_buf(),
causing further spurious failure of ffs_sync().

In collaboration with: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoWhen logging unlikely UFS_TRUNCATE() failure in ufs_direnter(),
kib [Thu, 8 Sep 2016 12:08:08 +0000 (12:08 +0000)]
When logging unlikely UFS_TRUNCATE() failure in ufs_direnter(),
include error code.

Reported and tested by: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agoWhen externding directory inode in ufs_direnter(), adjust i_endoff.
kib [Thu, 8 Sep 2016 12:07:25 +0000 (12:07 +0000)]
When externding directory inode in ufs_direnter(), adjust i_endoff.

This change is formally not needed, since i_endoff not used in all
code paths after the call to ufs_direnter(), and i_endoff is
recalculated by the next lookup.  But having the value correct makes
the reasoning about code simpler.

Reported and tested by: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agointpm.4 update supported hardware list
avg [Thu, 8 Sep 2016 12:07:25 +0000 (12:07 +0000)]
intpm.4 update supported hardware list

MFC after: 1 week