Commit Graph

101319 Commits

Author SHA1 Message Date
andrew
af32fb7fce MFC 275564:
Use the unified syntax when generating assembly for clang. The clang 3.5
integrated assembler only accepts it.

Sponsored by:	ABT Systems Ltd
2014-12-14 18:28:01 +00:00
andrew
56edfadd1e MFC 275378:
Pull in the NetBSD global offset table handling code. Clang 3.5 creates
relocations the linker complains about.

Obtained from:	NetBSD
2014-12-14 18:23:30 +00:00
andrew
90fc0dee7a Clean up our ARM assembly:
MFC 275256:

Switch to the ARM unified assembly language as the clang integrated as only
supports it. Binutils supports it when the ".syntax unified" directive
is set.

Sponsored by:   ABT Systems Ltd

MFC 275264:

Update _ENTRY to use _EENTRY to reduce the common code.

MFC 275321:

Remove extra labels, ENTRY_NP already provides them.

Sponsored by:   ABT Systems Ltd

MFC 275322:

Correctly a few incorrect uses of ENTRY/EENTRY and END/EEND

Sponsored by:   ABT Systems Ltd

MFC 275416:

Fix the name of the coprocessor to include the "p" prefix, the clang
integrated assembler expects this.

Sponsored by:   ABT Systems Ltd

MFC 275418:

Switch to unified syntax so these can be built with clang 3.5.

Sponsored by:   ABT Systems Ltd

MFC 275519:

Add missing END macros to some of the xscale functions.

Sponsored by:   ABT Systems Ltd

MFC 275520:

Use the unified syntax in a few more assembly files

Sponsored by:   ABT Systems Ltd

MFC 275521:

Set the alignment to 4-bytes after a string as clang 3.5 can switch to
thumb mode if this is incorrect.

Sponsored by:   ABT Systems Ltd

MFC 275522:

Place the literal pool after a RET otherwise clang 3.5 tries to put it too
far away from a ldr psuedo instruction. With this clang will place the
literal value here where it's close enough to be loaded.

Sponsored by:   ABT Systems Ltd

MFC 275523:

Switch to an armv6k cpu, without this clang 3.5 complains "bx lr" is
unsupported as it needs a newer cpu.

Sponsored by:   ABT Systems Ltd

MFC 275524:

Switch to a .cpu directive. These will work when clang 3.5 is imported
where the .arch directive is a nop.

Sponsored by:   ABT Systems Ltd
2014-12-14 16:28:53 +00:00
andrew
041226eb03 MFC 275207:
We don't use the hypervisor interrupt, make it optional in the device tree.

Submitted by:   Julien Grall <julien.grall AT linaro.org>

MFC 275208:

Some device tree configurations place the generic timer under the root
of the tree and not under simplebus. Update the driver to handle this.

Submitted by:   Julien Grall <julien.grall AT linaro.org>
2014-12-14 15:41:56 +00:00
andrew
35401942c2 MFC 273927:
Move the definitions of the fdt functions from a uboot header to a new fdt
header. There is nothing in the fdt spec that ties it to U-Boot.

While here sort and fix the signature of fdt_setup_fdtp.

MFC 273934:

Start to allow platforms other than U-Boot to use the FDT code in loader by
moving U-Boot specific code from libfdt.a to a new libuboot_fdt.a. This
needs to be a new library for linking to work correctly.

Differential Revision:  https://reviews.freebsd.org/D1054
Reviewed by:    ian, rpaulo (earlier version)
2014-12-14 15:33:45 +00:00
andrew
26961b2547 MFC r273913:
Clean up the types of a few strings to make them const when they are never
written to.

MFC r273914:

The command name is a constant, use the correct type.
2014-12-14 15:03:11 +00:00
kib
88eaa27723 MFC r275347:
Provide mutual exclusion between zone allocation/destruction and
uma_reclaim().
2014-12-14 09:34:55 +00:00
dim
3156db9097 MFC r275633:
Pull in r223171 from upstream llvm trunk (by Michael Zolotukhin):

  PR21302. Vectorize only bottom-tested loops.

  rdar://problem/18886083

This fixes a bug in the llvm vectorizer, which could sometimes cause
vectorized loops to perform an additional iteration, leading to possible
buffer overruns.  Symptoms of this, which are usually segfaults, were
first noticed when building gcc ports, here:

https://lists.freebsd.org/pipermail/freebsd-ports/2014-September/095466.html
https://lists.freebsd.org/pipermail/freebsd-toolchain/2014-September/001211.html

Since this fix is very important for ports, bump __FreeBSD_version to
make it easier for port maintainers to test whether the fix has been
applied.

Upstream PR:	http://llvm.org/PR21302
2014-12-13 12:14:26 +00:00
kib
8b3b3c8447 MFC r275513:
When the last reference on the vnode' vm object is dropped, read the
vp->v_vflag without taking vnode lock and without bypass.
2014-12-12 09:22:52 +00:00
hselasky
722ac120b4 MFC r275636:
Move OFED init a bit earlier so that PXE boot works.

Sponsored by:	Mellanox Technologies
2014-12-12 07:59:05 +00:00
mav
dff991dbdf MFC r274411: Improve CAM's reaction on asymmetric access errors. 2014-12-12 07:41:08 +00:00
mav
cc4fa4df69 MFC r275478: Swap resource count scopes for used/available space.
Used count should be reported as per-LUN, while available should not.
2014-12-11 00:25:26 +00:00
cy
fef6395777 MFC r275199.
Correctly define constants.
2014-12-10 20:54:23 +00:00
mav
4875c0a205 MFC r275446: Plug memory leaks on UNMAP and XCOPY with invalid parameters. 2014-12-10 08:52:47 +00:00
rpaulo
88952b61c5 MFC r275376:
Allow multiple devices to mmap.  It's impossible to prevent this with
  checks on the open/close functions.
2014-12-09 17:03:14 +00:00
avg
0fb6d9ca37 MFC r275046: whitespace and cosmetic changes in callout_reset family of macros
Not applicable to earlier releases.
2014-12-08 13:19:29 +00:00
avg
36fdb56baa MFC r275045: callout(9): add sbt flavors of callout_schedule
Not applicable to earlier releases.
2014-12-08 13:13:17 +00:00
avg
c07a7147df MFC r274628: l2arc: restore correct rounding up of asize of compressed data 2014-12-08 13:06:44 +00:00
mav
16ad04df25 MFC r275368:
When passing LUN IDs through treat ASCII values as fixed-length, not
interpreating NULLs as EOLs, but converting them to spaces.

SPC-4 does not tell that T10-based IDs should be NULL-terminated/padded.
And while it tells that it should include only ASCII chars (0x20-0x7F),
there are some USB sticks (SanDisk Ultra Fit), that have NULLs inside
the value.  Treating NULLs as EOLs there made those LUN IDs non-unique.
2014-12-08 09:47:49 +00:00
mav
72641b76c8 MFC r274843, r274845:
Move icl_pdu_get_data() and xpt_done() out of initiator's session lock.

During heavy reads data copying in icl_pdu_get_data() may consume large
percent of CPU time.  Moving it out of the lock significantly reduces
lock hold time and respectively lock congestion on read operations.
2014-12-06 07:30:08 +00:00
kib
f88754a36c MFC r275206:
Assert the state of the process lock and sigact mutex in
kern_sigprocmask() and reschedule_signals().
2014-12-05 09:30:07 +00:00
mav
f55f3b5eab MFC r272937: Fix r272936 build with old GCC. 2014-12-05 07:48:22 +00:00
mav
2ba95e01e3 MFC r268395:
Pass correct command that should be aborted to ISPCTL_ABORT_CMD.

This makes XPT_ABORT to work for me on initiator side of isp(4).
Previous code was trying to abort the XPT_ABORT itself and failed.
2014-12-05 07:46:28 +00:00
mav
c2a2522fc4 MFC r274805:
Make cfiscsi_offline() synchronous, waiting for connections termination
before return.  This should make ctld restart more clean and predictable.
2014-12-05 07:25:02 +00:00
mav
0d78a1c549 MFC r274795:
Close race between cfiscsi_offline() and new connection arrival.

Incoming connection should be either rejected or accepted and terminated.
2014-12-05 07:24:17 +00:00
mav
cc2f0f4af5 MFC r274785: Partially reconstruct Active/Standby clusting.
In this mode one head is in Active state, supporting all commands, while
another is in Standby state, supporting only minimal LUN discovery subset.

It is still incomplete since Standby state requires reservation support,
which is impossible to do right without having interlink between heads.
But it allows to run some basic experiments.
2014-12-05 07:23:25 +00:00
delphij
ebd3bcb845 MFC r274172 (avg)
fix l2arc compression buffers leak

We have observed that arc_release() can be called concurrently with a
l2arc in-flight write.
Also, we have observed that arc_hdr_destroy() can be called from
arc_write_done() for a zio with ZIO_FLAG_IO_REWRITE flag in similar
circumstances.

Previously the l2arc headers would be freed while leaking their
associated compression buffers.  Now the buffers are placed on
l2arc_free_on_write list for delayed freeing.  This is similar to what
was already done to arc buffers that were supposed to be freed
concurrently with in-flight writes of those buffers.

In addition to fixing the discovered leaks this change also adds some
protective code to assert that a compression buffer associated with a
l2arc header is never leaked.

A new kstat l2_cdata_free_on_write is added.  It keeps a count of
delayed compression buffer frees which previously would have been leaks.

Tested by:      Vitalij Satanivskij <satan@ukr.net> et al
Requested by:   many
Sponsored by:   HybridCluster / ClusterHQ

This is a 10.1-RELEASE errata candidate.
2014-12-05 00:32:33 +00:00
delphij
d663d42637 MFC r274674:
Add a tunable for spa_slop_shift which controls how much space we
would reserve by default.  Tuning is not recommended.

Relnotes:	yes
2014-12-04 23:26:15 +00:00
delphij
f96a33a8ab MFC r274636:
Sync with userland variant.
2014-12-04 23:21:42 +00:00
delphij
a26baf65aa MFC r274276: MFV r274271:
Improve zdb -b performance:

 - Reduce gethrtime() call to 1/100th of blkptr's;
 - Skip manipulating the size-ordered tree;
 - Issue more (10, previously 3) async reads;
 - Use lighter weight testing in traverse_visitbp();

Illumos issue:
    5243 zdb -b could be much faster
2014-12-04 23:20:44 +00:00
delphij
36b0a2ac49 MFC r274458,274523:
Derive copyright year from src/COPYRIGHT.
2014-12-04 23:19:04 +00:00
dim
856a793432 MFC r274922:
Fix the following -Werror warning from clang 3.5.0, while building the
ath kernel module:

sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: error: taking the absolute value of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]
                if (abs(lp[0] * EEP_SCALE - target) < EEP_DELTA) {
                    ^
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
sys/dev/ath/ath_hal/ar5212/ar5212_reset.c:2642:7: note: remove the call to '__builtin_abs' since unsigned values cannot be negative
sys/dev/ath/ah_osdep.h:74:18: note: expanded from macro 'abs'
#define abs(_a)         __builtin_abs(_a)
                        ^
1 error generated.

This warning occurs because both lp[0] and target are unsigned, so the
subtraction expression is also unsigned, and calling abs() is a no-op.

However, the intention was to look at the absolute difference between
the two unsigned quantities.  Introduce a small static function to
clarify what we're doing, and call that instead.

Reviewed by:	adrian
Differential Revision: https://reviews.freebsd.org/D1212
2014-12-04 01:10:50 +00:00
kib
ec597a3d4e MFC r275120:
Fix SA_SIGINFO | SA_RESETHAND handling, reset disposition after sv_sendsig()
is called.
2014-12-03 10:42:10 +00:00
hselasky
a0061de774 MFC r275110:
Add new USB quirk.

PR:		195372
2014-12-03 09:14:14 +00:00
trasz
ea68673881 MFC r274703:
Fix typo.

Sponsored by:	The FreeBSD Foundation
2014-12-03 08:22:13 +00:00
mav
2c60f5a12d MFC r275124: Fix WWNN/WWPN generation for virtual channels. 2014-12-03 07:05:17 +00:00
mav
1986eab03e MFC r275123: Fix incorrect check, blocking MULTIID functionality. 2014-12-03 07:04:28 +00:00
mav
a486cdc239 MFC r275101:
Add bunch of PCI IDs of Intel Wildcat Point (9 Series) chipsets.
2014-12-03 06:53:49 +00:00
brooks
68673ca7df MFC r274821:
Merge from CheriBSD:

commit d0c7d235c09fc65dbdb278e7016a96f79c6a49cc
  Make the Altera JTAG UART device driver slightly more forgiving of
  the foibles of a sub-par hrdware interface by increasing the timeout
  for spotting JTAG polling from one to two seconds.

commit 19ed45a18832560dab967c179d83b71081c3a220
  Update comment.

commit 8edfe803f033cc8e33229f99894c2b7496a44d5f
  Add a comment about a device-driver race condition that could cause the BERI
  pipeline to wedge awaiting JTAG in the event that both the low-level console
  and the tty layer decide to write to the JTAG FIFO just before JTAG is
  disconnected.  Resolving this race is a bit tricky as it looks like there
  isn't a way to 'give the character back' to the tty layer when we discover
  the race.  The easy fix is to drop the character, which we don't yet do, but
  perhaps should as that is a better outcome than wedging the pipeline.

commit 2ea26cf579c9defcf31e413e7c9b0fbc159237fc
  Add a comment about an inherent race with hardware in the Altera JTAG
  UART's low-level console code.

Submitted by:	rwatson
Sponsored by:	DARPA, AFRL
2014-12-02 22:04:27 +00:00
brooks
768a6267bd MFC r274820:
Merge from CheriBSD (2e28d2a3090239b30481f35dc452ad95a5c57389):

Remove initalized, but unused devname variable

Sponsored by:	DARPA, AFRL
2014-12-02 21:23:13 +00:00
brooks
f27f3e0e8e MFC r274818:
Merge from CheriBSD (3422ebe71b6c06fe78b1be73623b240c219e08e3):

Rename beripic to beripic0.

Sponsored by:	DARPA, AFRL
2014-12-02 20:28:05 +00:00
tijl
f3fce3afbd MFC r269634:
drm: fix usage of vm_phys_fictitious_to_vm_page

vm_phys_fictitious_to_vm_page should not be called directly, even when
operating on a range that has been registered using
vm_phys_fictitious_reg_range. PHYS_TO_VM_PAGE should be used instead
because on arches that use VM_PHYSSEG_DENSE the page might come
directly from vm_page_array.

Reported by:	nwhitehorn
Tested by:	nwhitehorn, David Mackay <davidm.jx8p@gmail.com>
Sponsored by:	Citrix Systems R&D
2014-12-02 14:21:06 +00:00
tijl
5bc138563e MFC r273969:
Use default memory type for TTM buffer objects that may be cached.
2014-12-02 14:12:05 +00:00
tijl
e95768983f MFC r273862,273902:
Port the TTM AGP backend to the FreeBSD agp driver and enable AGP support
in the radeonkms driver.

Note: In PCI mode virtual addresses on the graphics card that map to system
RAM are translated to physical addresses by the graphics card itself.   In
AGP mode address translation is done by the AGP chipset so fictitious
addresses appear on the system bus.  For the CPU cache management to work
correctly when the CPU accesses this memory it needs to use the same
fictitious addresses (and let the chipset translate them) instead of using
the physical addresses directly.

Reviewed by:	kib
2014-12-02 14:09:54 +00:00
tijl
3add3ea367 MFC r273856,273863,273963-273965
- Add two new functions to the AGP driver KPI to bind/unbind arbitrary sets
  of pages into the GTT.
- Avoid possible overflow in agp_generic_alloc_memory.
- In agp(4) avoid the need to flush all cpu caches with wbinvd between
  updating the GTT and flushing the AGP TLB by storing the GTT in
  write-combining memory.
- In agp_amd_bind_page don't flush the AGP TLB.  It's done by the calling
  function.
- agp_generic_unbind_memory: flush AGP TLB before unwiring pages
  agp_bind_pages: assert that pages have been wired down
2014-12-02 13:46:13 +00:00
jch
0e426a7bb8 MFC r264321, r264342, r264351, r264356, r273850, r274629:
Currently, the TCP slow timer can starve TCP input processing while it
walks the list of connections in TIME_WAIT closing expired connections
due to contention on the global TCP pcbinfo lock.

To remediate, introduce a new global lock to protect the list of
connections in TIME_WAIT.  Only acquire the TCP pcbinfo lock when
closing an expired connection.  This limits the window of time when
TCP input processing is stopped to the amount of time needed to close
a single connection.

Approved by:    jhb (mentor)
2014-12-02 11:47:26 +00:00
hselasky
f66f59b794 MFC r274918:
Don't use the synchronization endpoint unless referenced by the
isochronous endpoint descriptor used for the data transfers, hence the
synchronization feature might not be supposed to be supported [yet].
This makes seamless playback synced with the USB HOST clock work with
the DN32-USB module for Midas audio systems and possibly other similar
products from Klark Teknik.
2014-12-01 07:34:25 +00:00
kevlo
aaab2e97e4 MFC r275003:
Add missing headers needed by write().
2014-12-01 03:04:15 +00:00
trasz
eafe9cc2c3 MFC r273918:
Change the default log level for iSCSI target from 3 to 1.  It should
have been 1 from the beginning; not sure how it ended up at 3.

Sponsored by:	The FreeBSD Foundation
2014-11-30 10:36:29 +00:00
bryanv
957ca069b7 MFC r274325:
Enable LRO by default when available on vtnet interfaces

  The prior change to not enable LRO by default has confused several
  people. The configurations where LRO is problematic is not the
  typical use case for VirtIO, and due to other issues, this often
  requires checksum offloading to be disabled anyways.
2014-11-29 23:05:01 +00:00