Commit Graph

16691 Commits

Author SHA1 Message Date
Mark Johnston
d912066c36 Add a src.conf option to build and install the DTrace test suite.
Reviewed by:	gnn, ngie
Differential Revision:	https://reviews.freebsd.org/D3195
2015-08-02 00:37:33 +00:00
John-Mark Gurney
94d919b999 mark this function as deprecated, and put the warning first, since I
doubt most people will read to the end...  Note the use of sys/cdefs.h
for pre-C11 compilers...

I didn't included a note about being compatibile w/ userland since a
C11 feature should be obviously usable in userland...

Suggested by:	imp
2015-08-02 00:22:14 +00:00
Jason Unovitch
994cfa1f63 - Add myself to the committers-ports.dot and add my mentor relationship.
- Add myself to the calendar.freebsd.

Approved by:	delphij (mentor)
Differential Revision:	https://reviews.FreeBSD.org/D3265
2015-08-01 17:29:52 +00:00
John-Mark Gurney
215397449a The implementation note isn't true anymore..
Not that anyone reads it, but those that do, remind them that this
isn't usable in userland...  I can't wait till this doc is wrong..
2015-07-31 03:28:02 +00:00
Christian Brueffer
703a08b23c The kernel option and module are actually called pmspcv.
MFC after:	3 days
2015-07-30 19:08:23 +00:00
Allan Jude
91ed97ddd8 Updat the committers graph
Approved by:	marcel (mentor)
Differential Revision:	https://reviews.freebsd.org/D3251
2015-07-30 17:02:23 +00:00
Ed Maste
6974dd6f4b Use default CLANG build options for ARM
We previously disabled CLANG_FULL on (little-endian) ARM because the
build failed.  This is no longer the case and as of Clang 3.5 we cannot
build any part of the in-tree Clang with in-tree GCC, so it's no longer
necessary to disable CLANG_FULL.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2525
2015-07-29 19:06:53 +00:00
Ed Maste
5be09b1082 Regenerate src.conf(5) after r286016 and r286030 2015-07-29 18:55:51 +00:00
Ed Maste
5ea9e83e2f Allow ELF Tool Chain elfcopy to be installed as objcopy
ELF Tool Chain elfcopy is nearly a drop-in replacement for GNU objcopy,
but does not currently support PE output which is needed for building
x86 UEFI bits.

Add a src.conf knob to allow installing it as objcopy and set it by
default for aarch64 only, where we don't have a native binutils.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2887
2015-07-29 18:45:38 +00:00
Christian Brueffer
8843746ab4 Remove the AUTHORS section until it's clear who exactly wrote the driver. 2015-07-29 16:37:36 +00:00
Warner Losh
aa255ef6dd Teach sysctl about the new optional suffix after IK to specify
precision. Update input as well. Add IK to the manual (it was missing
completely).

Differential Revision: https://reviews.freebsd.org/D3181
2015-07-29 02:34:25 +00:00
Michael Gmelin
ca2e4ecd73 isl(4), driver for Intersil I2C ISL29018 Digital Ambient Light Sensor
Differential Revision:	https://reviews.freebsd.org/D2811
Reviewed by:	adrian, wblock
Approved by:	adrian, wblock
Relnotes:	yes
2015-07-25 20:17:19 +00:00
Michael Gmelin
46f07718f7 cyapa(4), driver for the Cypress APA I2C trackpad
Differential Revision:	https://reviews.freebsd.org/D3068
Reviewed by:	kib, wblock
Approved by:	kib
Relnotes:	yes
2015-07-25 18:14:35 +00:00
Edward Tomasz Napierala
208a8b9532 Update Capsicum and Mandatory Access Control manual pages
to no longer claim they are experimental.

Reviewed by:	rwatson@, wblock@
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D2985
2015-07-25 15:56:49 +00:00
Kristof Provost
e600320b2a Pf can reassemble IPv6 fragments now.
Obtained from: bluhm (OpenBSD)
Sponsored by: Essen FreeBSD Hackathon
2015-07-25 14:06:32 +00:00
Christian Brueffer
79cdd7a420 Add a basic manpage for the pms driver.
MFC after:	1 week
Committed from:	Essen FreeBSD Hackathon
2015-07-24 21:48:53 +00:00
Brooks Davis
bdf80fecf0 Document the fact that tunables can be set in device.hints.
Reviewed by:	wblock
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D3153
2015-07-23 17:27:10 +00:00
Marcel Moolenaar
be00e09818 Check the hw.proto.attach environment variable for devices that
proto(4) should attach to instead of the normal driver.

Document the variable.
2015-07-19 23:37:45 +00:00
Edward Tomasz Napierala
bd425507b7 Expand sysctl descriptions in iscsi(4) and ctl(4).
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2015-07-18 15:27:12 +00:00
Ed Schouten
50f960e60e Fix a small typo: "the the".
Spotted by:	wblock
2015-07-16 15:43:55 +00:00
Ed Schouten
707d98fe2f Implement the CloudABI random_get() system call.
The random_get() system call works similar to getentropy()/getrandom()
on OpenBSD/Linux. It fills a buffer with random data.

This change introduces a new function, read_random_uio(), that is used
to implement read() on the random devices. We can call into this
function from within the CloudABI compatibility layer.

Approved by:	secteam
Reviewed by:	jmg, markm, wblock
Obtained from:	https://github.com/NuxiNL/freebsd
Differential Revision:	https://reviews.freebsd.org/D3053
2015-07-14 18:45:15 +00:00
Christian Brueffer
9870187435 Markup fixes. 2015-07-13 15:26:03 +00:00
Christian Brueffer
647cdd025a Fix a typo and duplicate word. 2015-07-13 14:25:15 +00:00
Mark Murray
3aa77530ca * Address review (and add a bit myself).
- Tweek man page.
 - Remove all mention of RANDOM_FORTUNA. If the system owner wants YARROW or DUMMY, they ask for it, otherwise they get FORTUNA.
 - Tidy up headers a bit.
 - Tidy up declarations a bit.
 - Make static in a couple of places where needed.
 - Move Yarrow/Fortuna SYSINIT/SYSUNINIT to randomdev.c, moving us towards a single file where the algorithm context is used.
 - Get rid of random_*_process_buffer() functions. They were only used in one place each, and are better subsumed into those places.
 - Remove *_post_read() functions as they are stubs everywhere.
 - Assert against buffer size illegalities.
 - Clean up some silly code in the randomdev_read() routine.
 - Make the harvesting more consistent.
 - Make some requested argument name changes.
 - Tidy up and clarify a few comments.
 - Make some requested comment changes.
 - Make some requested macro changes.

* NOTE: the thing calling itself a 'unit test' is not yet a proper
  unit test, but it helps me ensure things work. It may be a proper
  unit test at some time in the future, but for now please don't make
  any assumptions or hold any expectations.

Differential Revision:	https://reviews.freebsd.org/D2025
Approved by:	so (/dev/random blanket)
2015-07-12 18:14:38 +00:00
Adrian Chadd
6520495abc Add an initial NUMA affinity/policy configuration for threads and processes.
This is based on work done by jeff@ and jhb@, as well as the numa.diff
patch that has been circulating when someone asks for first-touch NUMA
on -10 or -11.

* Introduce a simple set of VM policy and iterator types.
* tie the policy types into the vm_phys path for now, mirroring how
  the initial first-touch allocation work was enabled.
* add syscalls to control changing thread and process defaults.
* add a global NUMA VM domain policy.
* implement a simple cascade policy order - if a thread policy exists, use it;
  if a process policy exists, use it; use the default policy.
* processes inherit policies from their parent processes, threads inherit
  policies from their parent threads.
* add a simple tool (numactl) to query and modify default thread/process
  policities.
* add documentation for the new syscalls, for numa and for numactl.
* re-enable first touch NUMA again by default, as now policies can be
  set in a variety of methods.

This is only relevant for very specific workloads.

This doesn't pretend to be a final NUMA solution.

The previous defaults in -HEAD (with MAXMEMDOM set) can be achieved by
'sysctl vm.default_policy=rr'.

This is only relevant if MAXMEMDOM is set to something other than 1.
Ie, if you're using GENERIC or a modified kernel with non-NUMA, then
this is a glorified no-op for you.

Thank you to Norse Corp for giving me access to rather large
(for FreeBSD!) NUMA machines in order to develop and verify this.

Thank you to Dell for providing me with dual socket sandybridge
and westmere v3 hardware to do NUMA development with.

Thank you to Scott Long at Netflix for providing me with access
to the two-socket, four-domain haswell v3 hardware.

Thank you to Peter Holm for running the stress testing suite
against the NUMA branch during various stages of development!

Tested:

* MIPS (regression testing; non-NUMA)
* i386 (regression testing; non-NUMA GENERIC)
* amd64 (regression testing; non-NUMA GENERIC)
* westmere, 2 socket (thankyou norse!)
* sandy bridge, 2 socket (thankyou dell!)
* ivy bridge, 2 socket (thankyou norse!)
* westmere-EX, 4 socket / 1TB RAM (thankyou norse!)
* haswell, 2 socket (thankyou norse!)
* haswell v3, 2 socket (thankyou dell)
* haswell v3, 2x18 core (thankyou scott long / netflix!)

* Peter Holm ran a stress test suite on this work and found one
  issue, but has not been able to verify it (it doesn't look NUMA
  related, and he only saw it once over many testing runs.)

* I've tested bhyve instances running in fixed NUMA domains and cpusets;
  all seems to work correctly.

Verified:

* intel-pcm - pcm-numa.x and pcm-memory.x, whilst selecting different
  NUMA policies for processes under test.

Review:

This was reviewed through phabricator (https://reviews.freebsd.org/D2559)
as well as privately and via emails to freebsd-arch@.  The git history
with specific attributes is available at https://github.com/erikarn/freebsd/
in the NUMA branch (https://github.com/erikarn/freebsd/compare/local/adrian_numa_policy).

This has been reviewed by a number of people (stas, rpaulo, kib, ngie,
wblock) but not achieved a clear consensus.  My hope is that with further
exposure and testing more functionality can be implemented and evaluated.

Notes:

* The VM doesn't handle unbalanced domains very well, and if you have an overly
  unbalanced memory setup whilst under high memory pressure, VM page allocation
  may fail leading to a kernel panic.  This was a problem in the past, but it's
  much more easily triggered now with these tools.

* This work only controls the path through vm_phys; it doesn't yet strongly/predictably
  affect contigmalloc, KVA placement, UMA, etc.  So, driver placement of memory
  isn't really guaranteed in any way.  That's next on my plate.

Sponsored by:	Norse Corp, Inc.; Dell
2015-07-11 15:21:37 +00:00
John-Mark Gurney
f405d8eb61 some additional improvements to the documentation...
Sponsored by:	Netflix, Inc.
2015-07-11 04:20:56 +00:00
John-Mark Gurney
94b591186d yet more documentation improvements... Many changes were made to the
OCF w/o documentation...

Document the new (8+ year old) device_t way of handling things, that
_unregister_all will leave no threads in newsession, the _SYNC flag,
the requirement that a flag be specified...

Other minor changes like breaking up a wall of text into paragraphs...
2015-07-08 22:46:45 +00:00
Baptiste Daroussin
f9b9c07087 Fix typo which breaks build of manpages when WITHOUT_MANCOMPRESS is set
PR:		201153
Reported by:	Andriy Voskoboinyk <s3erios@gmail.com>
2015-07-08 22:24:55 +00:00
Patrick Kelsey
fe3ff217dd Replace use of .Po Pc with the preferred .Pq for single line
enclosures in iovctl.conf(5), iovctl(8), pci(9), and
pci_iov_schema(9).

Differential Revision: https://reviews.freebsd.org/D3000
Reviewed by: wblock
Approved by: jmallett (mentor)
2015-07-08 16:16:44 +00:00
Conrad Meyer
80f295a415 Add myself to committers-src.dot
Approved by:	markj (mentor)
2015-07-08 03:20:28 +00:00
Warner Losh
abb14e5ded The results of the vote are in. This reflects that vote. Single
line statements inside of braces is recognized as an acceptable
style.
	http://reviews.freebsd.org/V3
As always, this isn't license for wholesale change, etc.
2015-07-06 20:10:47 +00:00
Mark Johnston
363f89481b Remove a BUGS entry that was addressed by r282300. 2015-07-05 23:24:52 +00:00
Mark Johnston
4b4ad3a219 Rename the dtrace-* man pages to dtrace_* for consistency with other
subsection man pages (e.g. geom_*, mac_*, snd_*).
2015-07-05 23:23:12 +00:00
Konstantin Belousov
e6e979f5d0 Document the locking context for the directly dispatched callouts.
Cross-reference timeout(9).

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-07-05 19:29:24 +00:00
Mariusz Zaborski
58c86148dd Move nvlist documentation to the FreeBSD Kernel Developer's sections.
Approved by:	pjd (mentor)
2015-07-04 10:27:30 +00:00
Julio Merino
30161d035c Add support for TEST_METADATA
Allow Makefiles to define generic metadata settings that apply to all test
programs defined by a Makefile.  The generic TEST_METADATA variable extends
the per-test program settings already supported via TEST_METADATA.<program>.

This feature will be useful to easily apply some settings to all programs
in a directory.  In particular, Kyua 0.12 will support parallel execution
of test programs and a bunch of them will need to be tagged as is_exclusive
to indicate that they cannot be run in parallel with anything else due to
their side-effects.  It will be reasonable to set this setting on whole
directories.

MFC after:	1 week
2015-07-04 02:37:36 +00:00
Julio Merino
18bafc4da9 Add missing shebang
Plain test programs are not preprocessed by the build system (as opposed to
ATF test cases, which automatically gain a shebang pointing at atf-sh), so
we must take care of providing the shebang ourselves.

I'm not sure why this was not causing problems with Kyua 0.11, but the
upcoming 0.12 release chokes on this particular issue.

MFC after:	1 week
2015-07-04 02:24:47 +00:00
Edward Tomasz Napierala
a2c782d103 Make ctl(4) appear in "man -k iscsi" results.
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-07-03 16:55:08 +00:00
Marcel Moolenaar
15abbe5137 Minor update to the proto(4) man page:
1.  We now support ISA devices
2.  DMA support has been added
2015-07-03 16:20:14 +00:00
John-Mark Gurney
e08d13cf83 more word smithing wrt the crd_inject field...
We've already defined IV earlier, so no need to expand it a second
time here...
2015-07-03 01:55:06 +00:00
John-Mark Gurney
2ca5eb5d2d update the documentation of the _IV_ flags... _IV_PRESENT doesn't
mean what you think it should...  This will be fixed in the future
with a flag rename, but document what the flag really does and make
the _IV_ flags clear what their presents (or lack there of) means...

Reviewed by:	gnn, eri (both earlier version)
2015-07-03 00:37:16 +00:00
Andrew Turner
5607ec2379 Set MACHINE_CPU to arm64 when building for arm64. This is needed by the
ports tree as they check this value in a number of ports.

PR:		201259
Sponsored by:	ABT Systems Ltd
2015-07-02 13:42:57 +00:00
John-Mark Gurney
0812640475 add units to the length and count so that it's clear what they
are measured in...  Gems like: "len is the length of the buffer."
aren't useful in man pages.
2015-06-30 19:06:14 +00:00
Hiren Panchasara
5341316696 Add missing DTrace scripts that exist in the source tree to the Makefile for
install.
While here, sort the list.

Differential Revision:	D2950
Submitted by:		Jason Wolfe <j at nitrology.com>
Reviewed by:		gnn, markj, hiren
Sponsored by:		Limelight Networks
2015-06-30 18:23:08 +00:00
Mark Murray
c4f9c760c9 Updated random(4) boot/shutdown scripting.
Fix the man pages as well.

Differential Revision: https://reviews.freebsd.org/D2924
Approved by: so (delphij)
2015-06-30 17:09:41 +00:00
Mark Murray
d1b06863fb Huge cleanup of random(4) code.
* GENERAL
- Update copyright.
- Make kernel options for RANDOM_YARROW and RANDOM_DUMMY. Set
  neither to ON, which means we want Fortuna
- If there is no 'device random' in the kernel, there will be NO
  random(4) device in the kernel, and the KERN_ARND sysctl will
  return nothing. With RANDOM_DUMMY there will be a random(4) that
  always blocks.
- Repair kern.arandom (KERN_ARND sysctl). The old version went
  through arc4random(9) and was a bit weird.
- Adjust arc4random stirring a bit - the existing code looks a little
  suspect.
- Fix the nasty pre- and post-read overloading by providing explictit
  functions to do these tasks.
- Redo read_random(9) so as to duplicate random(4)'s read internals.
  This makes it a first-class citizen rather than a hack.
- Move stuff out of locked regions when it does not need to be
  there.
- Trim RANDOM_DEBUG printfs. Some are excess to requirement, some
  behind boot verbose.
- Use SYSINIT to sequence the startup.
- Fix init/deinit sysctl stuff.
- Make relevant sysctls also tunables.
- Add different harvesting "styles" to allow for different requirements
  (direct, queue, fast).
- Add harvesting of FFS atime events. This needs to be checked for
  weighing down the FS code.
- Add harvesting of slab allocator events. This needs to be checked for
  weighing down the allocator code.
- Fix the random(9) manpage.
- Loadable modules are not present for now. These will be re-engineered
  when the dust settles.
- Use macros for locks.
- Fix comments.

* src/share/man/...
- Update the man pages.

* src/etc/...
- The startup/shutdown work is done in D2924.

* src/UPDATING
- Add UPDATING announcement.

* src/sys/dev/random/build.sh
- Add copyright.
- Add libz for unit tests.

* src/sys/dev/random/dummy.c
- Remove; no longer needed. Functionality incorporated into randomdev.*.

* live_entropy_sources.c live_entropy_sources.h
- Remove; content moved.
- move content to randomdev.[ch] and optimise.

* src/sys/dev/random/random_adaptors.c src/sys/dev/random/random_adaptors.h
- Remove; plugability is no longer used. Compile-time algorithm
  selection is the way to go.

* src/sys/dev/random/random_harvestq.c src/sys/dev/random/random_harvestq.h
- Add early (re)boot-time randomness caching.

* src/sys/dev/random/randomdev_soft.c src/sys/dev/random/randomdev_soft.h
- Remove; no longer needed.

* src/sys/dev/random/uint128.h
- Provide a fake uint128_t; if a real one ever arrived, we can use
  that instead. All that is needed here is N=0, N++, N==0, and some
  localised trickery is used to manufacture a 128-bit 0ULLL.

* src/sys/dev/random/unit_test.c src/sys/dev/random/unit_test.h
- Improve unit tests; previously the testing human needed clairvoyance;
  now the test will do a basic check of compressibility. Clairvoyant
  talent is still a good idea.
- This is still a long way off a proper unit test.

* src/sys/dev/random/fortuna.c src/sys/dev/random/fortuna.h
- Improve messy union to just uint128_t.
- Remove unneeded 'static struct fortuna_start_cache'.
- Tighten up up arithmetic.
- Provide a method to allow eternal junk to be introduced; harden
  it against blatant by compress/hashing.
- Assert that locks are held correctly.
- Fix the nasty pre- and post-read overloading by providing explictit
  functions to do these tasks.
- Turn into self-sufficient module (no longer requires randomdev_soft.[ch])

* src/sys/dev/random/yarrow.c src/sys/dev/random/yarrow.h
- Improve messy union to just uint128_t.
- Remove unneeded 'staic struct start_cache'.
- Tighten up up arithmetic.
- Provide a method to allow eternal junk to be introduced; harden
  it against blatant by compress/hashing.
- Assert that locks are held correctly.
- Fix the nasty pre- and post-read overloading by providing explictit
  functions to do these tasks.
- Turn into self-sufficient module (no longer requires randomdev_soft.[ch])
- Fix some magic numbers elsewhere used as FAST and SLOW.

Differential Revision: https://reviews.freebsd.org/D2025
Reviewed by: vsevolod,delphij,rwatson,trasz,jmg
Approved by: so (delphij)
2015-06-30 17:00:45 +00:00
Maxim Konovalov
2a52334e0b o DragonFly 4.2.0 added. 2015-06-30 07:46:06 +00:00
Sean Bruno
8971c13ffa Delete the refernce to VLAN handling being disabled by default. This is
no longer the case.

PR:		118693
MFC after:	3 days
2015-06-29 17:59:00 +00:00
Christian Brueffer
d14a50d95a Fix issues that kept some of the examples from actually working.
PR:		144534
Submitted by:	Nicolas Edel
MFC after:	1 week
2015-06-29 14:41:19 +00:00
Hans Petter Selasky
38b622e199 Make the system queue header file fully usable within C++ programs by
adding macros to define class lists.

This change is backwards compatible for all use within C and C++
programs. Only C++ programs will have added support to use the queue
macros within classes. Previously the queue macros could only be used
within structures.

The queue.3 manual page has been updated to describe the new
functionality and some alphabetic sorting has been done while
at it.

Differential Revision:	https://reviews.freebsd.org/D2745
PR:			200827 (exp-run)
MFC after:		2 weeks
2015-06-28 21:06:45 +00:00
Matthew Seaman
4311777e58 Steve KArgl's commit bit taken in at his own request
With hat:     core-secretary
Approved by:	core
2015-06-28 09:03:26 +00:00
Baptiste Daroussin
af38028d11 Make all shared library a relative symlink
This makes sysroot usable for cross building, it also removes the need for
_SHLIBDIRPREFIX (keeps its definition since picobsd uses it and I have no time
to test it)

Differential Revision:	https://reviews.freebsd.org/D2920
Submitted by:	imp, adrian
Tested by:	adrian
2015-06-27 23:28:56 +00:00
Andrew Turner
61b9bd2303 Sort the cpu architectures by name rather than a combination of
alphabetical order and appending new architectures to the end of the list.

Obtained from:	ABT Systems Ltd
Sponsored by:	The FreeBSD Foundation
2015-06-25 16:47:11 +00:00
Ermal Luçi
a5b789f65a ALTQ FAIRQ discipline import from DragonFLY
Differential Revision:  https://reviews.freebsd.org/D2847
Reviewed by:    glebius, wblock(manpage)
Approved by:    gnn(mentor)
Obtained from:  pfSense
Sponsored by:   Netgate
2015-06-24 19:16:41 +00:00
Kevin Lo
2907b9f461 Mention that using ports/net/malo-firmware-kmod to install the firmware. 2015-06-24 09:28:43 +00:00
Simon J. Gerraty
cc2520d2f3 Fix generation of src.conf.5
Since makeman turns all options on, we need to guard somethings from
make(showconfig)
2015-06-22 20:21:57 +00:00
Simon J. Gerraty
7090067b2a Appy := to dependent opts once value determined.
This is needed to fix output from 'make showconfig'
2015-06-22 19:01:09 +00:00
Baptiste Daroussin
a82117a6af Simplify code to install manpages and it symlinks
Use the bmake's .for multi variable loops to simplify and make the code more
readable
2015-06-21 22:42:55 +00:00
Baptiste Daroussin
5428abe13d Simplify symlinks on include files by using bmake's multivariable .for loops 2015-06-21 22:27:52 +00:00
Edward Tomasz Napierala
c6ba08803a Expand sysctls descriptions for iscsi(4) and ctl(4).
Differential Revision:	https://reviews.freebsd.org/D2876
Reviewed by:	wblock@
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
2015-06-21 14:21:38 +00:00
Simon J. Gerraty
916c1cd0ab Deal with MAKEOBJDIRPREFIX
MAKEOBJDIRPREFIX does not really fit our model.
Use it to set OBJROOT to about where user expects
and set MAKEOBJDIR to do what we want.
2015-06-20 21:48:07 +00:00
Konstantin Belousov
7705435606 The barriers, provided by _acq and _rel atomics, are acquire and
release barriers, not read and write barriers.  They fence all memory
accesses from the respective side, not limited by the kind of
operation.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2015-06-20 17:18:46 +00:00
Baptiste Daroussin
729c67f5a7 Use .CURDIR in soelim's include path instead of SRCDIR
This fixes build when a user has defined SRCDIR in make.conf as required by
some ports
2015-06-20 00:17:57 +00:00
Baptiste Daroussin
d586a8e4ae Readd merge.awk forgotten while importing the old vi documentation directly into
the tree.

Do not rely on SRCDIR to find the merge.awk script but use .CURDIR
Fix a long standing bug making the generated documents never including the index
2015-06-20 00:13:28 +00:00
Xin LI
10b942e5d3 Fix markups and change e.g./eg. to e.g.,.
MFC after:	2 weeks
2015-06-19 21:35:56 +00:00
Xin LI
908e4e9754 Fix markups.
MFC after:	2 weeks
2015-06-19 21:35:24 +00:00
Warner Losh
196f0f2b53 Back out contested change until dispute is resolved. This proved to be
more contentious than I expected.
2015-06-19 21:30:45 +00:00
Xin LI
fdc84efdd1 Document kern.cam.ada.legacy_aliases, while I'm there also fix some typos.
MFC after:	2 weeks
2015-06-19 21:26:06 +00:00
Simon J. Gerraty
daf514d0bb Move include of make.conf back to its old position.
This means moving include of local.sys.mk and src.sys.mk too.
Introduce new includes to take the early slot, for the purpose
of being able to influence toolchains and the like.

Differential Revision:	D2860
Reviewed by:	imp
2015-06-19 14:56:24 +00:00
Christian Brueffer
61d010fae9 Document title should be in CAPS. 2015-06-18 16:31:32 +00:00
Christian Brueffer
cf28e39c96 Remove EOL whitespace. 2015-06-18 16:29:11 +00:00
Neel Natu
9b1aa8d622 Restructure memory allocation in bhyve to support "devmem".
devmem is used to represent MMIO devices like the boot ROM or a VESA framebuffer
where doing a trap-and-emulate for every access is impractical. devmem is a
hybrid of system memory (sysmem) and emulated device models.

devmem is mapped in the guest address space via nested page tables similar
to sysmem. However the address range where devmem is mapped may be changed
by the guest at runtime (e.g. by reprogramming a PCI BAR). Also devmem is
usually mapped RO or RW as compared to RWX mappings for sysmem.

Each devmem segment is named (e.g. "bootrom") and this name is used to
create a device node for the devmem segment (e.g. /dev/vmm/testvm.bootrom).
The device node supports mmap(2) and this decouples the host mapping of
devmem from its mapping in the guest address space (which can change).

Reviewed by:	tychon
Discussed with:	grehan
Differential Revision:	https://reviews.freebsd.org/D2762
MFC after:	4 weeks
2015-06-18 06:00:17 +00:00
Warner Losh
c97426f4d7 Bump date.
Submitted by: Xin Li
2015-06-17 22:06:27 +00:00
Warner Losh
b6c9950099 Update style.9 to reflect consensus on developer's mailing list
allowing redundant braces.

Differential Revision: https://reviews.freebsd.org/D2842
2015-06-17 21:25:36 +00:00
Simon J. Gerraty
2ef6d5a7b9 new depends 2015-06-16 23:37:19 +00:00
Simon J. Gerraty
da27fc718f Normally a staging conflict causes an error.
When bootstrapping different options, it is handy to be able to
make those warnings.
2015-06-16 23:06:43 +00:00
Warner Losh
32c88b5252 Remove old fmake. It wasn't built by default for some time. Users that
really need it can find it in the devel/fmake port or pkg install fmake.
Note: This commit is orthogonal to the question 'can we fmake buildworld'.

Differential Revision: https://reviews.freebsd.org/D2840
2015-06-16 20:58:33 +00:00
Sergey Kandaurov
ccc785556c Deshallify. 2015-06-15 23:30:54 +00:00
Baptiste Daroussin
c0b575998b Register libpanel into the available libraries 2015-06-15 21:20:21 +00:00
Simon J. Gerraty
31277fe3a0 Skip MAKE_PRINT_VAR_ON_ERROR unless we are doing META_MODE
with all the recursion in normal build it is too much noise.
2015-06-15 21:09:18 +00:00
Simon J. Gerraty
c1cb0d799b do not include src.opts.mk from here 2015-06-15 19:23:47 +00:00
Enji Cooper
c4af37bb9a Ensure TESTSDIR is defined before bsd.test.mk is .include'd
MFC after: 1 week
2015-06-15 07:13:23 +00:00
Enji Cooper
61099d9aab Remove ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support from atf.test.mk
The legacy atf tools were removed in atf 0.20

MFC after: 2 weeks
2015-06-15 06:38:59 +00:00
Simon J. Gerraty
8311337d35 Avoid trailing white-space 2015-06-14 03:28:48 +00:00
Simon J. Gerraty
704b4cac9d Watch out for bin/cat in host stage tree 2015-06-14 03:28:25 +00:00
Simon J. Gerraty
71c66d9edc Avoid anoying warning 2015-06-14 03:27:22 +00:00
Adrian Chadd
26b05dff32 Fix incorrect library path. 2015-06-13 22:36:42 +00:00
Simon J. Gerraty
fe137a9992 We no longer need CSU_DIR.i386
and until there is an alternative we need MK_INSTALL_AS_USER=yes
2015-06-13 19:52:35 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
4b9775d88c Use ${CRUNCHGEN} rather than bare word.
Reviewed by: brooks
2015-06-13 15:36:13 +00:00
Simon J. Gerraty
122b6b61c7 Get rid of some more NO_OBJs
Differential Revision:       D2748
2015-06-12 14:30:27 +00:00
Christian Brueffer
cf804e4e0d Language cleanup.
Noticed during wblock's manpage walkthrough at BSDCan 2015.
2015-06-12 00:02:31 +00:00
Simon J. Gerraty
ab21b9ab84 Do not override variables on command line that build needs to change.
It is sufficient to explicitly set DEPENDFILE in env for each sub-make.
2015-06-11 21:11:33 +00:00
Simon J. Gerraty
d083cb1104 Ensure SYMLINKS fully specified
Differential Revision:       D2748
Reviewed by: brooks
2015-06-11 21:09:03 +00:00
Christian Brueffer
471481d4f2 Add a ugold(4) manpage, adapted from the OpenBSD one. 2015-06-11 19:06:58 +00:00
Jung-uk Kim
87964f0e7c Regen for r284274. 2015-06-11 17:21:27 +00:00
Andrew Turner
d1f83b466c Enable clang on armeb, it is now able to build targeting armeb. This is
the last arm platform to move away from gcc.

Tested by:	jmg
2015-06-11 16:49:14 +00:00
Simon J. Gerraty
e5b44e3743 With MK_AUTO_OBJ=yes objdir is created during sys.mk
If a makefile sets NO_OBJ, we should honor that by setting
.OBJDIR back to .CURDIR
2015-06-11 13:53:15 +00:00
Simon J. Gerraty
92f755617b For debugging we sometimes run makefiles forcing level > 0
Ensure setup that should have happened at level 0 is done.
2015-06-11 13:51:52 +00:00
Simon J. Gerraty
5b381db8cc Remove NO_OBJ
For meta mode we will want objdirs.

Differential Revision:	D2748
Reviewed by:	brooks imp
2015-06-11 04:22:17 +00:00
Simon J. Gerraty
10b60135a9 Mention what 'common' is for 2015-06-10 19:36:53 +00:00
Simon J. Gerraty
dccf7cedd2 combine two comments 2015-06-10 19:31:10 +00:00
Simon J. Gerraty
940a3032cb Explain in a nutshell why we destroy 2015-06-10 19:26:49 +00:00
Simon J. Gerraty
f5374544f1 Building on fmake is no longer possible so removed tests for bmake. 2015-06-10 18:14:38 +00:00
Simon J. Gerraty
4cc6b8394f If MK_AUTO_OBJ==yes, it is done before bsd.obj.mk included 2015-06-10 18:09:05 +00:00
Simon J. Gerraty
b589e6297b Remove extra blank lines 2015-06-10 14:08:36 +00:00
Simon J. Gerraty
b56a78b69e Let people use this with MAKEOBJDIRPREFIX if they really want to 2015-06-10 13:14:24 +00:00
Simon J. Gerraty
ee10d8d237 Remove extra line 2015-06-10 05:39:48 +00:00
Simon J. Gerraty
fbeda970cf remove extra line 2015-06-10 05:39:06 +00:00
Kenneth D. Merry
5672fac935 Add support for reading MAM attributes to camcontrol(8) and libcam(3).
MAM is Medium Auxiliary Memory and is most commonly found as flash
chips on tapes.

This includes support for reading attributes and decoding most
known attributes, but does not yet include support for writing
attributes or reporting attributes in XML format.

libsbuf/Makefile:
	Add subr_prf.c for the new sbuf_hexdump() function.  This
	function is essentially the same function.

libsbuf/Symbol.map:
	Add a new shared library minor version, and include the
	sbuf_hexdump() function.

libsbuf/Version.def:
	Add version 1.4 of the libsbuf library.

libutil/hexdump.3:
	Document sbuf_hexdump() alongside hexdump(3), since it is
	essentially the same function.

camcontrol/Makefile:
	Add attrib.c.

camcontrol/attrib.c:
	Implementation of READ ATTRIBUTE support for camcontrol(8).

camcontrol/camcontrol.8:
	Document the new 'camcontrol attrib' subcommand.

camcontrol/camcontrol.c:
	Add the new 'camcontrol attrib' subcommand.

camcontrol/camcontrol.h:
	Add a function prototype for scsiattrib().

share/man/man9/sbuf.9:
	Document the existence of sbuf_hexdump() and point users to
	the hexdump(3) man page for more details.

sys/cam/scsi/scsi_all.c:
	Add a table of known attributes, text descriptions and
	handler functions.

	Add a new scsi_attrib_sbuf() function along with a number
	of other related functions that help decode attributes.

	scsi_attrib_ascii_sbuf() decodes ASCII format attributes.

	scsi_attrib_int_sbuf() decodes binary format attributes, and
	will pass them off to scsi_attrib_hexdump_sbuf() if they're
	bigger than 8 bytes.

	scsi_attrib_vendser_sbuf() decodes the vendor and drive
	serial number attribute.

	scsi_attrib_volcoh_sbuf() decodes the Volume Coherency
	Information attribute that LTFS writes out.

sys/cam/scsi/scsi_all.h:
	Add a number of attribute-related structure definitions and
	other defines.

	Add function prototypes for all of the functions added in
	scsi_all.c.

sys/kern/subr_prf.c:
	Add a new function, sbuf_hexdump().  This is the same as
	the existing hexdump(9) function, except that it puts the
	result in an sbuf.

	This also changes subr_prf.c so that it can be compiled in
	userland for includsion in libsbuf.

	We should work to change this so that the kernel hexdump
	implementation is a wrapper around sbuf_hexdump() with a
	statically allocated sbuf with a drain.  That will require
	a drain function that goes to the kernel printf() buffer
	that can take a non-NUL terminated string as input.
	That is because an sbuf isn't NUL-terminated until it is
	finished, and we don't want to finish it while we're still
	using it.

	We should also work to consolidate the userland hexdump and
	kernel hexdump implemenatations, which are currently
	separate.  This would also mean making applications that
	currently link in libutil link in libsbuf.

sys/sys/sbuf.h:
	Add the prototype for sbuf_hexdump(), and add another copy
	of the hexdump flag values if they aren't already defined.

	Ideally the flags should be defined in one place but the
	implemenation makes it difficult to do properly.  (See
	above.)

Sponsored by:	Spectra Logic Corporation
MFC after:	1 week
2015-06-09 21:39:38 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
6251c65a82 Latest dirdeps.mk sets DEP_RELDIR for itself.
This helps guard against bugs in manually edited Makefile.depend
files, and avoids the need to call realpath from the Makefile.depend file.
2015-06-08 23:34:04 +00:00
Simon J. Gerraty
924b88f687 Watchout for bogus MAN 2015-06-08 23:32:27 +00:00
Andrey V. Elsukov
fcdb1ffc49 Add makefile to build geom_map kld. Document some GEOM_* options
in NOTES and geom(4).
2015-06-08 13:23:56 +00:00
Bernard Spil
07d93540fc Add myself (brnrd / Bernard Spil) to committers docs
- Add myself and vsevolod (mentor) to committers-ports.dot
- Add koobs and vsevolod as mentors to committers-ports.dot

Submitted by:	brnrd@freebsd.org
Approved by:	vsevolod (mentor), koobs (mentor)
Differential Revision: https://reviews.freebsd.org/D2648
2015-06-06 11:19:21 +00:00
Simon J. Gerraty
d800e67729 Add support for dependent options
Reviewed by:	imp
2015-06-06 01:18:28 +00:00
Andriy Gapon
2764d3bcdb bhyve/vmrun.sh: pass all existing readable disks to bhyveload(8)
This is done if the installation mode is not requested or auto-detected.
This is useful when a kernel has to be loaded from multiple disks.
For example from a RAID-Z pool or a ZFS pool with multiple top level
vdevs.

Differential Revision:	https://reviews.freebsd.org/D2723
Reviewed by:	neel
MFC after:	8 days
2015-06-05 15:16:26 +00:00
Andriy Gapon
2aa681ed31 bhyve/vmrun.sh: support passing disk options same as for bhyve(8)
Differential Revision:	https://reviews.freebsd.org/D2723
Reviewed by:	neel
MFC after:	8 days
2015-06-05 15:14:54 +00:00
Simon J. Gerraty
1e34437637 Add dependent option STAGING_MAN/STAGING
Use a single mlinks set, since some libs (eg. libc) do cross section
links.
2015-06-04 19:11:56 +00:00
Baptiste Daroussin
06d83c8266 In r282297 \fC was wrong changed to \fCW.) when it should have been \fCW
Reported by:	carsten.kunze@arcor.de (heirloom doctools)
2015-06-03 20:04:39 +00:00
Sean Bruno
23c9098b2a Change EM_MULTIQUEUE to a real kernconf entry and enable support for
up to 2 rx/tx queues for the 82574.

Program the 82574 to enable 5 msix vectors, assign 1 to each rx queue,
1 to each tx queue and 1 to the link handler.

Inspired by DragonFlyBSD, enable some RSS logic for handling tx queue
handling/processing.

Move multiqueue handler functions so that they line up better in a diff
review to if_igb.c

Always enqueue tx work to be done in em_mq_start, if unable to acquire
the TX lock, then this will be processed in the background later by the
taskqueue.  Remove mbuf argument from em_start_mq_locked() as the work
is always enqueued.  (stolen from igb)

Setup TARC, TXDCTL and RXDCTL registers for better performance and stability
in multiqueue and singlequeue implementations. Handle Intel errata  3 and
generic multiqueue behavior with the initialization of TARC(0) and TARC(1)

Bind interrupt threads to cpus in order.  (stolen from igb)

Add 2 new DDB functions, one to display the queue(s) and their settings and
one to reset the adapter.  Primarily used for debugging.

In the multiqueue configuration, bump RXD and TXD ring size to max for the
adapter (4096).  Setup an RDTR of 64 and an RADV of 128 in multiqueue configuration
to cut down on the number of interrupts.  RADV was arbitrarily set to 2x RDTR
and can be adjusted as needed.

Cleanup the display in top a bit to make it clearer where the taskqueue threads
are running and what they should be doing.

Ensure that both queues are processed by em_local_timer() by writing them both
to the IMS register to generate soft interrupts.

Ensure that an soft interrupt is generated when em_msix_link() is run so that
any races between assertion of the link/status interrupt and a rx/tx interrupt
are handled.

Document existing tuneables: hw.em.eee_setting, hw.em.msix, hw.em.smart_pwr_down, hw.em.sbp

Document use of hw.em.num_queues and the new kernel option EM_MULTIQUEUE

Thanks to Intel for their continued support of FreeBSD.

Reviewed by:	erj jfv hiren gnn wblock
Obtained from:	Intel Corporation
MFC after:	2 weeks
Relnotes:	Yes
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D1994
2015-06-03 18:01:09 +00:00
John-Mark Gurney
285c9f5c02 fix missing backslash.. 2015-06-03 17:10:52 +00:00
John-Mark Gurney
3d016773bb install nanobsd.sh as a MLINK as that is the .Nm of the man page..
really the man page should be renamed as nanobsd.sh is not installed
as nanobsd..
2015-06-03 17:10:11 +00:00
Bryan Drewery
b322948ef6 Similar to r280178, don't hide command for building static library. 2015-06-02 19:05:02 +00:00
Andrey V. Elsukov
f49cc1b5c0 Add example howto configure gre(4) tunnel with the same inner and
outer addresses using multiple FIBs.

X-MFC after:	r282809
2015-06-02 00:47:38 +00:00
Simon J. Gerraty
8bf4a1b89c Handle multiple sections in MLINKS 2015-05-31 07:16:31 +00:00
Simon J. Gerraty
09cdd180a2 Stage man pages. 2015-05-31 03:13:24 +00:00
Baptiste Daroussin
8854666322 Regenerate after r283777 2015-05-30 17:46:11 +00:00
Baptiste Daroussin
8faa40d1a0 Switch to mandoc's version of makewhatis(8), whatis(1), apropos(1) utilities.
This change among other things improve search capabilities over the manpages
allowing fine grain query.

A new build option WITHOUT_MANDOCDB has been added to keep the ancient version
of the database and the tools. The plan is to entirely remove this option before
11.0-RELEASE.

Differential Revision:	https://reviews.freebsd.org/D2603
2015-05-30 17:41:37 +00:00
Simon J. Gerraty
58073855a4 Do not override variables on command line that build needs to change.
It is sufficient to explicitly set DEPENDFILE in env for each sub-make.
2015-05-30 17:29:51 +00:00
Simon J. Gerraty
fdfa61c3ab Test that .CURDIR is component of (or matches) .OBJDIR 2015-05-30 17:27:52 +00:00
Simon J. Gerraty
6332aaacb4 Use SRCTOP when defining ROOTOBJDIR
Excplicitly check rather than assume that .CURDIR is
a component of .OBJDIR
Otherwise check for OBJTOP and if that is a match use it.
2015-05-30 15:13:18 +00:00
Simon J. Gerraty
883e6bfbb1 Define SRCTOP in src.sys.mk
Because src.sys.mk should only ever be found in the src tree
we can use its position (.PARSEDIR) to set SRCTOP.

Reviewed by:	bapt, imp
2015-05-30 15:08:52 +00:00
Michael Gmelin
71d51719ea ig4 - Intel fourth gen integrated I2C SMBus driver.
Differential Revision:	https://reviews.freebsd.org/D2372
Reviewed by:	jhb, wblock, adrian
Approved by:	jhb, wblock
Relnotes:	yes
2015-05-30 12:17:18 +00:00
Simon J. Gerraty
10e781d1ba Allow AUTO_OBJ with out META_MODE.
Remove frobbing of SRCCONF etc - not strictly relevant to meta mode.
2015-05-29 06:45:32 +00:00
John Baldwin
f3bb925153 Create a separate kobj interface for leaf-driver PCI IOV methods.
Leaf drivers should not import the PCI bus interface to add IOV handling.
Instead, move the IOV client methods to a separate kobj interface.

Differential Revision:	https://reviews.freebsd.org/D2584
Reviewed by:	rstone
2015-05-28 22:01:50 +00:00
Patrick Kelsey
e5315a56df Provide an unambiguous description of the potential hazard in calling
pthread_setspecific(3) from a key destructor.

Reviewed by: jhb
Approved by: jmallett (mentor)
MFC after: 3 days
2015-05-28 16:18:41 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Simon J. Gerraty
b17ff922d4 Merge from head 2015-05-26 21:52:57 +00:00
Simon J. Gerraty
c4a81da0c8 Include bsd.mkopt.mk before local.sys.mk
Also use __DEFAULT_DEPENDENT_OPTIONS for options that
generally depend on META_MODE.
Deal with MK_META_MODE and MK_AUTO_OBJ directly.
Also allow MK_META_FILES if no -B
this is very handy for getting meta files from say buildworld
2015-05-26 21:51:36 +00:00
Simon J. Gerraty
6d5e42ed3a include local.meta.sys.mk 2015-05-26 21:47:43 +00:00
Simon J. Gerraty
43f42ca719 always filter out dirdeps.cache*meta 2015-05-26 21:47:12 +00:00
Simon J. Gerraty
4113aa9077 Move META_MODE bits to local.meta.sys.mk
By moving META_MODE bits from local.sys.mk, they are easier
to skip when MK_META_MODE=no

Update some filters to cope with sync from head.

If buildworld etc or WITHOUT_META_MODE disable all the META_MODE
related options.
2015-05-26 21:44:15 +00:00
Simon J. Gerraty
ae3019ca08 Define SRCTOP in src.sys.mk
Use SRCTOP to replace .../ in MAKSYSPATH (avoid extra :tA)
Use SRCTOP rather than ROOTSRCDIR in src.libnames.mk
Merge from head
2015-05-26 21:41:26 +00:00
Simon J. Gerraty
71edef51db Latest dirdeps.mk and meta.stage.mk
Add support for dirdeps cache
and allow full path as key for STAGE_AS_*
2015-05-26 21:03:41 +00:00
Simon J. Gerraty
3b33c213ef Add support for __DEFAULT_DEPENDENT_OPTIONS 2015-05-26 16:17:24 +00:00
Baptiste Daroussin
e46a13884e Considers cases when NO_SHARED?=[no|NO] as dynamically linking
This reduces overlinking for parts of the build system where NO_SHARED is
set to no/NO
2015-05-26 01:09:56 +00:00
Andrew Rybchenko
3c838a9f51 sfxge: add 7xxx NICs family support
Support 7xxx adapters including firmware-assisted TSO and VLAN tagging:

  - Solarflare Flareon Ultra 7000 series 10/40G adapters:
    - Solarflare SFN7042Q QSFP+ Server Adapter
    - Solarflare SFN7142Q QSFP+ Server Adapter

  - Solarflare Flareon Ultra 7000 series 10G adapters:
    - Solarflare SFN7022F SFP+ Server Adapter
    - Solarflare SFN7122F SFP+ Server Adapter
    - Solarflare SFN7322F Precision Time Synchronization Server Adapter

  - Solarflare Flareon 7000 series 10G adapters:
    - Solarflare SFN7002F SFP+ Server Adapter

Support utilities to configure adapters and update firmware.

The work is done by Solarflare developers
(Andy Moreton, Andrew Lee and many others),
Artem V. Andreev <Artem.Andreev at oktetlabs.ru> and me.

Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 weeks
Causually read by: gnn
Differential Revision: https://reviews.freebsd.org/D2618
2015-05-25 08:34:55 +00:00
Mark Johnston
5dd12007ce Remove a reference to the PBDRY flag, which itself was removed in r248470.
MFC after:	3 days
2015-05-25 01:09:18 +00:00
Simon J. Gerraty
9932374ea3 Add options for auto obj and meta mode to sys.mk 2015-05-24 02:46:08 +00:00