]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoUse lltable_get_ifp() instead of direct access to lltable fields.
Alexander V. Chernikov [Fri, 1 Jan 2016 12:35:33 +0000 (12:35 +0000)]
Use lltable_get_ifp() instead of direct access to lltable fields.

8 years agoUpdate leap-seconds to latest. This will satisfy the ntpd leap-second
Cy Schubert [Fri, 1 Jan 2016 11:57:32 +0000 (11:57 +0000)]
Update leap-seconds to latest. This will satisfy the ntpd leap-second
version check.

Obtained from: ftp://tycho.usno.navy.mil/pub/ntp/.
See also: http://www.iers.org/SharedDocs/News/EN/BulletinC.html

8 years agoRemove second EVENTHANDLER_REGISTER slipped in r292978.
Alexander V. Chernikov [Fri, 1 Jan 2016 10:15:06 +0000 (10:15 +0000)]
Remove second EVENTHANDLER_REGISTER slipped in r292978.
Describe the reason of doing unconditional M_PREPEND in ether_output().

8 years ago17 years and change after I wrote warp_saver, here's a simple plasma effect
Dag-Erling Smørgrav [Fri, 1 Jan 2016 04:04:40 +0000 (04:04 +0000)]
17 years and change after I wrote warp_saver, here's a simple plasma effect
(currently only three circular patterns) which requires quite a bit of
fixed-point arithmetic, including sqrt() and cos().  Happy New Year!

8 years agoIn the unload target, check that the module is loaded first.
Dag-Erling Smørgrav [Fri, 1 Jan 2016 03:59:09 +0000 (03:59 +0000)]
In the unload target, check that the module is loaded first.
Add a reload target which unloads and then loads the module.

8 years agoUse randomly generated device names in testcases via mktemp -u instead of using
Enji Cooper [Fri, 1 Jan 2016 03:12:51 +0000 (03:12 +0000)]
Use randomly generated device names in testcases via mktemp -u instead of using
the hardcoded device name, "test"

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years agoExtend idle support for newer Book-E cores.
Justin Hibbits [Fri, 1 Jan 2016 02:47:40 +0000 (02:47 +0000)]
Extend idle support for newer Book-E cores.

Newer Book-E cores (e500mc, e5500, e6500) do not support the WE bit in the MSR,
and instead delegate CPU idling to the SoC.

Perhaps in the future the QORIQ_DPAA option for the mpc85xx platform will become
a subclass, which will eliminate most of the #ifdef's.

8 years agoAdd functions for managing md(4) devices and cleaning up said md(4) devices
Enji Cooper [Fri, 1 Jan 2016 02:25:10 +0000 (02:25 +0000)]
Add functions for managing md(4) devices and cleaning up said md(4) devices

These will be used soon in the various test scripts that source geom_subr.sh

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years ago- Use geom <class> load instead of g<class> load; g<class> doesn't exist
Enji Cooper [Fri, 1 Jan 2016 02:22:45 +0000 (02:22 +0000)]
- Use geom <class> load instead of g<class> load; g<class> doesn't exist
  for all geom classes, e.g. geom_uzip(4)
- These tests require root. Skip all of the tests if they're run as non-root

MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

8 years ago[net80211] document the (not completely complete) set of places where
Adrian Chadd [Fri, 1 Jan 2016 00:21:07 +0000 (00:21 +0000)]
[net80211] document the (not completely complete) set of places where
we're assuming hz=1000 and not gracefully handling when it isn't.

The math involved will return 0 for hz < 1000, which it is on some
platforms and on DragonflyBSD.

This doesn't fix it, it:

* converts one manual use over to use the macro, and
* comments where it needs some thought/fixing.

I'll think about this a bit more before fixing it.

Submitted by: imre@vdsz.com

8 years agoUnify the ELFv1 and ELFv2 code paths and make ELFv1 (the normal ABI) more
Nathan Whitehorn [Fri, 1 Jan 2016 00:11:29 +0000 (00:11 +0000)]
Unify the ELFv1 and ELFv2 code paths and make ELFv1 (the normal ABI) more
correct in the process.

MFC after: 2 weeks

8 years ago[rtwn] add rtwn module directory.
Adrian Chadd [Thu, 31 Dec 2015 23:48:07 +0000 (23:48 +0000)]
[rtwn] add rtwn module directory.

Pointed out by: dim

8 years agoMerge r293013 from clang380-import branch:
Dimitry Andric [Thu, 31 Dec 2015 22:52:11 +0000 (22:52 +0000)]
Merge r293013 from clang380-import branch:

Fix a clang 3.8.0 warning in pflogd.c:

contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
if (!if_exists(interface) == -1) {
    ^                     ~~

The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check.  Just ditch the == -1 instead.

Obtained from: OpenBSD's pflogd.c 1.49
MFC after: 3 days

8 years agoMerge r293006 from clang380-import branch:
Dimitry Andric [Thu, 31 Dec 2015 22:48:46 +0000 (22:48 +0000)]
Merge r293006 from clang380-import branch:

For determining the compiler version, quote the string to be echo'd,
otherwise the command might fail.  This is because clang -v now results
in the following:

FreeBSD clang version 3.8.0 (trunk 256633) (based on LLVM 3.8.0svn)

The second "3.8.8svn)" string tripped up the shell command.

MFC after: 3 days

8 years agoFix a clang 3.8.0 warning in pflogd.c:
Dimitry Andric [Thu, 31 Dec 2015 22:45:00 +0000 (22:45 +0000)]
Fix a clang 3.8.0 warning in pflogd.c:

contrib/pf/pflogd/pflogd.c:769:8: error: logical not is only applied to the left hand side of this comparison [-Werror,-Wlogical-not-parentheses]
                        if (!if_exists(interface) == -1) {
                            ^                     ~~

The if_exists() function does not return -1, and even if it did, it
would not be the correct way to check.  Just ditch the == -1 instead.

Obtained from: OpenBSD's pflogd.c 1.49
MFC after: 3 days

8 years ago[rtwn] Add initial manpages for the rtwn driver.
Adrian Chadd [Thu, 31 Dec 2015 22:34:16 +0000 (22:34 +0000)]
[rtwn] Add initial manpages for the rtwn driver.

8 years ago[rtwn] Add rtwn firmware and driver module.
Adrian Chadd [Thu, 31 Dec 2015 22:33:32 +0000 (22:33 +0000)]
[rtwn] Add rtwn firmware and driver module.

Submitted by: kevlo

8 years ago[rtwn] bring over initial rtwn driver.
Adrian Chadd [Thu, 31 Dec 2015 22:32:36 +0000 (22:32 +0000)]
[rtwn] bring over initial rtwn driver.

This is a port from openbsd.  It's incomplete and unstable, but it's better
than nothing.  I have no plans to MFC this until it's complete and stable.

Submitted by: kevlo

8 years ago[rtwn] add rtwn firmware.
Adrian Chadd [Thu, 31 Dec 2015 22:31:43 +0000 (22:31 +0000)]
[rtwn] add rtwn firmware.

Submitted by: kevlo

8 years agoFor determining the compiler version, quote the string to be echo'd,
Dimitry Andric [Thu, 31 Dec 2015 21:01:06 +0000 (21:01 +0000)]
For determining the compiler version, quote the string to be echo'd,
otherwise the command might fail.  This is because clang -v now results
in the following:

FreeBSD clang version 3.8.0 (trunk 256633) (based on LLVM 3.8.0svn)

The second "3.8.8svn)" string tripped up the shell command.

8 years agosh: Remove redundant CTLQUOTEMARK checks.
Jilles Tjoelker [Thu, 31 Dec 2015 20:15:57 +0000 (20:15 +0000)]
sh: Remove redundant CTLQUOTEMARK checks.

With the new expand.c code, the intermediate representation passed to the
pathname generation code only contains CTLESC, not CTLQUOTEMARK.

CTLQUOTEMARK now only occurs in the text of NARG nodes (output of the
parser).

8 years agoIntroduce the ZFS Boot Environments menu to the loader menu
Allan Jude [Thu, 31 Dec 2015 20:00:53 +0000 (20:00 +0000)]
Introduce the ZFS Boot Environments menu to the loader menu

If the system was booted with ZFS, a new menu item (#7) appears
It contains an autogenerated list of ZFS Boot Environments

This allows the user to switch to an alternate root file system
Use Cases:
 - Revert a failed upgrade
 - Concurrently run different versions of FreeBSD with common home directory
 - Easier integration with the sysadmin/beadm utility

Requested by: many
Reviewed by: dteske
MFC after: 10 days
Relnotes: yes
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D3167

8 years agoRemove supposition comment that code would better live elsewhere.
Devin Teske [Thu, 31 Dec 2015 19:37:14 +0000 (19:37 +0000)]
Remove supposition comment that code would better live elsewhere.
Thinking this through, and looking at process_assignment, I believe
moving the code would be wrong considering that set_conf_files is
called in one condition while set_nextboot_conf is guarded by a
different condition of having nextboot_enable="YES". So these must
stay separated and not combined.

MFC after: 1 week

8 years agoFix a memory leak. nextboot_conf_file is not volatile, as far as I
Devin Teske [Thu, 31 Dec 2015 19:33:17 +0000 (19:33 +0000)]
Fix a memory leak. nextboot_conf_file is not volatile, as far as I
can tell, and thus the strdup is entirely unnecessary.

Thanks to: Toomas Soome (tsoome at-me dot-com)
MFC after: 1 week

8 years agonewvers.sh: put variable assignments on separate lines
Ed Maste [Thu, 31 Dec 2015 19:25:35 +0000 (19:25 +0000)]
newvers.sh: put variable assignments on separate lines

This makes it easier to grep for where they're set, and may simplify
future merging for FreeBSD derivatives that change these.

8 years agoRemove debugging messages. NB: SVN r187143 reads:
Devin Teske [Thu, 31 Dec 2015 19:00:45 +0000 (19:00 +0000)]
Remove debugging messages. NB: SVN r187143 reads:
comment out some debugging messages that slipped in by mistake
(removing them 7 years after they have been commented out)

MFC after: 1 week

8 years agosh: Reindent expandmeta().
Jilles Tjoelker [Thu, 31 Dec 2015 18:56:11 +0000 (18:56 +0000)]
sh: Reindent expandmeta().

8 years agosh: Perform pathname generation during the first expansion phases.
Jilles Tjoelker [Thu, 31 Dec 2015 18:47:54 +0000 (18:47 +0000)]
sh: Perform pathname generation during the first expansion phases.

This avoids the need to add and remove CTLESC bytes if pathname generation
will not be performed (set -f).

Side effect: the order of operations is slightly different: pathname
generation in ${$+* $(CMD)} will not see filesystem changes from CMD.

8 years agoWhen building libstand for arm, don't emit instructions that require
Ian Lepore [Thu, 31 Dec 2015 18:29:24 +0000 (18:29 +0000)]
When building libstand for arm, don't emit instructions that require
relocation fixups unsupported by the self_reloc() code, and don't optimize
memcpy/memset using floating point registers, because in a standalone
environment nothing has initialized the fpu hardware.

8 years agoAdd suppoort for the Sitecom LN-031
Kristof Provost [Thu, 31 Dec 2015 18:12:35 +0000 (18:12 +0000)]
Add suppoort for the Sitecom LN-031

This is an AX88178 chip, which we already support so all we have to do is add
the USB product and vendor ID.

8 years agosh: Perform IFS splitting during the first expansion phases.
Jilles Tjoelker [Thu, 31 Dec 2015 17:51:15 +0000 (17:51 +0000)]
sh: Perform IFS splitting during the first expansion phases.

This simplifies the code and should be faster in some cases.

Side effect: the order of operations is different so that the value of IFS
used when IFS is modified during expansion (${IFS:=...}, ${IFS=...} or
$((...IFS=...))) may be different. Note that this order is highly unportable
between shells.

8 years agoNext part of updating llvm/clang build glue: getting the
Dimitry Andric [Thu, 31 Dec 2015 17:37:35 +0000 (17:37 +0000)]
Next part of updating llvm/clang build glue: getting the
WITH_CLANG_EXTRAS tools built.

8 years agoHandle when filedescriptors are closed before initialized. An early
Hans Petter Selasky [Thu, 31 Dec 2015 14:47:45 +0000 (14:47 +0000)]
Handle when filedescriptors are closed before initialized. An early
fdclose() call can cause fget_unlocked() to fail.

Found by: mjg @
MFC after: 1 week
Reviewed by: Mark Block <markb@mellanox.com>
Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4351

8 years agoFirst part of updating llvm/clang build glue: getting llvm-tblgen,
Dimitry Andric [Thu, 31 Dec 2015 14:39:45 +0000 (14:39 +0000)]
First part of updating llvm/clang build glue: getting llvm-tblgen,
clang-tblgen and clang itself built.

8 years agoMinor LinuxKPI code cleanup:
Hans Petter Selasky [Thu, 31 Dec 2015 12:30:19 +0000 (12:30 +0000)]
Minor LinuxKPI code cleanup:
- Declare some static functions in linux_compat.c instead if inside
  various header files.
- Prefix FreeBSD local functions in the LinuxKPI with "linux_" to
  avoid symbol name conflicts in the future and to make debugging
  easier.
- Make the "struct kobj_ktype" declaractions constant to shave off a
  few bytes from the data segment.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoMake the kobject refcounting compliant with Linux. Refcounting on the
Hans Petter Selasky [Thu, 31 Dec 2015 11:27:36 +0000 (11:27 +0000)]
Make the kobject refcounting compliant with Linux. Refcounting on the
parent kobject cannot be factored out and must be done by the kobject
consumers.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoBump copyright year.
Bjoern A. Zeeb [Thu, 31 Dec 2015 11:21:45 +0000 (11:21 +0000)]
Bump copyright year.

Happy New Year 2016!

8 years agoRemove unused variable after r292981 to unbreak the build.
Bjoern A. Zeeb [Thu, 31 Dec 2015 10:55:50 +0000 (10:55 +0000)]
Remove unused variable after r292981 to unbreak the build.

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
Marcelo Araujo [Thu, 31 Dec 2015 07:08:21 +0000 (07:08 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Reviewed by: grehan
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D4734

8 years agoClean up unused-but-set-variable spotted by gcc4.9.
Marcelo Araujo [Thu, 31 Dec 2015 07:03:41 +0000 (07:03 +0000)]
Clean up unused-but-set-variable spotted by gcc4.9.

Reviewed by: ngie
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D4719

8 years agoImplement interface link header precomputation API.
Alexander V. Chernikov [Thu, 31 Dec 2015 05:03:27 +0000 (05:03 +0000)]
Implement interface link header precomputation API.

Add if_requestencap() interface method which is capable of calculating
  various link headers for given interface. Right now there is support
  for INET/INET6/ARP llheader calculation (IFENCAP_LL type request).
  Other types are planned to support more complex calculation
  (L2 multipath lagg nexthops, tunnel encap nexthops, etc..).

Reshape 'struct route' to be able to pass additional data (with is length)
  to prepend to mbuf.

These two changes permits routing code to pass pre-calculated nexthop data
  (like L2 header for route w/gateway) down to the stack eliminating the
  need for other lookups. It also brings us closer to more complex scenarios
  like transparently handling MPLS nexthops and tunnel interfaces.
  Last, but not least, it removes layering violation introduced by flowtable
  code (ro_lle) and simplifies handling of existing if_output consumers.

ARP/ND changes:
Make arp/ndp stack pre-calculate link header upon installing/updating lle
  record. Interface link address change are handled by re-calculating
  headers for all lles based on if_lladdr event. After these changes,
  arpresolve()/nd6_resolve() returns full pre-calculated header for
  supported interfaces thus simplifying if_output().
Move these lookups to separate ether_resolve_addr() function which ether
  returs error or fully-prepared link header. Add <arp|nd6_>resolve_addr()
  compat versions to return link addresses instead of pre-calculated data.

BPF changes:
Raw bpf writes occupied _two_ cases: AF_UNSPEC and pseudo_AF_HDRCMPLT.
Despite the naming, both of there have ther header "complete". The only
  difference is that interface source mac has to be filled by OS for
  AF_UNSPEC (controlled via BIOCGHDRCMPLT). This logic has to stay inside
  BPF and not pollute if_output() routines. Convert BPF to pass prepend data
  via new 'struct route' mechanism. Note that it does not change
  non-optimized if_output(): ro_prepend handling is purely optional.
Side note: hackish pseudo_AF_HDRCMPLT is supported for ethernet and FDDI.
  It is not needed for ethernet anymore. The only remaining FDDI user is
  dev/pdq mostly untouched since 2007. FDDI support was eliminated from
  OpenBSD in 2013 (sys/net/if_fddisubr.c rev 1.65).

Flowtable changes:
  Flowtable violates layering by saving (and not correctly managing)
  rtes/lles. Instead of passing lle pointer, pass pointer to pre-calculated
  header data from that lle.

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

8 years agoWrap using #ifdef 'notyet' those variables and statements not yet
Marcelo Araujo [Thu, 31 Dec 2015 02:01:20 +0000 (02:01 +0000)]
Wrap using #ifdef 'notyet' those variables and statements not yet
implemented to lower the compiler warnings.

It fix the case of unused-but-set-variable spotted by gcc4.9.

Reviewed by: ngie, ae
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D4720

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
Marcelo Araujo [Thu, 31 Dec 2015 01:57:55 +0000 (01:57 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D4736

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
Marcelo Araujo [Thu, 31 Dec 2015 01:55:51 +0000 (01:55 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Reviewed by: grehan
Approved by: bapt (mentor)
Differential Revision: https://reviews.freebsd.org/D4735

8 years agoClean up unused-but-set-variable spotted by gcc-4.9.
Marcelo Araujo [Thu, 31 Dec 2015 01:54:07 +0000 (01:54 +0000)]
Clean up unused-but-set-variable spotted by gcc-4.9.

Reviewed by: royger
Approved by: rodrigc (mentor)
Differential Revision: https://reviews.freebsd.org/D4733

8 years agoBump __FreeBSD_version because r292782 removes sys/crypto/sha2.h
Allan Jude [Wed, 30 Dec 2015 23:27:24 +0000 (23:27 +0000)]
Bump __FreeBSD_version because r292782 removes sys/crypto/sha2.h

Submitted by: Oliver Pinter <oliver.pinter@hardenedbsd.org>

8 years agoAdd the MOVT/MOVW types to the list of relocs which do not generate .plt
Ian Lepore [Wed, 30 Dec 2015 23:04:08 +0000 (23:04 +0000)]
Add the MOVT/MOVW types to the list of relocs which do not generate .plt
entries.  This fixes the segfaults in arm userland code compiled with
-march= or -mcpu= values that allow the compiler to generate movw/movt
sequences to load 32-bit constants.

8 years agoBreak up opencrypto/xform.c so it can be reused piecemeal
Allan Jude [Wed, 30 Dec 2015 22:43:07 +0000 (22:43 +0000)]
Break up opencrypto/xform.c so it can be reused piecemeal

Keep xform.c as a meta-file including the broken out bits
existing code that includes xform.c continues to work as normal

Individual algorithms can now be reused elsewhere, including outside
of the kernel

Reviewed by: bapt (previous version), gnn, delphij
Approved by: secteam
MFC after: 1 week
Sponsored by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D4674

8 years agoForce nullfs vnode reclaim after unlinking, to potentially unlink
Konstantin Belousov [Wed, 30 Dec 2015 19:49:22 +0000 (19:49 +0000)]
Force nullfs vnode reclaim after unlinking, to potentially unlink
lower vnode.  Otherwise, reference to the lower vnode from the upper
one prevents final unlink.

PR: 178238
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoChange the - hopefully - last piece of ktr(9) to use PCPU_GET(cpuid)
Marius Strobl [Wed, 30 Dec 2015 18:57:29 +0000 (18:57 +0000)]
Change the - hopefully - last piece of ktr(9) to use PCPU_GET(cpuid)
instead of the MD module ID for KTR_CPU.

8 years agoUpdate various build glue files for the new llvm/clang version number.
Dimitry Andric [Wed, 30 Dec 2015 18:52:29 +0000 (18:52 +0000)]
Update various build glue files for the new llvm/clang version number.

8 years agoUpdate clang's Version.inc file, and regenerate various generated
Dimitry Andric [Wed, 30 Dec 2015 18:23:01 +0000 (18:23 +0000)]
Update clang's Version.inc file, and regenerate various generated
configuration headers (these used to be generated by autoconf, but
upstream has deprecated autoconf in favor of CMake).

8 years agoRename `recvfd` and `sendfd` variables in recvfd/sendfd functions to avoid
Enji Cooper [Wed, 30 Dec 2015 18:13:43 +0000 (18:13 +0000)]
Rename `recvfd` and `sendfd` variables in recvfd/sendfd functions to avoid
-Wshadow issues with gcc

MFC after: 1 week
Reported by: bz, jenkins
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd the appropriate case statement for IPV6_BINDMULTI so the option can be
Jonathan T. Looney [Wed, 30 Dec 2015 18:08:05 +0000 (18:08 +0000)]
Add the appropriate case statement for IPV6_BINDMULTI so the option can be
retrieved with getsockopt().

CID: 1229928
Differential Revision: https://reviews.freebsd.org/D4737
Reviewed by: adrian
Sponsored by: Juniper Networks

8 years agoFix a file descriptor leak in mdXhl.c (which is used by numerous hashing
Jonathan T. Looney [Wed, 30 Dec 2015 18:04:50 +0000 (18:04 +0000)]
Fix a file descriptor leak in mdXhl.c (which is used by numerous hashing
algorithms.

CID: 1305669,1305611,1305663,1305603,1305584,1305639,1346865,1305601
Differential Revision: https://reviews.freebsd.org/D4732
Reviewed by: allanjude, delphij
MFC after: 2 weeks
Sponsored by: Juniper Networks

8 years agoDecode and print the ID_AA64* registers on boot. These registers hold
Andrew Turner [Wed, 30 Dec 2015 17:36:34 +0000 (17:36 +0000)]
Decode and print the ID_AA64* registers on boot. These registers hold
information on what the core supports. In most cases these will be
identical across most CPUs in the SoC, however there may be the case where,
with a big.LITTLE setup they may differ. In this case we print the
decoded data on all CPUs.

Reviewed by: kib
Sponsored by: ABT Systems Ltd
Differential Revision: https://reviews.freebsd.org/D4725

8 years agoThis code is not in modules that need KPI stability so no need to use
Bjoern A. Zeeb [Wed, 30 Dec 2015 17:10:03 +0000 (17:10 +0000)]
This code is not in modules that need KPI stability so no need to use
the wrapper functions as used in r252511.  We can directly use the
locking macros.

Reviewed by: jtl, rwatson
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4731

8 years agoDrop the clang patch which added a custom vendor suffix to the version
Dimitry Andric [Wed, 30 Dec 2015 16:42:09 +0000 (16:42 +0000)]
Drop the clang patch which added a custom vendor suffix to the version
printed with -v.  We have historically put a date stamp there (roughly
corresponding to the date of import), but this has never been used for
anything, and the patch has also never been upstreamed, so let's get rid
of it now.

8 years agoMerge ^/head r292936 through r292950.
Dimitry Andric [Wed, 30 Dec 2015 16:20:24 +0000 (16:20 +0000)]
Merge ^/head r292936 through r292950.

8 years agoDrop the clang patch which adds recognition of 'CC' suffixes as aliases
Dimitry Andric [Wed, 30 Dec 2015 16:14:30 +0000 (16:14 +0000)]
Drop the clang patch which adds recognition of 'CC' suffixes as aliases
for --driver-mode=g++, since this was never upstreamed.  For backwards
compatibility, add a wrapper shell script.

MFC after: 1 week

8 years agoAdd support for modifying coalescing parameters runtime.
Hans Petter Selasky [Wed, 30 Dec 2015 15:01:47 +0000 (15:01 +0000)]
Add support for modifying coalescing parameters runtime.

MFC after: 1 week
Sponsored by: Mellanox Technologies

8 years agoAllow I2C to read address 0x51 as well as address 0x50.
Hans Petter Selasky [Wed, 30 Dec 2015 14:58:55 +0000 (14:58 +0000)]
Allow I2C to read address 0x51 as well as address 0x50.

MFC after: 1 week
Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies

8 years agoFix use of uninitialised Nflag
Steven Hartland [Wed, 30 Dec 2015 14:57:42 +0000 (14:57 +0000)]
Fix use of uninitialised Nflag

Initialise Nflag to 0 preventing use of uninitialised value.

Reported by: uqs
MFC after: 1 week
X-MFC-With: r292266
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4449

8 years ago10G ER/LR should present itself as LR.
Hans Petter Selasky [Wed, 30 Dec 2015 14:54:08 +0000 (14:54 +0000)]
10G ER/LR should present itself as LR.

MFC after: 1 week
Submitted by: Shahar Klein <shahark@mellanox.com>
Sponsored by: Mellanox Technologies

8 years agoUsing trunk for now, instead of 3.7.1.
Dimitry Andric [Wed, 30 Dec 2015 14:06:01 +0000 (14:06 +0000)]
Using trunk for now, instead of 3.7.1.

8 years agoDrop patches which are certain to be obsolete now.
Dimitry Andric [Wed, 30 Dec 2015 14:05:33 +0000 (14:05 +0000)]
Drop patches which are certain to be obsolete now.

8 years ago- (Ab)use udivx for dividing the u_int pc_cpuid when implementing
Marius Strobl [Wed, 30 Dec 2015 13:49:20 +0000 (13:49 +0000)]
- (Ab)use udivx for dividing the u_int pc_cpuid when implementing
  CPU_ISSET(), CPU_SET etc. in sparc64 asm. This approach has the
  benefit of not clobbering %y, allowing to revert r222827 and
  partially r222828.
- In r222828, CATR() already was changed to use the equivalent of
  PCPU_GET(cpuid) instead of the MD module ID for KTR_CPU, so
  belatedly also catch up with the C side of ktr(9). Originally,
  in r203838 CATR() was moved away from directly reading the
  module ID or equivalent as that became impractical with other
  CPU types than USI/II supported. With r222828 in place, per-CPU
  data generally is set up soon enough, though, that employing
  PCPU things in ktr(9) also for use during early stages works.
- Unfortunately, an exception to the latter is the ktr(9) use
  in pmap_bootstrap(), which actually is run so early that even
  checking for bootverbose being set via the loader doesn't work.
  Consequently, replace the ktr(9) use in pmap_bootstrap() with
  OF_printf(9) and put it under #ifdef DIAGNOSTIC instead.

MFC after: 3 days

8 years agoUpdate clang to trunk r256633.
Dimitry Andric [Wed, 30 Dec 2015 13:34:49 +0000 (13:34 +0000)]
Update clang to trunk r256633.

8 years agoUpdate llvm to trunk r256633.
Dimitry Andric [Wed, 30 Dec 2015 13:13:10 +0000 (13:13 +0000)]
Update llvm to trunk r256633.

8 years agoMerge ^/head r292913 through r292935.
Dimitry Andric [Wed, 30 Dec 2015 12:10:04 +0000 (12:10 +0000)]
Merge ^/head r292913 through r292935.

8 years agoVendor import of clang trunk r256633:
Dimitry Andric [Wed, 30 Dec 2015 11:49:41 +0000 (11:49 +0000)]
Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633

8 years agoVendor import of llvm trunk r256633:
Dimitry Andric [Wed, 30 Dec 2015 11:46:15 +0000 (11:46 +0000)]
Vendor import of llvm trunk r256633:
https://llvm.org/svn/llvm-project/llvm/trunk@256633

8 years agoIntegrate tools/regression/sockets/unix_passfd into the FreeBSD test
Enji Cooper [Wed, 30 Dec 2015 11:15:07 +0000 (11:15 +0000)]
Integrate tools/regression/sockets/unix_passfd into the FreeBSD test
suite as tests/sys/kern/unix_passfd_test

- Convert testcases to ATF
- Fix an alignment issues
- Mark rights_creds_payload(..) as an expected failure (see PR # 181741)

Based [in part] on the following Differential Revision:
https://reviews.freebsd.org/D689

MFC after: 1 week
Submitted by: markj
Sponsored by: EMC / Isilon Storage Division

8 years agoAdd some more obsolete files, left over from the clang 3.7.0 -> 3.7.1
Dimitry Andric [Wed, 30 Dec 2015 09:15:02 +0000 (09:15 +0000)]
Add some more obsolete files, left over from the clang 3.7.0 -> 3.7.1
upgrade.

Noticed by: Nikolai Lifanov <lifanov@mail.lifanov.com>, jtl

8 years agoAdd platform support for QorIQ SoCs.
Justin Hibbits [Wed, 30 Dec 2015 03:43:25 +0000 (03:43 +0000)]
Add platform support for QorIQ SoCs.

This includes the following changes:
* SMP kickoff for QorIQ (tested on P5020)
* Errata fixes for some silicon revisions
* Enables L2 (and L3 if available) caches
Obtained from: Semihalf
Sponsored by: Alex Perez/Inertial Computing

8 years agoUse __alignof__ instead of assuming int64_t to get the right
Warner Losh [Wed, 30 Dec 2015 03:36:22 +0000 (03:36 +0000)]
Use __alignof__ instead of assuming int64_t to get the right
alignment.

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

8 years agoOptimize zero_page for book-e mmu.
Justin Hibbits [Wed, 30 Dec 2015 02:26:04 +0000 (02:26 +0000)]
Optimize zero_page for book-e mmu.

Instead of indirectly calling bzero() through mmu_booke_zero_page_area, zero the
full page the same way as the AIM pmap logic does: using dcbz.

8 years agoRewrite tid_flush() in C.
Justin Hibbits [Wed, 30 Dec 2015 02:23:14 +0000 (02:23 +0000)]
Rewrite tid_flush() in C.

There's no need for it to be in asm.  Also, by writing in C, and marking it
static in pmap.c, it saves a branch to the function itself, as it's only used in
one location.  The generated asm is virtually identical to the handwritten code.

8 years agoFix stack leak introduced by SVN r97201 (nextboot_conf support).
Devin Teske [Wed, 30 Dec 2015 02:15:12 +0000 (02:15 +0000)]
Fix stack leak introduced by SVN r97201 (nextboot_conf support).
Fix erroneous error path in error messages when processing boot_conf.
Fixup stack comments for functions introduced by SVN r97201.
Remove a questioning stack comment introduced by SVN r186789.
NB: Comment removed because strdup usage here is correct/not a leak.

MFC after: 1 week

8 years agoAdapt CATR() to r283283.
Marius Strobl [Wed, 30 Dec 2015 00:17:37 +0000 (00:17 +0000)]
Adapt CATR() to r283283.

8 years agoDocument the recently added support for ptrace(2) LWP events.
John Baldwin [Wed, 30 Dec 2015 00:04:57 +0000 (00:04 +0000)]
Document the recently added support for ptrace(2) LWP events.

8 years agoAdd ptrace(2) reporting for LWP events.
John Baldwin [Tue, 29 Dec 2015 23:25:26 +0000 (23:25 +0000)]
Add ptrace(2) reporting for LWP events.

Add two new LWPINFO flags: PL_FLAG_BORN and PL_FLAG_EXITED for reporting
thread creation and destruction. Newly created threads will stop to report
PL_FLAG_BORN before returning to userland and exiting threads will stop to
report PL_FLAG_EXIT before exiting completely. Both of these events are
only enabled and reported if PT_LWP_EVENTS is enabled on a process.

8 years agoCall kern_thr_exit() instead of duplicating it.
John Baldwin [Tue, 29 Dec 2015 23:16:20 +0000 (23:16 +0000)]
Call kern_thr_exit() instead of duplicating it.

This code is missing the racct_subr() call from kern_thr_exit() and would
require further code duplication in future changes.

Reviewed by: kib
MFC after: 1 week

8 years agoBring some of the recent locore-v4.S improvements into locore-V6...
Ian Lepore [Tue, 29 Dec 2015 22:18:35 +0000 (22:18 +0000)]
Bring some of the recent locore-v4.S improvements into locore-V6...

 - Map all 4GB as VA=PA so that args passed in from a bootloader can
   be accessed regardless of where they are.
 - Figure out the kernel load address by directly masking the PC rather
   then by doing pc-relative math on the _start symbol.
 - For EARLY_PRINTF support, map device memory as uncacheable (no-op for
   ARM_NEW_PMAP because all TEX types resolve to uncacheable).

8 years agoAdd standard extended feature bit 6 from the Intel SDM rev. 57, which
Konstantin Belousov [Tue, 29 Dec 2015 22:14:21 +0000 (22:14 +0000)]
Add standard extended feature bit 6 from the Intel SDM rev. 57, which
indicates that data-pointer in the saved x87 FPU state is only updated
on FPU exceptions.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

8 years agoFix the error checking for the ubenv command. This moves the check for an
Ian Lepore [Tue, 29 Dec 2015 21:29:05 +0000 (21:29 +0000)]
Fix the error checking for the ubenv command.  This moves the check for an
empty ldvar (which amounts to the varname string starting with '=') into
the if block that manipulates ldvar, which avoids later referencing ldvar
when it was never initialized.

Submitted by: Thomas Skibo
Pointy hat: ian

8 years agosh: Split subevalvar() in #/##/%/%% and =/? parts.
Jilles Tjoelker [Tue, 29 Dec 2015 20:51:29 +0000 (20:51 +0000)]
sh: Split subevalvar() in #/##/%/%% and =/? parts.

8 years agoFix getopt(3) argument after r290180; I forgot to change -r to -R
Enji Cooper [Tue, 29 Dec 2015 20:17:40 +0000 (20:17 +0000)]
Fix getopt(3) argument after r290180; I forgot to change -r to -R
by accident

MFC after: 3 days
Pointyhat to: ngie
Reported by: vangyzen
Sponsored by: EMC / Isilon Storage Division

8 years agoWhen checking the inp_ip_minttl restriction for IPv6 packets, don't check
Jonathan T. Looney [Tue, 29 Dec 2015 19:20:39 +0000 (19:20 +0000)]
When checking the inp_ip_minttl restriction for IPv6 packets, don't check
the IPv4 header.

CID: 1017920
Differential Revision: https://reviews.freebsd.org/D4727
Reviewed by: bz
MFC after: 2 weeks
Sponsored by: Juniper Networks

8 years ago- Add entries for the more prominent members of the Digi International
Marius Strobl [Tue, 29 Dec 2015 17:07:28 +0000 (17:07 +0000)]
- Add entries for the more prominent members of the Digi International
  Neo series, which are based on Exar PCI chips.
- Mark some unused parameters as such.
- Fix style

MFC after: 3 days

8 years agopax: prevent possible buffer overflow
Pedro F. Giffuni [Tue, 29 Dec 2015 16:31:28 +0000 (16:31 +0000)]
pax: prevent possible buffer overflow

Or at least quiet down some static analyzers about it.

CID: 978835
MFC after: 1 week
Obtained from: OpenBSD

8 years agoImprovements to BSD-licensed DTC.
David Chisnall [Tue, 29 Dec 2015 16:29:42 +0000 (16:29 +0000)]
Improvements to BSD-licensed DTC.

- Added an expression parser so that expressions from headers are now working
- Fixed missing null terminators on cross references
- Disabled exceptions / RTTI in the build for smaller binaries
- Changed phandle order generation to be identical to GPL'd dtc

8 years ago- Sort ports-secteam
Martin Wilke [Tue, 29 Dec 2015 15:54:34 +0000 (15:54 +0000)]
- Sort ports-secteam

8 years agoext2: recognize ext4 INCOMPAT_RECOVER flag
Pedro F. Giffuni [Tue, 29 Dec 2015 15:51:52 +0000 (15:51 +0000)]
ext2: recognize ext4 INCOMPAT_RECOVER flag

This is a flag specific for journalling in ext4.
Add it to the list of ext4 features we ignore for
read-only purposes.

PR: 205668
MFC after: 1 week

8 years ago- Add myself to ports-secteam
Martin Wilke [Tue, 29 Dec 2015 15:36:46 +0000 (15:36 +0000)]
- Add myself to ports-secteam

Approved by: delphij (implicit)

8 years agoCorrect the code for sign-extending a 16 bit value. As near as I can tell
Ian Lepore [Tue, 29 Dec 2015 15:23:03 +0000 (15:23 +0000)]
Correct the code for sign-extending a 16 bit value.  As near as I can tell
this is effectively a no-op -- the addend term in MOVT/MOVW relocations
always seems to be zero.  But this is correct and the old code wasn't.

8 years agoUpdate metadata for "tools/tools/bus_autoconf" after r292080. Use
Hans Petter Selasky [Tue, 29 Dec 2015 11:53:13 +0000 (11:53 +0000)]
Update metadata for "tools/tools/bus_autoconf" after r292080. Use
BYTE_ORDER instead of _BYTE_ORDER due to 3rd party USB software for
now.

8 years agoFix type mismatches for malloc(3) and Co.
Ulrich Spörlein [Tue, 29 Dec 2015 11:24:41 +0000 (11:24 +0000)]
Fix type mismatches for malloc(3) and Co.

This is rather pedantic, as for most architectures it holds that
sizeof(type *) == sizeof(type **)

Found by: clang static analyzer
Reviewed by: ed
Differential Revision: https://reviews.freebsd.org/D4722

8 years agoFix type mismatches for malloc(3) and Co.
Ulrich Spörlein [Tue, 29 Dec 2015 11:24:35 +0000 (11:24 +0000)]
Fix type mismatches for malloc(3) and Co.

Found by: clang static analyzer
Reviewed by: ed
Differential Revision: https://reviews.freebsd.org/D4722

8 years agohyperv: vmbus: run non-blocking message handlers in vmbus_msg_swintr()
Xin LI [Tue, 29 Dec 2015 08:19:43 +0000 (08:19 +0000)]
hyperv: vmbus: run non-blocking message handlers in vmbus_msg_swintr()

We'll remove the per-channel control_work_queue because it can't properly
do serialization of message handling, e.g., when there are 2 NIC devices,
vmbus_channel_on_offer() -> hv_queue_work_item() has a race condition:
for an SMP VM, vmbus_channel_process_offer() can run concurrently on
different CPUs and if the second NIC's
vmbus_channel_process_offer() -> hv_vmbus_child_device_register() runs
first, the second NIC's name will be hn0 and the first NIC's name will
be hn1!

We can fix the race condition by removing the per-channel control_work_queue
and run all the message handlers in the global
hv_vmbus_g_connection.work_queue -- we'll do this in the next patch.

With the coming next patch, we have to run the non-blocking handlers
directly in the kernel thread vmbus_msg_swintr(), because the special
handling of sub-channel: when a sub-channel (e.g., of the storvsc driver)
is received and being handled in vmbus_channel_on_offer() running on the
global hv_vmbus_g_connection.work_queue, vmbus_channel_process_offer()
invokes channel->sc_creation_callback, i.e., storvsc_handle_sc_creation,
and the callback will invoke hv_vmbus_channel_open() -> hv_vmbus_post_message
and expect a further reply from the host, but the handling of the further
messag can't be done because the current message's handling hasn't finished
yet; as result, hv_vmbus_channel_open() -> sema_timedwait() will time out
and th device can't work.

Also renamed the handler type from hv_pfn_channel_msg_handler to
vmbus_msg_handler: the 'pfn' and 'channel' in the old name make no sense.

Submitted by: Dexuan Cui <decui microsoft com>
Reviewed by: royger
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D4596