Commit Graph

210117 Commits

Author SHA1 Message Date
Mark Johnston
b529028676 Implement support for boot-time DTrace.
This allows one to enable DTrace probes relatively early during boot,
during SI_SUB_DTRACE_ANON, before dtrace(1) can invoked. The desired
enabling is created using dtrace -A, which writes a /boot/dtrace.dof
file and uses nextboot(8) to ensure that DTrace kernel modules are loaded
and that the DOF file describing the enabling is loaded by loader(8)
during the subsequent boot. The trace output can then be fetched with
dtrace -a.

With this commit, boot-time DTrace is only functional on i386 and amd64: on
other architectures, the high-resolution timer frequency is initialized
during SI_SUB_CLOCKS and is thus not available when the anonymous
tracing state is initialized. On x86, the TSC is used and is thus available
earlier.

MFC after:	1 month
Relnotes:	yes
2016-04-10 01:25:48 +00:00
Mark Johnston
8553156023 nextboot(8): add a -a option for appending to a configuration.
By default, a nextboot invocation will clobber any existing nextboot
configuration.

MFC after:	2 weeks
Relnotes:	yes
2016-04-10 01:25:12 +00:00
Mark Johnston
33b454938a Initialize SDT probes during SI_SUB_DTRACE_PROVIDER.
This is consistent with all other DTrace providers and ensures that
SDT probes are available for boot-time tracing.

MFC after:	2 weeks
2016-04-10 01:24:27 +00:00
Mark Johnston
e1e33ff912 Initialize DTrace hrtimer frequency during SI_SUB_CPU on i386 and amd64.
This allows the hrtimer to be used earlier during boot. This is required
for boot-time DTrace: anonymous enablings are created during
SI_SUB_DTRACE_ANON, which runs before APs are started. In particular,
the DTrace deadman timer requires that the hrtimer be functional.

MFC after:	2 weeks
2016-04-10 01:23:39 +00:00
Adrian Chadd
5cf581e264 [net80211] log the node pointer when calling ht node init/cleanup
This makes it easier to track which node is having what done do it
during normal use.

This is likely the eighth time I've done this since I started doing
net80211 development, so I think it's about time I just committed it.
2016-04-09 22:01:32 +00:00
Adrian Chadd
169c392c43 [net80211] add back in the ff/superg node init call that I accidentally
deleted.

It's mostly a no-op right now, so it shouldn't have changed behaviour.
2016-04-09 21:57:34 +00:00
Pedro F. Giffuni
2bf493863f USB: replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	hselasky
2016-04-09 20:36:07 +00:00
Alexander Motin
eaee150e3f MFV r297760: 6418 zpool should have a label clearing command
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Author: Will Andrews <will@firepipe.net>

Closes #83
Closes #32

openzfs/openzfs@9663688425

FreeBSD already had `zpool labelclear` functionality, so this is mostly
just a diff reduction.

MFC after:	1 month
2016-04-09 20:30:50 +00:00
John Baldwin
59e4a8cd1c Use DELAY() instead of sleeping during boot-time attach.
Tested by:	Wolfgang Zenker <wolfgang@lyxys.ka.sub.org>
2016-04-09 20:18:34 +00:00
Pedro F. Giffuni
74136dc300 sh(1): replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	jilles
2016-04-09 20:05:39 +00:00
Alexander Motin
41e0d6d109 6418 zpool should have a label clearing command
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Author: Will Andrews <will@firepipe.net>

Closes #83
Closes #32
2016-04-09 19:49:40 +00:00
Ian Lepore
62b10973b1 Align the start of the text segment to an 8-byte boundary. This fixes
alignment aborts in ubldr.bin for RPi that started happening with clang 3.8
(earlier clang apparently didn't generate strd instructions that trigger
the alignment fault).  The abort happened in ubldr.bin and not ubldr (elf
version) because the elf headers are 0xf4 bytes long, and stripping them
off left everything 4-byte aligned.

While here, also stop aligning the data segment to a page boundary, align
it to 8 bytes instead (aligning to a page just needlessly makes the file
bigger); pointed out by andrew@.
2016-04-09 19:09:06 +00:00
Pedro F. Giffuni
14eaf4448c libedit: replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	Christos Zoulas
2016-04-09 18:52:09 +00:00
Alexander Motin
4cace9ebf6 Add couple new constants from SPC5r08. 2016-04-09 18:39:57 +00:00
Pedro F. Giffuni
d18146c299 libpam: replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	des
2016-04-09 18:09:10 +00:00
Pedro F. Giffuni
3cd7f4295f libfetch: replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	des
2016-04-09 18:08:21 +00:00
Pedro F. Giffuni
648970d8eb ixl(4): replace 0 with NULL for pointers.
Found by devel/coccinelle.

Differential Revision:	https://reviews.freebsd.org/D5894
Reviewed by:	erj
2016-04-09 17:37:36 +00:00
Jilles Tjoelker
4a9f41ec82 sh: Fix some unquoted variables in tests.
The builtins/getopts1.0 test failed if a single-character file existed in
the current directory.
2016-04-09 16:06:13 +00:00
Alexander Motin
7e53e7accc Register symbolic port/node names in FC name server.
This is cosmetics that simplifies identification of new ports on FC switch.

It would be good to use target name from CTL here instead of hostname, but
it is not passed here through CAM now.

MFC after:	2 weeks
2016-04-09 14:50:47 +00:00
John Baldwin
62d70a8174 Add more fine-grained kernel options for NUMA support.
VM_NUMA_ALLOC is used to enable use of domain-aware memory allocation in
the virtual memory system.  DEVICE_NUMA is used to enable affinity
reporting for devices such as bus_get_domain().

MAXMEMDOM must still be set to a value greater than for any NUMA support
to be effective.  Note that 'cpuset -gd' always works if MAXMEMDOM is
enabled and the system supports NUMA.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D5782
2016-04-09 13:58:04 +00:00
Conrad Meyer
0ff814e854 ioat(4): ioat_get_dmaengine(): Add M_WAITOK mode
Sponsored by:	EMC / Isilon Storage Division
2016-04-09 13:15:34 +00:00
Bjoern A. Zeeb
806929d514 Mfp: r296310,r296343
It looks like as with the safety belt of DELAY() fastened (*) we can
completely tear down and free all memory for TCP (after r281599).

(*) in theory a few ticks should be good enough to make sure the timers
are all really gone. Could we use a better matric here and check a
tcbcb count as an optimization?

PR:		164763
Reviewed by:	gnn, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5734
2016-04-09 12:05:23 +00:00
Alexander Motin
06c5618335 Reduce code duplication when executing Passthrough IOCB.
MFC after:	2 weeks
2016-04-09 11:54:09 +00:00
Bjoern A. Zeeb
8586a9635f Mfp: r296260
The tcp_inpcb (pcbinfo) zone should be safe to destroy.

PR:		164763
Reviewed by:	gnn
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5732
2016-04-09 11:27:47 +00:00
Jared McNeill
a09ecc1326 Enable PHY regulator when the optional "phy-supply" property is present.
Submitted by:	Emmanuel Vadot <manu@bidouilliste.com>
2016-04-09 11:23:46 +00:00
Bjoern A. Zeeb
f254aeda60 Mfp: r296259
We attach the "counter" to the tcpcbs. Thus don't free the
TCP Fastopen zone before the tcpcbs are gone, as otherwise
the zone won't be empty.
With that it should be safe to destroy the "tfo" zone without
leaking the memory.

PR:		164763
Reviewed by:	gnn
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5731
2016-04-09 10:58:08 +00:00
Poul-Henning Kamp
b805f83da7 Create /usr/local/etc before filling things into it.
Only run mtree if the NANO_CUST_FILES_MTREE is nonempty

Also umount the packages on non-signal failure
2016-04-09 10:53:21 +00:00
Bjoern A. Zeeb
dc95d65555 Mfp: r296309
While there is no dependency interaction, stopping the timer before
freeing the rest of the resources seems more natural and avoids it
being scheduled an extra time when it is no longer needed.

Reviewed by:	gnn, emaste
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5733
2016-04-09 10:51:07 +00:00
Bjoern A. Zeeb
e18b26d377 Mfp: r296345
No need to keep type stability on raw sockets zone.
We've also been running with a KASSERT since r222488 to make sure the
ipi_count is 0 on destroy.

PR:		164763
Reviewed by:	gnn
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5735
2016-04-09 10:44:57 +00:00
Bjoern A. Zeeb
4c86b2bc13 Mfp: r296346
No reason identified to keep UMA_ZONE_NOFREE here.

Reviewed by:	gnn
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D5736
2016-04-09 10:39:54 +00:00
Bjoern A. Zeeb
c89e0d151c Try to unbreak the build: the 'vap' variable is only used if ieee80211
debugging compile is on.
2016-04-09 09:31:28 +00:00
Bjoern A. Zeeb
029f99dcc4 Make the KASSERT message in hash destroy more informative.
While the pointer might not be too helpful, the malloc type might at
least give a good hint about which hashtbl we are talking.

MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Reviewed by:	gnn, emaste
Differential Revision:	https://reviews.freebsd.org/D5802
2016-04-09 09:24:05 +00:00
Adrian Chadd
2b8b8ae8e7 [net80211] print out the channel type (eg a, b, g, n) when creating
an IBSS network.
2016-04-09 04:57:25 +00:00
Justin Hibbits
c4d7f6ab97 Fix a masking bug for e500 PMC.
No idea how this slipped through my regression testing.  pe_code is the event to
count, pe_cpu is the CPU family mask.
2016-04-09 01:02:17 +00:00
Adrian Chadd
afa4433355 [ath] Only process beacon frames for the IBSS/BSSID if appropriate.
* Don't use arbitrary frames for the average RX RSSI - only frames
  from the current BSSID

* Don't log / do the syncbeacon logic for another BSSID and definitely
  don't do the syncbeacon call if we miss beacons outside of STA mode.

* Don't do the IBSS merge bits if the current node plainly won't ever
  match our current BSS (ie, the IBSS doesn't have to match, but all
  the same bits that we check in ieee80211_ibss_merge() have to match.)

Tested:

* ath(4), AR9380, IBSS mode, surrounded by a lot of IBSS 11ac networks.

Sponsored by:	Eva Automation, Inc.
2016-04-09 00:58:38 +00:00
Adrian Chadd
adad5b4564 [net8021] Pull out the ibss check code into a public function.
The ath(4) driver now sees beacons and management frames for different
BSSIDs in IBSS mode, which is a problem when you're in a very busy
IBSS environment.

So, expose this function so drivers can use it to check if the current
RX node is actually for a BSS we need to pay attention to or not.

PR:		kern/208644
Sponsored by:	Eva Automation. Inc.
2016-04-09 00:55:55 +00:00
Adrian Chadd
6966317aba [net80211] revert part of r282405 in order to restore IBSS behaviour.
This prevents nodes being created for peers on BSSes that are not our own.
(Ie, same channel, IBSS, but different BSS.)

The "IBSS merge" thing was fixed by me enabling "see all beacons" in
the ath(4) driver a few months ago.  Trouble is, we now need the filtering
again.

Tested:

* ath(4), IBSS, on a very busy IBSS channel with lots (> 15) IBSS networks.

PR:		kern/208643
Sponsored by:	Eva Automation, Inc.
2016-04-09 00:54:02 +00:00
Jared McNeill
222947a742 Fix incorrect pin definitions for Allwinner A31. 2016-04-08 23:11:00 +00:00
Jared McNeill
65d6a5a446 Attach hwreset resources at the same time as clock resources. 2016-04-08 23:07:16 +00:00
Edward Tomasz Napierala
8bd8c8f14c Make it possible to tweak RCTL throttling sysctls at runtime.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-04-08 18:15:31 +00:00
Zbigniew Bodek
db6eff694c Fix sending TSO packets larger than single DMA segment on VNIC
Due to the bug in the number of 'GATHER' subdescriptors for TSO
packets, VNIC was not able to transmit more than one DMA segment
with TSO enabled.

Obtained from: Semihalf
Sponsored by:  Cavium
2016-04-08 16:14:18 +00:00
Stanislav Galabov
368449816e Fix MIPS INTRNG omissions, add soft/hard interrupts with different names
Reviewed by:	kan
Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D5888
2016-04-08 15:48:10 +00:00
Stanislav Galabov
33311df141 Introduce better locking for mtk_gpio_v[12] drivers
Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5887
2016-04-08 15:28:12 +00:00
Stanislav Galabov
1b3142aaae Introduce Mediatek/Ralink PCIe support
This revision introduces PCIe support for the relevant Mediatek/Ralink
SoCs.
Currently the PCIe support is not converted to INTRNG, this may be a
task for the future.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5886
2016-04-08 15:26:49 +00:00
Stanislav Galabov
b37b38e9ab Introduce XHCI support for MT7621 SoC
Tested on a MT7621 board, similar to the WiTi board.
More testing will be required to confirm everything is fine, but things
look good so far.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5885
2016-04-08 15:22:30 +00:00
Stanislav Galabov
1e7745b401 Disable USB PHY slew rate calibration for Mediatek SoCs for now
USB on both MT7621 and MT7688 seems to work much better without doing
slew rate calibration.
These are the only two SoCs, apart from MT7628, which actually make
use of the slew rate calibration routines implemented in the mtk_usb_phy
driver. Since MT7628 is actually a superset of MT7688 things should be
the same for it as well.

We do not remove the code, we simply define it out.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5884
2016-04-08 15:20:58 +00:00
Stanislav Galabov
1ccd15cac7 Fix wrong memory mapping
In mtk_soc.c memory is mapped incorrectly for MT7621. This revision fixes
this.

Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5882
2016-04-08 15:13:38 +00:00
Allan Jude
b3f7b13945 bsdinstall/zfsboot should create /tmp and /var/tmp if they do not exist
PR:		208629
PR:		208568
Submitted by:	Galael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after:	2 weeks
2016-04-08 15:08:22 +00:00
Allan Jude
6b5e33ba48 Do not add swap to fstab when swapsize is 0
If a user requested encrypted swap, but 0 sized, it would still be added to fstab

PR:		208630
Submitted by:	Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com>
MFC after:	2 weeks
Sponsored by:	ScaleEngine Inc.
2016-04-08 15:05:06 +00:00
Andriy Gapon
a449bdba32 topo_set_pu_id: turn a check into an assertion
The new id must not be present in any cpu set in any topology element.

MFC after:	30 days
2016-04-08 11:59:11 +00:00