Commit Graph

95130 Commits

Author SHA1 Message Date
Mark Murray
6a7ba84834 Wrap some policy-rich code in 'if NOTYET' until we can thresh out what it really needs to do. 2013-10-09 17:50:36 +00:00
Mark Murray
371cbaafa8 MFC - tracking commit 2013-10-09 17:41:47 +00:00
Edward Tomasz Napierala
c48f182bb1 Remove no longer useful debugging output and a stale comment.
Approved by:	re (gjb)
Sponsored by:	FreeBSD Foundation
2013-10-09 17:34:45 +00:00
Jack F Vogel
7609433eb6 Update the Intel igb driver to version 2.4.0
- This version has support for the new Intel Avoton systems,
including 2.5Gb support, further it now has IPv6/TSO6 support as
well. Shared code has been updated where necessary as well. Thanks
to my new assistant Eric Joyner for doing the transmit path changes
to bring in the IPv6/TSO6 support. Thanks to Gleb for catching the
one bug and change needed in NETMAP.

Approved by: re
2013-10-09 17:32:52 +00:00
Dimitry Andric
209536b767 Initialize a variable in sys/contrib/ipfilter/netinet/ip_rcmd_pxy.c, to
silence a gcc warning.

Approved by:	re (gjb)
X-MFC-With:	r255332
2013-10-09 17:07:50 +00:00
Edward Tomasz Napierala
02147e9cd0 Make the error handling more consistant. Shouldn't make any functional
difference.

Approved by:	re (gjb)
Sponsored by:	FreeBSD Foundation
2013-10-09 17:06:03 +00:00
Dimitry Andric
98c28062e0 Remove redundant redeclarations of uart_s3c2410_class in
sys/arm/s3c2xx0/uart_bus_s3c2410.c and uart_cpu_s3c2410.c, to silence
two gcc warnings.

Approved by:	re (gjb)
X-MFC-With:	r252394
2013-10-09 17:05:02 +00:00
Edward Tomasz Napierala
8ba0396077 Tidy up, cache return value of a function, and add an assertion;
shouldn't make any functional difference.

Approved by:	re (gjb)
Sponsored by:	FreeBSD Foundation
2013-10-09 16:55:52 +00:00
Alexander Motin
6dfc67e379 Close the race on path ID allocation in xpt_bus_register() if two buses are
registered simultaneously. Due to topology unlock between the ID allocation
and the bus registration there is a chance that two buses may get the
same IDs. That is supposed reason of lock assertion panic in CAM during
initial bus scanning after new iscsid initiates two sessions same time.

Reported by:	trasz
Approved by:	re (glebus, marius)
MFC after:	2 weeks
2013-10-09 12:09:01 +00:00
Edward Tomasz Napierala
1008ac5eb7 Fix NOP-In/NOP-Out payload handling. Previous way didn't work at all; fortunately
nothing seems to actually use this feature, but it's required by standard.

Approved by:	re (glebius)
Sponsored by:	FreeBSD Foundation
2013-10-09 12:03:04 +00:00
Gleb Smirnoff
c11a15bf8d When processing ACK in tcp_do_segment, use sbcut_locked() instead of
sbdrop_locked() to cut acked mbufs from the socket buffer. Free this
chain a batch manner after the socket buffer lock is dropped.

This measurably reduces contention on socket buffer.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
Approved by:	re (marius)
2013-10-09 12:00:38 +00:00
Gleb Smirnoff
1d2df300e9 - Substitute sbdrop_internal() with sbcut_internal(). The latter doesn't free
mbufs, but return chain of free mbufs to a caller. Caller can either reuse
  them or return to allocator in a batch manner.
- Implement sbdrop()/sbdrop_locked() as a wrapper around sbcut_internal().
- Expose sbcut_locked() for outside usage.

Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
Approved by:	re (marius)
2013-10-09 11:57:53 +00:00
Dag-Erling Smørgrav
aa1c90971f Re-add /dev/urandom for compatibility purposes. 2013-10-09 09:13:12 +00:00
Dag-Erling Smørgrav
85bbc612af comment nit 2013-10-09 09:12:44 +00:00
Dag-Erling Smørgrav
3e8957ea85 Add missing include guards and move the existing ones out of the
implementation namespace.
2013-10-09 09:11:14 +00:00
Mark Murray
a332c3c798 MFC - tracking commit 2013-10-09 07:55:21 +00:00
Dimitry Andric
cb53fc2dad Remove redundant declaration of cmclass in
sys/ofed/drivers/infiniband/core/ucm.c, to silence a gcc warning.

Approved by:	re (kib)
X-MFC-With:	r255932
2013-10-09 07:02:03 +00:00
Adrian Chadd
490cbcd9cb Add some missing AR934x register definitions.
These are needed for ethernet bootstrap.

Approved by:	re@ (gjb)
2013-10-09 03:19:05 +00:00
Adrian Chadd
50c5514227 Fix interrupt handling from the APB periperals (ie, UART) - it
also requires an explicit acknowledgement.

Tested:

* AR9344 (DB120) SoC

Approved by:	re@ (gjb)
2013-10-09 02:01:20 +00:00
Adrian Chadd
83220b2e9f Mark AR934x based boards to be mips74k.
Reviewed by:	imp@
Approved by:	re@ (gjb)
2013-10-09 00:27:33 +00:00
Adrian Chadd
4cfbfdd4b3 Add "better" MIPS24k and MIPS74k barriers.
* the mips74k cores only need EHB (which is 'sll $0, $0, 3')
  here; NOPs don't actually work.

* add EHB as the last NOP for the default barriers/hazards;
  that is "better" behaviour and should work on a wider
  variety of processors.

This allows the existing (icky) TLB code to work, allowing
the AR9344 SoC (mips74k) to actually get through kernel startup.

Tested:

* AR9344 SoC - (mips74k)
* AR9331 SoC - (mips24k)

TODO:

* test on mips4k CPUs, just to be sure.

* document that sll $0, $0, 3 is actually "EHB" and that it
  falls back to being a NOP for pre-mips32r1.

* mips24k has an errata that we currently don't correctly explicitly
  state - ie, that after DERET/ERET, the only valid instruction is
  a NOP.

Reviewed by:	imp@
Approved by:	re@ (gjb)
2013-10-09 00:27:12 +00:00
Adrian Chadd
2e2f21556e Shuffle the includes around so they occur after opt_global.h is included;
this way the CPU ABI / core #define items are there.

Reviewed by:	imp@
Approved by:	re@ (gjb)
2013-10-09 00:22:21 +00:00
Adrian Chadd
57778cfec4 Add two new MIPS CPU families - mips24k and mips74k.
They're both different cores:

* mips24k is an 8-stage pipeline, mips32r1 ABI, non-superscalar core.
* mips74k is a dual-issue 15-stage superscalar design, mips32r2 ABI.

They have different sets of quirks and bugs; these #define entries
will be used to work around these.

Now, strictly speaking, we should have CPU ABI families (mips32r1, mips32r2,
etc) and CPU core types (mips4k, mips24k, mips74k, etc.)  But this is the
starting point of that particular tidy-up.

Reviewed by:	imp@
Approved by:	re@ (gjb)
2013-10-09 00:21:21 +00:00
Jim Harris
8a959ae073 Fix the LINT build.
Approved by:	re (implicit)
MFC after:	1 week
2013-10-08 23:23:04 +00:00
Mark Murray
b9887f5053 Fix some just-noticed problems:
o Allow this to work with "nodevice random" by fixing where the MALLOC pool is defined.

o Fix the explicit reseed code. This was correct as submitted, but in the project branch doesn't need to set the "seeded" bit as this is done correctly in the "unblock" function.

o Remove some debug ifdeffing.

o Adjust comments.
2013-10-08 22:14:07 +00:00
Dimitry Andric
9cba9d0157 In sys/amd64/amd64/pmap.c, fix several gcc warnings about uninitialized
variables in reclaim_pv_chunk().

Approved by:	re (marius)
Reviewed by:	neel, kib
X-MFC-With:	r256072
2013-10-08 20:04:35 +00:00
Edward Tomasz Napierala
a9c80a534a Properly fix out of memory handling in the iSCSI target.
Approved by:	re (glebius)
Sponsored by:	FreeBSD Foundation
2013-10-08 19:18:02 +00:00
Mark Murray
898f83f9eb MFC - tracking commit. 2013-10-08 19:07:48 +00:00
Mark Murray
8cc20a46b7 Make a mildly sylistic change to the order of sources in this enum. 2013-10-08 18:57:46 +00:00
Mark Murray
623f70165f Time to eat crow for me.
I replaced the sx_* locks that Arthur used with regular mutexes; this turned out the be the wrong thing to do as the locks need to be sleepable. Revert this folly.

Submitted by:	Arthur Mesh <arthurmesh@gmail.com> (In original diff)
2013-10-08 18:48:11 +00:00
Dimitry Andric
e7ad54b2b4 Now our binutils's assembler supports the Intel Random Number Generator
extensions, we can change the .byte directives in sys/dev/random/ivy.c
to plain 'rdrand' mnemonics.  This already worked for clang users, but
now it will also work for gcc users.

Approved by:	re (kib)
Approved by:	so (des)
MFC after:	1 week
2013-10-08 17:26:28 +00:00
Jim Harris
7aa27dbac5 Do not leak resources during attach if nvme_ctrlr_construct() or the initial
controller resets fail.

Sponsored by:	Intel
Reviewed by:	carl
Approved by:	re (hrs)
MFC after:	1 week
2013-10-08 16:01:43 +00:00
Jim Harris
bb2f67fd72 Log and then disable asynchronous notification of persistent events after
they occur.

This prevents repeated notifications of the same event.

Status of these events may be viewed at any time by viewing the
SMART/Health Info Page using nvmecontrol, whether or not asynchronous
events notifications for those events are enabled.  This log page can
be viewed using:

    nvmecontrol logpage -p 2 <ctrlr id>

Future enhancements may re-enable these notifications on a periodic basis
so that if the notified condition persists, it will continue to be logged.

Sponsored by:	Intel
Reviewed by:	carl
Approved by:	re (hrs)
MFC after:	1 week
2013-10-08 16:00:12 +00:00
Jim Harris
d5fc982133 Do not enable temperature threshold as an asynchronous event notification
on NVMe controllers that do not support it.

Sponsored by:	Intel
Reviewed by:	carl
Approved by:	re (hrs)
MFC after:	1 week
2013-10-08 15:49:14 +00:00
Jim Harris
992db80f1d Extend some 32-bit fields and variables to 64-bit to prevent overflow
when calculating stats in nvmecontrol perftest.

Sponsored by:	Intel
Reported by:	Joe Golio <joseph.golio@emc.com>
Reviewed by:	carl
Approved by:	re (hrs)
MFC after:	1 week
2013-10-08 15:47:22 +00:00
Jim Harris
a40e72a695 Add driver-assisted striping for upcoming Intel NVMe controllers that can
benefit from it.

Sponsored by:	Intel
Reviewed by:	kib (earlier version), carl
Approved by:	re (hrs)
MFC after:	1 week
2013-10-08 15:44:04 +00:00
Mark Johnston
cb7320ce7b Initialize and free the DTrace taskqueue in the dtrace module load/unload
handlers rather than in the dtrace device open/close methods. The current
approach can cause a panic if the device is closed which the taskqueue
thread is active, or if a kernel module containing a provider is unloaded
while retained enablings are present and the dtrace device isn't opened.

Submitted by:	gibbs (original version)
Reviewed by:	gibbs
Approved by:	re (glebius)
MFC after:	2 weeks
2013-10-08 12:56:46 +00:00
Adrian Chadd
0a2cefc676 Add channel survey support to the AR5212 HAL.
The AR5212 series of MACs implement the same channel counters as the
later 11n chips - except, of course, the 11n specific counter (extension
channel busy.)

This allows users of these NICs to use 'athsurvey' to see how busy their
current channel is.

Tested:

* AR5212, AR2413 NICs, STA mode

Approved by:	re@ (gleb)
2013-10-08 11:28:59 +00:00
Dag-Erling Smørgrav
db3fcaf970 Add YARROW_RNG and FORTUNA_RNG to sys/conf/options.
Add a SYSINIT that forces a reseed during proc0 setup, which happens
fairly late in the boot process.

Add a RANDOM_DEBUG option which enables some debugging printf()s.

Add a new RANDOM_ATTACH entropy source which harvests entropy from the
get_cyclecount() delta across each call to a device attach method.
2013-10-08 11:05:26 +00:00
Mark Murray
842d654ca7 MFC - tracking commit. 2013-10-08 07:02:23 +00:00
Mark Murray
6e818c871f Debugging. My attempt at EVENTHANDLER(multiuser) was a failure; use EVENTHANDLER(mountroot) instead.
This means we can't count on /var being present, so something will need to be done about harvesting /var/db/entropy/... .

Some policy now needs to be sorted out, and a pre-sync cache needs to be written, but apart from that we are now ready to go.

Over to review.
2013-10-08 06:54:52 +00:00
Xin LI
6eb151f212 Improve lzjb decompress performance by reorganizing the code
to tighten the copy loop.

Submitted by:	Denis Ahrens <denis h3q com>
MFC after:	2 weeks
Approved by:	re (gjb)
2013-10-08 01:38:24 +00:00
Dimitry Andric
64db896617 Fix kernel build on amd64 after r256118, since the machine/md_var.h
header is not implicitly included there.  So include it explicitly.

Approved by:	re (delphij)
Pointy hat to:	dim
MFC after:	3 days
X-MFC-With:	r256118
2013-10-07 22:30:03 +00:00
Konstantin Belousov
50fbc8e7e8 Make isci(4) loadable.
Reviewed by:	jimharris
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Approved by:	re (gjb)
2013-10-07 20:48:24 +00:00
Dimitry Andric
e38c5308a2 Remove redundant declarations of szsigcode and sigcode in
sys/i386/ibcs2/ibcs2_sysvec.c, to silence two gcc warnings.

Approved by:	re (gjb)
MFC after:	3 days
2013-10-07 16:57:48 +00:00
Dimitry Andric
42355a4ff6 Remove redundant declaration of cpu_clflush_line_size in
sys/dev/cxgbe/t4_sge.c, to silence a gcc warning.

Approved by:	re (gjb)
MFC after:	3 days
2013-10-07 16:56:56 +00:00
Dimitry Andric
faf8ff5faa Initialize a variable in sys/dev/xen/control/control.c, to silence a gcc
warning.

Approved by:	re (gjb)
MFC after:      3 days
2013-10-07 16:55:34 +00:00
Dimitry Andric
7ea82d6741 Give an unnamed union in sys/ofed/include/rdma/ib_verbs.h a name, to
silence a gcc warning.

Approved by:	re (gjb)
MFC after:      3 days
2013-10-07 16:54:29 +00:00
Dimitry Andric
d359802e10 Remove redundant declaration of force_evtchn_callback() in the
i386-specific xen-os.h, to silence a gcc warning.

Approved by:	re (gjb)
MFC after:	3 days
2013-10-07 16:53:26 +00:00
Gleb Smirnoff
491b520174 Fix mbuf leak.
Submitted by:	Loganaden Velvindron <logan elandsys.com>
Obtained from:	NetBSD
Approved by:	re (kib)
2013-10-07 12:07:40 +00:00