]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoRemove a stray else. It isn't needed (due to the return at the end of
imp [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.
br [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
emaste [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
zbb [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
zbb [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
zbb [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
wma [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
skra [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.
skra [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
skra [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 [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
sephe [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
sephe [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
sephe [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()
sephe [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
sephe [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
sephe [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.
sephe [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
sephe [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
sephe [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
sephe [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
yongari [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.
markj [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.
yongari [Thu, 18 Feb 2016 01:30:49 +0000 (01:30 +0000)]
Remove duplicated check.

Found by: PVS-Studio

8 years agoFix variable assignment.
yongari [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.
bdrewery [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.
markj [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.
markj [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().
markj [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.
glebius [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.
glebius [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.
glebius [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.
glebius [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
kib [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
kib [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.
bdrewery [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.
imp [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 [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.
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.
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.
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
imp [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
skra [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
emaste [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().
br [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.
br [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().
br [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().
br [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().
br [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
skra [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.
skra [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.
skra [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().
skra [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.
bdrewery [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).
jhibbits [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.
bdrewery [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.
jhb [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
jhb [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
jhb [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).
pfg [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
jhibbits [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().
pfg [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.
pfg [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.
tuexen [Tue, 16 Feb 2016 20:33:18 +0000 (20:33 +0000)]
Whitespace changes.

8 years agoImprove the teardown of the SCTP stack.
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.
bdrewery [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
bdrewery [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.
bdrewery [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.
jhibbits [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.
bdrewery [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 [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
emaste [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
skra [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.
skra [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 [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 [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
zbb [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
skra [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 [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

8 years agoAdd myself as ports committer (including calendar)
olivier [Tue, 16 Feb 2016 10:33:45 +0000 (10:33 +0000)]
Add myself as ports committer (including calendar)

Approved by: jadawin
Differential Revision: https://reviews.freebsd.org/D5295

8 years agoichsmb: add PCI device ID for Intel Sunrise Point-H SMBus controller
vangyzen [Tue, 16 Feb 2016 02:23:39 +0000 (02:23 +0000)]
ichsmb: add PCI device ID for Intel Sunrise Point-H SMBus controller

MFC after: 3 days
Sponsored by: Dell Inc.

8 years agoDIRDEPS_BUILD: Update dependencies.
bdrewery [Tue, 16 Feb 2016 02:14:30 +0000 (02:14 +0000)]
DIRDEPS_BUILD: Update dependencies.

Sponsored by: EMC / Isilon Storage Division

8 years agoFilemon: Fix panic when fork1() is called from kproc_create().
bdrewery [Tue, 16 Feb 2016 02:14:25 +0000 (02:14 +0000)]
Filemon: Fix panic when fork1() is called from kproc_create().

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

8 years agoRemove the need for overriding depend.
bdrewery [Tue, 16 Feb 2016 02:14:21 +0000 (02:14 +0000)]
Remove the need for overriding depend.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd missing dependency on sys/conf/newvers.sh.
bdrewery [Tue, 16 Feb 2016 02:14:18 +0000 (02:14 +0000)]
Add missing dependency on sys/conf/newvers.sh.

Sponsored by: EMC / Isilon Storage Division

8 years agoAdd an .ORDER for all/install.
bdrewery [Tue, 16 Feb 2016 02:14:15 +0000 (02:14 +0000)]
Add an .ORDER for all/install.

Sponsored by: EMC / Isilon Storage Division

8 years agoUse built-in :tA here rather than realpath(1).
bdrewery [Tue, 16 Feb 2016 02:14:12 +0000 (02:14 +0000)]
Use built-in :tA here rather than realpath(1).

Sponsored by: EMC / Isilon Storage Division

8 years agoDon't descend into test directories for distribution->installconfig.
bdrewery [Tue, 16 Feb 2016 02:14:09 +0000 (02:14 +0000)]
Don't descend into test directories for distribution->installconfig.

Sponsored by: EMC / Isilon Storage Division

8 years agoTest directories can build in parallel fine.
bdrewery [Tue, 16 Feb 2016 02:13:59 +0000 (02:13 +0000)]
Test directories can build in parallel fine.

Sponsored by: EMC / Isilon Storage Division

8 years agoFix a panic bug that cropped up in the PTE rewrite.
jhibbits [Tue, 16 Feb 2016 02:13:55 +0000 (02:13 +0000)]
Fix a panic bug that cropped up in the PTE rewrite.

PTE was getting overwritten by just the flags.

Pointy-hat to: jhibbits

8 years agoConsolidate common beforebuild logic.
bdrewery [Tue, 16 Feb 2016 02:09:48 +0000 (02:09 +0000)]
Consolidate common beforebuild logic.

Sponsored by: EMC / Isilon Storage Division

8 years agofputs: Return the number of bytes written.
pfg [Mon, 15 Feb 2016 21:18:52 +0000 (21:18 +0000)]
fputs: Return the number of bytes written.

Fix r295631: wrong value.

Pointy hat: pfg (me)
Pointed out by: bde

8 years agoCorrect the ABI name for Linux/i386 binaries under FreeBSD/i386.
jhb [Mon, 15 Feb 2016 20:27:16 +0000 (20:27 +0000)]
Correct the ABI name for Linux/i386 binaries under FreeBSD/i386.

This allows truss to work for these binaries again after r288424.

MFC after: 3 days

8 years agoSign extend the error value for failing Linux/i386 system calls. This
jhb [Mon, 15 Feb 2016 20:26:40 +0000 (20:26 +0000)]
Sign extend the error value for failing Linux/i386 system calls.  This
restores the mapping of Linux errors to native FreeBSD errno values after
the refactoring in r288424.

8 years agoAdd support for the Allwinner DMA controller. This will be used by the at
andrew [Mon, 15 Feb 2016 19:56:35 +0000 (19:56 +0000)]
Add support for the Allwinner DMA controller. This will be used by the at
least the audio codec driver currently in review.

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

8 years agoAdd support for the AXP209 Power System Management IC. This allows boards
andrew [Mon, 15 Feb 2016 19:31:23 +0000 (19:31 +0000)]
Add support for the AXP209 Power System Management IC. This allows boards
with this and an Allwinner SoC to power off.

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

8 years agoSet sc->clkfreq removed in r295470
andrew [Mon, 15 Feb 2016 19:14:24 +0000 (19:14 +0000)]
Set sc->clkfreq removed in r295470

Reported by: Jared McNeill <jmcneill@invisible.ca>
Pointy-hat to: andrew

8 years agogetln: We cannot expand the buffer beyond INT_MAX.
pfg [Mon, 15 Feb 2016 18:14:21 +0000 (18:14 +0000)]
getln: We cannot expand the buffer beyond INT_MAX.

In such cases return ENOMEM. This is a limitation of our
implementation, alternatively you may consider getline(3).

Differential Revision: https://reviews.freebsd.org/D442 (Partial)
Obtained from: Apple Inc. (Libc 997.90.3)
Relnotes: yes

8 years agofputs: Return the number of bytes written.
pfg [Mon, 15 Feb 2016 18:13:33 +0000 (18:13 +0000)]
fputs: Return the number of bytes written.

POSIX.1-2008 requires that successful completion simply return a
non-negative integer. We have regularly returned a constant value.
Another, equally valid, implementation convention implies returning
the number of bytes written.

Adopt this last convention to be in line with what Apple's libc
does. POSIX also explicitly notes:

Note that this implementation convention cannot be adhered to for strings
longer than {INT_MAX} bytes as the value would not be representable in the
return type of the function. For backwards-compatibility, implementations
can return the number of bytes for strings of up to {INT_MAX} bytes, and
return {INT_MAX} for all longer strings.

Developers shouldn't depend specifically on either convention but
the change may help port software from Apple.

Differential Revision:  https://reviews.freebsd.org/D442 (Partial)
Obtained from:  Apple Inc. (Libc 997.90.3 with changes)
Relnotes: yes

8 years agoFix the spelling of OF_getencprop. It will fix the data correctly for the
andrew [Mon, 15 Feb 2016 17:14:10 +0000 (17:14 +0000)]
Fix the spelling of OF_getencprop. It will fix the data correctly for the
endian of the CPU so there is no need to call fdt32_to_cpu.

Sponsored by: ABT Systems Ltd