Commit Graph

206241 Commits

Author SHA1 Message Date
Bryan Drewery
4902050fa5 META MODE: Add some basic bootstrapping support for no Makefile.depend.
This will not work for bootstrapping dependencies, it will only
bootstrap the top-level build directory.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:29:30 +00:00
Bryan Drewery
b1f92fa229 META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/.
Doing so requires a massive effort to rework targets/ to do so.  A
better approach will be to either include the SUBDIR Makefiles directly
and map to DIRDEPS or just dynamically lookup the SUBDIR.  These lose
the benefit of having a userland/lib, userland/libexec, etc, though and
results in a massive package.  The current implementation of targets/ is
very unmaintainable.

Currently rescue/rescue and sys/modules are still not connected.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:23:19 +00:00
Bryan Drewery
a0eb270b12 META MODE: Fix userland/cddl.
MK_CTF controls whether ctfmerge is ran against the binaries, not
whether CTF tools should be built.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:22:10 +00:00
Bryan Drewery
3bed45ab81 META MODE: Rework [bootstrapped] tools PATH support.
- Support more of the toolchain from TOOLSDIR.
- This also improves 'make bootstrap-tools' to pass, for example,
  AS=/usr/bin/as to Makefile.inc1, which will tell cross-tools to use
  external toolchain support and avoid building things we won't be using
  in the build.
- Always set the PATH to contain the staged TOOLSDIR directories when
  not building the bootstrap targets.

  The previous version was only setting this at MAKE.LEVEL==0 and if the
  TOOLSDIR existed.  Both of these prevented using staged tools that were
  built during the build though as DIRDEPS with .host dependencies, such
  as the fix for needing usr.bin/localedef.host in r291311.
  This is not a common tool so we must build and use it during the build,
  and need to be prepared to change PATH as soon as it appears.

  This should also fix the issue of host dependencies disappearing from
  Makefile.depend and then reappearing due to the start of the fresh build not
  having the directory yet, resulting in the tools that were built not actually
  being used.
- Only use LEGACY_TOOLS while building in Makefile.inc1.  After r291317
  and r291546 there is no need to add LEGACY_TOOLS into the PATH for
  the pseudo/targets/toolchain build.
- Because the pseudo/targets/toolchain will now build its own
  [clang-]tblgen, the special logic in clang.build.mk is no longer needed.
- LEGACY_TOOLS is no longer used outside of targets/pseudo/bootstrap-tools
  so is no longer passed into the environment in its build.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:19:02 +00:00
Bryan Drewery
0383be9bae META MODE: Fix rebuilding of lib/clang/include after clang-tblgen.host is
staged.

None of usr.bin/clang/clang-tblgen or its dependencies need
lib/clang/include, so there is no cyclic dependency here to worry about.
The issue came about because of workarounds to dependencies on clang
being optional.

Without this, the clang-tblgen called during the build would change
after it was staged for the host.  This would cause lib/clang/include to
rebuild due to changed build commands.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:18:59 +00:00
Bryan Drewery
3c42abd89d META MODE: Don't trim out lib/clang/include dependency.
Doing this causes more trouble than it is worth regarding cyclic
dependencies.  It should not be needed after cleaning up MACHINE=host
builds in r291324.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:18:55 +00:00
Bryan Drewery
cf990407e1 Update dependencies after r291406 added libelf to libkvm.
Unfortunately filemon/meta mode tracks all indirect dependencies here
since ld(1) is reading libelf when linking in libkvm.  Churn would be
reduced if this was able to be limited to direct dependencies.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:18:48 +00:00
Kevin Lo
e1b74f21f5 Add initial support for RTL8152 USB Fast Ethernet. RTL8152 supports
IPv4/IPv6 checksum offloading and VLAN tag insertion/stripping.

Since uether doesn't provide a way to announce driver specific offload
capabilities to upper stack, checksum offloading support needs more work
and will be done in the future.

Special thanks to Hayes Wang from RealTek who gave input.
2015-12-01 05:12:13 +00:00
Bryan Drewery
b6725ecdb2 FAST_DEPEND: Workaround hacks in the wild that have '..' or '/' in OBJS.
This is mostly working around the converts/iconv port having '../ces/file.o'
in its OBJS list which resulted in '.depend../ces/file.o'.  Now it will have
'.depend.._ces_file.o'.

Other implementations have :T which would result in '.depend.file.o' here, but
that could lead to collisions.

X-MFC-With:	r291554
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-12-01 03:09:54 +00:00
Bryan Drewery
593e465913 FAST_DEPEND: Allow not using -MP by setting DEPEND_MP blank.
-MP creates empty targets for all dependency files, which can be useful when a
dependency is deleted from the file system.  This would otherwise cause an
error for "don't know how to build FOO" since the .depend file is included
with the dependency registered.

This is mostly a workaround for the misc/dahdi-kmod port using '::' for one of
its dependencies, while -MP uses just ':'.  This results in an 'Inconsistent
operator for' error.

X-MFC-With:	r290433
MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-12-01 03:00:10 +00:00
Mateusz Guzik
d6767a972c capsicum: plug spurious memset in __cap_rights_init
Reviewed by:	pjd
2015-12-01 02:48:42 +00:00
Bryan Drewery
1e36b7df1a META MODE: Libc++ does in fact need Libcxxrt.
There seems to be no cyclic dependency here.  This partially reverts r283595
which had no explanation for the change.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 01:22:10 +00:00
Bryan Drewery
c7f8dda118 META MODE: Always define HOST_*, even if not using them.
Sponsored by:	EMC / Isilon Storage Division
2015-12-01 00:53:17 +00:00
Bryan Drewery
6ca6c445fd META MODE: For bootstrap-tools, don't let Makefile.inc1 build any of the
toolchain.

This change prevents building of [clang-]tblgen, which is unneeded due
to already being a host dependency where needed for
targets/pseudo/toolchain.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 00:32:09 +00:00
Stanislav Sedov
314eeef290 Make the number of fasttrap probes and the size of the trace points hash table
tunable via sysctl or kernel tunables.

Illumos allows this parameters to be changed via the fasttrap.conf configuration
file, but FreeBSD code hardcoded the parameters.  Expose them under
the kern.dtrace.fasttrap sysctl tree.

MFC after:	2 weeks
2015-12-01 00:24:54 +00:00
Rick Macklem
10b2e06e3e Delete the TUNABLE_INT() line. It was in r291527 so that it could be
MFC'd to stable/10 and still work.
2015-11-30 23:37:09 +00:00
Bryan Drewery
dfb62a5a22 META MODE: Fix bootstrap-tools after r291349.
Now that OBJTOP is assumed to be proper, it needs to be overridden for
the bootstrap-tools phase to ensure it is not kept as the top-level
OBJTOP.  Otherwise the libraries were not found during the
bootstrap-tools phase.

Sponsored by:	EMC / Isilon Storage Division
2015-11-30 22:53:55 +00:00
Bryan Drewery
e58834bc29 Only DIRDEPS_BUILD should trigger this logic.
Missed in r290816.

Sponsored by:	EMC / Isilon Storage Division
2015-11-30 22:53:41 +00:00
Rick Macklem
33ba10888e Document the __FreeBSD_version bump done for r291527 in UPDATING. 2015-11-30 22:46:34 +00:00
Rick Macklem
cbeb66dda2 Bump __FreeBSD_version since r291527 changes the interface between the
nfsd.ko and nfscommon.ko modules. As such, both modules need to be upgraded
to-gether.
2015-11-30 22:35:53 +00:00
Rick Macklem
b45c941c1c Add support for the new "-manage-gids" option for the nfsuserd daemon
to the rc scripts. With these changes, setting nfs_server_managegids="YES"
in /etc/rc.conf will enable this capability.

Suggested by:	jpaetzel
Tested by:	jpaetzel
Reviewed by:	rc (pending)
MFC after:	2 weeks
2015-11-30 22:29:11 +00:00
Rick Macklem
3367fa32b1 Document the new "-manage-gids" option for the nfsuserd daemon.
This is a content change.

Suggested by:	jpaetzel
Tested by:	jpaetzel
MFC after:	2 weeks
2015-11-30 22:16:30 +00:00
Rick Macklem
e6c623c86a Add support for the "-manage-gids" option to the nfsuserd daemon.
When this option is set, the NFS server uses the list of groups
acquired via getgrouplist(3) for the uid instead of the list of
groups in the RPC request. This can be used to avoid the 16 gid
limit for the group list in the RPC request.

Suggested by:	jpaetzel
Tested by:	jpaetzel
MFC after:	2 weeks
2015-11-30 22:11:34 +00:00
Alexander Motin
aeef6b689a Use SPI name for parallel SCSI. 2015-11-30 22:09:55 +00:00
Rick Macklem
84be7e0952 Add kernel support to the NFS server for the "-manage-gids"
option that will be added to the nfsuserd daemon in a future
commit. It modifies the cache used by NFSv4 for name<-->id
translation (both username/uid and group/gid) to support this.
When "-manage-gids" is set, the server looks up each uid
for the RPC and uses the list of groups cached in the server
instead of the list of groups provided in the RPC request.
The cached group list is acquired for the cache by the nfsuserd
daemon via getgrouplist(3).
This avoids the 16 groups limit for the list in the RPC request.
Since the cache is now used for every RPC when "-manage-gids"
is enabled, the code also modifies the cache to use a separate
mutex for each hash list instead of a single global mutex.

Suggested by:	jpaetzel
Tested by:	jpaetzel
MFC after:	2 weeks
2015-11-30 21:54:27 +00:00
John Baldwin
fe5f4c93fe Fix a double-semicolon typo in my libkvm changes.
Submitted by:	jmallett
2015-11-30 21:53:24 +00:00
Bryan Drewery
0314b7e24d libllvmmirparser and libllvmlibdriver are only used in usr.bin/clang/llc and
usr.bin/clang/llvm-ar, respectively, when MK_CLANG_EXTRAS is yes.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2015-11-30 19:16:58 +00:00
Randall Stewart
f19bae413c Add support for Intel Skylake and Intel Broadwell PMC's. The Broadwell PMC's have been
tested on the Broadwell-Xeon with a hacked up version of pmcstudy -T. I still need
to circle back and add in to pmcstudy all the new tests from the Broadwell Vtune
guide (for the hacked up version I just made it so I could run the -T option). The
Skylake CPU is not yet available (even though Intel is advertising it .. imagine that).
The Skylake PMC's will need to be tested once we can get a sample skylake CPU :-)

Sponsored by: Netflix Inc.
2015-11-30 17:35:49 +00:00
Andriy Voskoboinyk
54b27b3583 wpi: ignore ic_update_promisc() call when device is not running
This change will fix kernel panic with uninitialized (zeroed)
RXON structure.

Tested with Intel 3945BG, IBSS mode.

Approved by:	adrian (mentor)
Differential Revision:	https://reviews.freebsd.org/D4304
2015-11-30 17:16:51 +00:00
Michal Meloun
e53ea2ab77 ARM: create new memory attribute for writethrough cacheable memory.
- add new TEX class for WT cacheable memory
- export new TEX class to kernel as VM_MEMATTR_WT attribute
- add new aliases VM_MEMATTR_WRITE_COMBINING and
  VM_MEMATTR_WRITE_BACK, it's used in DRM code

Note:
 Only Cortex A8 supports WT caching in HW. On rest of Cortex CPUs,
 WT requests is treated as uncacheable.

Approved by:	kib (mentor)
2015-11-30 17:09:25 +00:00
Enji Cooper
a2a45f908a Fix the build after ifconfig was converted over to lib80211 in r291470
Reported by: jenkins, O. Hartmann <ohartman@zedat.fu-berlin.de>
Pointyhat to: adrian
2015-11-30 16:34:13 +00:00
Andrew Rybchenko
cb3acb3e9b sfxge: avoid TSO packets collapses bacause of not 2K aligned data
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D4310
2015-11-30 13:27:40 +00:00
Konstantin Belousov
4424a685c2 Shorten conditional branch code.
Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
2015-11-30 10:18:15 +00:00
Konstantin Belousov
5cb72aa7ec Remove unneeded instructions.
Reviewed by:	andrew
Sponsored by:	The FreeBSD Foundation
2015-11-30 10:17:13 +00:00
Hans Petter Selasky
52ba05767f Add more functions and types to the LinuxKPI.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2015-11-30 09:24:12 +00:00
Adrian Chadd
36f8b167b5 add missing lib80211 include. 2015-11-30 09:02:28 +00:00
Enji Cooper
2451d4dd33 Fix the build
ichan is only used if AH_DEBUG_ALQ if defined

Pointyhat to: adrian
2015-11-30 08:02:52 +00:00
Adrian Chadd
5c15e5d044 Add missing lib declaration. 2015-11-30 06:56:25 +00:00
Adrian Chadd
d01cb677ba Convert ifconfig to use lib80211.
* remove regdomain.[ch] - it's now part of lib80211.
* convert ifieee80211.c to use the ioctl routines in lib80211 and
  implement the "error? exit" wrapper behaviour the callers expect.
2015-11-30 06:34:16 +00:00
Adrian Chadd
ff066b54ec fix ht/40 configuration for ar9331 (hornet).
The synth programming here requires the real centre frequency,
which for HT20 channels is the normal channel, but HT40 is
/not/ the primary channel.  Everything else was using 'freq',
which is the correct centre frequency, but the hornet config
was using 'ichan' to do the lookup which was also the primary
channel.

So, modify the HAL call that does the mapping to take a frequency
in MHz and return the channel number.

Tested:

* Carambola 2, AR9331, tested both HT/20 and HT/40 operation.
2015-11-30 06:26:59 +00:00
Alexander V. Chernikov
c00c4e46e3 Remove in_setifarnh definition. 2015-11-30 06:02:35 +00:00
Alexander V. Chernikov
674e0823c1 Move flowtable rte checks to separate function. 2015-11-30 05:59:22 +00:00
Alexander V. Chernikov
e8b0643eee Add new rt_foreach_fib_walk_del() function for deleting route entries
by filter function instead of picking into routing table details in
  each consumer.
Remove now-unused rt_expunge() (eliminating last external RTF_RNH_LOCKED
 user).
This simplifies future nexthops/mulitipath changes and rtrequest1_fib()
  locking refactoring.

Actual changes:
Add "rt_chain" field to permit rte grouping while doing batched delete
  from routing table (thus growing rte 200->208 on amd64).
Add "rti_filter" /  "rti_filterdata" / "rti_spare" fields to rt_addrinfo
  to pass filter function to various routing subsystems in standard way.
Convert all rt_expunge() customers to new rt_addinfo-based api and eliminate
  rt_expunge().
2015-11-30 05:51:14 +00:00
Adrian Chadd
4c32f07bff Add lib80211 to include path.
(This commit was missing from my lib80211 commit.)
2015-11-30 04:59:01 +00:00
Adrian Chadd
127be1a706 Add lib80211, a small (but hopefully soon to grow) set of library
routines to interface with net80211.

This is all from the ifconfig program; the duplicate code from ifconfig
will be removed when it starts using this API.

Differential Revision:	https://reviews.freebsd.org/D4290
2015-11-30 04:41:50 +00:00
Justin Hibbits
6035018b9a Print machine check address for Book-E.
Bits in mcsr indicate if the address is valid, and whether it's a physical
address or effective address.

Sponsored by:	Alex Perez/Inertial Computing
2015-11-30 02:40:41 +00:00
Justin Hibbits
68a71d75c2 Add Freescale QorIQ GPIO driver.
Still missing interrupt support, to come later.

Sponsored by:	Alex Perez/Inertial Computing
2015-11-30 02:23:56 +00:00
Dimitry Andric
a1b9b1743c Fix buildworld after r291453, similar to r284346: url->user and url->pwd
are arrays, so they can never be NULL.

Reported by:	many
Pointy hat to:	des
2015-11-29 22:37:48 +00:00
Kirk McKusick
41d4f10391 As the kernel allocates and frees vnodes, it fully initializes them
on every allocation and fully releases them on every free.  These
are not trivial costs: it starts by zeroing a large structure then
initializes a mutex, a lock manager lock, an rw lock, four lists,
and six pointers. And looking at vfs.vnodes_created, these operations
are being done millions of times an hour on a busy machine.

As a performance optimization, this code update uses the uma_init
and uma_fini routines to do these initializations and cleanups only
as the vnodes enter and leave the vnode_zone. With this change the
initializations are only done kern.maxvnodes times at system startup
and then only rarely again. The frees are done only if the vnode_zone
shrinks which never happens in practice. For those curious about the
avoided work, look at the vnode_init() and vnode_fini() functions in
kern/vfs_subr.c to see the code that has been removed from the main
vnode allocation/free path.

Reviewed by: kib
Tested by:   Peter Holm
2015-11-29 21:42:26 +00:00
Kirk McKusick
43a993bb7d For performance reasons, it is useful to have a single string used as
the name of a filesystem when setting it as the first parameter to the
getnewvnode() function. Most filesystems call getnewvnode from just one
place so can use a literal string as the first parameter. However, NFS
calls getnewvnode from two places, so we create a global constant string
that can be used by the two instances. This change also collapses two
instances of getnewvnode() in the UFS filesystem to a single call.

Reviewed by: kib
Tested by:   Peter Holm
2015-11-29 21:01:02 +00:00