Commit Graph

197590 Commits

Author SHA1 Message Date
Dimitry Andric
b09980d164 Merge llvm 3.6.0rc4 from ^/vendor/llvm/dist, merge clang 3.6.0rc4 from
^/vendor/clang/dist, resolve conflicts, and update patches.
2015-02-19 22:20:19 +00:00
Dimitry Andric
0d36d957d3 Merging ^/head r278916 through r279022. 2015-02-19 21:10:01 +00:00
Dimitry Andric
8af9f2019d 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
2015-02-19 20:55:17 +00:00
Warner Losh
b4d7059828 Only disable gvn on clang 3.5 and newer. 2015-02-19 20:22:30 +00:00
Gleb Smirnoff
de5ef1dfee Burn bridges to FreeBSD 7.x IGMP stats. 2015-02-19 19:36:54 +00:00
Ed Schouten
0f0d5f6e45 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
2015-02-19 18:56:39 +00:00
Gleb Smirnoff
6740ed378b Use KTR_COMPILE=(KTR_ALL) for LINTs, to get more code coverage. 2015-02-19 17:03:13 +00:00
Andrew Turner
16a1c0a829 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
2015-02-19 16:34:48 +00:00
Konstantin Belousov
0c6dcac369 Fix build with KTR after r278978. 2015-02-19 15:41:23 +00:00
Andrew Turner
deb7728379 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
2015-02-19 12:47:48 +00:00
Andrew Turner
aeca5b8bc9 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
2015-02-19 12:20:21 +00:00
Andrew Turner
1b23f9b9c3 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
2015-02-19 12:06:57 +00:00
Bjoern A. Zeeb
daa99f441e Try to unbreak NOIP and NOINET6 LINT builds after r278886
by placing appropriate #ifdefs around otherwise unused variables
or sections with functions called which are not available without
IPv6 support in the kernel.
2015-02-19 11:48:00 +00:00
Enji Cooper
57e8e48f53 Unbreak freshly installed worlds by properly "commenting" out ifmcstat
Pointyhat to: glebius
2015-02-19 11:17:36 +00:00
Gleb Smirnoff
53d3d92f4b Temporarily disconnect ifmcstat(8) from build, to make world buildable
ifmcstat(8) noses in kernel memory too much, and thus is very tentative
to any changes in kernel.

I will rewrite it to use some API instead of libkvm(3) and connect back
to build.
2015-02-19 06:27:14 +00:00
Gleb Smirnoff
fd1b2a7c57 Widen _KERNEL ifdef to hide more kernel network stack structures from userland. 2015-02-19 06:24:27 +00:00
Glen Barber
3a25555c6a Fix a grammar nit.
Sponsored by:	The FreeBSD Foundation
2015-02-19 05:20:59 +00:00
Mark Johnston
ce47682c6c Remove unnecessary checks for a return value of NULL from M_WAITOK
allocations.

MFC after:	3 days
2015-02-19 03:32:48 +00:00
Mark Johnston
250246706f Free the zlib stream after expanding a compressed CTF section.
Note that this memory would only be leaked once, since CTF info for a kld
file is cached after the first access.

MFC after:	3 days
2015-02-19 03:29:46 +00:00
John-Mark Gurney
b759b8aa44 fix spelling, add comma and remove BUGS section.. it provided no useful
information, and is not really bugs, but limitations for other reasons...
2015-02-19 01:51:17 +00:00
Gleb Smirnoff
a99c84d4e6 Use new struct mbufq instead of struct ifqueue to manage packet queues in
IPv6 multicast code.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2015-02-19 01:21:23 +00:00
Gleb Smirnoff
058e08bea9 Use new struct mbufq instead of struct ifqueue to manage packet queues in
IPv4 multicast code.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2015-02-19 01:21:02 +00:00
Gleb Smirnoff
c578b6aca0 Provide a set of inline functions to manage simple mbuf(9) queues, based
on queue(3)'s STAILQ.  Utilize them in cxgb(4) and Xen, deleting home
grown implementations.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2015-02-19 01:19:42 +00:00
John Baldwin
8935302fe1 Ensure that the supplied data length is large enough to hold the base
FPU state to avoid passing a negative length to fpusetregs() / npxsetregs().

Differential Revision:	https://reviews.freebsd.org/D1861
Reviewed by:	kib, emaste
2015-02-18 23:34:03 +00:00
Jung-uk Kim
9c633deb70 Fix bootstrap on systems with old yacc with small MAXTABLE. 2015-02-18 23:10:15 +00:00
Jung-uk Kim
1c0e1b6da9 Merge ACPICA 20141107 and 20150204. 2015-02-18 20:33:00 +00:00
Peter Grehan
784b6cd5e9 Restore the ability to use clang as an external compiler. This was
inadvertently removed when support for external GCC was added.

Deprecate XFLAGS in favour of the newer XCFLAGS/XCXXFLAGS.

Tested with:	make universe, make CROSS_COMPILER_PREFIX=/usr/bin/ buildworld
Reviewed by:	imp, bapt
2015-02-18 19:27:51 +00:00
Kenneth D. Merry
e8577fb489 Make sure that the flags for the XPT_DEV_ADVINFO CCB are initialized
properly.

If there is garbage in the flags field, it can sometimes include a
set CDAI_FLAG_STORE flag, which may cause either an error or
perhaps result in overwriting the field that was intended to be
read.

sys/cam/cam_ccb.h:
	Add a new flag to the XPT_DEV_ADVINFO CCB, CDAI_FLAG_NONE,
	that callers can use to set the flags field when no store
	is desired.

sys/cam/scsi/scsi_enc_ses.c:
	In ses_setphyspath_callback(), explicitly set the
	XPT_DEV_ADVINFO flags to CDAI_FLAG_NONE when fetching the
	physical path information.  Instead of ORing in the
	CDAI_FLAG_STORE flag when storing the physical path, set
	the flags field to CDAI_FLAG_STORE.

sys/cam/scsi/scsi_sa.c:
	Set the XPT_DEV_ADVINFO flags field to CDAI_FLAG_NONE when
	fetching extended inquiry information.

sys/cam/scsi/scsi_da.c:
	When storing extended READ CAPACITY information, set the
	XPT_DEV_ADVINFO flags field to CDAI_FLAG_STORE instead of
	ORing it into a field that isn't initialized.

sys/dev/mpr/mpr_sas.c,
sys/dev/mps/mps_sas.c:
	When fetching extended READ CAPACITY information, set the
	XPT_DEV_ADVINFO flags field to CDAI_FLAG_NONE instead of
	setting it to 0.

sbin/camcontrol/camcontrol.c:
	When fetching a device ID, set the XPT_DEV_ADVINFO flags
	field to CDAI_FLAG_NONE instead of 0.

sys/sys/param.h:
	Bump __FreeBSD_version to 1100061 for the new XPT_DEV_ADVINFO
	CCB flag, CDAI_FLAG_NONE.

Sponsored by:	Spectra Logic
MFC after:	1 week
2015-02-18 18:30:19 +00:00
Konstantin Belousov
1395226703 If malloc() sleeps, Giant is dropped. Recheck for another thread
doing our work.

Remove unneeded check for failed M_WAITOK allocation.

Reviewed by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-02-18 18:12:06 +00:00
Marcel Moolenaar
cf9b923f48 Add LIBXO. 2015-02-18 17:28:55 +00:00
Warner Losh
5ec3257602 Clean up a bit of the INET/INET6 mess wrt options. 2015-02-18 15:25:25 +00:00
Warner Losh
88030a5eb0 Cleanup the way we include some files (in this case EISA) based on
kernel config. Also tidy up the ed options.
2015-02-18 15:25:22 +00:00
Warner Losh
35c4406d4c Populate new KERN_OPTS from all the opt_*.h files in
KERNBUILDDIR. Come up with some sensible defaults (though listing them
in kmod.mk may be unwise -- we have no easy way to know what are the
best sensible defaults for everything so we just catch the big stuff).
Append SRCS.${opt} for each option in KERN_OPTS to SRCS to allow easy
conditional compilation. Append any notion of KERN_OPTS_EXTRA to the
list of kernel opts.

Differential Revision:    https://reviews.freebsd.org/D1530
2015-02-18 15:25:19 +00:00
Warner Losh
46b39c90f4 Add copyright statement I should have had on these files in 2006,
based on the spibus_if.m file.
2015-02-18 14:33:33 +00:00
Mateusz Guzik
8fbda7f00b filedesc: obtain a stable copy of credentials in fget_unlocked
This was broken in r278930.

While here tidy up fget_mmap to use fdp from local var instead of obtaining
the same pointer from td.
2015-02-18 13:37:28 +00:00
Konstantin Belousov
117c6e7cf2 Fix UP build.
Sponsored by:	The FreeBSD Foundation
MFC after:	2 months
2015-02-18 10:51:48 +00:00
Xin LI
19442b85b1 Bump revision again after my Fortuna change. 2015-02-18 08:24:00 +00:00
Xin LI
8d45c8ab96 - fortuna.c: catch up with r278927 and fix a buffer overflow by using the
temporary buffer when remaining space is not enough to hold
	      a whole block.
 - yarrow.c:  add a comment that we intend to change the code and remove
	      memcpy's in the future. (*)

Requested by:	markm (*)
Reviewed by:	markm
Approved by:	so (self)
2015-02-18 08:21:51 +00:00
Justin Hibbits
9fdc5d59f3 Match the right backlight driver.
Some ATI-based PowerBooks use the string 'mnca' in the backlight controller
device tree entry, so account for this and don't use nVidia when it's not an
nVidia device.

MFC after:	3 weeks
2015-02-18 07:34:32 +00:00
Justin Hibbits
5f41b3c1da Don't set the write bit if we're just reading.
Also fix a couple typos.

MFC after:	3 weeks
2015-02-18 06:53:40 +00:00
Andrew Rybchenko
d8574f4f45 sfxge: fix broken MCDI_EV_FIELD() macro
Submitted by:   Andrew Lee <alee at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-18 06:26:07 +00:00
Andrew Rybchenko
1f69766845 sfxge: support variable-length response to MCDI GET_BOARD_CFG
Allocate the minimum or maximum response length for GET_BOARD_CFG as
appropriate.  When looking up firmware subtypes by partition ID,
check the ID against the actual response length.

Merge of the patch made by Ben Hutchings in 2011.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-18 06:23:16 +00:00
Andrew Rybchenko
097de6f518 sfxge: add driver context member with number of event queues
Mainly to unify with similar member for transmit and receive queues.
It will be used in the future for resources allocation processing.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-18 06:21:59 +00:00
Andrew Rybchenko
133366a6e5 sfxge: add driver context member with number of receive queues
Mainly to unify with similar member for transmit queues.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-18 06:20:59 +00:00
Andrew Rybchenko
e2b05fe21c sfxge: add driver context member with number of transmit queues
Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-18 06:19:35 +00:00
Andrew Rybchenko
d0f7387777 sfxge: add TCP segment size to sfxge_tso_state
It avoids access to m_pkthdr when TSO packet is started and also makes
tso_start_new_packet() function smaller.

Sponsored by:   Solarflare Communications, Inc.
Approved by:    gnn (mentor)
2015-02-18 06:18:51 +00:00
Warner Losh
8e5f761422 On my Lenovo T400, a Atheros 2413 has a problem powering up
sometimes. It will power up wrong and identify itself badly:

cardbus0: <network, ethernet> at device 0.0 (no driver attached)
cardbus0: <simple comms, UART> at device 0.1 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.2 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.3 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.4 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.5 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.6 (no driver attached)
cardbus0: <old, non-VGA display device> at device 0.7 (no driver attached)

All the higher numbered functions (.2 and above) have a config space
of all 0's. This smells a bit like a special debug mode, but the
current atheros driver doesn't cope. It is unclear if this card is
just a flake, or if we're doing something wrong in the power-up
sequence.

Put a work around into the code that tests for this rather unusual
condition. If we power a CardBus device up, and the device says it is
multi-function, and any of the functions have a 0 device ID, try the
power-up sequence again.
2015-02-18 05:53:04 +00:00
Mark Johnston
03a5f9f0fd Remove drti.o's dependency on libelf. This makes it possible to add DTrace
probes to userland programs and libraries without also needing to link
libelf.

dtrace -G places the __SUNW_dof symbol at the beginning of the DOF (DTrace
probe and provider metdata) section in the generated object file; drti.o
now just uses this symbol to locate the section. A complication occurs
when multiple dtrace-generated object files are linked together, since the
__SUNW_dof symbol defined in each file is global. This is handled by
using objcopy(1) to convert __SUNW_dof to a local symbol once drti.o has
been linked with the generated object file. Upstream, this is done using a
linker feature not present in GNU ld.

Differential Revision:	https://reviews.freebsd.org/D1757
Reviewed by:	rpaulo
MFC after:	1 month
Relnotes:	yes
2015-02-18 03:54:54 +00:00
Rui Paulo
70f82314c2 Fix a typo in ipv6_down().
We weren't skipping extraneous entries in the ifconfig | grep inet6 case.

Submitted by:	Ashutosh Kumar AK0037447 at TechMahindra.com
MFC after:	1 week
2015-02-18 03:46:43 +00:00
Pedro F. Giffuni
2b1474fdde libc: clean some set-but-not-used errors.
These were found by gcc 5.0 on Dragonfly BSD, however I
made no attempt to silence the false positives.

Obtained from:	DragonFly (cf515c3a6f3a8964ad592e524442bc628f8ed63b)
2015-02-18 03:33:17 +00:00