Commit Graph

195461 Commits

Author SHA1 Message Date
Hans Petter Selasky
654ea8e767 Optimise bit searching loop by using the ffs() function.
Make some related bit shifts unsigned while at it.
2014-12-05 12:07:53 +00:00
Hans Petter Selasky
535701f699 Define the ffs() function in the USB bootloader's global and
independent header file.
2014-12-05 12:04:47 +00:00
Alexander Motin
1e68fe9c33 Avoid unneeded malloc/memcpy/free if there is no metadata on disk.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2014-12-05 10:23:18 +00:00
Enji Cooper
da976f9d68 MFhead @ r275496 2014-12-05 07:48:25 +00:00
Michael Tuexen
457b4b8836 This is the SCTP specific companion of
https://svnweb.freebsd.org/changeset/base/275358
which was provided by Hans Petter Selasky.
2014-12-04 21:17:50 +00:00
Alexander Motin
001de973d5 Document r275481 changes.
MFC after:	2 weeks
2014-12-04 19:08:05 +00:00
Alexander Motin
53c146de18 Add to CTL support for threshold notifications for file-backed LUNs.
Previously it was supported only for ZVOL-backed LUNs, but now should work
for file-backed LUNs too.  Used value in this case is a space occupied by
the backing file, while available value is an available space on file
system.  Pool thresholds are still not implemented in this case.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2014-12-04 18:37:42 +00:00
Christian Brueffer
ebc990cf5d Add MLINKs for all functions described in the libxo manpages. 2014-12-04 18:23:13 +00:00
Alexander Motin
5a770b5496 Swap resource count scopes for used/available space.
Used count should be reported as per-LUN, while available should not.

MFC after:	1 week
2014-12-04 17:36:29 +00:00
Dimitry Andric
b42a6953a1 Pull in r174303 from upstream gcc trunk (by Jason Merrill):
PR c++/48211
  * name-lookup.h (cp_class_binding): Make base a pointer.
  * name-lookup.c (new_class_binding): Adjust.
  (poplevel_class): Adjust.

This fixes a potential segfault when compiling gold, a part of the
devel/binutils port, with gcc.  See also the upstream bug report:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48211

Thanks to Jason Merrill, Tom Callaway and Red Hat legal for approving
the use of this patch under the GNU GPL, version 2 or later.

MFC after:	1 week
2014-12-04 17:26:04 +00:00
Steve Kargl
668986107d Fix a 20+ year bug by using an appropriate constant for
the transition from one asymptotic approximation to another
for the zeroth order Bessel and Neumann functions.

Reviewed by:	bde
2014-12-04 15:57:58 +00:00
Alexander Motin
26f0f92fa2 Decode some binary fields of Intel metadata.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	2 weeks
2014-12-04 15:54:45 +00:00
Alexander Motin
ef8daf3fed Add GET LBA STATUS command support to CTL.
It is implemented for LUNs backed by ZVOLs in "dev" mode and files.
GEOM has no such API, so for LUNs backed by raw devices all LBAs will
be reported as mapped/unknown.

MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
2014-12-04 11:34:19 +00:00
Andrey V. Elsukov
3d6aff5615 Fix style(9) and remove m_freem(NULL).
Add XXX comment, it looks incorrect, because m_pkthdr.len is already
incremented by M_PREPEND().

Sponsored by:	Yandex LLC
2014-12-04 05:02:12 +00:00
Sean Bruno
040bcc9ac0 Switch is an 8316, so make the comments say that.
Delete extraneous comment line that manifested itself from cut-n-pasting.

Sponsored by:	Nicholas Esborn <nick@desert.net>
2014-12-03 23:37:23 +00:00
Warner Losh
d0b6da086f Const poison in a few places to ensure we don't modify things
through the module data pointer.
2014-12-03 22:14:13 +00:00
Hans Petter Selasky
157675bd2d Optimise the bit searching loops, by quickly skipping the 16 first set
bits if all the 16 first bits are set. This way the worst case
searching time is reduced from 32 to 16 cycles.
2014-12-03 21:55:44 +00:00
Hans Petter Selasky
e93086d0bf Workaround for possible bug in the SAF1761 chip. Wait 125us before
re-using a hardware propritary transfer descriptor, PTD, in USB host
mode. If the PTD's are recycled too quickly, it has been observed that
the hardware simply fails to schedule the requested job or resets
completely disconnecting all devices.
2014-12-03 21:48:30 +00:00
Sean Bruno
258c6e3d7a There is only one argemdio device on this board.
Sponsored by:	Nicholas Esborn <nick@desert.net>
2014-12-03 19:41:49 +00:00
Christian Brueffer
850d588074 Add libcuse and libxo. 2014-12-03 18:14:21 +00:00
Sean Bruno
3bfb0fa7e9 Assign argemdio0 to the correct base address and assign argemdio1 to its
proper place *after* argemdio0

Correctly place arge0 and arge1 on their respective bus positions.

Sponsored by:	Nicholas Esborn <nick@desert.net>
2014-12-03 18:08:39 +00:00
Alexander Motin
ffe9621cc3 Increase CTL ports limit from 128 to 256 and LUNs limit from 256 to 1024.
After recent optimizations this change is no longer blocked by CTL memory
consumption.  Those limits are still not free, but much cheaper now.

MFC after:	1 week
Relnotes:	yes
Sponsored by:	iXsystems, Inc.
2014-12-03 16:04:01 +00:00
John Baldwin
b10c08a52b Revert device_getenv_int() for now as it duplicates resource_int_value().
We should perhaps implement a device_getenv_*() and device_setenv_*() API
as a convenience wrapper on top of resource_*_value() and resource_set_*().
2014-12-03 15:29:53 +00:00
Alexander Motin
f9477570ec Unify function names after r275458.
MFC after:	1 month
2014-12-03 15:19:38 +00:00
Alexander Motin
9e52565344 Do not pre-allocate UNIT ATTENTIONs storage for every possible initiator.
Abusing ability of major UAs cover minor ones we may not account UAs for
inactive ports.  Allocate UAs storage for port and start accounting only
after some initiator from that port fetched its first POWER ON OCCURRED.

This reduces per-LUN CTL memory usage from >1MB to less then 100K.

MFC after:	1 month
2014-12-03 15:16:18 +00:00
Ed Maste
672aa7f472 Increase BERI loader section alignment to 16
The .text, .bss, and .data sections claimed 16-byte alignment, but were
only aligned to 8 by the linker script.

Discovered with strip(1) from elftoolchain, which performs validation
absent from the binutils strip(1).

Sponsored by:	DARPA, AFRL
2014-12-03 14:04:57 +00:00
Alexander Motin
c9fe195c24 Remove some unused code. 2014-12-03 10:39:47 +00:00
Alexander Motin
1606ad8c42 Do not corrupt the listen string when parsing it.
This fixes problem with ctld reload when it is configured to listen on two
portals with same IP, but different ports.

MFC after:	1 week
2014-12-03 09:32:51 +00:00
Alexander Motin
411598df7a Do not pre-allocate reservation keys memory for every possible initiator.
In configurations with many ports, like iSCSI, each LUN is typically
accessed only by limited subset of ports.  Allocating that memory on
demand allows to reduce CTL memory usage from 5.3MB/LUN to 1.3MB/LUN.

MFC after:	1 month
2014-12-03 09:05:53 +00:00
Alexander Motin
2a72b5936d Plug memory leaks on UNMAP and XCOPY with invalid parameters.
MFC after:	1 week
2014-12-03 08:25:41 +00:00
Andrey V. Elsukov
18961126cb Remove __P() macro.
Suggested by:	kevlo
Sponsored by:	Yandex LLC
2014-12-03 04:08:41 +00:00
Andrey V. Elsukov
2e84e6eac9 ANSIfy function declarations.
Sponsored by:	Yandex LLC
2014-12-03 03:50:54 +00:00
Rui Paulo
2a1136620d Switch gpioctl(8) to LIBADD. 2014-12-03 03:05:15 +00:00
Xin LI
e8b00d3d65 Add sleep(1) to /rescue. This adds 664 bytes to the binary on amd64 but
it's pretty useful for shell scripts.

MFC after:	1 month
Sponsored by:	iXsystems, Inc.
2014-12-03 01:34:24 +00:00
Warner Losh
86fd88736f Remove unused PCMCIA_CARD* macros.
Always include the card human readable name. We support ~270 cards and
at ~20 bytes each, this bloats things by only ~5k. Retain the
PCMCIA_CARD vs PCMCIA_CARD_D distinction, though, in case this is
intolerable.
2014-12-03 00:47:05 +00:00
Baptiste Daroussin
a7710c485e Revert r274953, r274934
mandoc(1) is now able to display correctly the vanilla version
2014-12-02 23:33:37 +00:00
Baptiste Daroussin
1fb816da82 Update to mandoc cvs version as of 20141201
- Compatiblity with existing manpages has been improved
- Now support ".so" directive with compressed manpages (which fixes a regression
we have since we have new man(1))
2014-12-02 23:24:57 +00:00
Jack F Vogel
4da1bbcda5 Revert r275136, it was not approved, it was sloppy, if a feature
like this is needed please resubmit for Intel's approval.
2014-12-02 23:02:57 +00:00
Ed Maste
ccbdcd03f2 libelf: Fix cross-endian ELF note file / memory conversion
The namesz and descsz variables need to be used in native endianness.
The sizes are in native order after swapping in the file to memory case,
and before swapping in the memory to file case.

This issue was identified for r273443, but the change was applied to the
wrong case. Revert r273443 to fix the to-memory case, and apply the
equivalent change to the to-file case.

Sponsored by:	DARPA, AFRL
Reviewed by:	adrian, brooks, marcel
Differential Revision: https://reviews.freebsd.org/D1257
2014-12-02 22:35:43 +00:00
Michael Tuexen
4e88d37a2a Do the renaming of sb_cc to sb_ccc in a way with less code changes by
using a macro.
This is an alternate approach to
https://svnweb.freebsd.org/changeset/base/275326
which is easier to handle upstream.

Discussed with: rrs, glebius
2014-12-02 20:29:29 +00:00
Enji Cooper
3df678fa16 Don't try to remove /usr/include/bsm, et al 2014-12-02 19:55:46 +00:00
George V. Neville-Neil
bd19924f6b This configuration file removes several debugging options, including
WITNESS and INVARIANTS checking, which are known to have significant
performance impact on running systems.  When benchmarking new features
this kernel should be used instead of the standard GENERIC.
This kernel configuration should never appear outside of the HEAD
of the FreeBSD tree.
2014-12-02 19:55:43 +00:00
Enji Cooper
210607205f Make ccd(4), et al conditional based on MK_CCD 2014-12-02 19:53:55 +00:00
Rui Paulo
8366091ea8 gpioctl: don't print the command line arguments.
PR:		195330
Submitted by:	Scott Ellis jumpnowtek at gmail.com
MFC after:	3 days
2014-12-02 19:41:25 +00:00
Enji Cooper
488ced8671 Only install etc/devd/asus.conf if MK_ACPI == yes 2014-12-02 19:02:39 +00:00
Andrew Turner
c258e1cc69 Switch to unified syntax so these can be built with clang 3.5.
MFC after:	1 week
Sponsored by:	ABT Systems Ltd
2014-12-02 18:37:04 +00:00
Andrew Turner
4373d2f370 Use the APSR_nzcv format of mrc. The clang integrated assembler doesn't
support the old usage of r15.

Sponsored by:	ABT Systems Ltd
2014-12-02 18:35:34 +00:00
Andrew Turner
d9e2150b36 Fix the name of the coprocessor to include the "p" prefix, the clang
integrated assembler expects this.

MFC after:	1 Week
Sponsored by:	ABT Systems Ltd
2014-12-02 18:20:53 +00:00
Andrew Turner
06b6b5da5e Allow the UAL APSR_nzcv format for the mrc and mrc2 instructions. The clang
integrated assembler only allows these forms so binutils will need to
support them.

MFC after:	1 Week
Sponsored by:	AB Systems Ltd
2014-12-02 18:12:16 +00:00
Enji Cooper
c415effcef Don't install usr.sbin/mountd if MK_NFS_SERVER == no 2014-12-02 17:10:11 +00:00