]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoClear up confision as to who the original historical authors of code
Maxim Sobolev [Fri, 19 Feb 2016 01:00:48 +0000 (01:00 +0000)]
Clear up confision as to who the original historical authors of code
and manual page were.

For whatever reason it listed myself as a primary author, which is
just not true.

Also, majority of the manpage is copied verbatim from the geom_uzip(4),
contributed by ceri, with only minor adjustments from loos, so put ceri
back into the copyright secrion where he belongs and reflect that in the
AUTHORS section.

For what it's worth, I think this one should be deleted and LZMA
support just folded back into geom_uzip(4) / mkuzip(4) whete it really
belongs.

MFC after: 1 month

8 years agoFAST_DEPEND: Apply conditional -MF from r291945 to kernel as well.
Bryan Drewery [Fri, 19 Feb 2016 00:41:41 +0000 (00:41 +0000)]
FAST_DEPEND: Apply conditional -MF from r291945 to kernel as well.

Sponsored by: EMC / Isilon Storage Division

8 years agoDIRDEPS_BUILD: Add dependencies somehow missed in r295681.
Bryan Drewery [Fri, 19 Feb 2016 00:41:38 +0000 (00:41 +0000)]
DIRDEPS_BUILD: Add dependencies somehow missed in r295681.

Sponsored by: EMC / Isilon Storage Division

8 years agoAvoid reading .depend.* in simple cases where not needed.
Bryan Drewery [Fri, 19 Feb 2016 00:41:24 +0000 (00:41 +0000)]
Avoid reading .depend.* in simple cases where not needed.

This will speed up some tree-walks with FAST_DEPEND which otherwise
would include length(SRCS) .depend files.

This also uses a trick suggested by sjg@ to still read them in when
specifying _V_READ_DEPEND=1 in the env/make args.

Sponsored by: EMC / Isilon Storage Division

8 years agocxgbe: catch up with the latest hardware-related definitions.
Navdeep Parhar [Fri, 19 Feb 2016 00:29:16 +0000 (00:29 +0000)]
cxgbe: catch up with the latest hardware-related definitions.

Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications

8 years agoRemove a bogus bzero() call.
Jung-uk Kim [Thu, 18 Feb 2016 23:32:11 +0000 (23:32 +0000)]
Remove a bogus bzero() call.

Found by: PVS-Studio

8 years agoOptimize ROL and ROR emulations and fix comments.
Jung-uk Kim [Thu, 18 Feb 2016 23:03:37 +0000 (23:03 +0000)]
Optimize ROL and ROR emulations and fix comments.

8 years agoSilence VPS-Studio errors (V646). These is no functional change.
Jung-uk Kim [Thu, 18 Feb 2016 23:00:01 +0000 (23:00 +0000)]
Silence VPS-Studio errors (V646).  These is no functional change.

8 years ago- add dma(8) to examples in mailer.conf(5)
Jason Helfman [Thu, 18 Feb 2016 22:40:24 +0000 (22:40 +0000)]
- add dma(8) to examples in mailer.conf(5)

PR: 207026
Submitted by: lifanov@mail.lifanov.com
Approved by: wblock (mentor)
Differential Revision: https://reviews.freebsd.org/D5259

8 years agoAdd protection code.
Michael Tuexen [Thu, 18 Feb 2016 21:33:10 +0000 (21:33 +0000)]
Add protection code.

MFC after: 3 days
CID: 748858

8 years agoAdd some protection code.
Michael Tuexen [Thu, 18 Feb 2016 21:21:45 +0000 (21:21 +0000)]
Add some protection code.

CID: 1331893
MFC after: 3 days

8 years agoFix reporting of mapped addressed in getpeername() and getsockname() for
Michael Tuexen [Thu, 18 Feb 2016 21:05:04 +0000 (21:05 +0000)]
Fix reporting of mapped addressed in getpeername() and getsockname() for
IPv6 SCTP sockets.
This bugs were found because of an issue reported by PVS / D5245.

8 years agoUse __unused instead of casting to void to silence the unused parameter
Stefan Eßer [Thu, 18 Feb 2016 20:20:36 +0000 (20:20 +0000)]
Use __unused instead of casting to void to silence the unused parameter
warning.

Fix the indentation of 2 lines to conform with the style of this file.

Submitted by: jhb

8 years agoFix compiler warnings in iostat
Alan Somers [Thu, 18 Feb 2016 20:08:01 +0000 (20:08 +0000)]
Fix compiler warnings in iostat

Raise WARNS from 1 to 6 (the default)
Fix warnings:
* Use C99 designated initializers for structs, and initialize all fields
* Mark global variables as static
* Mark unused function arguments
* Be careful about signed/unsigned comparisons

Reviewed by: eadler
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D5328

8 years agoSilence VPS-Studio errors (V512). These buffer underflows are intentional.
Jung-uk Kim [Thu, 18 Feb 2016 19:37:39 +0000 (19:37 +0000)]
Silence VPS-Studio errors (V512).  These buffer underflows are intentional.

8 years agoFix obvious typo, that lead to incorrect sorting.
Gleb Smirnoff [Thu, 18 Feb 2016 19:05:30 +0000 (19:05 +0000)]
Fix obvious typo, that lead to incorrect sorting.

Found by: PVS-Studio

8 years agoBump .Dd for r295764
Benjamin Kaduk [Thu, 18 Feb 2016 18:50:03 +0000 (18:50 +0000)]
Bump .Dd for r295764

Also fix a spelling and grammar nit while here.

8 years agoRight now, the "virtual hole" API feature of lseek(2) is very vaguely
Maxim Sobolev [Thu, 18 Feb 2016 18:41:40 +0000 (18:41 +0000)]
Right now, the "virtual hole" API feature of lseek(2) is very vaguely
documented and easy to miss.

At the same time, it's pretty important for anyone who is trying to use
SEEK_HOLE/SEEK_DATA in real app. Try to bridge that gap by making that
description more pronounced and also document how it affects failure codes.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D5162

8 years agoFix build for i386 and arm64 after r295755
Zbigniew Bodek [Thu, 18 Feb 2016 15:44:45 +0000 (15:44 +0000)]
Fix build for i386 and arm64 after r295755

- Take bus_space_tag_t type into consideration when returning
  default, zero value.
- Include missing rman.h required by ofw_pci.h

8 years agoIncrease kernel and user VA space.
Ruslan Bukin [Thu, 18 Feb 2016 15:28:57 +0000 (15:28 +0000)]
Increase kernel and user VA space.
This allows us to boot with more than 128MB of physical memory.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoMake WARNS=6 safe.
Stefan Eßer [Thu, 18 Feb 2016 15:23:25 +0000 (15:23 +0000)]
Make WARNS=6 safe.

Tested with Clang 3.7.1, GCC 4.2.1 and GCC 4.8.5 on amd64.

8 years agoRemove a stray else. It isn't needed (due to the return at the end of
Warner Losh [Thu, 18 Feb 2016 15:12:52 +0000 (15:12 +0000)]
Remove a stray else. It isn't needed (due to the return at the end of
the if statement it pairs with). While not an error today, a careless
edit in the future could cause problems (though given the nature of
this specific code, the problems quite likely would be some variation
of "most direct access SCSI storage devices won't attach," which is
unlikely to go unnoticed).

PVS-Studio: V705

8 years agoUse medany (Medium/Anywhere) GCC code model for RISC-V.
Ruslan Bukin [Thu, 18 Feb 2016 14:38:37 +0000 (14:38 +0000)]
Use medany (Medium/Anywhere) GCC code model for RISC-V.
This will allow us to use bigger relocations and all
the 64-bit VA space.

8 years agoRemove dd xfer stats emitted during buildworld
Ed Maste [Thu, 18 Feb 2016 14:17:28 +0000 (14:17 +0000)]
Remove dd xfer stats emitted during buildworld

They result in gratuitous differences when comparing build log output.

8 years agoExtract common code from PowerPC's ofw_pci
Zbigniew Bodek [Thu, 18 Feb 2016 13:07:21 +0000 (13:07 +0000)]
Extract common code from PowerPC's ofw_pci

Import portions of the PowerPC OF PCI implementation into
new file "ofw_pci.c", common for other platforms. The files ofw_pci.c and
ofw_pci.h from sys/powerpc/ofw no longer exist. All required declarations
are moved to sys/dev/ofw/ofw_pci.h.

This creates a new ofw_pci_write_ivar() function and modifies
ofw_pci_nranges(), ofw_pci_read_ivar(), ofw_pci_route_interrupt() methods.
Most functions contain existing ppc implementations in the majority
unchanged. Now there is no need to have multiple identical copies
of methods for various architectures.

Submitted by:  Marcin Mazurek <mma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Annapurna Labs
Reviewed by:   jhibbits, mmel
Differential Revision: https://reviews.freebsd.org/D4879

8 years agoIntroduce bus_get_bus_tag() method
Zbigniew Bodek [Thu, 18 Feb 2016 13:00:04 +0000 (13:00 +0000)]
Introduce bus_get_bus_tag() method

Provide bus_get_bus_tag() for sparc64, powerpc, arm, arm64 and mips
nexus and its children in order to return a platform specific default tag.

This is required to ensure generic correctness of the bus_space tag.
It is especially needed for arches where child bus tag does not match
the parent bus tag. This solves the problem with ppc architecture
where the PCI bus tag differs from parent bus tag which is big-endian.

This commit is a part of the following patch:
https://reviews.freebsd.org/D4879

Submitted by:  Marcin Mazurek <mma@semihalf.com>
Obtained from: Semihalf
Sponsored by:  Annapurna Labs
Reviewed by:   jhibbits, mmel
Differential Revision: https://reviews.freebsd.org/D4879

8 years agoFix bug in ofwbus_release_resource() for non-ofwbus descendants
Zbigniew Bodek [Thu, 18 Feb 2016 11:53:57 +0000 (11:53 +0000)]
Fix bug in ofwbus_release_resource() for non-ofwbus descendants

Resource list for devices that are not ofwbus descendants, but
got to ofwbus method via bus_generic_release_resource() call chain,
cannot be found using BUS_GET_RESOURCE_LIST() used by ofwbus.
In that case, changing device's resource list should be avoided
(will not contain resource list prepared by ofw or simplebus).

Pointy-hat to: zbb
Reviewed by:   wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5304

8 years agoFix ThunderX external PEM bus offset
Wojciech Macek [Thu, 18 Feb 2016 11:26:08 +0000 (11:26 +0000)]
Fix ThunderX external PEM bus offset

Obtained from:         Semihalf
Sponsored by:          Cavium
Approved by:           cognet (mentor)
Reviewed by:           zbb
Differential revision: https://reviews.freebsd.org/D5293

8 years agoRemove redundant ARM_L2_ADDR_BITS and L2_ADDR_BITS definitions and
Svatopluk Kraus [Thu, 18 Feb 2016 09:30:04 +0000 (09:30 +0000)]
Remove redundant ARM_L2_ADDR_BITS and L2_ADDR_BITS definitions and
replace them by primary ones where needed.

8 years agoRemove redundant L2_ADDR_MASK definition and replace it by primary one.
Svatopluk Kraus [Thu, 18 Feb 2016 09:28:16 +0000 (09:28 +0000)]
Remove redundant L2_ADDR_MASK definition and replace it by primary one.

8 years agoRemove unneeded definitions after r291406. Also remove redundant and
Svatopluk Kraus [Thu, 18 Feb 2016 09:26:58 +0000 (09:26 +0000)]
Remove unneeded definitions after r291406. Also remove redundant and
not used L1_ADDR_BITS definition.

8 years agoReorganize the handling all-zeroes terminal block in sparse mode
Thomas Quinot [Thu, 18 Feb 2016 08:44:16 +0000 (08:44 +0000)]
Reorganize the handling all-zeroes terminal block in sparse mode

The intent of the previous code in that case was to force
an explicit write, but the implementation was incorrect, and
as a result the write was never performed. This new implementation
instead uses ftruncate(2) to extend the file with a trailing hole.

Also introduce regression tests for these cases.

PR: 189284
(original PR whose fix introduced this bug)

PR: 207092

Differential Revision: D5248
Reviewed by: sobomax,kib
MFC after: 2 weeks

8 years agohyperv/hn: Use buf_ring for txdesc list
Sepherosa Ziehau [Thu, 18 Feb 2016 07:44:14 +0000 (07:44 +0000)]
hyperv/hn: Use buf_ring for txdesc list

So one spinlock is avoided, which would be potentially dangerous for
virtual machine, if the spinlock holder was scheduled out by the host,
as noted by royger.

Old spinlock based txdesc list is still kept around, so we could have
a safe fallback.

No performance regression nor improvement is observed.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5290

8 years agohyperv/hn: Split TX ring data structure out of softc
Sepherosa Ziehau [Thu, 18 Feb 2016 07:37:59 +0000 (07:37 +0000)]
hyperv/hn: Split TX ring data structure out of softc

This paves the way for upcoming vRSS stuffs and eases more code cleanup.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5283

8 years agohyperv/hn: Use non-fast taskqueue for transmission
Sepherosa Ziehau [Thu, 18 Feb 2016 07:28:45 +0000 (07:28 +0000)]
hyperv/hn: Use non-fast taskqueue for transmission

Performance stays same; so no need to use fast taskqueue here.

Suggested by: royger
Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5282

8 years agohyperv/hn: Use taskqueue_enqueue()
Sepherosa Ziehau [Thu, 18 Feb 2016 07:23:05 +0000 (07:23 +0000)]
hyperv/hn: Use taskqueue_enqueue()

This also eases experiment on the non-fast taskqueue.

Reviewed by: adrian, Jun Su <junsu microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5276

8 years agohyperv/hn: Split RX ring data structure out of softc
Sepherosa Ziehau [Thu, 18 Feb 2016 07:16:31 +0000 (07:16 +0000)]
hyperv/hn: Split RX ring data structure out of softc

This paves the way for upcoming vRSS stuffs and eases more code cleanup.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5275

8 years agohyperv/hn: Change global tunable prefix to hw.hn
Sepherosa Ziehau [Thu, 18 Feb 2016 07:06:44 +0000 (07:06 +0000)]
hyperv/hn: Change global tunable prefix to hw.hn

And use SYSCTL+CTLFLAG_RDTUN for them.

Suggested by: adrian
Reviewed by: adrian, Hongjiang Zhang <honzhan microsoft com>
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5274

8 years agohyperv/hn: Always do transmission scheduling.
Sepherosa Ziehau [Thu, 18 Feb 2016 07:00:47 +0000 (07:00 +0000)]
hyperv/hn: Always do transmission scheduling.

This one gives the best performance so far.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5273

8 years agohyperv/hn: Add option to allow sharing TX taskq between hn instances
Sepherosa Ziehau [Thu, 18 Feb 2016 06:55:05 +0000 (06:55 +0000)]
hyperv/hn: Add option to allow sharing TX taskq between hn instances

It is off by default.  This eases further experimenting on this driver.

Reviewed by: adrian
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5272

8 years agohyperv/hn: Set the TCP ACK/data segment aggregation limit
Sepherosa Ziehau [Thu, 18 Feb 2016 04:59:37 +0000 (04:59 +0000)]
hyperv/hn: Set the TCP ACK/data segment aggregation limit

Set TCP ACK append limit to 1, i.e. aggregate 2 ACKs at most.  Aggregating
anything more than 2 hurts TCP sending performance in hyperv.  This
significantly improves the TCP sending performance when the number of
concurrent connetion is low (2~8).  And it greatly stabilizes the TCP
sending performance in other cases.

Set TCP data segments aggregation length limit to 37500.  Without this
limitation, hn(4) could aggregate ~45 TCP data segments for each
connection (even at 64 or more connections) before dispatching them to
socket code; large aggregation slows down ACK sending and eventually
hurts/destabilizes TCP reception performance.  This setting stabilizes
and improves TCP reception performance for >4 concurrent connections
significantly.

Make them sysctls so they could be adjusted.

Reviewed by: adrian, gallatin (previous version), hselasky (previous version)
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5185

8 years agotcp/lro: Allow drivers to set the TCP ACK/data segment aggregation limit
Sepherosa Ziehau [Thu, 18 Feb 2016 04:58:34 +0000 (04:58 +0000)]
tcp/lro: Allow drivers to set the TCP ACK/data segment aggregation limit

ACK aggregation limit is append count based, while the TCP data segment
aggregation limit is length based.  Unless the network driver sets these
two limits, it's an NO-OP.

Reviewed by: adrian, gallatin (previous version), hselasky (previous version)
Approved by: adrian (mentor)
MFC after: 1 week
Sponsored by: Microsoft OSTC
Differential Revision: https://reviews.freebsd.org/D5185

8 years agoFix a bug introduced in r295736
Pyun YongHyeon [Thu, 18 Feb 2016 03:05:08 +0000 (03:05 +0000)]
Fix a bug introduced in r295736
TX descriptor address should be updated for valid chain.

Pointed out by: jmallett

8 years agoUse the _SAFE loop variant, since the loop body may remove queue entries.
Mark Johnston [Thu, 18 Feb 2016 01:58:26 +0000 (01:58 +0000)]
Use the _SAFE loop variant, since the loop body may remove queue entries.

PR: 207146
MFC after: 3 days

8 years agoRemove duplicated check.
Pyun YongHyeon [Thu, 18 Feb 2016 01:30:49 +0000 (01:30 +0000)]
Remove duplicated check.

Found by: PVS-Studio

8 years agoFix variable assignment.
Pyun YongHyeon [Thu, 18 Feb 2016 01:24:10 +0000 (01:24 +0000)]
Fix variable assignment.

Found by: PVS-Studio

8 years agoFix installation of makewhatis.local(1) since r283777.
Bryan Drewery [Thu, 18 Feb 2016 00:26:21 +0000 (00:26 +0000)]
Fix installation of makewhatis.local(1) since r283777.

The wrapper script has moved to libexec/makewhatis.local since it is not
directlry related to the older makewhatis(1) utility that has been replaced
by the usr.bin/mandoc version.

Reported by: vangyzen

8 years agoRelease the ref acquired in nd6_dad_find() if DAD is already in progress.
Mark Johnston [Thu, 18 Feb 2016 00:00:51 +0000 (00:00 +0000)]
Release the ref acquired in nd6_dad_find() if DAD is already in progress.

MFC after: 1 week

8 years agoUse pfxrtr_del() instead of freeing advertising routers directly.
Mark Johnston [Wed, 17 Feb 2016 23:55:24 +0000 (23:55 +0000)]
Use pfxrtr_del() instead of freeing advertising routers directly.

MFC after: 1 week

8 years agoRemove a prototype for the non-existent prelist_del().
Mark Johnston [Wed, 17 Feb 2016 23:53:24 +0000 (23:53 +0000)]
Remove a prototype for the non-existent prelist_del().

MFC after: 1 week

8 years agoFix a potentially "forever" loop.
Gleb Smirnoff [Wed, 17 Feb 2016 21:24:26 +0000 (21:24 +0000)]
Fix a potentially "forever" loop.

Found by: PVS-Studio

8 years agoTernary operator has lower priority than OR.
Gleb Smirnoff [Wed, 17 Feb 2016 21:17:14 +0000 (21:17 +0000)]
Ternary operator has lower priority than OR.

Found by: PVS-Studio

8 years agoTernary operator has lower priority than OR.
Gleb Smirnoff [Wed, 17 Feb 2016 21:13:33 +0000 (21:13 +0000)]
Ternary operator has lower priority than OR.

Found by: PVS-Studio

8 years agoAdd missing braces.
Gleb Smirnoff [Wed, 17 Feb 2016 21:09:19 +0000 (21:09 +0000)]
Add missing braces.

Found by: PVS-Studio
Approved by: so (implicit)

8 years agoAfter nullfs rmdir operation, reclaim the directory vnode which was
Konstantin Belousov [Wed, 17 Feb 2016 19:43:03 +0000 (19:43 +0000)]
After nullfs rmdir operation, reclaim the directory vnode which was
unlinked.  Otherwise the vnode stays cached, causing leak.  This is
similar to r292961 for regular files.

Reported and tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoIn bnoreuselist(), check both ends of the specified logical block
Konstantin Belousov [Wed, 17 Feb 2016 19:39:57 +0000 (19:39 +0000)]
In bnoreuselist(), check both ends of the specified logical block
numbers range.

This effectively skips indirect and extdata blocks on the buffer
queue.  Since their logical block numbers are negative, bnoreuselist()
could loop infinitely.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoFix build race after r295643.
Bryan Drewery [Wed, 17 Feb 2016 18:41:55 +0000 (18:41 +0000)]
Fix build race after r295643.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse the right size for zeroing.
Warner Losh [Wed, 17 Feb 2016 18:28:38 +0000 (18:28 +0000)]
Use the right size for zeroing.

Submitted by: rpokala@

8 years agoMove the Allwinner kernels to use fdt_pinctrl. This will read the pin
Andrew Turner [Wed, 17 Feb 2016 18:28:03 +0000 (18:28 +0000)]
Move the Allwinner kernels to use fdt_pinctrl. This will read the pin
configuration from the FDT data, then set the pins into the requested
state. As part of this the gpio controller now reports the correct number
of pins instead of returning the number of bank * 32.

To allow for a future consolidated kernel we add the SOC_ALLWINNER_A10 and
SOC_ALLWINNER_A20 kernel options. These need to be set as appropriate for
the SoC the kernel will boot on.

Submitted by: Emmanuel Vadot <manu@bidouilliste.com>
Differential Revision: https://reviews.freebsd.org/D5177

8 years agoAdd protection code for issues reported by PVS / D5245.
Michael Tuexen [Wed, 17 Feb 2016 18:12:38 +0000 (18:12 +0000)]
Add protection code for issues reported by PVS / D5245.

MFC after: 3 days

8 years agoCode cleanup which will silence a warning in PVS / D5245.
Michael Tuexen [Wed, 17 Feb 2016 18:04:22 +0000 (18:04 +0000)]
Code cleanup which will silence a warning in PVS / D5245.

8 years agoAddress a warning reported by D5245 / PVS.
Michael Tuexen [Wed, 17 Feb 2016 17:52:46 +0000 (17:52 +0000)]
Address a warning reported by D5245 / PVS.

MFC after: 3 days

8 years agoCreate an API to reset a struct bio (g_reset_bio). This is mandatory
Warner Losh [Wed, 17 Feb 2016 17:16:02 +0000 (17:16 +0000)]
Create an API to reset a struct bio (g_reset_bio). This is mandatory
for all struct bio you get back from g_{new,alloc}_bio. Temporary
bios that you create on the stack or elsewhere should use this before
first use of the bio, and between uses of the bio. At the moment, it
is nothing more than a wrapper around bzero, but that may change in
the future. The wrapper also removes one place where we encode the
size of struct bio in the KBI.

8 years agoDo not use PMAP_DOMAIN_KERNEL definition for __ARM_ARCH >= 6 as domains
Svatopluk Kraus [Wed, 17 Feb 2016 14:39:29 +0000 (14:39 +0000)]
Do not use PMAP_DOMAIN_KERNEL definition for __ARM_ARCH >= 6 as domains
are not utilized there. Only domain #0 is used and there is no reference
to it in the whole pmap-v6.c. Thus initialize domain access register in
locore-v6.c without reference too.

8 years agoHardcode date in RCS paper for reproducibility
Ed Maste [Wed, 17 Feb 2016 14:34:01 +0000 (14:34 +0000)]
Hardcode date in RCS paper for reproducibility

The 1995/06/01 date is taken from the $Id$ entry in rcs.ms from RCS 5.7,
the last version we imported, and is more meaningful than the OS build
date.

Reviewed by: eadler
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5299

8 years agoAdd the implementation of atomic_swap_32().
Ruslan Bukin [Wed, 17 Feb 2016 14:32:03 +0000 (14:32 +0000)]
Add the implementation of atomic_swap_32().

8 years agoUse better form representing 32 x 128-bit floating-point registers.
Ruslan Bukin [Wed, 17 Feb 2016 14:24:25 +0000 (14:24 +0000)]
Use better form representing 32 x 128-bit floating-point registers.

Suggested by: kib

8 years agoThere is no need to pre save tp in cpu_fork().
Ruslan Bukin [Wed, 17 Feb 2016 14:13:25 +0000 (14:13 +0000)]
There is no need to pre save tp in cpu_fork().

Discussed with: jhb

8 years agoAdd the implementation of savectx().
Ruslan Bukin [Wed, 17 Feb 2016 13:49:38 +0000 (13:49 +0000)]
Add the implementation of savectx().

8 years agoUse callee-saved registers to pass args through fork_trampoline().
Ruslan Bukin [Wed, 17 Feb 2016 13:43:43 +0000 (13:43 +0000)]
Use callee-saved registers to pass args through fork_trampoline().

8 years agoRemove unneeded vector_page_setprot() for __ARM_ARCH >= 6. A vector
Svatopluk Kraus [Wed, 17 Feb 2016 13:29:17 +0000 (13:29 +0000)]
Remove unneeded vector_page_setprot() for __ARM_ARCH >= 6. A vector
page is always mapped in KVA space and so it's always writeable.

8 years agoInclude pte-v6.h only where needed.
Svatopluk Kraus [Wed, 17 Feb 2016 12:57:05 +0000 (12:57 +0000)]
Include pte-v6.h only where needed.

8 years agoRemove pd_prot and pd_cache members from struct arm_devmap_entry.
Svatopluk Kraus [Wed, 17 Feb 2016 12:36:24 +0000 (12:36 +0000)]
Remove pd_prot and pd_cache members from struct arm_devmap_entry.
The struct is used for definition of static device mappings which
should always have same protection and attributes.

8 years agoEvaluate also VM_PROT_EXECUTE protection in pmap_preboot_map_attr().
Svatopluk Kraus [Wed, 17 Feb 2016 12:30:59 +0000 (12:30 +0000)]
Evaluate also VM_PROT_EXECUTE protection in pmap_preboot_map_attr().
Before this change all mappings done by this function were executable
as pte entries have NOT EXECUTABLE bit.

The function is used only for static device mappings at present. Thus
this is also a fix as DEVICE memory should not be mapped as executable.

8 years agoFix build race after r295643.
Bryan Drewery [Wed, 17 Feb 2016 00:30:28 +0000 (00:30 +0000)]
Fix build race after r295643.

Sponsored by: EMC / Isilon Storage Division

8 years agoBump __FreeBSD_Version for u_long -> rman_res_t change (r294883).
Justin Hibbits [Tue, 16 Feb 2016 23:47:52 +0000 (23:47 +0000)]
Bump __FreeBSD_Version for u_long -> rman_res_t change (r294883).

8 years agoDIRDEPS_BUILD: Hookup CLANG_EXTRAS.
Bryan Drewery [Tue, 16 Feb 2016 23:11:09 +0000 (23:11 +0000)]
DIRDEPS_BUILD: Hookup CLANG_EXTRAS.

Sponsored by: EMC / Isilon Storage Division

8 years agoRemove an unused variable that snuck into the previous revision.
John Baldwin [Tue, 16 Feb 2016 22:13:25 +0000 (22:13 +0000)]
Remove an unused variable that snuck into the previous revision.

8 years agoFetch the current thread and it's syscall state from the trussinfo object
John Baldwin [Tue, 16 Feb 2016 22:00:01 +0000 (22:00 +0000)]
Fetch the current thread and it's syscall state from the trussinfo object
instead of passing some of that state as arguments to print_syscall() and
print_syscallret().  This just makes the calls of these functions shorter
and easier to read.

8 years agoThe locking annotations for struct sockbuf originally used the key from
John Baldwin [Tue, 16 Feb 2016 21:42:53 +0000 (21:42 +0000)]
The locking annotations for struct sockbuf originally used the key from
struct socket.  When sockbuf.h was moved out of socketvar.h, the locking
key was no longer nearby.  Instead, add a new key for sockbuf and use
a single item for the socket buffer lock instead of separate entries for
receive vs send buffers.

Reviewed by: adrian
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D4901

8 years agoFix naive use of ftell(3).
Pedro F. Giffuni [Tue, 16 Feb 2016 21:39:19 +0000 (21:39 +0000)]
Fix naive use of ftell(3).

Secure coding practices, FIO19-C.

8 years agoAnother conversion u_long -> rman_res_t
Justin Hibbits [Tue, 16 Feb 2016 21:30:55 +0000 (21:30 +0000)]
Another conversion u_long -> rman_res_t

8 years agocrontab: ftruncate() with ftello() instead of ftell().
Pedro F. Giffuni [Tue, 16 Feb 2016 21:19:39 +0000 (21:19 +0000)]
crontab: ftruncate() with ftello() instead of ftell().

Obtained from: OpenBSD (CVS rev. 1.47)

8 years agocron: use (char *)NULL instead of (char *)0 in execle.
Pedro F. Giffuni [Tue, 16 Feb 2016 20:59:49 +0000 (20:59 +0000)]
cron: use (char *)NULL instead of (char *)0 in execle.

Obtained from: OpenBSD (CVS Rev 1.25)

8 years agoWhitespace changes.
Michael Tuexen [Tue, 16 Feb 2016 20:33:18 +0000 (20:33 +0000)]
Whitespace changes.

8 years agoImprove the teardown of the SCTP stack.
Michael Tuexen [Tue, 16 Feb 2016 19:36:25 +0000 (19:36 +0000)]
Improve the teardown of the SCTP stack.

Obtained from: bz@
MFC after: 1 week

8 years agoAdd CLEANDEPEND[FILES|DIRS] and simplify the tags cleanup to use it.
Bryan Drewery [Tue, 16 Feb 2016 19:11:17 +0000 (19:11 +0000)]
Add CLEANDEPEND[FILES|DIRS] and simplify the tags cleanup to use it.

Sponsored by: EMC / Isilon Storage Division

8 years agoAlways remove .depend.* regardless of WITH_FAST_DEPEND in case of changing
Bryan Drewery [Tue, 16 Feb 2016 19:02:04 +0000 (19:02 +0000)]
Always remove .depend.* regardless of WITH_FAST_DEPEND in case of changing
which is used.

Sponsored by:  EMC / Isilon Storage Division

8 years agoRemove temporary hack from r294370 for SSH upgrades.
Bryan Drewery [Tue, 16 Feb 2016 19:00:22 +0000 (19:00 +0000)]
Remove temporary hack from r294370 for SSH upgrades.

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

8 years agoConvert a few more long -> rman_res_t.
Justin Hibbits [Tue, 16 Feb 2016 17:55:10 +0000 (17:55 +0000)]
Convert a few more long -> rman_res_t.

8 years agoRevert r295648 for now.
Bryan Drewery [Tue, 16 Feb 2016 16:07:12 +0000 (16:07 +0000)]
Revert r295648 for now.

This builds fine with FAST_DEPEND but the mkdep method requires that
include/ generates the headers during 'make depend' so the subsequent
directories can find them when running mkdep.

Sponsored by: EMC / Isilon Storage Division

8 years agoAllow callers of OF_decode_addr to get the size of the found mapping. This
Andrew Turner [Tue, 16 Feb 2016 15:18:12 +0000 (15:18 +0000)]
Allow callers of OF_decode_addr to get the size of the found mapping. This
will allow for code that uses the old fdt_get_range and fdt_regsize
functions to find a range, map it, access, then unmap to replace this, up
to and including the map, with a call to OF_decode_addr.

As this function should only be used in the early boot code the unmap is
mostly do document we no longer need the mapping as it's a no-op, at least
on arm.

Reviewed by: jhibbits
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D5258

8 years agoAllow elfcopy to convert between two non-ELF formats
Ed Maste [Tue, 16 Feb 2016 14:03:25 +0000 (14:03 +0000)]
Allow elfcopy to convert between two non-ELF formats

If the output object is not an ELF file, choose an arbitrary ELF format
for the intermediate file. srec, ihex and binary formats are independent
of class, endianness and machine type so these choices do not affect the
output.

ELF Tool Chain ticket #517

Reviewed by: kai
Obtained from: ELF Tool Chain r3411

8 years agoUse EARLY_DRIVER_MODULE() for ti_scm driver to be attached before
Svatopluk Kraus [Tue, 16 Feb 2016 13:40:23 +0000 (13:40 +0000)]
Use EARLY_DRIVER_MODULE() for ti_scm driver to be attached before
am335x_prcm driver which uses it. Used BUS_PASS_BUS is a quick pick
for now and may be revised when other drivers start using multipass
feature.

This is needed after an update of Linux dts files done in r295436.

8 years agoDo not use DMA channels used by GPU.
Svatopluk Kraus [Tue, 16 Feb 2016 12:19:06 +0000 (12:19 +0000)]
Do not use DMA channels used by GPU.

(1) The channel mask is get from "brcm,dma-channel-mask" property of
    dma node, and if not provided, from "broadcom,channels" property.
(2) Consequently, sdhci driver does not allocate any specific channel.
(3) Use CS_RESET bit for initial channel reset.

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

8 years agoAdd a sysctl to read the internal temperature of the AXP209 Power
Andrew Turner [Tue, 16 Feb 2016 11:51:54 +0000 (11:51 +0000)]
Add a sysctl to read the internal temperature of the AXP209 Power
Management IC.

Submitted by: Jared McNeill <jmcneill@invisible.ca>
Differential Revision: https://reviews.freebsd.org/D5298

8 years agoAdd an analog audio driver for the audio codec found on the Allwinner
Andrew Turner [Tue, 16 Feb 2016 11:45:46 +0000 (11:45 +0000)]
Add an analog audio driver for the audio codec found on the Allwinner
A10/A20 SoC. Based loosely on the submitters NetBSD driver, tested on
Cubieboard 2. Playback and capture are supported.

Submitted by: Jared McNeill <jmcneill@invisible.ca>
Differential Revision: https://reviews.freebsd.org/D5202

8 years agoSupport PEM that is not a PCI endpoint on ThunderX
Zbigniew Bodek [Tue, 16 Feb 2016 11:43:57 +0000 (11:43 +0000)]
Support PEM that is not a PCI endpoint on ThunderX

Some chip revisions don't have their external PCIe buses
behind the internal bridge. Add support for FDT-configurable
PEMs but keep ability for PCIe enumeration.

Reviewed by:   andrew, wma
Obtained from: Semihalf
Sponsored by:  Cavium
Differential Revision: https://reviews.freebsd.org/D5285

8 years agoTemporary overwrite bad definition of elm interrupt property in Linux
Svatopluk Kraus [Tue, 16 Feb 2016 11:38:38 +0000 (11:38 +0000)]
Temporary overwrite bad definition of elm interrupt property in Linux
dts files. It may be removed once it will be fixed upstream.

This is done just to supresses a warning during dtb evaluation as
there is no elm driver in tree at present.

8 years agoOnly read the power state register when we will be using its value. While
Andrew Turner [Tue, 16 Feb 2016 11:03:21 +0000 (11:03 +0000)]
Only read the power state register when we will be using its value. While
here remove magic shifts, and cleanup pwr_name.

Sponsored by: ABT Systems Ltd