Commit Graph

17521 Commits

Author SHA1 Message Date
John Baldwin
5f0263c120 Change the default installation directory for modules to /boot/modules.
Kernel installs always override KMODDIR when installing modules, so
this default setting is only used for standalone module builds.  Many
out-of-tree modules manually override KMODDIR already to avoid placing
modules in /boot/kernel.  This now makes that behavior the default.

Discussed on:	arch@
Reviewed by:	imp
Relnotes:	yes
2016-05-10 22:32:23 +00:00
John Baldwin
a7b81566bc Add a missing section to a cross-reference.
While here, add bus_space(9) to the SEE ALSO section.
2016-05-10 16:13:54 +00:00
Warner Losh
1f1bf434c6 Bump date. Forgotten in r299312. 2016-05-10 04:01:04 +00:00
Warner Losh
7043b9898f Document g_reset_bio(). This is long overdue. g_reset_bio will reset
the bio to a pristine state should you wish to re-use it for another
I/O without freeing it. In the bast, a simple bzero was done to do
this, but that may not be sufficient in the future when the bio may
contain state that's not part of the documented API. Besides, it makes
the code clearer as to the intent...

Noticed by: smh@
2016-05-10 03:57:47 +00:00
Glen Barber
a5921bc365 Update share/examples/* to properly install /usr/share/examples.
As result of this, a new examples package is now created.

Note, this is only effective with 'SHARED=copies' (the default),
as the 'SHARED=symlinks' mechanism will create a symlink to the
source tree version of the file(s).

Sponsored by:	The FreeBSD Foundation
2016-05-10 00:51:50 +00:00
Bryan Drewery
29df9f6b75 DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.
This avoids running target binaries.

Sponsored by:	EMC / Isilon Storage Division
2016-05-09 22:21:09 +00:00
John Baldwin
8d791e5af1 Add a new bus method to fetch device-specific CPU sets.
bus_get_cpus() returns a specified set of CPUs for a device.  It accepts
an enum for the second parameter that indicates the type of cpuset to
request.  Currently two valus are supported:

 - LOCAL_CPUS (on x86 this returns all the CPUs in the package closest to
   the device when DEVICE_NUMA is enabled)
 - INTR_CPUS (like LOCAL_CPUS but only returns 1 SMT thread for each core)

For systems that do not support NUMA (or if it is not enabled in the kernel
config), LOCAL_CPUS fails with EINVAL.  INTR_CPUS is mapped to 'all_cpus'
by default.  The idea is that INTR_CPUS should always return a valid set.

Device drivers which want to use per-CPU interrupts should start using
INTR_CPUS instead of simply assigning interrupts to all available CPUs.
In the future we may wish to add tunables to control the policy of
INTR_CPUS (e.g. should it be local-only or global, should it ignore
SMT threads or not).

The x86 nexus driver exposes the internal set of interrupt CPUs from the
the x86 interrupt code via INTR_CPUS.

The ACPI bus driver and PCI bridge drivers use _PXM to return a suitable
LOCAL_CPUS set when _PXM exists and DEVICE_NUMA is enabled.  They also and
the global INTR_CPUS set from the nexus driver with the per-domain set from
_PXM to generate a local INTR_CPUS set for child devices.

Compared to the r298933, this version uses 'struct _cpuset' in
<sys/bus.h> instead of 'cpuset_t' to avoid requiring <sys/param.h>
(<sys/_cpuset.h> still requires <sys/param.h> for MAXCPU even though
<sys/_bitset.h> does not after recent changes).
2016-05-09 20:50:21 +00:00
Ben Woods
faef00a3e1 Add myself (woodsb02) as ports committer, and update mentor/mentee relationships
Approved by:	adamw (mentor)
Differential Revision:	https://reviews.freebsd.org/D6275
2016-05-09 20:01:18 +00:00
Stephen McConnell
a5b310716b Updates to mpr driver man page.
- Add 3216 and 3224 support.
- Add SSU, chain_alloc_fail, and spinup_wait_time information.
- Clear up some sentences.
- Correct some typos.

Reviewed by:    ken, scottl, ambrisko, asomers, wblock
Approved by:	ken, scottl, ambrisko
MFC after:      1 week
Differential Revision: https://reviews.freebsd.org/D6104
2016-05-09 16:42:46 +00:00
Maxim Konovalov
c34ed7382c o Stop to mention the slowstart_flightsize sysctl in the tuning(7).
The slowstart_flightsize and local_slowstart_flightsize sysctl's
were removed from the TCP code in 226447 several years ago.

PR:		209376
MFC after:	1 week
2016-05-09 11:48:09 +00:00
Enji Cooper
9c61377766 Fix r299162
share/man/man8/Makefile:
- Add src.opts.mk so MK_NIS can be tested
- Fix typo in MK_NIS conditional

tools/build/mk/OptionalObsoleteFiles.inc:
- Remove WIP diff from ^/user/ngie/detangle-rc

MFC after: 1 week
X-MFC with: r299162
Sponsored by: EMC / Isilon Storage Division
2016-05-06 08:53:24 +00:00
Enji Cooper
18128d28c1 Only install NIS section 8 manpages if MK_NIS != no
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
2016-05-06 08:42:33 +00:00
Konstantin Belousov
9c671dbd0b Warn about consequences of suspending threads in arbitrary state of
execution.

While there, fix minor nits in markup.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-05-05 10:22:19 +00:00
Adrian Chadd
148ed57165 [bwn] [bhnd] initial support for using bhnd for if_bwn devices.
This is an initial work in progress to use the replacement bhnd
bus code for devices which support it.

* Add manpage updates for bhnd, bhndb, siba
* Add kernel options for bhnd, bhndbus, etc
* Add initial support in if_bwn_pci / if_bwn_mac for using bhnd
  as the bus transport for suppoted NICs
* if_bwn_pci will eventually be the PCI bus glue to interface to bwn,
  which will use the right backend bus to attach to, versus direct
  nexus/bhnd attachments (as found in embedded broadcom devices.)

The PCI glue defaults to probing at a lower level than the bwn glue,
so bwn should still attach as per normal without a boot time tunable set.

It's also not fully fleshed out - the bwn probe/attach code needs to be
broken out into platform and bus specific things (just like ath, ath_pci,
ath_ahb) before we can shift the driver over to using this.

Tested:

* BCM4311, STA mode
* BCM4312, STA mode

Submitted by:	Landon Fuller <landonf@landonf.org>
Differential Revision:	https://reviews.freebsd.org/D6191
2016-05-04 23:38:27 +00:00
Enji Cooper
430f7286a5 Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed
after r298107

Summary of changes:

- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
  namespacing is kept with FILES appropriately, and that this shouldn't need
  to be repeated if the namespace changes -- only the definition of PACKAGE
  needs to be changed
- Allow PACKAGE to be overridden by callers instead of forcing it to always be
  `tests`. In the event we get to the point where things can be split up
  enough in the base system, it would make more sense to group the tests
  with the blocks they're a part of, e.g. byacc with byacc-tests, etc
- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
  previously.
- Remove unnecessary TESTSPACKAGE definitions; this has been elided into
  bsd.tests.mk
- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
  ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
- Fix installation of files under data/ subdirectories in lib/libc/tests/hash
  and lib/libc/tests/net/getaddrinfo
- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)

Document the proposed changes in share/examples/tests/tests/... via examples
so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
of communicating that info.

MFC after: never probably
X-MFC with: r298107
PR: 209114
Relnotes: yes
Tested with: buildworld, installworld, checkworld; buildworld, packageworld
Sponsored by: EMC / Isilon Storage Division
2016-05-04 23:20:53 +00:00
Alan Somers
8907f744ff Improve performance and functionality of the bitstring(3) api
Two new functions are provided, bit_ffs_at() and bit_ffc_at(), which allow
for efficient searching of set or cleared bits starting from any bit offset
within the bit string.

Performance is improved by operating on longs instead of bytes and using
ffsl() for searches within a long. ffsl() is a compiler builtin in both
clang and gcc for most architectures, converting what was a brute force
while loop search into a couple of instructions.

All of the bitstring(3) API continues to be contained in the header file.
Some of the functions are large enough that perhaps they should be uninlined
and moved to a library, but that is beyond the scope of this commit.

sys/sys/bitstring.h:
        Convert the majority of the existing bit string implementation from
        macros to inline functions.

        Properly protect the implementation from inadvertant macro expansion
        when included in a user's program by prefixing all private
        macros/functions and local variables with '_'.

        Add bit_ffs_at() and bit_ffc_at(). Implement bit_ffs() and
        bit_ffc() in terms of their "at" counterparts.

        Provide a kernel implementation of bit_alloc(), making the full API
        usable in the kernel.

        Improve code documenation.

share/man/man3/bitstring.3:
        Add pre-exisiting API bit_ffc() to the synopsis.

        Document new APIs.

        Document the initialization state of the bit strings
        allocated/declared by bit_alloc() and bit_decl().

        Correct documentation for bitstr_size(). The original code comments
        indicate the size is in bytes, not "elements of bitstr_t". The new
        implementation follows this lead. Only hastd assumed "elements"
        rather than bytes and it has been corrected.

etc/mtree/BSD.tests.dist:
tests/sys/Makefile:
tests/sys/sys/Makefile:
tests/sys/sys/bitstring.c:
        Add tests for all existing and new functionality.

include/bitstring.h
	Include all headers needed by sys/bitstring.h

lib/libbluetooth/bluetooth.h:
usr.sbin/bluetooth/hccontrol/le.c:
        Include bitstring.h instead of sys/bitstring.h.

sbin/hastd/activemap.c:
        Correct usage of bitstr_size().

sys/dev/xen/blkback/blkback.c
        Use new bit_alloc.

sys/kern/subr_unit.c:
        Remove hard-coded assumption that sizeof(bitstr_t) is 1.  Get rid of
        unrb.busy, which caches the number of bits set in unrb.map.  When
        INVARIANTS are disabled, nothing needs to know that information.
        callapse_unr can be adapted to use bit_ffs and bit_ffc instead.
        Eliminating unrb.busy saves memory, simplifies the code, and
        provides a slight speedup when INVARIANTS are disabled.

sys/net/flowtable.c:
        Use the new kernel implementation of bit-alloc, instead of hacking
        the old libc-dependent macro.

sys/sys/param.h
        Update __FreeBSD_version to indicate availability of new API

Submitted by:   gibbs, asomers
Reviewed by:    gibbs, ngie
MFC after:      4 weeks
Sponsored by:   Spectra Logic Corp
Differential Revision:  https://reviews.freebsd.org/D6004
2016-05-04 22:34:11 +00:00
Bryan Drewery
a0c640c2a0 DIRDEPS_BUILD: Exclude secure/lib* libraries for host builds.
Sponsored by:	EMC / Isilon Storage Division
2016-05-04 03:13:48 +00:00
Conrad Meyer
bec7ff798a ioat(4): Implement CRC and MOVECRC APIs
And document them in ioat.4.

Sponsored by:	EMC / Isilon Storage Division
2016-05-03 17:07:18 +00:00
Sepherosa Ziehau
f8ce3dfaf1 kern: Add phashinit_flags(), which allows malloc(M_NOWAIT)
It will be used for the upcoming LRO hash table initialization.
And probably will be useful in other cases, when M_WAITOK can't
be used.

Reviewed by:	jhb, kib
Sponsored by:	Microsoft OSTC
Differential Revision:	https://reviews.freebsd.org/D6138
2016-05-03 07:17:13 +00:00
John Baldwin
8a08b7d36b Revert bus_get_cpus() for now.
I really thought I had run this through the tinderbox before committing,
but many places need <sys/types.h> -> <sys/param.h> for <sys/bus.h> now.
2016-05-03 01:17:40 +00:00
John Baldwin
bc153c692f Add a new bus method to fetch device-specific CPU sets.
bus_get_cpus() returns a specified set of CPUs for a device.  It accepts
an enum for the second parameter that indicates the type of cpuset to
request.  Currently two valus are supported:

 - LOCAL_CPUS (on x86 this returns all the CPUs in the package closest to
   the device when DEVICE_NUMA is enabled)
 - INTR_CPUS (like LOCAL_CPUS but only returns 1 SMT thread for each core)

For systems that do not support NUMA (or if it is not enabled in the kernel
config), LOCAL_CPUS fails with EINVAL.  INTR_CPUS is mapped to 'all_cpus'
by default.  The idea is that INTR_CPUS should always return a valid set.

Device drivers which want to use per-CPU interrupts should start using
INTR_CPUS instead of simply assigning interrupts to all available CPUs.
In the future we may wish to add tunables to control the policy of
INTR_CPUS (e.g. should it be local-only or global, should it ignore
SMT threads or not).

The x86 nexus driver exposes the internal set of interrupt CPUs from the
the x86 interrupt code via INTR_CPUS.

The ACPI bus driver and PCI bridge drivers use _PXM to return a suitable
LOCAL_CPUS set when _PXM exists and DEVICE_NUMA is enabled.  They also and
the global INTR_CPUS set from the nexus driver with the per-domain set from
_PXM to generate a local INTR_CPUS set for child devices.

Reviewed by:	wblock (manpage)
Differential Revision:	https://reviews.freebsd.org/D5519
2016-05-02 18:00:38 +00:00
Warren Block
7c64ddd5b0 Spelling fixes supplied by pfg@, detected with codespell, plus
additional misspellings detected by igor.

MFC after:	1 week
2016-05-01 22:00:41 +00:00
Pedro F. Giffuni
ca7f4027f7 share: minor spelling fixes.
Mostly comments but these tend to be user-visible.

MFC after:	2 weeks
2016-05-01 16:29:02 +00:00
Enji Cooper
f2a5d14c4a Allow FILESGROUPS to be specified more than once by pruning out duplicates
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-04-30 21:32:29 +00:00
Jamie Gritton
ab9604e1bb Clarify when happens when there is a "depend" parameter in jail.conf,
and how this affects the "jail_list" option in rc.conf.
2016-04-30 21:27:41 +00:00
Baptiste Daroussin
7f5ddefe05 Add a savecore_enable variable support for the savecore rc script
By default set to 'YES' so it does not change the current behaviour for users,
this variable allows to decide to not extract crach dumps from the dump
device at boot time by setting it to "NO" in rc.conf.

Sponsored by:	Gandi.net
2016-04-29 12:23:56 +00:00
Glen Barber
49dae58b28 Fix including Kyuafile in packaged base system.
Fix a related typo while here.

Note, this change results in the Kyuafile inclusion in the runtime
package, which needs to be fixed, however addresses the PR as far
as I can tell in my tests.

PR:		209114
Submitted by:	ngie
Sponsored by:	The FreeBSD Foundation
2016-04-29 05:28:40 +00:00
Warren Block
d90f12e3c0 Clarify build(7) instructions for alternate object directory.
PR:		209062
Submitted by:	Shawn Debnath <sd@beastie.io>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D6106
2016-04-28 22:14:09 +00:00
John Baldwin
9aa021d416 Add some notes about the implicit resource mapping for activated resources.
Specifically, mention that rman_get_bustag/handle/virtual are valid after
a resource is activated.  Also, mention the wrapper API that accepts a
struct resource instead of a bus tag and handle.
2016-04-28 18:23:18 +00:00
John Baldwin
9a1be350ea Document RF_PREFETCHABLE. 2016-04-28 18:01:25 +00:00
John Baldwin
55c661caad Document PCI_RES_BUS as a possible resource type. 2016-04-28 17:50:16 +00:00
John Baldwin
de70bf980b Remove a stale reference to the removed RF_TIMESHARE flag. 2016-04-28 17:48:52 +00:00
John Baldwin
a907c6914c Add a new rescan method to the bus interface.
The BUS_RESCAN() method rescans a single bus device checking for devices
that have been added or removed from the bus.  A new 'rescan' command is
added to devctl(8) to trigger a rescan.

Differential Revision:	https://reviews.freebsd.org/D6016
2016-04-27 16:29:03 +00:00
Conrad Meyer
aa90aec270 osd(9): Change array pointer to array pointer type from void*
This is a minor follow-up to r297422, prompted by a Coverity warning.  (It's
not a real defect, just a code smell.)  OSD slot array reservations are an
array of pointers (void **) but were cast to void* and back unnecessarily.
Keep the correct type from reservation to use.

osd.9 is updated to match, along with a few trivial igor fixes.

Reported by:	Coverity
CID:		1353811
Sponsored by:	EMC / Isilon Storage Division
2016-04-26 19:57:35 +00:00
Gordon Tetlow
a48214425f Add myself (finally) to the port committer's dot file.
Approved by:	mat (mentor)
Differential Revision:	https://reviews.freebsd.org/D6074
2016-04-24 21:19:00 +00:00
Emmanuel Vadot
6c65acb507 Add myself as src commiter.
Approved by:	cognet (mentor)
2016-04-24 14:49:01 +00:00
Christian Brueffer
ec8497e117 MLINK mfi.4 to mfi_linux.4 and mfip.4 to cover these kernel modules.
The mfi(4) manpage doesn't explain the modules yet, but at least we direct
users to the right place.

PR:		205925
Submitted by:	dvl
MFC after:	1 week
Sponsored by:	Essen Hackathon 2016
2016-04-24 11:41:36 +00:00
Christian Brueffer
f6c64174fe Correct types for g_example_start() and g_example_access().
PR:		203498
Submitted by:	chadf@triularity.org, ae
MFC after:	1 week
Sponsored by:	Essen Hackathon 2016
2016-04-24 08:31:32 +00:00
Benedict Reuschling
df0501a299 The default value of MINFREE is defined to be 8% in
ufs/ffs/fs.h and not 10%.  The newfs(8) and tunefs(8)
man pages had this change already, but fs(5) did not.
This change makes it consistent again.

Bump Dd.

PR:             204929
Submitted by:   amutu@amutu.com
MFC after:      3 days
Sponsored by:   Essen Linuxhotel Hackathon 2016
2016-04-23 20:45:52 +00:00
Baptiste Daroussin
027b468717 Bump the date of the manpage after r298515
Sponsored by:	Essen Hackathon 2016
2016-04-23 17:09:40 +00:00
Lars Engels
1980d11b5f - Add two new subcommands to rc.subr:
"describe" shows an rc script's description
  "extracommands" shows an rc script's non-standard commands like "reload", "configtest", "keygen", etc
- Update the rc(8) manpage and the tcsh(1) completion examples to reflect these changes

Approved by:	bapt
Sponsored by:	Essen Linuxhotel Hackathon 2016
Differential Revision:	D452
2016-04-23 16:19:34 +00:00
Christian Brueffer
ee9e0ce4cb Improve upon r296618 to keep lines < 80 characters.
Pointed out by:	jhb
Sponsored by:	Essen Hackathon 2016
2016-04-23 11:04:45 +00:00
Bryan Drewery
f19c33eed4 Fix error when SRCCONF is empty.
Sponsored by:	EMC / Isilon Storage Division
2016-04-22 20:31:29 +00:00
Bryan Drewery
4a70acf1dc Follow-up r298219: Don't error with 'make all install'.
Reported by:	kib
Sponsored by:	EMC / Isilon Storage Division
2016-04-21 16:12:55 +00:00
George V. Neville-Neil
a5ff72cb0e Add the address at which the routine returned.
MFC after:	1 week
Sponsored by:	Rubicon Communications (Netgate)
2016-04-21 03:17:53 +00:00
Simon J. Gerraty
30e2910007 Allow -f dirdeps.mk some/dir with no TARGET_MACHINE spec
Use $MACHINE if target does not specify.

Reviewed by:	bdrewery
2016-04-18 22:00:26 +00:00
Bryan Drewery
f31828ed9c META_MODE: Don't hide the .depend rm -f command.
Otherwise the build command changes every build.  META_MODE will
only remove it if something changes to warrant rebuilding
the file.

Sponsored by:	EMC / Isilon Storage Division
2016-04-18 21:11:55 +00:00
Bryan Drewery
e1dfa6572d Update meta2deps to fix crash when using -X with M2D_EXCLUDES. 2016-04-18 21:05:19 +00:00
Simon J. Gerraty
51c71d3e03 Update dirdeps.mk et al
dirdeps.mk: move logic to handle -f dirdeps.mk to inside check
for first read of dirdeps.mk

Also fix handling of WITHOUT_DIRDEPS_BELOW

gendirdeps.mk: pass M2D_EXCLUDES to meta2deps

meta.autodep.mk: if we build with nofilemon, leave a cookie to
prevent updating dependencies until cleaned.

Reviewed by:	bdrewery
2016-04-18 20:56:21 +00:00
Bryan Drewery
29fbb8071f Cause an error during 'make install' if trying to compile with CC.
This is limited to src-tree builds, meaning not extended to ports or other
out-of-tree builds.

This will help ensure that read-only OBJDIRS will be respected at install-time
by causing a more consistent failure for those who don't use a read-only
OBJDIR.  It also will cause Jenkins to yell.  This is a better solution than
trying to see CC=false as has been attempted and discussed before.

Of course this is only relevant for files generated by CC.

Disable this for META_MODE since it will detect the CFLAGS/command
change and force a rebuild.

Sponsored by:	EMC / Isilon Storage Division
2016-04-18 18:14:02 +00:00