freebsd.git
9 years agoUpdate compiler-rt to trunk r230183. This has some of our patches
dim [Sun, 22 Feb 2015 22:53:51 +0000 (22:53 +0000)]
Update compiler-rt to trunk r230183.  This has some of our patches
imported, so we have just a few small diffs against upstream left.

9 years agoImport compiler-rt trunk r230183.
dim [Sun, 22 Feb 2015 22:43:40 +0000 (22:43 +0000)]
Import compiler-rt trunk r230183.

https://llvm.org/svn/llvm-project/compiler-rt/trunk@230183

9 years agoUpdate compiler-rt to trunk r228651. This enables using Address
dim [Sun, 22 Feb 2015 22:31:36 +0000 (22:31 +0000)]
Update compiler-rt to trunk r228651.  This enables using Address
Sanitizer and Undefined Behavior Sanitizer with clang 3.6.0.

9 years agoBelatedly add llvm patch corresponding to r278367.
dim [Sun, 22 Feb 2015 16:28:24 +0000 (16:28 +0000)]
Belatedly add llvm patch corresponding to r278367.

9 years agoMerge ^/head r279023 through r279162.
dim [Sun, 22 Feb 2015 16:04:37 +0000 (16:04 +0000)]
Merge ^/head r279023 through r279162.

9 years agoAdd llvm patch corresponding to r279161.
dim [Sun, 22 Feb 2015 15:56:16 +0000 (15:56 +0000)]
Add llvm patch corresponding to r279161.

9 years agoPull in r230058 from upstream llvm trunk (by Benjamin Kramer):
dim [Sun, 22 Feb 2015 15:51:49 +0000 (15:51 +0000)]
Pull in r230058 from upstream llvm trunk (by Benjamin Kramer):

  LoopRotate: When reconstructing loop simplify form don't split edges
  from indirectbrs.

  Yet another chapter in the endless story. While this looks like we
  leave the loop in a non-canonical state this replicates the logic in
  LoopSimplify so it doesn't diverge from the canonical form in any way.

  http://llvm.org/PR21968

This fixes a "Cannot split critical edge from IndirectBrInst" assertion
failure when building the devel/radare2 port.

PR: 195480, 196987
MFC after: 3 days

9 years agopmccontrol(8): Replace malloc() + memset() with calloc()
pfg [Sun, 22 Feb 2015 14:45:00 +0000 (14:45 +0000)]
pmccontrol(8): Replace malloc() + memset() with calloc()

PMCC_OP_IGNORE happens to be zero, so just use calloc() here.

9 years agonice(): Correct return value and [EPERM] error.
jilles [Sun, 22 Feb 2015 13:36:44 +0000 (13:36 +0000)]
nice(): Correct return value and [EPERM] error.

PR: 189821
Obtained from: NetBSD
Relnotes: yes

9 years agoAdd support to the bcm2835 mailbox driver to work before interrupts are
andrew [Sun, 22 Feb 2015 11:11:05 +0000 (11:11 +0000)]
Add support to the bcm2835 mailbox driver to work before interrupts are
enabled. This will be needed to enable the power on devices early on in the
boot process.

9 years agoStep 2 of eliminating the "games" distribution: Remove punch card
cperciva [Sun, 22 Feb 2015 08:50:05 +0000 (08:50 +0000)]
Step 2 of eliminating the "games" distribution: Remove punch card
utilities.

I was originally planning on removing the phase-of-moon (pom), clock
(grdc), and caesar cipher (caesar, rot13) utilities as well, but after
I committed r278616 I received an astonishing volume of email informing
me that those are still being widely used.  Much to my relief, nobody
reported continuing to use the punch card utilities in production.

The final step will be to merge src/games into src/usr.bin.

This change will not be MFCed.

9 years agosfxge: TxQ block level should use EFX_TXQ_LIMIT as maximum TxQ size
arybchik [Sun, 22 Feb 2015 07:20:04 +0000 (07:20 +0000)]
sfxge: TxQ block level should use EFX_TXQ_LIMIT as maximum TxQ size

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: use sparse index to retrieve sensor value
arybchik [Sun, 22 Feb 2015 07:18:38 +0000 (07:18 +0000)]
sfxge: use sparse index to retrieve sensor value

Submitted by:   Andrew Jackson <ajackson at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: use macros to acquire and release BAR locks everywhere
arybchik [Sun, 22 Feb 2015 07:17:35 +0000 (07:17 +0000)]
sfxge: use macros to acquire and release BAR locks everywhere

It was the result of invalid merge of the patch from out-of-tree driver.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: packet can't require more than n_dma_seg descriptors plus one
arybchik [Sun, 22 Feb 2015 07:16:11 +0000 (07:16 +0000)]
sfxge: packet can't require more than n_dma_seg descriptors plus one

Use remaining number of DMA segment instead of maximum number in mapping
when checking space for one more TSO segment packet.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: use common definitions of MC shared memory offsets and PDU length
arybchik [Sun, 22 Feb 2015 07:14:12 +0000 (07:14 +0000)]
sfxge: use common definitions of MC shared memory offsets and PDU length

Submitted by:   Ben Hutchings
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: synchronize EF10 registers header
arybchik [Sun, 22 Feb 2015 07:11:55 +0000 (07:11 +0000)]
sfxge: synchronize EF10 registers header

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: style fixes and cleanup
arybchik [Sun, 22 Feb 2015 07:08:57 +0000 (07:08 +0000)]
sfxge: style fixes and cleanup

Sync endif comment with conditional.
BOOTROM and SIENA_BOOTROM are the same, but highlight that it is Siena.
Restore commented out assertion.
Sync comments with out-of-tree driver.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoAdd the -c option for specifying the capacity of the disk image. When
marcel [Sun, 22 Feb 2015 04:50:47 +0000 (04:50 +0000)]
Add the -c option for specifying the capacity of the disk image. When
a capcity is given, no partitions are required. When no partitions are
given, no scheme needs to be specified either. This makes it possible
to create an entirely empty disk image. To add an empty partitioning
table, specify the scheme.

Bump the version to 20150222.

9 years agoAllow use of higher-resolution (e.g. 1920x1080) framebuffers on PS3.
nwhitehorn [Sun, 22 Feb 2015 02:59:53 +0000 (02:59 +0000)]
Allow use of higher-resolution (e.g. 1920x1080) framebuffers on PS3.

MFC after: 1 month

9 years agoDon't require a scheme if no partitions are given. Change the code
marcel [Sun, 22 Feb 2015 01:20:49 +0000 (01:20 +0000)]
Don't require a scheme if no partitions are given. Change the code
to handle that case. Note that we still require partitions, so the
change is effectively a no-op.

9 years agomsun: drop unnecessary checks.
pfg [Sun, 22 Feb 2015 01:15:09 +0000 (01:15 +0000)]
msun: drop unnecessary checks.

Drop an unnecessary check in some calculations. The check
would have Coverity falsely conclude that variables could
be left undefined.

Discussed with: kargl, bde
Reviewed by: bde

9 years agoIn scheme_write(), don't overwrite the end parameter with the
marcel [Sun, 22 Feb 2015 01:01:02 +0000 (01:01 +0000)]
In scheme_write(), don't overwrite the end parameter with the
return value of image_get_size(). As it so happens, the only
caller of scheme_write() passes exactly that.

9 years agoRemove extraneous parenthesis in assignment.
marcel [Sun, 22 Feb 2015 00:58:10 +0000 (00:58 +0000)]
Remove extraneous parenthesis in assignment.

9 years agoDocument that netstat(1) supports libxo(3).
marcel [Sun, 22 Feb 2015 00:01:42 +0000 (00:01 +0000)]
Document that netstat(1) supports libxo(3).

9 years agoAllow for parameters added with the JP_OPT flag to not exist.
jamie [Sun, 22 Feb 2015 00:00:10 +0000 (00:00 +0000)]
Allow for parameters added with the JP_OPT flag to not exist.
That's why the flag exists in the first place.

MFC after: 1 week

9 years agoConvert netstat to use libxo.
marcel [Sat, 21 Feb 2015 23:47:20 +0000 (23:47 +0000)]
Convert netstat to use libxo.

Obtained from:  Phil Shafer <phil@juniper.net>
Ported to -current by: alfred@ (mostly), Kim Shrier
Formatting: marcel@
Sponsored by:   Juniper Networks, Inc.

9 years agoDisguising stderr from jls generally considered harmful
ngie [Sat, 21 Feb 2015 23:39:43 +0000 (23:39 +0000)]
Disguising stderr from jls generally considered harmful

Undisguising it dumps out the following logspew:

jls: unknown parameter: allow

PR: 191019

9 years agoMake kernel ELF image parsing not crash for kernels running at locations
nwhitehorn [Sat, 21 Feb 2015 23:20:05 +0000 (23:20 +0000)]
Make kernel ELF image parsing not crash for kernels running at locations
other than their link address.

9 years agoRevert r276949 and redo the fix for PCIe/PCI bridges, which do not
kib [Sat, 21 Feb 2015 22:38:32 +0000 (22:38 +0000)]
Revert r276949 and redo the fix for PCIe/PCI bridges, which do not
follow specification and do not provide PCIe capability.

Verify if the port above such bridge is downstream PCIe (or root port)
and treat the bridge as PCIe/PCI then.  This allows to avoid
maintaining the table of device ids for bridges without capability,
while still calculate correct request originator for devices behind
the bridge.

Submitted by: Jason Harmening <jason.harmening@gmail.com>
MFC after: 1 week

9 years agoback Xref get_cyclecount to have it get more exposure...
jmg [Sat, 21 Feb 2015 22:25:24 +0000 (22:25 +0000)]
back Xref get_cyclecount to have it get more exposure...

9 years agoCorrect a comment which was exactly backwards from reality.
ian [Sat, 21 Feb 2015 22:19:59 +0000 (22:19 +0000)]
Correct a comment which was exactly backwards from reality.

9 years agoPrevent NULL pointer de-reference.
pfg [Sat, 21 Feb 2015 15:02:27 +0000 (15:02 +0000)]
Prevent NULL pointer de-reference.

As a follow up to r279090, if dp hasn't been defined, we
shouldn't attempt to do an optimization here.

9 years agoTypo: effect -> affect.
gavin [Sat, 21 Feb 2015 13:00:52 +0000 (13:00 +0000)]
Typo: effect -> affect.

9 years agosfxge: allow TX and RX queue limits to be changed
arybchik [Sat, 21 Feb 2015 06:28:31 +0000 (06:28 +0000)]
sfxge: allow TX and RX queue limits to be changed

Before the common code had hard coded limits on the IDs RXQs and TXQs could
be created with which were suited for the Windows driver with VMQ, and so
would prevent queues with IDs greater than or equal to 259 (for TXQs) or 768
(for RXQs) from being created. This change allows the limits to be set in
efsys.h, so that all 1024 queues can be created during new manftest tests.
Also, the descriptor cache sizes were also hard coded to values suited to
the smaller queue counts, and so it was necessary to make them configurable
as well.

Submitted by:   Mark Spender <mspender at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: check allocations are non-NULL before freeing them
arybchik [Sat, 21 Feb 2015 06:27:45 +0000 (06:27 +0000)]
sfxge: check allocations are non-NULL before freeing them

Caught when efx_filter_init() failed and called efx_filter_fini() in the
teardown path.

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: keep fw and driver view of autoneg parameters consistent
arybchik [Sat, 21 Feb 2015 06:27:16 +0000 (06:27 +0000)]
sfxge: keep fw and driver view of autoneg parameters consistent

Previously the driver's view was the expected outcome of any
reconfiguration even if that reconfiguration failed.

Submitted by:   Ben Horgan
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: never set RX_DESCQ_EN during self-test
arybchik [Sat, 21 Feb 2015 06:26:10 +0000 (06:26 +0000)]
sfxge: never set RX_DESCQ_EN during self-test

We must not enable RX queues with random parameters when they are
mapped into a VF with an untrusted driver.  It's probably not a good
idea to do this anyway, so take this bit out of the table test masks.

Submitted by:   Ben Hutchings
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: more accurate calculation of maximum number of TSO segments
arybchik [Sat, 21 Feb 2015 06:24:48 +0000 (06:24 +0000)]
sfxge: more accurate calculation of maximum number of TSO segments

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoPurge references to the mrouted rc script, which was removed in r275299.
markj [Sat, 21 Feb 2015 06:05:51 +0000 (06:05 +0000)]
Purge references to the mrouted rc script, which was removed in r275299.

PR: 195785

9 years agocxgbe(4): there is no need to force an "unimplemented" panic needlessly.
np [Fri, 20 Feb 2015 22:57:54 +0000 (22:57 +0000)]
cxgbe(4): there is no need to force an "unimplemented" panic needlessly.
The calls to free_nm_txq and free_nm_rxq are made just a few lines prior
to the panic.

9 years agoAdd cxl(4) and if_cxl(4) as links to cxgbe(4).
np [Fri, 20 Feb 2015 22:52:24 +0000 (22:52 +0000)]
Add cxl(4) and if_cxl(4) as links to cxgbe(4).

MFC after: 1 week.

9 years agoregex(3): Fix uninitialized pointer values.
pfg [Fri, 20 Feb 2015 21:21:38 +0000 (21:21 +0000)]
regex(3): Fix uninitialized pointer values.

CID: 405582 (also clang static checker)
CID: 1018724

9 years agoDon't specify a resid parameter if we're just going to ignore it. Instead,
markj [Fri, 20 Feb 2015 20:49:00 +0000 (20:49 +0000)]
Don't specify a resid parameter if we're just going to ignore it. Instead,
let vn_rdwr() check for short reads.

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

9 years agotab vs spaces.
pfg [Fri, 20 Feb 2015 20:27:53 +0000 (20:27 +0000)]
tab vs spaces.

9 years agoFix the logic for skipping parameters (with -s) that have "jailsys"
jamie [Fri, 20 Feb 2015 20:12:05 +0000 (20:12 +0000)]
Fix the logic for skipping parameters (with -s) that have "jailsys"
parents (such as host.hostname); these were being skipped all the time.
That it went this long without anyone noticing is a sign that this feature
isn't actually used by anyone, but it's there so it might as well work.

MFC after: 1 week

9 years agoAllow parameters listed on the command line to override the -v option,
jamie [Fri, 20 Feb 2015 19:48:24 +0000 (19:48 +0000)]
Allow parameters listed on the command line to override the -v option,
instead of crashing.

PR: 197701
MFC after: 1 week

9 years agosfxge: reap Tx descriptors on unblock
arybchik [Fri, 20 Feb 2015 19:44:02 +0000 (19:44 +0000)]
sfxge: reap Tx descriptors on unblock

Otherwise when processing finally comes to efx_tx_qdesc_post() it could
be insufficient space between reaped and added to post pending
descriptors.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoFix build on i386 without "device apic"
tijl [Fri, 20 Feb 2015 19:42:26 +0000 (19:42 +0000)]
Fix build on i386 without "device apic"

Reviewed by: kib

9 years agosfxge: add assertions that required event handlers are implemented
arybchik [Fri, 20 Feb 2015 19:42:05 +0000 (19:42 +0000)]
sfxge: add assertions that required event handlers are implemented

efx_ev_mcdi() does not assert or check that all event handlers it
calls are non-null.  Add assertions at the top for all required
event handlers, as some events (in the case of this bug, monitor
events) are rare.

Submitted by:   Ben Hutchings
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: style fixes
arybchik [Fri, 20 Feb 2015 19:39:40 +0000 (19:39 +0000)]
sfxge: style fixes

Use nitem() to get number of array elements.
Remove unused define.
Use TAB to indent.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: regenerate sensor map
arybchik [Fri, 20 Feb 2015 19:37:10 +0000 (19:37 +0000)]
sfxge: regenerate sensor map

Add Florence R7 and Modena sensors.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoDefault XZ_THREADS=0, and add to RELEASE_RMAKEFLAGS
gjb [Fri, 20 Feb 2015 18:51:52 +0000 (18:51 +0000)]
Default XZ_THREADS=0, and add to RELEASE_RMAKEFLAGS
so it is passed to the 'release' make(1) target if
it needs to be adjusted to a non-zero integer.

Sponsored by: The FreeBSD Foundation

9 years agoFix XZ_THREADS description in release(7), which defaults to
gjb [Fri, 20 Feb 2015 18:49:49 +0000 (18:49 +0000)]
Fix XZ_THREADS description in release(7), which defaults to
'0', not kern.ncpu.

Sponsored by: The FreeBSD Foundation

9 years agoFix wording in entry for r278934.
gjb [Fri, 20 Feb 2015 18:42:00 +0000 (18:42 +0000)]
Fix wording in entry for r278934.

Submitted by: markj
Sponsored by: The FreeBSD Foundation

9 years agoHandle SIOCSIFCAP by propogating the request to the parent interface. This
delphij [Fri, 20 Feb 2015 18:39:12 +0000 (18:39 +0000)]
Handle SIOCSIFCAP by propogating the request to the parent interface.  This
allows adding an vlan interface into a bridge.

Thanks for William Katsak <wkatsak cs rutgers edu> for testing and fixing
an issue in my previous patch draft.

MFC after: 2 weeks

9 years agoDocument r275140, pmc callchain depths increased.
gjb [Fri, 20 Feb 2015 18:06:11 +0000 (18:06 +0000)]
Document r275140, pmc callchain depths increased.

Sponsored by: The FreeBSD Foundation

9 years agoFix a typo in r278037 entry: s/cam/ctl/
gjb [Fri, 20 Feb 2015 17:56:27 +0000 (17:56 +0000)]
Fix a typo in r278037 entry: s/cam/ctl/

Submitted by: mav
Sponsored by: The FreeBSD Foundation

9 years agoDocument XZ_THREADS in release(7).
gjb [Fri, 20 Feb 2015 17:53:10 +0000 (17:53 +0000)]
Document XZ_THREADS in release(7).

Sponsored by: The FreeBSD Foundation

9 years agoUpdate the commented last revision.
gjb [Fri, 20 Feb 2015 17:46:20 +0000 (17:46 +0000)]
Update the commented last revision.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278926, 'make release' now uses multi-threaded
gjb [Fri, 20 Feb 2015 17:46:18 +0000 (17:46 +0000)]
Document r278926, 'make release' now uses multi-threaded
xz(1).

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278433, xz(1) update to 5.2.0.
gjb [Fri, 20 Feb 2015 17:46:15 +0000 (17:46 +0000)]
Document r278433, xz(1) update to 5.2.0.
Separately document multi-threaded support to keep the
version update separate, so it remains correct if xz(1)
is updated again.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278354, ctld(8) update to control non-iSCSI CTL
gjb [Fri, 20 Feb 2015 17:46:12 +0000 (17:46 +0000)]
Document r278354, ctld(8) update to control non-iSCSI CTL
ports

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278320, devctl(3) and devctl(8) added.
gjb [Fri, 20 Feb 2015 17:46:10 +0000 (17:46 +0000)]
Document r278320, devctl(3) and devctl(8) added.

Sponsored by: The FreeBSD Foundation

9 years agoAdd a 'General Storage' section.
gjb [Fri, 20 Feb 2015 17:46:07 +0000 (17:46 +0000)]
Add a 'General Storage' section.
Document r278037, CAM LUN mapping rewrite.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r278934, elf(3) dependency removed from dtri.o
gjb [Fri, 20 Feb 2015 17:46:04 +0000 (17:46 +0000)]
Document r278934, elf(3) dependency removed from dtri.o

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277990, powerpc64 kernel now built as
gjb [Fri, 20 Feb 2015 17:46:02 +0000 (17:46 +0000)]
Document r277990, powerpc64 kernel now built as
a position-independent executable

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277904, '-s' option added to config(8).
gjb [Fri, 20 Feb 2015 17:45:59 +0000 (17:45 +0000)]
Document r277904, '-s' option added to config(8).

Sponsored by: The FreeBSD Foundation

9 years agoDocument r277610, futimens(2) and utimensat(2) added.
gjb [Fri, 20 Feb 2015 17:45:56 +0000 (17:45 +0000)]
Document r277610, futimens(2) and utimensat(2) added.

Sponsored by: The FreeBSD Foundation

9 years agoProperly mark up author name.
brueffer [Fri, 20 Feb 2015 13:50:50 +0000 (13:50 +0000)]
Properly mark up author name.

9 years agoProperly mark up author name.
brueffer [Fri, 20 Feb 2015 11:23:41 +0000 (11:23 +0000)]
Properly mark up author name.

9 years agoApply mdoc style.
brueffer [Fri, 20 Feb 2015 10:25:13 +0000 (10:25 +0000)]
Apply mdoc style.

MFC after: 1 week

9 years agosfxge: add Florence R7 turbo mode support to common code
arybchik [Fri, 20 Feb 2015 07:57:59 +0000 (07:57 +0000)]
sfxge: add Florence R7 turbo mode support to common code

Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: regenerate MCDI protocol headers
arybchik [Fri, 20 Feb 2015 07:54:35 +0000 (07:54 +0000)]
sfxge: regenerate MCDI protocol headers

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agosfxge: handle fragmented TCP header in mbuf
arybchik [Fri, 20 Feb 2015 07:53:46 +0000 (07:53 +0000)]
sfxge: handle fragmented TCP header in mbuf

TCP header is fragmented in the case of VLAN tagged IPv6 traffic without
HW VLAN tagging.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)

9 years agoMake the PowerMac fan control nonlinear
jhibbits [Fri, 20 Feb 2015 06:19:23 +0000 (06:19 +0000)]
Make the PowerMac fan control nonlinear

Summary:
Currently, fan control is linear between the target temperature and max
temperature, which is far from ideal.  This changes it to be proportional to the
distance between the current temperature and the two endpoints (target and max
temp).  This also adds a hysteresis, so that fans keep going when the
temperature drops, for about 10 seconds, before slowing down.

Reviewers: nwhitehorn

Reviewed By: nwhitehorn

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

MFC after: 3 weeks

9 years agoAdd rudimentary man page for llan(4) virtualized ethernet controllers.
nwhitehorn [Fri, 20 Feb 2015 05:40:39 +0000 (05:40 +0000)]
Add rudimentary man page for llan(4) virtualized ethernet controllers.

MFC after: 1 week

9 years agoAllow EFI and ACPI to be included together. When ACPI is included
imp [Fri, 20 Feb 2015 01:40:55 +0000 (01:40 +0000)]
Allow EFI and ACPI to be included together. When ACPI is included
first, EFI will use its definitions for {,U}INT{8,16,32,64} and
BOOLEAN. When EFI is included first, define ACPI_USE_SYSTEM_INTTYPES
to tell ACPI that these are already defined.

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

9 years agodbm_delete(3) correct man page to match current behaviour.
pfg [Fri, 20 Feb 2015 01:31:10 +0000 (01:31 +0000)]
dbm_delete(3) correct man page to match current behaviour.

"The dbm_store() and dbm_delete() functions shall return 0 when they
succeed and a negative value when they fail."

Reference:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/dbm_clearerr.html

PR: 42422
Suggested by: delphij
MFC after: 3 days

9 years agoFix small memleaks in nis_passwd() and nis_group().
pfg [Fri, 20 Feb 2015 01:02:32 +0000 (01:02 +0000)]
Fix small memleaks in nis_passwd() and nis_group().

These only occur upon error.

Code Review: https://reviews.freebsd.org/D1849
Reviewed by: delphij

CID: 1016715
CID: 1016717

9 years agoBring the XL710 drivers up to the SW3 release level.
jfv [Fri, 20 Feb 2015 00:40:26 +0000 (00:40 +0000)]
Bring the XL710 drivers up to the SW3 release level.

MFC after: 1 week

9 years agoThe last userland piece of in_var.h is now 'struct in_aliasreq'. Move
glebius [Thu, 19 Feb 2015 23:59:27 +0000 (23:59 +0000)]
The last userland piece of in_var.h is now 'struct in_aliasreq'.  Move
it to the top of the file, and ifdef _KERNEL the rest.

9 years agoNow that all users of _WANT_IFADDR are fixed, remove this crutch and
glebius [Thu, 19 Feb 2015 23:16:10 +0000 (23:16 +0000)]
Now that all users of _WANT_IFADDR are fixed, remove this crutch and
hide ifaddr, in_ifaddr and in6_ifaddr under _KERNEL.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoThe ipftest(1) is a program that emulates ipf(4) operation and tests packets
glebius [Thu, 19 Feb 2015 23:14:35 +0000 (23:14 +0000)]
The ipftest(1) is a program that emulates ipf(4) operation and tests packets
against rules.  It definitely doesn't need to know about kernel internals,
such as 'struct ifaddr'.  What it does with ifaddr, is that it only takes
ifa_addr member of it, and treats it as sockaddr, while it is only a pointer
to sockaddr.  Fortunately, sizeof(struct ifaddr) > sizeof(struct sockaddr_in6),
so no problems arise.

Fix that declaring a private struct ifaddr in ipftest(1) and stop including
if_var.h.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoNow that IGMP and MLD sysctls provide a clean API structures that do not
glebius [Thu, 19 Feb 2015 22:42:33 +0000 (22:42 +0000)]
Now that IGMP and MLD sysctls provide a clean API structures that do not
leak kernel internal stuff, reconnect ifmcstat(1) back to build.  However,
disable kvm(3) support in it, since it requires uncovering tons of _KERNEL
defined declarations, which can be achieved either uncovering them globally
or providing dirty hacks such as _WANT_IFADDR.  If anyone demands an
ifmcstat-like kvm-based tool, please take the code out of usr.sbin/ifmstat
and create a tool in src/tools/tools.

9 years ago- Rename 'struct mld_ifinfo' into 'struct mld_ifsoftc', since it really
glebius [Thu, 19 Feb 2015 22:37:01 +0000 (22:37 +0000)]
- Rename 'struct mld_ifinfo' into 'struct mld_ifsoftc', since it really
  represents a context.
- Preserve name 'struct mld_ifinfo' for a new structure, that will be stable
  API between userland and kernel.
- Make sysctl_mld_ifinfo() return the new 'struct mld_ifinfo', instead of
  old one, which had a bunch of internal kernel structures in it.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years ago- Rename 'struct igmp_ifinfo' into 'struct igmp_ifsoftc', since it really
glebius [Thu, 19 Feb 2015 22:35:23 +0000 (22:35 +0000)]
- Rename 'struct igmp_ifinfo' into 'struct igmp_ifsoftc', since it really
  represents a context.
- Preserve name 'struct igmp_ifinfo' for a new structure, that will be stable
  API between userland and kernel.
- Make sysctl_igmp_ifinfo() return the new 'struct igmp_ifinfo', instead of
  old one, which had a bunch of internal kernel structures in it.
- Move all above declarations from in_var.h to igmp_var.h, since they are
  private to IGMP code.

Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoMerge llvm 3.6.0rc4 from ^/vendor/llvm/dist, merge clang 3.6.0rc4 from
dim [Thu, 19 Feb 2015 22:20:19 +0000 (22:20 +0000)]
Merge llvm 3.6.0rc4 from ^/vendor/llvm/dist, merge clang 3.6.0rc4 from
^/vendor/clang/dist, resolve conflicts, and update patches.

9 years agoAdd myself to committers-doc.dot
bhd [Thu, 19 Feb 2015 21:47:31 +0000 (21:47 +0000)]
Add myself to committers-doc.dot

Approved by: bcr (mentor)

9 years agoMerging ^/head r278916 through r279022.
dim [Thu, 19 Feb 2015 21:10:01 +0000 (21:10 +0000)]
Merging ^/head r278916 through r279022.

9 years agoVendor import of llvm RELEASE_360/rc4 tag r229772 (effectively, 3.6.0 RC4):
dim [Thu, 19 Feb 2015 20:55:17 +0000 (20:55 +0000)]
Vendor import of llvm RELEASE_360/rc4 tag r229772 (effectively, 3.6.0 RC4):
https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/rc4@229772

9 years agoOnly disable gvn on clang 3.5 and newer.
imp [Thu, 19 Feb 2015 20:22:30 +0000 (20:22 +0000)]
Only disable gvn on clang 3.5 and newer.

9 years agoBurn bridges to FreeBSD 7.x IGMP stats.
glebius [Thu, 19 Feb 2015 19:36:54 +0000 (19:36 +0000)]
Burn bridges to FreeBSD 7.x IGMP stats.

9 years agoMake syslogd work in case shutdown() is POSIX-ly correct.
ed [Thu, 19 Feb 2015 18:56:39 +0000 (18:56 +0000)]
Make syslogd work in case shutdown() is POSIX-ly correct.

On POSIX conformant systems, shutdown() should return ENOTCONN when not
connected. We attempted to fix this once (kern/84761), but this change
got backed out because it 'breaks code' (r150155).

I just reapplied the patch and indeed, syslogd fails on startup. Make it
easier to re-enable this change in the future by paching up syslogd to
do the right thing.

MFC after: 3 weeks
Sponsored by: Nuxi

9 years agoUse KTR_COMPILE=(KTR_ALL) for LINTs, to get more code coverage.
glebius [Thu, 19 Feb 2015 17:03:13 +0000 (17:03 +0000)]
Use KTR_COMPILE=(KTR_ALL) for LINTs, to get more code coverage.

9 years agoAdda function to iterate over the cpu nodes in the OFW or FDT data. This
andrew [Thu, 19 Feb 2015 16:34:48 +0000 (16:34 +0000)]
Adda function to iterate over the cpu nodes in the OFW or FDT data. This
will be used with arm64 to find which cpus to enable, and could also be
used with 32-bit arm and mips for the same purpose.

Differential Revision: https://reviews.freebsd.org/D1825
Sponsored by: The FreeBSD Foundation

9 years agoFix build with KTR after r278978.
kib [Thu, 19 Feb 2015 15:41:23 +0000 (15:41 +0000)]
Fix build with KTR after r278978.

9 years agoAdd support to get the cpu ID from its device driver in a generic way.
andrew [Thu, 19 Feb 2015 12:47:48 +0000 (12:47 +0000)]
Add support to get the cpu ID from its device driver in a generic way.
This will be needed by arm64 to find the value to pass to the psci (Power
State Coordination Interface) driver, among other things, used to enable
cores.

Differential Revision: https://reviews.freebsd.org/D1824
Reviewed by: imp
Sponsored by: The FreeBSD Foundation

9 years agoUse the ARM unwinder with dtrace to extract the stack when asked. With this
andrew [Thu, 19 Feb 2015 12:20:21 +0000 (12:20 +0000)]
Use the ARM unwinder with dtrace to extract the stack when asked. With this
dtrace is able to display a stack trace similar to the one below.

# dtrace -p 603 -n 'tcp:kernel::receive { stack(); }'
  0     70                         :receive
              kernel`ip_input+0x140
              kernel`netisr_dispatch_src+0xb8
              kernel`ether_demux+0x1c4
              kernel`ether_nh_input+0x3a8
              kernel`netisr_dispatch_src+0xb8
              kernel`ether_input+0x60
              kernel`cpsw_intr_rx+0xac
              kernel`intr_event_execute_handlers+0x128
              kernel`ithread_loop+0xb4
              kernel`fork_exit+0x84
              kernel`swi_exit
              kernel`swi_exit

Tested by: gnn
Sponsored by: ABT Systems Ltd

9 years agoAllow the ARM unwinder to work through modules. This will be used to add
andrew [Thu, 19 Feb 2015 12:06:57 +0000 (12:06 +0000)]
Allow the ARM unwinder to work through modules. This will be used to add
support for unwinding from dtrace.

Tested by: gnn (with dtrace)
Sponsored by: ABT Systems Ltd