Commit Graph
17948 Commits
Author SHA1 Message Date
Enji Cooper 40bbc28b47 MFC r322441:
Delete trailing whitespace
2017-09-30 20:07:54 +00:00
Mariusz Zaborski f462cde9e7 MFC r323655:
Add missing links to the nv man page.
2017-09-23 12:32:11 +00:00
Mariusz Zaborski 09ac7732ff MFC r323654:
Fix names of the array functions in the nv man page.

Submitted by: def@
2017-09-23 12:28:56 +00:00
Glen Barber fb45864997 MFC r323557:
Remove an unneeded sentence stop.

Sponsored by:	The FreeBSD Foundation
2017-09-20 17:15:58 +00:00
Baptiste Daroussin c3fcd5703f MFC r323160:
Update pci_vendors to 2017-09-01
2017-09-17 06:34:51 +00:00
Ian Lepore 27f0de2a2b MFC r323341:
Clarify that the size option is in bytes by default, but also accepts the
usual SI suffixes.
2017-09-11 22:43:01 +00:00
Ian Lepore e3ac62db1e MFC r322465:
Add config_intrhook_oneshot(): schedule an intrhook function and unregister
it automatically after it runs.

The config_intrhook mechanism allows a driver to stall the boot process
until device(s) required for booting are available, by not allowing system
inits to proceed until all intrhook functions have been unregistered.
Virtually all existing code simply unregisters from within the hook function
when it gets called.

This new function makes that common usage more convenient. Instead of
allocating and filling in a struct, passing it to a function that might (in
theory) fail, and checking the return code, now a driver can simply call
this cannot-fail routine, passing just the intrhook function and its arg.

Differential Revision:	https://reviews.freebsd.org/D11963
2017-09-11 21:32:35 +00:00
Alexander Motin 4791823d15 MFC r323032, r323053, r323058, r323059, r323084, r323114, r323127:
Add NTB driver for PLX/Avago/Broadcom PCIe switches.

This driver supports both NTB-to-NTB and NTB-to-Root Port modes (though
the second with predictable complications on hot-plug and reboot events).
I tested it with PEX 8717 and PEX 8733 chips, but expect it should work
with many other compatible ones too.  It supports up to two NT bridges
per chip, each of which can have up to 2 64-bit or 4 32-bit memory windows,
6 or 12 scratchpad registers and 16 doorbells.  There are also 4 DMA engines
in those chips, but they are not yet supported.

While there, rename Intel NTB driver from generic ntb_hw(4) to more specific
ntb_hw_intel(4), so now it is on par with this new ntb_hw_plx(4) driver and
alike to Linux naming.
2017-09-11 18:48:09 +00:00
Ian Lepore cfd053ead1 MFC r320901-r320902, r320996-r320997, r321002, r321048, r321400, r321743,
r321745

r320901:
Protect access to the AT realtime clock with its own mutex.

The mutex protecting access to the registered realtime clock should not be
overloaded to protect access to the atrtc hardware, which might not even be
the registered rtc. More importantly, the resettodr mutex needs to be
eliminated to remove locking/sleeping restrictions on clock drivers, and
that can't happen if MD code for amd64 depends on it. This change moves the
protection into what's really being protected: access to the atrtc date and
time registers.

This change also adds protection when the clock is accessed from
xentimer_settime(), which bypasses the resettodr locking.

Differential Revision:	https://reviews.freebsd.org/D11483

r320902:
Support multiple realtime clocks, and remove locking/sleeping restrictions
on clock drivers.

This tracks multiple concurrent realtime clock drivers in a list sorted by
clock resolution.  When system time changes (and periodically) the
clock_settime() methods of all registered clocks are invoked.

To initialize system time, each driver is tried in turn from best to worst
resolution, until one succesfully returns a valid time.

The code no longer holds a mutex while calling the clock_settime() and
clock_gettime() methods of the registered clocks. This allows clock drivers
to do whatever kind of locking or sleeping is necessary (this is especially
important for i2c clock chips since i2c drivers often need to sleep).

A new clock_register_flags() function allows the clock driver to pass
flags. The flags currently defined help support drivers that use their own
techniques to avoid roundoff errors (prevents the 4/5 rounding done by the
subr_rtc code). A driver which may need to wait for resources (such as bus
ownership) may pass a flag to indicate that it will obtain system time for
itself after waiting for resources; this is merely an optimization to avoid
the common code retrieving a timespec that will never get used.

Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D11484

r320996:
Allow setting debug.clocktime as a tunable.  Print 64-bit time_t correctly
on 32-bit systems.

r320997:
Minor optimization: instead of converting between days and years using
loops that start in 1970, assume most conversions are going to be for recent
dates and use a precomputed number of days through the end of 2016.

r321002:
Revert r320997.  There are reports of it getting the wrong results, so
clearly my testing was insuffficent, and it's best to just revert it
until I get it straightened out.

r321048:
Minor optimization: instead of converting between days and years using loops
that start in 1970, assume most conversions are going to be for recent dates
and use a precomputed number of days through the end of 2016.

This is a do-over of r320997, hopefully this time with 100% more workiness.

The first attempt had an off-by-one error, but instead of just adding
another mysterious +1 adjustment, this rearranges the relationship between
recent_base_year and recent_base_days so that the latter is the number of
days that occurred before the start of the associated year (instead of the
count thru the end of that year).  This makes the recent_base stuff work
more like the original loop logic that didn't need any +1 adjustments.

r321400:
Add common code to support realtime clocks that store year without century.

Most realtime clocks store the year as 2 BCD digits.  Some add a century bit
to extend the range another hundred years.  Every clock driver has its own
code to determine the century and pass a full year value to clock_ct_to_ts().
Now clock drivers can just convert BCD to bin and store the result in the
clocktime struct and let the common code figure out the century.  Clocks
with a century bit can just add 100 to year if the century bit is on.

r321743:
Add taskqueue_enqueue_timeout_sbt(), because sometimes you want more control
over the scheduling precision than 'ticks' can offer, and because sometimes
you're already working with sbintime_t units and it's dumb to convert them
to ticks just so they can get converted back to sbintime_t under the hood.

r321745:
Add clock_schedule(), a feature that allows realtime clock drivers to
request that their clock_settime() methods be called at a given offset
from top-of-second.  This adds a timeout_task to the rtc_instance so that
each clock can be separately added to taskqueue_thread with the scheduling
it prefers, instead of looping through all the clocks at once with a
single task on taskqueue_thread.  If a driver doesn't call clock_schedule()
the default is the old behavior: clock_settime() is queued immediately.
2017-09-11 17:32:26 +00:00
Ian Lepore a38dc85cda MFC r315089: Document uiomove_frombuf(9). 2017-09-10 20:13:20 +00:00
Enji Cooper 0d0aed1ce0 Regenerate src.conf(5) based on recent changes to src.opts.mk, etc. 2017-09-08 04:51:16 +00:00
Enji Cooper ad6c168af6 MFC r321952:
Allowing MK_NLS_CATALOGS to be enabled if MK_NLS == no doesn't make a whole lot
of sense. Anchor MK_NLS_CATALOGS being enabled off of MK_NLS.
2017-09-08 04:48:25 +00:00
Hans Petter Selasky 47415285d8 MFC r322810 and r322830:
Add new mlx5ib(4) driver to the kernel source tree which supports
Remote DMA over Converged Ethernet, RoCE, for the ConnectX-4 series of
PCI express network cards.

There is currently no user-space support and this driver only supports
kernel side non-routable RoCE V1. The krping kernel module can be used
to test this driver. Full user-space support including RoCE V2 will be
added as part of the ongoing upgrade to ibcore from Linux 4.9. Otherwise
this driver is feature equivalent to mlx4ib(4). The mlx5ib(4) kernel
module will only be built when WITH_OFED=YES is specified.

Sponsored by:		Mellanox Technologies
2017-09-06 13:10:33 +00:00
Ed Maste d5ab42ff82 MFC r323010: hv_vss.4: Fix spelling of 'responsibility'
PR:		221300
Submitted by:	Fabian Keil
Obtained from:	ElectroBSD
2017-09-06 02:05:19 +00:00
Mark Johnston 6b2464571e MFC r321963:
Rework and simplify the ksyms implementation.
2017-09-05 13:52:15 +00:00
Ryan Libby dc4ec92b3d MFC r303188,r303190,r303271,r303438,r303453: Warn flags for gcc 6.1
r303188 (by br):
    Add warn flags for GCC 6.1 compiler.
  r303190 (by br):
    Add GCC 6.1 warn flags for kernel as well.
  r303271 (by br):
    Fix style.
  r303438 (by br):
    o Add warn flags required to build modules with GCC 6.1;
    o Sort GCC 4.8 warn flags.
  r303453 (by br):
    Normalise the CWARNFLAGS inter-word spacing: remove all leading and
    trailing space, and convert multiple consecutive spaces to single
    space.

Approved by:	markj (mentor)
2017-09-04 21:58:35 +00:00
Ed Maste cfd10b0dde MFC r322683: ena.4: fix spelling of 'occurred'
PR:		331298
2017-08-26 00:30:59 +00:00
Ed Maste 1b0de8a690 MFC r322680: sa.4: fix spelling of 'suppresses'
PR:		221302
2017-08-26 00:30:13 +00:00
Alan Somers fbc1fe9497 MFC r320807:
stdbuf(1): Add buffer definition "B" to the usage message

This option has been missing from the usage message ever since the program
was first imported.

Submitted by:	shivansh
Reviewed by:	asomers
Sponsored by:	Google, Inc (GSoC 2017)
Differential Revision:	https://reviews.freebsd.org/D11529
2017-08-25 14:28:36 +00:00
Glen Barber 7b89fb337c MFC r322752:
Update the tests(7) manual page to note the test suite is installed
 by default as of 11.0-RELEASE.

Sponsored by:	The FreeBSD Foundation
2017-08-24 16:49:34 +00:00
Andrey V. Elsukov d01a11ce8f MFC r322310:
Add to if_enc(4) ability to capture packets via BPF after pfil processing.

  New flag 0x4 can be configured in net.enc.[in|out].ipsec_bpf_mask.
  When it is set, if_enc(4) additionally captures a packet via BPF after
  invoking pfil hook. This may be useful for debugging.

  Sponsored by:	Yandex LLC
2017-08-23 08:56:18 +00:00
Li-Wen Hsu 0fc131a424 MFC r322434:
Re-remove excess / for installing SYMLINKS

This excess / was introduced in r280129, and fixed in r295230, but got
re-introduced while merging another branch in r298107.

Approved by:	gjb
Differential Revision:	https://reviews.freebsd.org/D11995
2017-08-21 10:26:11 +00:00
Enji Cooper 241190f11a MFC r321081:
Sort the tests alphabetically before adding them to the Kyuafiles

This is being done to aid in debugging test runs, in the event the
output shifts due to refactored Makefiles, added tests, etc.
2017-08-19 01:43:02 +00:00
Enji Cooper 24b8d06cca MFC r321954:
Delete comment above "__DEFAULT_DEPENDENT_OPTIONS" related to "meta mode options"

src.conf(5) should document which knobs are which and the dependency between each;
remove the comment so the variable can apply to non-"meta mode options".
2017-08-19 01:40:30 +00:00
Ed Maste 6273ae7e61 MFC r322356: Mark PROFILE option as broken when targetting mips64
The assembly in sys/mips/include/profile.h will only work for o32 ABI.

Submitted by:	Alexander Richardson
2017-08-17 01:31:37 +00:00
Kyle Evans 195f85a680 MFC r317254: bsdgrep: add BSD_GREP_FASTMATCH knob for built-in fastmatch
Bugs have been found in the fastmatch implementation as used in bsdgrep.
Some have been fixed (r316495) while fixes for others are in review
(D10098).

In comparison with the fastmatch implementation, Kyle Evans found that:

- regex(3)'s performance with literal expressions offers a speed
  improvement over fastmatch

- regex(3)'s performance, both with simple BREs and EREs, seems to be
  comparable

The regex implementation was imported in r226035, and the commit message
reports:

    This is a temporary solution until the whole regex library is
    not replaced so that BSD grep development can continue and the
    backported code gets some review and testing. This change only
    improves scalability slightly, there is no big performance boost
    yet but several minor bugs have been found and fixed.

Introduce a WITH_/WITHOUT_BSD_GREP_FASTMATCH knob to support testing
of both approaches.

Regenerate src.conf(5) as per the original commit

PR:		175314, 194823
Approved by:	emaste (mentor, blanket MFC)
2017-08-16 17:38:37 +00:00
Konstantin Belousov b91dc537c3 MFC r322077:
Provide more detailed specification for major(), minor() and makedev().
2017-08-12 08:51:19 +00:00
Dmitry Chagin d6681fdb8e MFC r321839:
Implement proper Linux /dev/fd and /proc/self/fd behavior by adding
Linux specific things to the native fdescfs file system.

Unlike FreeBSD, the Linux fdescfs is a directory containing a symbolic
links to the actual files, which the process has open.
A readlink(2) call on this file returns a full path in case of regular file
or a string in a special format (type:[inode], anon_inode:<file-type>, etc..).
As well as in a FreeBSD, opening the file in the Linux fdescfs directory is
equivalent to duplicating the corresponding file descriptor.

Here we have mutually exclusive requirements:
- in case of readlink(2) call fdescfs lookup() method should return VLNK
vnode otherwise our kern_readlink() fail with EINVAL error;
- in the other calls fdescfs lookup() method should return non VLNK vnode.

For what new vnode v_flag VV_READLINK was added, which is set if fdescfs has beed
mounted with linrdlnk option an modified kern_readlinkat() to properly handle it.

For now For Linux ABI compatibility mount fdescfs volume with linrdlnk option:

  mount -t fdescfs -o linrdlnk null /compat/linux/dev/fd

Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D11452
2017-08-10 05:38:31 +00:00
Baptiste Daroussin 06af2f5e36 MFC r321812:
Update pci_vendors to 2017.07.27
2017-08-08 11:24:40 +00:00
Stefan Eßer e2eb6b0735 MFC 321858: Add alternate Turkish keyboard layout F, submitted by Ufur Guler.
MFC 321859: While here, adjust a few file and path names in comments.
2017-08-08 10:45:13 +00:00
Enji Cooper f1d86d39e2 MFC r321951:
Some minor doc fixups

- Tweak a sentence by placing the modifier before an adjective to make it flow
  better.
- Fix a typo.
2017-08-05 17:01:58 +00:00
Enji Cooper b4dfd8cd2b Regenerate src.conf(5) per r322099 2017-08-05 17:00:22 +00:00
Enji Cooper 32156ba244 MFC r320702,r320703:
r320702:

Formalize LEAPSECONDS and OLDTIMEZONES in share/zoneinfo/... as
`MK_ZONEINFO_LEAPSECONDS_SUPPORT == yes` and
`MK_ZONEINFO_OLD_TIMEZONES_SUPPORT == yes`.

Keep `LEAPSECONDS` and `OLDTIMEZONES` for backwards compatibility,
but print out a warning notifying users that they should use the new
variables, in an effort to migrate them to the variables. This is being
done mostly for automated build tools, etc, that might rely on these
variables being set. The variables will be removed in the future on
^/head, e.g., after ^/stable/12 is cut.

Relnotes:       yes

r320703:

Add tests to help verify Links functionality for .../contrib/tzdata/backwards

MFC with:	r320702
2017-08-05 16:44:31 +00:00
Edward Tomasz Napierala 2c9429358b MFC r320671:
Use more canonical .Dt for vt(4).
2017-08-05 09:42:44 +00:00
Edward Tomasz Napierala 8e42cdf534 MFC r319774:
Improve formatting by removing yet another case of '-width ".Pa'.
2017-08-05 09:40:04 +00:00
Edward Tomasz Napierala 7cce32d753 MFC r319775:
/usr/share/doc/bind is gone since 20040925.
2017-08-05 09:39:15 +00:00
Edward Tomasz Napierala 1ea4b9dc44 MFC r319499:
Consistently use lowercase hex numbers in ascii(7).
2017-08-05 09:38:15 +00:00
Edward Tomasz Napierala 45ba2d0464 MFC r318182:
Improve build(7): add missing "buildkernel" and "installkernel"
to the example, change the architectures to something more common,
and improve description of defaults for TARGET.
2017-08-05 09:32:03 +00:00
Alexander Motin dbce1d6f1e MFC r320604, r320865:
Switch fabric scans from GID_FT to GID_PT+GFF_ID/GFT_ID.

Instead of using GID_FT SNS request to get list of registered FCP ports,
use GID_PT to get list of all Nx_Ports, and then use GFF_ID and/or GFT_ID
requests to find whether they are FCP and target capable.

The problem with old approach is that GID_FT does not report ports without
FC-4 type registered.  In particular it was impossible to boot OS from
FreeBSD FC target using QLogic FC BIOS, since one does not register FC-4
type even on new cards and so ignored by old code as incompatible.

As a side bonus this allows initiator to skip pointless logins to other
initiators by fetching that information from SNS instead.

In case some switches do not implement GFF_ID/GFT_ID correctly, add sysctls
to disable that functionality.  I handled broken GFF_ID of my Brocade 200E,
but there may be other switches with different bugs.

Linux also uses GID_PT, but GFF_ID is disabled by default there, and GFT_ID
is not supported.

Sponsored by:	iXsystems, Inc.
2017-08-01 13:03:06 +00:00
Enji Cooper 5198dd2220 MFC r320441,r320442:
r320441:

share/examples/tests/Makefile: clean up example snippets/documentation

- TESTSDIR doesn't need to be specified after r289158.
- Including bsd.own.mk isn't required since no MK_<foo> knobs are being
  manipulated.
- TESTS_SUBDIRS should be written out in an append format, one entry
  per line, to provide a better, more conflict resistant example.

r320442:

share/examples/tests/{atf,plain}/Makefile: tweak example Makefile snippets

- Including bsd.own.mk isn't required since no MK_<foo> knobs are being
  manipulated.
- Update documentation to note that ${FILES} is installed via bsd.progs.mk,
  not bsd.prog.mk.
2017-07-28 03:32:36 +00:00
Enji Cooper b2cf61094c MFC r320443,r320444:
r320443:

Add kyua TAP test integration examples

The examples are patterned loosely after the ATF examples, similar
to the plain test examples.

r320444:

Commit the corresponding mtree file change for the TAP test examples

MFC with:	r320443
2017-07-28 03:27:41 +00:00
Enji Cooper c27487ac90 MFC r314543:
Add missing section when referencing ctl(4) via .Xr macro
2017-07-20 01:07:51 +00:00
Enji Cooper 1afb5ee8d6 MFC note: content changes based on r309745 not included.
MFC r315799:

counter(9): fix igor/manlint warnings

- Reword description of `counter_enter` slightly to fix
  wordiness [1].
- Expand "isn't" as "is not" [1].
- Add missing section number with .Xr sysctl calls [2].
2017-07-19 19:02:06 +00:00
Enji Cooper 2c8f4c2254 MFC note: cnv(9) diff ignored since API/manpage not present on
^/stable/11.

MFC r309066:

r309066 (by brueffer):

Fix various mdoc issues reported by mandoc -Tlint.
2017-07-19 18:59:26 +00:00
Enji Cooper 4c7857726f MFC r316549,r316550,r316551,r316554:
r316549:

Add sys/types.h #include to EXAMPLE to provide a complete functional
standalone example program

r316550:

sbuf(9): convert SYNOPSIS section from .Fn entries to .Fo/.Fa/.Fc entries

This shortens the column count on many lines considerably.

While here, add "(void)" to sbuf_new_auto(3) for consistency with style(9)
recommendations.

r316551:

sbuf(9): clarify kernel-only APIs

- move sbuf_bcopyin(9) and sbuf_copyin(9) near sbuf_new_for_sysctl(9), as
  all three functions are kernel-only APIs.
- add #ifdef _KERNEL around sbuf_*copyin and sbuf_new_for_sysctl(9) to
  make it visually clear that they are kernel-only APIs.

r316554:

sbuf(9): add MLINKS for sbuf_{clear,get,set}_flags(9)

These functions were added in r279992.
2017-07-18 08:28:37 +00:00
Enji Cooper 89cc4cdf44 MFC r307873,r314397,r314399,r314419,r314420,r314533,r316553:
r307873 (by marcel):

Include <stdarg.h> instead of <machine/stdarg.h> when compiled as
part of libsbuf. The former is the standard header, and allows us
to compile libsbuf on macOS/linux.

r314397 (by scottl):

Implement sbuf_prf(), which takes an sbuf and outputs it
to stdout in the non-kernel case and to the console+log
in the kernel case.  For the kernel case it hooks the
putbuf() machinery underneath printf(9) so that the buffer
is written completely atomically and without a copy into
another temporary buffer.  This is useful for fixing
compound console/log messages that become broken and
interleaved when multiple threads are competing for the
console.

r314399 (by scottl):

Add prototype for sbuf_putbuf()

r314419 (by jkim):

Include stdio.h to fix libsbuf build.

r314420 (by scottl):

Provide a comment on why stdio.h needs to be included.

r314533 (by scottl):

Expose the sbuf_putbuf() symbol to libsbuf.  There are a few other symbols
that are present but not exposed, like get/set/clear flags, not sure if they
need to be exposed at this point.

r316553:

sbuf(3): expose sbuf_{clear,get,set}_flags(3) via libsbuf

These functions were added to sbuf(9) in r279992, but never
exposed to userspace. Expose them now so they can be used/tested.
2017-07-18 06:45:13 +00:00
Xin LI df1f320d34 MFC r320986:
Update arcmsr(4) to 1.40.00.00 in order to add support of
ARC-1884 SATA RAID controllers.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by:	黃清隆 <ching2048 areca com tw>
2017-07-17 02:52:02 +00:00
Baptiste Daroussin ca09c9bce2 MFC r320988:
Update pci_vendors to 2017.07.13
2017-07-16 16:51:38 +00:00
Konstantin Belousov 6d2f6c8068 MFC r320755,r320762,r320893:
BIT_FLS(9).
2017-07-13 08:29:01 +00:00
John Baldwin 2e095c3aef Add deprecation notices for various device drivers removed in 12.0.
This is a direct commit to stable/11 since these files have already
been removed in head.

Reviewed by:	sbruno, gjb
Differential Revision:	https://reviews.freebsd.org/D11542
2017-07-12 20:10:53 +00:00