]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agohyperv/vmbus: Add type/instance guid fields into hv_vmbus_channel
sephe [Wed, 13 Jul 2016 04:39:16 +0000 (04:39 +0000)]
hyperv/vmbus: Add type/instance guid fields into hv_vmbus_channel

This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

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

8 years agohyperv/vmbus: Add flags field into hv_vmbus_channel for MNF indication
sephe [Wed, 13 Jul 2016 04:31:08 +0000 (04:31 +0000)]
hyperv/vmbus: Add flags field into hv_vmbus_channel for MNF indication

This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

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

8 years agohyperv/vmbus: Make subchan index a field of hv_vmbus_channel.
sephe [Wed, 13 Jul 2016 03:35:22 +0000 (03:35 +0000)]
hyperv/vmbus: Make subchan index a field of hv_vmbus_channel.

This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

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

8 years agohyperv/vmbus: Make channel id a field of hv_vmbus_channel.
sephe [Wed, 13 Jul 2016 03:24:29 +0000 (03:24 +0000)]
hyperv/vmbus: Make channel id a field of hv_vmbus_channel.

This prepares to remove the unnecessary offer message embedding in
hv_vmbus_channel.

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

8 years agohyperv/vmbus: Merge hv_connection.c into hv_channel.c
sephe [Wed, 13 Jul 2016 03:14:29 +0000 (03:14 +0000)]
hyperv/vmbus: Merge hv_connection.c into hv_channel.c

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

8 years agoReduce the set of things on the disc1 image to those on the bootonly image.
nwhitehorn [Wed, 13 Jul 2016 02:07:36 +0000 (02:07 +0000)]
Reduce the set of things on the disc1 image to those on the bootonly image.
Notably, this removes the toolchain from the CD-ROM image (it remains on DVD
images) and pushes the CD-ROM image well below the 700 MB mark.

MFC after: 10 days

8 years agoRevert r302670 and r302671 for now.
bdrewery [Wed, 13 Jul 2016 01:35:53 +0000 (01:35 +0000)]
Revert r302670 and r302671 for now.

MACHINE_CPUARCH smells like MACHINE except for arm64/aarch64 which
has it backwards.

8 years agoioat(4): Check ring links at grow/shrink in INVARIANTS
cem [Tue, 12 Jul 2016 21:57:05 +0000 (21:57 +0000)]
ioat(4): Check ring links at grow/shrink in INVARIANTS

8 years agoioat(4): Add KTR trace for ioat_reset_hw
cem [Tue, 12 Jul 2016 21:57:02 +0000 (21:57 +0000)]
ioat(4): Add KTR trace for ioat_reset_hw

8 years agoioat(4): Enhance KTR logging for descriptor completions
cem [Tue, 12 Jul 2016 21:57:00 +0000 (21:57 +0000)]
ioat(4): Enhance KTR logging for descriptor completions

8 years agoioat(4): Assert against ring underflow
cem [Tue, 12 Jul 2016 21:56:57 +0000 (21:56 +0000)]
ioat(4): Assert against ring underflow

8 years agoioat_reserve_space: Recheck quiescing flag after dropping submit lock
cem [Tue, 12 Jul 2016 21:56:55 +0000 (21:56 +0000)]
ioat_reserve_space: Recheck quiescing flag after dropping submit lock

Fix a minor bound check error while here (ring can only hold 1 <<
MAX_ORDER - 1 entries).

8 years agoioat(4): Remove force_hw_error sysctl; it does not work reliably
cem [Tue, 12 Jul 2016 21:56:52 +0000 (21:56 +0000)]
ioat(4): Remove force_hw_error sysctl; it does not work reliably

8 years agoioat(4): Export HW capabilities to consumers
cem [Tue, 12 Jul 2016 21:56:49 +0000 (21:56 +0000)]
ioat(4): Export HW capabilities to consumers

8 years agoioat(4): Submitters pick up a shovel if queue is too full
cem [Tue, 12 Jul 2016 21:56:46 +0000 (21:56 +0000)]
ioat(4): Submitters pick up a shovel if queue is too full

Before attempting to grow the ring.

8 years agoioat(4): Don't shrink ring if active
cem [Tue, 12 Jul 2016 21:56:34 +0000 (21:56 +0000)]
ioat(4): Don't shrink ring if active

8 years agoioat(4): Print some more useful information about the ring from ddb "show ioat"
cem [Tue, 12 Jul 2016 21:52:26 +0000 (21:52 +0000)]
ioat(4): Print some more useful information about the ring from ddb "show ioat"

8 years agoMETA_MODE: Don't require filemon(4) for mergemaster(8)/etcupdate(8)
bdrewery [Tue, 12 Jul 2016 19:47:01 +0000 (19:47 +0000)]
META_MODE: Don't require filemon(4) for mergemaster(8)/etcupdate(8)

New .meta files will be created without filemon data, but any future build
that wants filemon data will force a rebuild due to the missing data
due to use of bmake's .MAKE.MODE=missing-filemon=yes feature.

Reported by: np
Sponsored by: EMC / Isilon Storage Division
MFC after: 3 days

8 years agoUse real values to calculate Max I/O size instead of guessing.
slm [Tue, 12 Jul 2016 19:34:10 +0000 (19:34 +0000)]
Use real values to calculate Max I/O size instead of guessing.

Reviewed by: ken, scottl
Approved by: ken, scottl, ambrisko (mentors)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7043

8 years agoCreate a TARGET_CPUARCH thing to go with MACHINE_CPUARCH.
bdrewery [Tue, 12 Jul 2016 18:57:28 +0000 (18:57 +0000)]
Create a TARGET_CPUARCH thing to go with MACHINE_CPUARCH.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7160

8 years agoCreate one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.
bdrewery [Tue, 12 Jul 2016 18:57:25 +0000 (18:57 +0000)]
Create one list of replacements for MACHINE_CPUARCH as MACHINE_CPUARCH_SUB.

This also adds missing s/aarch64/arm64 to the sys.mk version and also
adds back armv6hf for universe since it was added to the sys.mk version
in r300438.

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D7159

8 years agoioat(4): Shrink using the correct timer
cem [Tue, 12 Jul 2016 17:58:58 +0000 (17:58 +0000)]
ioat(4): Shrink using the correct timer

Fix a typo introduced in r302352.

Sponsored by: EMC / Isilon Storage Division

8 years agoMake unknown register reads predictable.
mav [Tue, 12 Jul 2016 17:38:18 +0000 (17:38 +0000)]
Make unknown register reads predictable.

Reported by: Coverity
CID: 1357525

8 years agoFix problems in the FQ-PIE AQM cleanup code that could leak memory or
truckman [Tue, 12 Jul 2016 17:32:40 +0000 (17:32 +0000)]
Fix problems in the FQ-PIE AQM cleanup code that could leak memory or
cause a crash.

Because dummynet calls pie_cleanup() while holding a mutex, pie_cleanup()
is not able to use callout_drain() to make sure that all callouts are
finished before it returns, and callout_stop() is not sufficient to make
that guarantee.  After pie_cleanup() returns, dummynet will free a
structure that any remaining callouts will want to access.

Fix these problems by allocating a separate structure to contain the
data used by the callouts.  In pie_cleanup(), call callout_reset_sbt()
to replace the normal callout with a cleanup callout that does the cleanup
work for each sub-queue.  The instance of the cleanup callout that
destroys the last flow will also free the extra allocated block of memory.
Protect the reference count manipulation in the cleanup callout with
DN_BH_WLOCK() to be consistent with all of the other usage of the reference
count where this lock is held by the dummynet code.

Submitted by: Rasool Al-Saadi <ralsaadi@swin.edu.au>
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7174

8 years agoAdd missing breaks in I/O BAR read/write.
mav [Tue, 12 Jul 2016 17:30:37 +0000 (17:30 +0000)]
Add missing breaks in I/O BAR read/write.

This could be important if any guest actually used those registers.

Reported by: Coverity
CID: 13575191357520

8 years agomkimg(1): minor cleanups with argument order in calloc(3).
pfg [Tue, 12 Jul 2016 15:46:53 +0000 (15:46 +0000)]
mkimg(1): minor cleanups with argument order in calloc(3).

Generally the first argument in calloc is supposed to stand for a count
and the second for a size. Try to make that consistent. While here,
attempt to make some use of the overflow detection capability in
calloc(3).

8 years agohyperv/vmbus: Destroy channel list lock upon attach failure and detach.
sephe [Tue, 12 Jul 2016 09:06:25 +0000 (09:06 +0000)]
hyperv/vmbus: Destroy channel list lock upon attach failure and detach.

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

8 years agohyperv/vmbus: Remove needed bits
sephe [Tue, 12 Jul 2016 08:55:08 +0000 (08:55 +0000)]
hyperv/vmbus: Remove needed bits

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

8 years agohyperv/vmbus: Move channel map to vmbus_softc
sephe [Tue, 12 Jul 2016 08:47:04 +0000 (08:47 +0000)]
hyperv/vmbus: Move channel map to vmbus_softc

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

8 years agoxen: automatically disable MSI-X interrupt migration
royger [Tue, 12 Jul 2016 08:43:09 +0000 (08:43 +0000)]
xen: automatically disable MSI-X interrupt migration

If the hypervisor version is smaller than 4.6.0. Xen commits 74fd00 and
70a3cb are required on the hypervisor side for this to be fixed, and those
are only included in 4.6.0, so stay on the safe side and disable MSI-X
interrupt migration on anything older than 4.6.0.

It should not cause major performance degradation unless a lot of MSI-X
interrupts are allocated.

Sponsored by: Citrix Systems R&D
MFC after: 3 days
Reviewed by: jhb
Differential revision: https://reviews.freebsd.org/D7148

8 years agohyperv/vmbus: Fix sub-channel re-open support.
sephe [Tue, 12 Jul 2016 08:38:03 +0000 (08:38 +0000)]
hyperv/vmbus: Fix sub-channel re-open support.

For multi-channel devices, once the primary channel is closed,
a set of 'rescind' messages for sub-channels will be delivered
by Hypervisor.  Sub-channel MUST be freed according to these
'rescind' messages; directly re-openning sub-channels in the
same fashion as the primary channel's re-opening does NOT work
at all.

After the primary channel is re-opened, requested # of sub-
channels will be delivered though 'channel offer' messages, and
this set of newly offered channels can be opened along side with
the primary channel.

This unbreaks the MTU setting for hn(4), which requires re-
openning all existsing channels upon MTU change.

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

8 years agohyperv/vmbus: Free sysctl properly upon channel close.
sephe [Tue, 12 Jul 2016 08:28:51 +0000 (08:28 +0000)]
hyperv/vmbus: Free sysctl properly upon channel close.

Prepare for sub-channel re-open.

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

8 years agohyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}
sephe [Tue, 12 Jul 2016 08:21:28 +0000 (08:21 +0000)]
hyperv/vmbus: More verbose for GPADL_connect/chan_{rescind,offer}

Reviewed by: Dexuan Cui <decui microsoft com>, Hongjiang Zhang <honzhan microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D6976

8 years agohyperv/vmbus: Move channel list to vmbus_softc
sephe [Tue, 12 Jul 2016 08:11:16 +0000 (08:11 +0000)]
hyperv/vmbus: Move channel list to vmbus_softc

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

8 years agohyperv/vmbus: Move GPADL index into vmbus_softc
sephe [Tue, 12 Jul 2016 07:49:38 +0000 (07:49 +0000)]
hyperv/vmbus: Move GPADL index into vmbus_softc

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

8 years agohyperv/vmbus: Rework vmbus version accessing.
sephe [Tue, 12 Jul 2016 07:33:39 +0000 (07:33 +0000)]
hyperv/vmbus: Rework vmbus version accessing.

Instead of global variable, vmbus version is accessed through
a vmbus DEVMETHOD now.

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

8 years agoBump __FreeBSD_version after removing collation from [a-z]-type ranges.
ache [Tue, 12 Jul 2016 07:16:37 +0000 (07:16 +0000)]
Bump __FreeBSD_version after removing collation from [a-z]-type ranges.

8 years agoFix pc98 LINT build.
dchagin [Tue, 12 Jul 2016 06:12:58 +0000 (06:12 +0000)]
Fix pc98 LINT build.

MFC after: 4 days

8 years agoAdd some .Xrs to getloginclass(2).
trasz [Tue, 12 Jul 2016 06:00:57 +0000 (06:00 +0000)]
Add some .Xrs to getloginclass(2).

MFC after: 1 month

8 years agohyperv/vmbus: Minor renaming
sephe [Tue, 12 Jul 2016 05:55:11 +0000 (05:55 +0000)]
hyperv/vmbus: Minor renaming

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

8 years agontb: Fix LINT
sephe [Tue, 12 Jul 2016 05:41:34 +0000 (05:41 +0000)]
ntb: Fix LINT

Sponsored by: Microsoft OSTC

8 years agohyperv/vmbus: Don't be oversmart in default cpu selection.
sephe [Tue, 12 Jul 2016 05:31:33 +0000 (05:31 +0000)]
hyperv/vmbus: Don't be oversmart in default cpu selection.

Pin the channel to cpu0 by default.  Drivers having special channel-cpu
mapping requirement should call vmbus_channel_cpu_{set,rr}() themselves.

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

8 years agohyperv: Nuke unused stuffs
sephe [Tue, 12 Jul 2016 05:23:14 +0000 (05:23 +0000)]
hyperv: Nuke unused stuffs

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

8 years agohyperv/vmbus: Busdma-fy Hypercall signal event input parameter.
sephe [Tue, 12 Jul 2016 05:09:07 +0000 (05:09 +0000)]
hyperv/vmbus: Busdma-fy Hypercall signal event input parameter.

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

8 years agohyperv/vmbus: Avoid tx_evtflags setting code duplication.
sephe [Tue, 12 Jul 2016 04:58:21 +0000 (04:58 +0000)]
hyperv/vmbus: Avoid tx_evtflags setting code duplication.

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

8 years agohyperv/vmbus: Flatten channel message response processing.
sephe [Tue, 12 Jul 2016 04:35:32 +0000 (04:35 +0000)]
hyperv/vmbus: Flatten channel message response processing.

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

8 years agoUndo r302599 and partially r302594 case 2):
ache [Tue, 12 Jul 2016 04:29:34 +0000 (04:29 +0000)]
Undo r302599 and partially r302594 case 2):
since WCHAR_MAX can be not a valid wchar value, it is easier to stay
inside wint_t.

8 years agoUndo r302601, WCHAR_MAX may not be a valid wchar value.
ache [Tue, 12 Jul 2016 04:20:44 +0000 (04:20 +0000)]
Undo r302601, WCHAR_MAX may not be a valid wchar value.

8 years agoRevive the check, disabled in r197963.
kib [Tue, 12 Jul 2016 03:53:15 +0000 (03:53 +0000)]
Revive the check, disabled in r197963.

Despite the implication (process has pending signals -> the current
thread marked for AST and has TDF_NEEDSIGCHK set) is not true due to
other thread might manipulate its signal blocking mask, it should still
hold for the single-threaded processes.  Enable check for the condition
for single-threaded case, and replicate it from userret() to ast() as
well, where we check that ast indeed has no signal to deliver.

Note that the check is under DIAGNOSTIC, it is not enabled for INVARIANTS
but !DIAGNOSTIC since it imposes too heavy-weight locking for day-to-day
used debugging kernel.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoAdd assert to complement r302328.
kib [Tue, 12 Jul 2016 03:52:05 +0000 (03:52 +0000)]
Add assert to complement r302328.

AST must not execute with TDF_SBDRY or TDF_SEINTR/TDF_SERESTART thread
flags set, which is asserted in userret(). As the consequence, -1 return
from cursig() must not be possible.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agohyperv: Nuke unused stuffs
sephe [Tue, 12 Jul 2016 03:38:29 +0000 (03:38 +0000)]
hyperv: Nuke unused stuffs

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

8 years agohyperv/vmbus: Use post message Hypercall APIs for GPA disconnect
sephe [Tue, 12 Jul 2016 03:32:07 +0000 (03:32 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for GPA disconnect

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

8 years agohyperv/vmbus: Use post message Hypercall APIs for channel close
sephe [Tue, 12 Jul 2016 03:25:36 +0000 (03:25 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for channel close

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

8 years agohyperv/vmbus: Use post message Hypercall APIs for GPADL connect.
sephe [Tue, 12 Jul 2016 03:19:40 +0000 (03:19 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for GPADL connect.

This also fixes memory leakge if sub-connect messages are needed.

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

8 years agohyperv/vmbus: Remove unnecessary check and unapplied comment
sephe [Tue, 12 Jul 2016 03:14:35 +0000 (03:14 +0000)]
hyperv/vmbus: Remove unnecessary check and unapplied comment

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

8 years agohyperv/vmbus: Use post message Hypercall APIs for channel open
sephe [Tue, 12 Jul 2016 03:09:10 +0000 (03:09 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for channel open

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

8 years agohyperv/vmbus: Reorganize vmbus scan process.
sephe [Tue, 12 Jul 2016 03:03:17 +0000 (03:03 +0000)]
hyperv/vmbus: Reorganize vmbus scan process.

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

8 years agohyperv/stor: Save the response status and xfer length properly.
sephe [Tue, 12 Jul 2016 02:57:13 +0000 (02:57 +0000)]
hyperv/stor: Save the response status and xfer length properly.

The current command response handling discards status and xfer
length unconditionally, so that all of the commands would be
considered successful, even if errors happened.  When errors
really happens, this causes all kinds of wiredness, since the
buffer will not be filled on the host side and sense data will
be ignored.

Most of the time, errors do not happen, however, error does
happen for the request sent immediately after the disk resizing.
Discarding the SCSI status (SCSI_STATUS_CHECK_COND) and sense
data (capacity changes) prevents the disk resizing from working
properly.

This commit saves the response status and xfer length properly
for later use.

Submitted by: Dexuan Cui <decui microsoft com>
Noticed by: sephe
MFC after: 3 days
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D7181

8 years agobhnd(4): Add bus pass-aware discovery of platform devices (PMU,
landonf [Tue, 12 Jul 2016 02:16:48 +0000 (02:16 +0000)]
bhnd(4): Add bus pass-aware discovery of platform devices (PMU,
NVRAM, ChipCommon, etc).

This extends the existing handling of NVRAM core discovery to support
locating additional devices that may be attached either directly as real
cores, or indirectly via ChipCommon (e.g. bhnd_pmu).

When attached as a SoC root bus (as opposed to a bridged WiFi device),
the platform devices may not be attached until later bus passes,
necessitating delayed discovery/initialization.

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

8 years agomips/ddb: fix MIPS backtrace truncation and MIPS32 register printing.
landonf [Tue, 12 Jul 2016 02:12:31 +0000 (02:12 +0000)]
mips/ddb: fix MIPS backtrace truncation and MIPS32 register printing.

 - Cast 32-bit register values to uintmax_t for use with %jx.
 - Add special-case return address handling for MipsKernGenException to
   avoid early termination of stack walking in the exception handler
   stack frame.

Submitted by: Michael Zhilin <mizhka@gmail.com>
Reviewed by: ray
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6907

8 years agobhnd(4): print extra register information on chipc SPI timeout.
landonf [Tue, 12 Jul 2016 01:15:00 +0000 (01:15 +0000)]
bhnd(4): print extra register information on chipc SPI timeout.

Submitted by: Michael Zhilin <mizhka@gmail.com>
Reviewed by: imp
Approved by: adrian (mentor)
Differential Revision: https://reviews.freebsd.org/D6993

8 years agoI don't know why unsigned int is choosed for wchar_t here, but WCHAR_MAX
ache [Tue, 12 Jul 2016 00:37:48 +0000 (00:37 +0000)]
I don't know why unsigned int is choosed for wchar_t here, but WCHAR_MAX
should be <= WINT_MAX. It is bigger, __UINT_MAX > INT32_MAX

8 years agoCast WCHAR_MAX to wint_t, it can be unsigned on some systems.
ache [Mon, 11 Jul 2016 23:06:11 +0000 (23:06 +0000)]
Cast WCHAR_MAX to wint_t, it can be unsigned on some systems.

8 years agoFix TARGET_TRIPLE for 12.0-CURRENT.
gjb [Mon, 11 Jul 2016 21:55:56 +0000 (21:55 +0000)]
Fix TARGET_TRIPLE for 12.0-CURRENT.

Submitted by: rene
Sponsored by: The FreeBSD Foundation

8 years agoRemove assumptions in MI code that the BSP is CPU 0.
nwhitehorn [Mon, 11 Jul 2016 21:25:28 +0000 (21:25 +0000)]
Remove assumptions in MI code that the BSP is CPU 0.

MFC after: 2 weeks

8 years ago1) Following r302512 (remove collation support for [a-z]-ranges in libc)
ache [Mon, 11 Jul 2016 21:23:50 +0000 (21:23 +0000)]
1) Following r302512 (remove collation support for [a-z]-ranges in libc)
remove collation support for a-z ranges here too.
It was implemented for single byte locales only in any case.

2) Reduce [Cc]flag loop to WCHAR_MAX, WINT_MAX here includes WEOF which is
not a character.

3) Optimize [Cc]flag case: don't repeatedly add the last character of
string2 to squeeze cset when string2 reach its EOS state.

4) Reflect in the manpage that [=equiv=] is implemented for single
byte locales only.

8 years agoAdd support for Allwinner A64.
jmcneill [Mon, 11 Jul 2016 20:15:46 +0000 (20:15 +0000)]
Add support for Allwinner A64.

Reviewed by: andrew, manu

8 years agoReturn early from bus_dmamap_load callback if the error indicator is set.
jmcneill [Mon, 11 Jul 2016 20:14:50 +0000 (20:14 +0000)]
Return early from bus_dmamap_load callback if the error indicator is set.

Reviewed by: andrew, manu

8 years agoAdd support for arm64. The allwinner_soc_family() function is not available
jmcneill [Mon, 11 Jul 2016 20:13:46 +0000 (20:13 +0000)]
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

8 years agoAdd support for Allwinner A64 CPUx-PORT and CPUs-PORT Port Controllers.
jmcneill [Mon, 11 Jul 2016 20:09:17 +0000 (20:09 +0000)]
Add support for Allwinner A64 CPUx-PORT and CPUs-PORT Port Controllers.

Reviewed by: andrew, manu

8 years agoAdd Allwinner A64 padconf settings.
jmcneill [Mon, 11 Jul 2016 20:06:21 +0000 (20:06 +0000)]
Add Allwinner A64 padconf settings.

Reviewed by: andrew, manu

8 years agoAdd SOC_ALLWINNER_A64 option for Allwinner A64 (sun50i) SoCs.
jmcneill [Mon, 11 Jul 2016 20:05:03 +0000 (20:05 +0000)]
Add SOC_ALLWINNER_A64 option for Allwinner A64 (sun50i) SoCs.

8 years agoInclude sys/rman.h to fix build on arm64.
jmcneill [Mon, 11 Jul 2016 20:03:31 +0000 (20:03 +0000)]
Include sys/rman.h to fix build on arm64.

8 years agoAttach RSB early. Children of RSB may provide resources necessary for
jmcneill [Mon, 11 Jul 2016 20:02:51 +0000 (20:02 +0000)]
Attach RSB early. Children of RSB may provide resources necessary for
other devices such as interrupts, GPIOs, and regulators.

8 years agoBuild fix for arm64. The phy interface uses intptr_t for the "phy"
jmcneill [Mon, 11 Jul 2016 20:00:57 +0000 (20:00 +0000)]
Build fix for arm64. The phy interface uses intptr_t for the "phy"
parameter, not int.

8 years agoRemove unused bus_space prototypes.
jmcneill [Mon, 11 Jul 2016 19:58:00 +0000 (19:58 +0000)]
Remove unused bus_space prototypes.

8 years agoRemove redundant declaration for tcp_dooptions, similar to r302576
ngie [Mon, 11 Jul 2016 17:11:18 +0000 (17:11 +0000)]
Remove redundant declaration for tcp_dooptions, similar to r302576

netinet/tcp_var.h already defines this function

Differential Revision: https://reviews.freebsd.org/D7189
MFC after: 1 week
PR: 209920
Reported by: Mark Millard <markmi@dsl-only.net>
Reviewed by: np
Tested with: clang 3.8.0, gcc 4.2.1, gcc 5.3.0
Sponsored by: EMC / Isilon Storage Division

8 years agoFix grammar.
kib [Mon, 11 Jul 2016 17:04:22 +0000 (17:04 +0000)]
Fix grammar.

Submitted by: alc
MFC after: 2 weeks

8 years agoRemove dead code. This should have been removed in r297392, when these
nwhitehorn [Mon, 11 Jul 2016 17:02:17 +0000 (17:02 +0000)]
Remove dead code. This should have been removed in r297392, when these
files were moved to dev/ofw, but wasn't, apparently due to some version
control issue.

MFC after: 1 week

8 years agoAdd missing default case to capable(..) function definition
ngie [Mon, 11 Jul 2016 17:01:07 +0000 (17:01 +0000)]
Add missing default case to capable(..) function definition

By definition (enum __drm_capabilities), cases other than CAP_SYS_ADMIN
aren't possible. Add in a KASSERT safety belt and return false in
!INVARIANTS case if an invalid value is passed in, as it would be a
programmer error.

This fixes a -Wreturn-type error with gcc 5.3.0.

Differential Revision: https://reviews.freebsd.org/D7188
MFC after: 1 week
Reported by: devel/amd64-gcc (5.3.0)
Reviewed by: dumbbell
Sponsored by: EMC / Isilon Storage Division

8 years ago(Re-do r302574 with corrected commit message..)
ngie [Mon, 11 Jul 2016 16:56:51 +0000 (16:56 +0000)]
(Re-do r302574 with corrected commit message..)

Remove redundant declaration for tcp_dooptions

netinet/tcp_var.h already defines this function

Differential Revision: https://reviews.freebsd.org/D7187
MFC after: 1 week
PR: 209920
Reported by: Mark Millard <markmi@dsl-only.net>
Reviewed by: np
Tested with: clang 3.8.0, gcc 4.2.1, gcc 5.3.0
Sponsored by: EMC / Isilon Storage Division

8 years agoRevert r302574. I botched the commit message in more way than 1
ngie [Mon, 11 Jul 2016 16:54:19 +0000 (16:54 +0000)]
Revert r302574. I botched the commit message in more way than 1

8 years agoRemove redundant declaration for tcp_dooptions
ngie [Mon, 11 Jul 2016 16:52:04 +0000 (16:52 +0000)]
Remove redundant declaration for tcp_dooptions

netinet/tcp_var.h already defines this function

PR: 209924
Reported by: Mark Millard <markmi@dsl-only.net>
Reviewed by: np
Tested with: clang 3.8.0, gcc 4.2.1, gcc 5.3.0
Sponsored by: EMC / Isilon Storage Division

8 years agoFill tf_trapno for trap frames created for syscall.
kib [Mon, 11 Jul 2016 15:52:52 +0000 (15:52 +0000)]
Fill tf_trapno for trap frames created for syscall.

If tf_trapno contains garbage which appears to be equal to T_NMI,
e.g. due to thread previously entered kernel due to NMI, doreti
sequence skips ast, and does so until a trap or hardware interrupt
occur.

The visible effects of the issue are quite confusing.  First, signals
delivery is postponed in observable ways.  In particular, the
guarantee that unblocked async signals queue is flushed before a
return from syscall, is broken.  Second, if there are pending signals,
all interruptible sleeps of the stuck thread are aborted immediately.

Since modern CPUs are relatively fast and tickless kernel generates
low interrupt rate, the faulty condition might exist for long time (in
an application time scale).

In collaboration with: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoRemove redundant declarations for intel_fbc_enabled(..) and
ngie [Mon, 11 Jul 2016 15:50:06 +0000 (15:50 +0000)]
Remove redundant declarations for intel_fbc_enabled(..) and
i915_gem_dump_object(..) to fix -Wredundant-decls warning

MFC after: 1 week
PR: 209924
Reported by: Mark Millard <markmi@dsl-only.net>
Tested with: devel/amd64-gcc (5.3.0)
Sponsored by: EMC / Isilon Storage Division

8 years agoRemove redundant declaration for radeon_pm_acpi_event_handler(..) to fix
ngie [Mon, 11 Jul 2016 15:47:43 +0000 (15:47 +0000)]
Remove redundant declaration for radeon_pm_acpi_event_handler(..) to fix
-Wredundant-decls warning

MFC after: 1 week
PR: 209924
Reported by: Mark Millard <markmi@dsl-only.net>
Tested with: devel/amd64-gcc (5.3.0)
Sponsored by: EMC / Isilon Storage Division

8 years agoIn vgonel(), postpone setting BO_DEAD until VOP_RECLAIM() is called,
kib [Mon, 11 Jul 2016 14:19:09 +0000 (14:19 +0000)]
In vgonel(), postpone setting BO_DEAD until VOP_RECLAIM() is called,
if vnode is VMIO.  For VMIO vnodes, set BO_DEAD in vm_object_terminate().

The vnode_destroy_object(), when calling into vm_object_terminate(),
must be able to flush buffers.  BO_DEAD purpose is to quickly destroy
buffers on write when the underlying vnode is not operable any more
(one example is the devfs node after geom is gone).  Setting BO_DEAD
for reclaiming vnode before object is terminated is premature, and
results in unability to flush buffers with live SU dependencies from
vinvalbuf() in vm_object_terminate().

Reported by: David Cross <dcrosstech@gmail.com>
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoFix the naming of -CURRENT
gjb [Mon, 11 Jul 2016 14:07:24 +0000 (14:07 +0000)]
Fix the naming of -CURRENT

Sponsored by: The FreeBSD Foundation

8 years agor302561 broke buildworld. This patch fixes that.
cy [Mon, 11 Jul 2016 13:41:40 +0000 (13:41 +0000)]
r302561 broke buildworld. This patch fixes that.

MFC after: 3 days
X-MFC with: r302561

8 years agoAdd AUE_WAIT6 handling to the BSM conversion switch statement, reusing
rwatson [Mon, 11 Jul 2016 13:06:17 +0000 (13:06 +0000)]
Add AUE_WAIT6 handling to the BSM conversion switch statement, reusing
the BSM encoding used for AUE_WAIT4.

MFC after: 3 days
Sponsored by: DARPA, AFRL

8 years agoFlush buffer after output. This fixes adding new data to already
ae [Mon, 11 Jul 2016 12:44:58 +0000 (12:44 +0000)]
Flush buffer after output. This fixes adding new data to already
printed flows.

PR: 210882
MFC after: 3 days

8 years agoOFWPCI: Fix style(9).
mmel [Mon, 11 Jul 2016 08:24:04 +0000 (08:24 +0000)]
OFWPCI: Fix style(9).
No functional change.

MFC after: 3 weeks

8 years agohyperv/vmbus: Embed channel detach task in channel itself.
sephe [Mon, 11 Jul 2016 08:12:04 +0000 (08:12 +0000)]
hyperv/vmbus: Embed channel detach task in channel itself.

GC work queue stuffs.

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

8 years agoDo not truncate lines longer than 512 chars.
gahr [Mon, 11 Jul 2016 08:05:46 +0000 (08:05 +0000)]
Do not truncate lines longer than 512 chars.

PR: 210344
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D6881

8 years agohyperv/vmbus: Save vmbus softc to channels.
sephe [Mon, 11 Jul 2016 07:54:58 +0000 (07:54 +0000)]
hyperv/vmbus: Save vmbus softc to channels.

So that we don't need to access the global vmbus softc.

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

8 years agohyperv/vmbus: Create channel synchronously.
sephe [Mon, 11 Jul 2016 07:45:31 +0000 (07:45 +0000)]
hyperv/vmbus: Create channel synchronously.

The device probe/attach has been move to a different thread, so the
reasons to create the channel asynchronously are no longer valid.

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

8 years agohyperv/vmbus: Use post message Hypercall APIs for unload
sephe [Mon, 11 Jul 2016 07:28:15 +0000 (07:28 +0000)]
hyperv/vmbus: Use post message Hypercall APIs for unload

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

8 years agoDon't test for xpt not being NULL before calling svc_xprt_free(..)
ngie [Mon, 11 Jul 2016 07:24:56 +0000 (07:24 +0000)]
Don't test for xpt not being NULL before calling svc_xprt_free(..)

svc_xprt_alloc(..) will always return initialized memory as it uses
mem_alloc(..) under the covers, which uses malloc(.., M_WAITOK, ..).

MFC after: 1 week
Reported by: Coverity
CID: 1007341
Sponsored by: EMC / Isilon Storage Division

8 years agoConvert `svc_xprt_alloc(..)` and `svc_xprt_free(..)`'s prototypes to
ngie [Mon, 11 Jul 2016 07:17:52 +0000 (07:17 +0000)]
Convert `svc_xprt_alloc(..)` and `svc_xprt_free(..)`'s prototypes to
ANSI C style prototypes

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

8 years agoDeobfuscate cleanup path in clnt_vc_create(..)
ngie [Mon, 11 Jul 2016 07:07:15 +0000 (07:07 +0000)]
Deobfuscate cleanup path in clnt_vc_create(..)

Similar to r300836, r301800, and r302550, cl and ct will always
be non-NULL as they're allocated using the mem_alloc routines,
which always use `malloc(..., M_WAITOK)`.

MFC after: 1 week
Reported by: Coverity
CID: 1007342
Sponsored by: EMC / Isilon Storage Division