Commit Graph

96960 Commits

Author SHA1 Message Date
Dimitry Andric
f785676f2a Upgrade our copy of llvm/clang to 3.4 release. This version supports
all of the features in the current working draft of the upcoming C++
standard, provisionally named C++1y.

The code generator's performance is greatly increased, and the loop
auto-vectorizer is now enabled at -Os and -O2 in addition to -O3.  The
PowerPC backend has made several major improvements to code generation
quality and compile time, and the X86, SPARC, ARM32, Aarch64 and SystemZ
backends have all seen major feature work.

Release notes for llvm and clang can be found here:
<http://llvm.org/releases/3.4/docs/ReleaseNotes.html>
<http://llvm.org/releases/3.4/tools/clang/docs/ReleaseNotes.html>

MFC after:	1 month
2014-02-16 19:44:07 +00:00
Ruslan Bukin
0beadc3c1c - Decrease buffer size.
- Handle eDMA interrupt on running channel only.
2014-02-16 19:21:44 +00:00
Ian Lepore
a6873fd141 After a timeout, reset the controller using SDHCI_RESET_CMD|SDHCI_RESET_DATA
rather than SDHCI_RESET_ALL; the latter turns off clocks and power, removing
any possibility of recovering from the error.

Also, double the timeout to 2 seconds.  Despite what the SD spec says about
all transactions completing in 250ms or less, I have a card which sometimes
takes more than a second to complete a write.
2014-02-16 17:22:49 +00:00
Ruslan Bukin
586a16c431 Add driver for Synchronous Audio Interface (SAI).
SAI supports full-duplex serial interfaces with frame
synchronization such as I2S, AC97, TDM, and codec/DSP
interfaces.
2014-02-16 16:49:54 +00:00
Hans Petter Selasky
77bea00c5e Add new PCI ID for hardware which needs port routing for USB 3.0.
PR:		usb/186811
MFC after:	1 week
Submitted by:	Philipp Maechler <philipp.maechler@mamo.li>
2014-02-16 14:37:23 +00:00
Christian Brueffer
5aabe0d7b8 Remove an nve(4)-specific workaround from the xbox port. nfe(4) doesn't
need it.

Reviewed by:	ed
2014-02-16 14:35:19 +00:00
Dimitry Andric
bc28228951 In sys/dev/usb/controller/musb_otg.c, fix a warning about musbotg_odevd
being unused, by adding it to the part that handles getting descriptors.

Reviewed by:	hselasky
MFC after:	3 days
2014-02-16 12:41:57 +00:00
Christian Brueffer
7f47cbd3ce Retire the nve(4) driver; nfe(4) has been the default driver for NVIDIA
nForce MCP adapters for a long time.

Yays:	jhb, remko, yongari
Nays:	none on the current and stable lists
2014-02-16 12:22:43 +00:00
Ian Lepore
a41679c945 Catch up with last-second name change. 2014-02-16 03:34:07 +00:00
Ian Lepore
49624653d5 Oops, remove some dregs of debugging. 2014-02-16 03:30:22 +00:00
Ian Lepore
f3639674b5 Make it possible to access the ocotp registers before the ocotp device
is attached, by establishing a temporary mapping of the registers when
necessary.  This is a temporary measure to keep progress moving; in the
long run we need better control over the order in which devices attach
(better than "the order they appear in the fdt dts source").
2014-02-16 03:09:39 +00:00
Ian Lepore
731ff010b9 Add a helper routine to depth-search the device tree for a node with a
matching 'compatible' property.  This probably has a short half-life (as
do most of the fdt_ functions), but it helps solve some near-term needs
until we work out the larger problems of device instantiation order
versus the order of things in the fdt data.
2014-02-16 03:00:59 +00:00
Ian Lepore
b6e466340b Sweep up a couple crumbs left over from the imx6->fsl renaming. 2014-02-15 21:59:00 +00:00
Ian Lepore
350badf9db It turns out Freescale cleverly made the ocotp device compatible across
several different families of SoCs, so move it to the freescale directory
and prefix everything with fsl rather than imx6.
2014-02-15 21:21:57 +00:00
Ian Lepore
e64f01a94a Add timeout logic to sdhci, separate from the timeouts done by the hardware.
If the hardware is not in a good state (like maybe clocks aren't running
because of a configuration glitch) its timeout clock may also not work
correctly, and the next command sent will hang that thread forever.  The
thread in question is usually the one and only thread (at init time) or
a bio queue worker thread whose lockup will eventually lead to the whole
system locking up when it runs out of buffers.

No sd card command should take longer than 250ms.  This new code establishes
a 1-second timeout to allow plenty of safety margin over that.
2014-02-15 20:45:53 +00:00
Ian Lepore
c4ec9d1887 If no compatible cards were found after probing the bus, say so. 2014-02-15 20:36:54 +00:00
George V. Neville-Neil
f850d57232 Summary: Two quick edits to the implementation notes as they're no
longer stored in netinet but in netpfil.
2014-02-15 18:36:31 +00:00
Ian Lepore
8775ab4589 Increase the wait time for acquiring the bus from 10 to 250ms.
Normally it never needs to wait here at all; waiting is done at the end
of the prior command.  When doing a crash dump, the normal interrupt
mechanism isn't used; instead the interrupt handler is called repeatedly
in a polling-like manner.  This can subvert hardware-specific drivers
and lead to trying to start a new command while the previous command is
still busy on the bus.  Since the SD spec says the longest a card can
take to execute any command is 250ms, use that as a timeout.
2014-02-15 17:59:32 +00:00
Ian Lepore
f1887a86aa Convert the "R1B fix" from a busy-loop in the interrupt handler to a callout. 2014-02-15 17:55:35 +00:00
Ian Lepore
844a97cdc2 Add a driver to provide access to imx6 on-chip one-time-programmble data.
Submitted by:	Steven Lawrance <stl@koffein.net>
2014-02-15 17:19:55 +00:00
Zbigniew Bodek
bccb7a02b5 Handle pmap_enter() on already promoted mappings for ARMv6/v7
Attempt to demote the superpage if trying to pmap_enter() on
one. Panic only when the particular superpage should
no longer exist for that pmap and address.
2014-02-15 13:27:45 +00:00
Zbigniew Bodek
6720dd234f Remove spurious assertion from pmap_extract_locked() on ARM
The condition under assertion is no longer valid since
superpages support is operating on section mappings.
2014-02-15 13:24:58 +00:00
Zbigniew Bodek
6be8284c66 Avoid redundant superpage promotion attempts on ARM
Because pmap_enter_locked() is called from few different functions
some redundancy in superpage promotion attempts can be observed.
Hence, avoid promotion in pmap_enter_object() (if the object can
be mapped by superpage it will be handled by pmap_enter_object()
itself) and also do not waste time in pmap_enter_quick().
From now on the promotion will be performed only in pmap_enter().
2014-02-15 13:22:37 +00:00
Zbigniew Bodek
bdd635e646 Fix superpage promotion on ARM with respect to RO/RW and wired attributes
It was possible to create RW superpage mapping even if
the base pages were RO due to wrong setting of the prot
flag passed to pmap_map_section().
Promotion attempt should be canceled in case of attributes
mismatch between any two base pages. Since we still use
pv_flags to maintain permission to write (PVF_WRITE) and
wired status (PVF_WIRED) for a page, it is also necessary
to take those variables into account.
2014-02-15 13:20:17 +00:00
Zbigniew Bodek
a7bd28f2cb Ensure proper TLB invalidation on superpage promotion and demotion on ARM
Base pages within newly created superpage need to be invalidated so that
new mapping is "visible" immediately after creation.
2014-02-15 13:17:51 +00:00
Zbigniew Bodek
807c947a43 Always clear L1 PTE descriptor when removing superpage on ARM
Invalidate L1 PTE regardles of existance of the corresponding
l2_bucket. This is relevant when superpage is entered via
pmap_enter_object() and will fix crash on entering page
in place of not properly removed superpage.
2014-02-15 13:13:00 +00:00
Dimitry Andric
216b991381 In sys/dev/xen/console/console.c, #if 0 an unused static function.
MFC after:	3 days
2014-02-15 12:37:26 +00:00
Dimitry Andric
a3043eeef2 Under sys/netpfil/ipfw, surround two IPv6-specific static functions with
#ifdef INET6, since they are unused when INET6 is disabled.

MFC after:	3 days
2014-02-15 12:25:01 +00:00
Dimitry Andric
2de7ba0758 In sys/fs/nandfs/nandfs_vfsops.c, #if 0 an unused static function.
MFC after:	3 days
2014-02-15 11:42:56 +00:00
Adrian Chadd
a2c5809961 Make sure that the flowtable flowid is only set to m_flowid if there
isn't one already supplied.

The previous flowtable code also did this.

Reviewed by:	glebius
Sponsored by:	Netflix, Inc.
2014-02-15 07:57:01 +00:00
Luigi Rizzo
f0ea3689a9 This new version of netmap brings you the following:
- netmap pipes, providing bidirectional blocking I/O while moving
  100+ Mpps between processes using shared memory channels
  (no mistake: over one hundred million. But mind you, i said
  *moving* not *processing*);

- kqueue support (BHyVe needs it);

- improved user library. Just the interface name lets you select a NIC,
  host port, VALE switch port, netmap pipe, and individual queues.
  The upcoming netmap-enabled libpcap will use this feature.

- optional extra buffers associated to netmap ports, for applications
  that need to buffer data yet don't want to make copies.

- segmentation offloading for the VALE switch, useful between VMs.

and a number of bug fixes and performance improvements.

My colleagues Giuseppe Lettieri and Vincenzo Maffione did a substantial
amount of work on these features so we owe them a big thanks.

There are some external repositories that can be of interest:

    https://code.google.com/p/netmap
        our public repository for netmap/VALE code, including
        linux versions and other stuff that does not belong here,
        such as python bindings.

    https://code.google.com/p/netmap-libpcap
        a clone of the libpcap repository with netmap support.
	With this any libpcap client has access to most netmap
	feature with no recompilation. E.g. tcpdump can filter
	packets at 10-15 Mpps.

    https://code.google.com/p/netmap-ipfw
        a userspace version of ipfw+dummynet which uses netmap
        to send/receive packets. Speed is up in the 7-10 Mpps
        range per core for simple rulesets.

Both netmap-libpcap and netmap-ipfw will be merged upstream at some
point, but while this happens it is useful to have access to them.

And yes, this code will be merged soon. It is infinitely better
than the version currently in 10 and 9.

MFC after:	3 days
2014-02-15 04:53:04 +00:00
Dimitry Andric
e9e21b6e41 In cxgbe, conditionalize the t4_pgprot_wc() function, since it is only
used when DOT5 is defined.

Reviewed by:	np
MFC after:	3 days
2014-02-14 23:38:42 +00:00
Adrian Chadd
f44e2a4c0f Include the CPU id in the per-CPU timer swi thread descriptions.
Original patch by:	jhb
2014-02-14 23:19:51 +00:00
Dimitry Andric
177ccd3c47 Disable warning about unused static const variables for sys/pci/ncr.c.
MFC after:	3 days
2014-02-14 21:20:16 +00:00
Dimitry Andric
2a9874259c In r260111, in sys/conf/files, I disabled warning about unused functions
for the wrong mcg.c, the one in ofed/drivers/infiniband/hw/mlx4.
Disable the warning for ofed/drivers/net/mlx4/mcg.c instead.

MFC after:	3 days
2014-02-14 21:06:12 +00:00
Sergey Kandaurov
54bb553005 Preserve one character space for a trailing '\0'.
Found by:	Ivan Klymenko via cppcheck
Discussed with: ae
MFC after:	1 week
2014-02-14 20:54:03 +00:00
Dimitry Andric
b3448df413 Similar to r260026, disable warning about unused functions for
ieee80211_adhoc.c, ieee80211_hostap.c and ieee80211_sta.c.

MFC after:	3 days
2014-02-14 20:11:06 +00:00
Dimitry Andric
2367b4ddc4 After r251709, avoid a clang 3.4 warning about an unused static const
variable (uma_max_ipers), when asserts are disabled.

Reviewed by:	glebius
MFC after:	3 days
2014-02-14 17:47:18 +00:00
Andriy Gapon
f25e50cf0b provide fast versions of ffsl and flsl for i386; ffsll and flsll for amd64
Reviewed by:	jhb
MFC after:	10 days
X-MFC note:	consider thirdparty modules depending on these symbols
Sponsored by:	HybridCluster
2014-02-14 15:18:37 +00:00
Christian Brueffer
d01195e3a9 Correct the order of arguments to mtx_init().
PR:		186701
Submitted by:	Takanori Sawada <tak.swd at gmail.com>
MFC after:	2 weeks
2014-02-14 11:18:15 +00:00
Gleb Smirnoff
f0e49f6631 Whenever flowtable lookup fails, we do route lookup and then try to
insert flow entry. During the route lookup the critical section is
exited. It may happen, that after route lookup we will be executed
on an other CPU that already has such flowentry. Before this change
we simply freed the flowentry and returned to ip_output() with
failure.

Actually there is nothing wrong with using previously allocated
flow entry, updating it properly. Thus, make flowentry_insert()
return the new either old fle, and make use of it.

Count reuses as "collisions" and real inserts as "inserts".

Reviewed by:	adrian
Sponsored by:	Netflix
Sponsored by:	Nginx, Inc.
2014-02-14 10:56:26 +00:00
Gleb Smirnoff
48278b8846 Once pf became not covered by a single mutex, many counters in it became
race prone. Some just gather statistics, but some are later used in
different calculations.

A real problem was the race provoked underflow of the states_cur counter
on a rule. Once it goes below zero, it wraps to UINT32_MAX. Later this
value is used in pf_state_expires() and any state created by this rule
is immediately expired.

Thus, make fields states_cur, states_tot and src_nodes of struct
pf_rule be counter(9)s.

Thanks to Dennis for providing me shell access to problematic box and
his help with reproducing, debugging and investigating the problem.

Thanks to:		Dennis Yusupoff <dyr smartspb.net>
Also reported by:	dumbbell, pgj, Rambler
Sponsored by:		Nginx, Inc.
2014-02-14 10:05:21 +00:00
Dimitry Andric
552ee0e1ed Bump __FreeBSD_version after the libc++ 3.4 ABI compatibility fix in
r261801.

Requested by:	portmgr
2014-02-14 08:42:39 +00:00
Hans Petter Selasky
c4a1e93fa6 Fix minor logical error in the XHCI driver. Set correct SETUP packet
direction value.

MFC after:	2 days
Reported by:	Horse Ma <HMa@wyse.com>
2014-02-14 07:17:36 +00:00
Adrian Chadd
e952166b53 Enable use of the PCIe connected wifi on the DB120 (AR9344) board.
The on-board NIC is an 3x3 AR9380 with 5GHz only.

* enable pci code in AR9344_BASE
* enable ath_pci and the firmware loading bits in DB120
* add in the relevant hints in DB120.hints to inform the probe/attach
  code where the PCIe fixup data is for the onboard chip.

This is only relevant for a default development board.  I also have a
DB120 with the on-board PCIe wifi NIC disabled and it's exposed as
a real PCIe slot (to put normal PCIe NICs in); the fixup code will need
to be disabled to make this work correctly.

Tested:

* DB120
2014-02-14 05:25:15 +00:00
Adrian Chadd
73a9ec2e15 Disable this check for now; it fails on the AR9344 PCI fixup code.
I'll make it conditional later.

Tested:

* DB120
2014-02-14 05:22:28 +00:00
Adrian Chadd
e9330c7b33 Add the ath0 EEPROM hints required to detect the on-chip wifi.
This allows the on-chip wifi to work; however it's not yet fully
tested.

ath0: Vendor=0x168c, Device=0x0031
ath0: Vendor=0x168c, Device=0x0031
ath0: <Atheros AR934x> at mem 0x18100000-0x1811ffff irq 0 on nexus0
...
ath0: [HT] enabling HT modes
ath0: [HT] enabling short-GI in 20MHz mode
ath0: [HT] 1 stream STBC receive enabled
ath0: [HT] 1 stream STBC transmit enabled
ath0: [HT] 2 RX streams; 2 TX streams

Tested:

* DB120 development board
2014-02-14 04:03:17 +00:00
Attilio Rao
14a5dc1780 Fix-up r254141: in the process of making a failing vm_page_rename()
a call of pager_swap_freespace() was moved around, now leading to freeing
the incorrect page because of the pindex changes after vm_page_rename().

Get back to use the correct pindex when destroying the swap space.

Sponsored by:	EMC / Isilon storage division
Reported by:	avg
Tested by:	pho
MFC after:	7 days
2014-02-14 03:34:12 +00:00
Rui Paulo
a999ce6abf Add urtwn_start_locked() to avoid unlocking during TX. 2014-02-14 01:47:12 +00:00
David C Somayajulu
b23deb2719 check for defrag only when bus_dmamap_load_mbuf_sg() returns EFBIG. Comment in
qla_hw_send is moot.
2014-02-14 01:02:06 +00:00