Commit Graph

196160 Commits

Author SHA1 Message Date
Warner Losh
a91275f72f Remove old ioctl use and support, once and for all. 2015-01-06 05:28:37 +00:00
Craig Rodrigues
a3f9f9a5a8 Add some GEOM options. 2015-01-06 05:28:22 +00:00
Craig Rodrigues
0db7f806be Refactor common options from MALTA and MALTA64 kernel
configs into MALTA_COMMON file.
2015-01-06 05:26:13 +00:00
Justin Hibbits
85eda151ff Avoid use of register variables. Clang 3.5 treats this as undefined behavior,
and bad things happen.

MFC after:	1 week
2015-01-06 03:50:43 +00:00
Justin Hibbits
8c29a9824b Apply r246556 to powerpc:
Avoid use of register variables, which some compilers (e.g. clang)
don't like. It makes the code a little clearer as well.

This allows a clang 3.5 built powerpc world to run (tested in a jail).

MFC after:	1 week
2015-01-06 03:49:22 +00:00
Adrian Chadd
cc6dd788c6 Refactor and split out the net80211 software scan engine from the rest
of the scan API.

The eventual aim is to have 'ieee80211_scan.c' have the net80211 and
driver facing scan API to start, finish and continue doing scanning
while 'ieee80211_swscan.c' implements the software scanner that
runs the scan task, handles probe request/reply bits, configures
the VAP off-channel, changes channel and does the scanning bits.

For NICs that do no scanning at all, the existing code is needed.
ath(4) and most of the other NICs (dumb USB ones in particular)
do little to no scan offload - it's all done in software.

Some NICs may do single channel at a time scanning; I haven't really
checked them out in detail.

iwn(4), the upcoming 7260 driver stuff, the new Qualcomm Atheros
11ac chipsets and the Atheros mobile/USB full-offload chips all
have complete scan engines in firmware.  We don't have to drive
any of it at all - the firmware just needs to be told what to scan,
when to scan, how long to scan.  It'll take care of going off
channel, pausing TX/RX appropriately, sending sleep notification
to the AP, sending probe requests and handling probe responses.
It'll do passive/active scan itself.  It's almost completely
transparent to the network stack - all we see are scan notifications
when it finishes scanning each channel and beacons/probe responses
when it does its thing.  Once it's done we get a final notification
that the scan is complete, with some scan results in the message.
The iwn(4) NICs handle doing active scanning too as an option
and will handle waiting appropriately on 5GHz passive channels
before active scanning.

There's some more refactoring, tidying up and lock assertions to
sprinkle around to tidy this whole thing up before I turn swscan.c
into another set of ic methods to override by the driver or
alternate scan module.  So in theory this is all one big no-op
commit.  In theory.

Tested:

* iwn(4) 5200, STA mode
* ath(4) 6205, STA mode
* ath(4) - various NICs, AP mode
2015-01-06 02:08:45 +00:00
Navdeep Parhar
f8c479085f cxgbe/tom: use vmem(9) as the DDP page pod allocator.
MFC after:	1 month
2015-01-06 01:30:32 +00:00
Navdeep Parhar
008015d2f4 cxgbe(4): fix the description of a strange bunch of counters.
MFC after:	1 week
2015-01-05 23:43:24 +00:00
Mark Johnston
bbd685e3a5 Use crcopysafe(9) to make a copy of a process' credential struct. crcopy(9)
may perform a blocking memory allocation, which is unsafe when holding a
mutex.

Differential Revision:	https://reviews.freebsd.org/D1443
Reviewed by:	rwatson
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-01-05 23:07:22 +00:00
Nathan Whitehorn
08b96b9ff5 Restore use of ofw_bus_intr_to_rl() in the pseries vdevice driver after fixing
ofw_bus_intr_to_rl() to match the spec for unspecified interrupt-parent
properties.
2015-01-05 21:39:35 +00:00
John Baldwin
531d65e139 Trim trailing whitespace. 2015-01-05 20:50:44 +00:00
John Baldwin
92597e064b On some Intel CPUs with a P-state but not C-state invariant TSC the TSC
may also halt in C2 and not just C3 (it seems that in some cases the BIOS
advertises its C3 state as a C2 state in _CST).  Just play it safe and
disable both C2 and C3 states if a user forces the use of the TSC as the
timecounter on such CPUs.

PR:		192316
Differential Revision:	https://reviews.freebsd.org/D1441
No objection from:	jkim
MFC after:	1 week
2015-01-05 20:44:44 +00:00
Enji Cooper
a9c218da80 Install d_align.{in,out} for the :align test
X-MFC with: r276669
Pointyhat to: me
2015-01-05 20:38:47 +00:00
Hans Petter Selasky
b217d18412 Add 64-bit DMA support in the XHCI controller driver.
- Fix some comments and whitespace while at it.

MFC after:	1 month
Submitted by:	marius@
2015-01-05 20:22:18 +00:00
John Baldwin
f045564dbb Use struct thread * directly instead of d_thread_t. This driver is not
likely to be merged back to stable/4.

Reviewed by:	delphij
2015-01-05 19:49:20 +00:00
Marius Strobl
799c49196c Exclude drivers which build but don't actually work with PAE enabled,
missed in r276377
2015-01-05 19:15:35 +00:00
Nathan Whitehorn
efabbd4c02 Revert r272109 locally, which is not quite equivalent in how it deals with
missing interrupt-parent properties. A better solution will come later,
but this restores pseries in QEMU for the time being.
2015-01-05 18:15:16 +00:00
Nathan Whitehorn
1d67d16647 Missed change in r276688. Apologies for build breakage. 2015-01-05 16:52:25 +00:00
Ruslan Bukin
1aac28e753 o Switch to use non-mergeable RX buffers to avoid mbuf adjustment needs
o Operate with copy of iov as we expect later it was not modified
2015-01-05 16:43:22 +00:00
Ed Maste
02b08c9092 readelf: Handle note types from different operating systems
Previously elftoolchain readelf(1) produced correct description text
only for Linux note types.

Upstream elftoolchain ticket #473

Differential Revision:	https://reviews.freebsd.org/D1428
Reviewed by:	kib
Sponsored by:	The FreeBSD Foundation
2015-01-05 16:05:15 +00:00
Edward Tomasz Napierala
3d2b0910d2 Fix memory leaks.
CID:	1258582, 1258583.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-01-05 15:34:23 +00:00
Edward Tomasz Napierala
b28def2171 Remove leftovers.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2015-01-05 15:29:28 +00:00
Dag-Erling Smørgrav
f1b3840c9a Enable remote control using a local socket in the default configuration. 2015-01-05 15:09:00 +00:00
Hans Petter Selasky
ece4b0bd43 Make a bunch of USB debug SYSCTLs tunable, so that their value(s) can
be set before the USB device(s) are probed.
2015-01-05 15:04:17 +00:00
Dag-Erling Smørgrav
31099b506d mfv (r276698): support for remote control over local sockets. 2015-01-05 14:59:18 +00:00
Dag-Erling Smørgrav
3ff5baf8cb Add support for using a local socket for the remote control connection
by specifying uts path instead of (or in addition to) an IP address as
an argument to the control-interface configuration variable.

Add support for unencrypted and unauthenticated control connections
through a new configuration variable, control-use-cert.  To avoid the
complexity of supporting both SSL socket and plain socket descriptors
in the same code, we just use an unencrypted SSL context and forego
authentication.  The downside is that we still have to perform DH kex
when establishing the connection.

This patch was derived (with significant modifications) from the
contrib/unbound_unixsock.diff patch originally submitted by Ilya
Bakulin of Genua mbH.
2015-01-05 14:55:52 +00:00
Christian Brueffer
74342541e2 Fix a few grammar issues. 2015-01-05 13:46:37 +00:00
Warner Losh
9aca3e0f2b Clang's 3.5 integrated assembler now handles these files correctly (it
has support for the .codeXX directives). However, it is desirable, for
a time, to allow kernels to be built with clang 3.4. Historically, it
has been advantageous to allow stable X-1 to build kernels the old
way (so long as the impact of doing so is small), and this restores
that ability.

Also, centralize the addition of ${ASM_CFLAGS.${.IMPSRC}}, place it in
kern.mk rather than kern.pre.mk so that all modules can benefit, and
give the same treatment to CFLAGS in kern.mk as well.
2015-01-05 12:28:22 +00:00
Christian Brueffer
fe94dc19e8 Add a very basic manpage for the Etherswitch framework.
MFC after:	1 week
2015-01-05 11:40:05 +00:00
Bjoern A. Zeeb
5334f8d74f With r276692 m_align() moved and became an inline function.
Remove the (now) redundant function declaration.
2015-01-05 11:22:58 +00:00
Kevin Lo
26d9e20f50 Mention axge(4). 2015-01-05 10:10:35 +00:00
Robert Watson
ed6a66ca6c To ease changes to underlying mbuf structure and the mbuf allocator, reduce
the knowledge of mbuf layout, and in particular constants such as M_EXT,
MLEN, MHLEN, and so on, in mbuf consumers by unifying various alignment
utility functions (M_ALIGN(), MH_ALIGN(), MEXT_ALIGN() in a single
M_ALIGN() macro, implemented by a now-inlined m_align() function:

- Move m_align() from uipc_mbuf.c to mbuf.h; mark as __inline.
- Reimplement M_ALIGN(), MH_ALIGN(), and MEXT_ALIGN() using m_align().
- Update consumers around the tree to simply use M_ALIGN().

This change eliminates a number of cases where mbuf consumers must be aware
of whether or not mbufs returned by the allocator use external storage, but
also assumptions about the size of the returned mbuf. This will make it
easier to introduce changes in how we use external storage, as well as
features such as variable-size mbufs.

Differential Revision:	https://reviews.freebsd.org/D1436
Reviewed by:	glebius, trasz, gnn, bz
Sponsored by:	EMC / Isilon Storage Division
2015-01-05 09:58:32 +00:00
Adrian Chadd
cd470fead8 Remove the remnants of the OpenWRT/Linux bits that this was based off
of.

Obtained from:	Linux/OpenWRT
2015-01-05 05:30:07 +00:00
Adrian Chadd
3eda0cb18c Oops - missed refclk.
Tested:

* AP135, QCA955x SoC
2015-01-05 05:26:57 +00:00
Ed Maste
a726543364 addr2line: fflush output after each address lookup
Certain tools spawn addr2line and pass addresses one at a time for
resolution.

PR:		195561
Reported by:	antoine
Sponsored by:	The FreeBSD Foundation
2015-01-05 04:56:38 +00:00
Nathan Whitehorn
a4f7863238 Add kexec-based Linux shim loader for use with the firmware petitboot
loader on PS3 and POWER8 systems. This is reasonably portable to other
architectures, especially FDT-based ones, if similar features are useful
elsewhere.

Netboot support is missing for now and will be added in a future commit,
at which time loader.ps3 will be garbage collected.

Done at:	Hackathon
2015-01-05 04:33:39 +00:00
Adrian Chadd
855c46100d Add initial Qualcomm Atheros QCA955x SoC support.
This adds the initial frequency poking and configures up enough
for it to boot and spit out data over the console.

There's still a whole bunch of work to do in the reset path
and devices to support this thing, but hey, it's alive!

ath> go 0x80050100
## Starting application at 0x80050100 ...
CPU platform: Atheros AR9558 rev 0
CPU Frequency=720 MHz
CPU DDR Frequency=600 MHz
CPU AHB Frequency=200 MHz
platform frequency: 720 MHz
CPU reference clock: 0 MHz
CPU MDIO clock: 40 MHz

Done at:	hackathon
Obtained from:	Linux OpenWRT, Qualcomm Atheros
2015-01-05 02:06:26 +00:00
Adrian Chadd
917d2c3c3b ACK interrupts on the new SoCs. 2015-01-05 02:00:41 +00:00
Adrian Chadd
dc6fff9835 add QCA955x SoC types. 2015-01-05 01:59:44 +00:00
Adrian Chadd
55b32e75df Add QCA955x series register definitions.
There's likely a bunch of register offsets that I have to add the
register window base to before I use them.

Done at:	Hackathon
Obtained from:	Linux OpenWRT
2015-01-05 01:44:23 +00:00
Konstantin Belousov
1a744fefc2 Avoid calling internal libc function through PLT or accessing data
though GOT, by staticizing and hiding.  Add setter for
__error_selector to hide it as well.

Suggested and reviewed by:	jilles
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-01-05 01:06:54 +00:00
Nathan Whitehorn
fd520b6e21 Use FDT properties to identify a PS3 if present. 2015-01-05 01:05:35 +00:00
Nathan Whitehorn
f1d2752f31 Make PS3 work with the userspace kboot loader. loader.ps3 will disappear
from the tree in the near future.

Done at:	Hackathon
2015-01-05 00:50:16 +00:00
Enji Cooper
e97b30d879 Bump .Dd again for the change done in r276483
Pointyhat to: me
2015-01-05 00:03:42 +00:00
Enji Cooper
a812392203 Expect :arithmetic_ops_body to fail with syntax errors on FreeBSD
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2015-01-04 23:41:17 +00:00
Ruslan Bukin
2499610b9a Do not configure Altera PIO device on ARM startup.
PIO is a device implemented in soft-core and becomes
available after flashing FPGA only.
2015-01-04 23:14:04 +00:00
Enji Cooper
dd2b763aa5 Integrate bin/cat/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2015-01-04 22:37:44 +00:00
Enji Cooper
b219c275cc Integrate sbin/ifconfig/tests from NetBSD into atf/kyua
Sponsored by: EMC / Isilon Storage Division
2015-01-04 22:25:16 +00:00
Ian Lepore
bbae23a725 Eliminate uninitialized variable warnings in kernel and module builds when
building with gcc 4.2

This has been requested several times over the past few months by several
people (including me), because gcc 4.2 just gets it wrong too often.  It's
causing us to litter the code with lots of bogus initializers just to
squelch the warnings.  We still have clang and coverity telling us about
uninitialized variables, and they do so more accurately.
2015-01-04 20:08:24 +00:00
Justin T. Gibbs
5b326a32ce Prevent live-lock and access of destroyed data in taskqueue_drain_all().
Phabric:	https://reviews.freebsd.org/D1247
Reviewed by:	jhb, avg
Sponsored by:	Spectra Logic Corporation

sys/kern_subr_taskqueue.c:
	Modify taskqueue_drain_all() processing to use a temporary
	"barrier task", rather than rely on a user task that may
	be destroyed during taskqueue_drain_all()'s execution.  The
	barrier task is queued behind all previously queued tasks
	and then has its priority elevated so that future tasks
	cannot pass it in the queue.

	Use a similar barrier scheme to drain threads processing
	current tasks.  This requires taskqueue_run_locked() to
	insert and remove the taskqueue_busy object for the running
	thread for every task processed.

share/man/man9/taskqueue.9:
	Remove warning about live-lock issues with taskqueue_drain_all()
	and indicate that it does not wait for tasks queued after
	it begins processing.
2015-01-04 19:55:44 +00:00