Commit Graph

207215 Commits

Author SHA1 Message Date
Jilles Tjoelker
ee97d8648c sh: Reindent expandmeta(). 2015-12-31 18:56:11 +00:00
Jilles Tjoelker
0e39c931e2 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.
2015-12-31 18:47:54 +00:00
Ian Lepore
1256437c72 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.
2015-12-31 18:29:24 +00:00
Kristof Provost
dd876af4de 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.
2015-12-31 18:12:35 +00:00
Jilles Tjoelker
47d8814c7f 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.
2015-12-31 17:51:15 +00:00
Dimitry Andric
ffa548ae3e Next part of updating llvm/clang build glue: getting the
WITH_CLANG_EXTRAS tools built.
2015-12-31 17:37:35 +00:00
Hans Petter Selasky
b648035313 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
2015-12-31 14:47:45 +00:00
Dimitry Andric
34cdd77646 First part of updating llvm/clang build glue: getting llvm-tblgen,
clang-tblgen and clang itself built.
2015-12-31 14:39:45 +00:00
Hans Petter Selasky
06204f8e25 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
2015-12-31 12:30:19 +00:00
Hans Petter Selasky
337cb9f04c 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
2015-12-31 11:27:36 +00:00
Bjoern A. Zeeb
881b1e2f95 Bump copyright year.
Happy New Year 2016!
2015-12-31 11:21:45 +00:00
Bjoern A. Zeeb
cc398e2151 Remove unused variable after r292981 to unbreak the build. 2015-12-31 10:55:50 +00:00
Marcelo Araujo
3ec1cff529 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
2015-12-31 07:08:21 +00:00
Marcelo Araujo
25656def0d Clean up unused-but-set-variable spotted by gcc4.9.
Reviewed by:	ngie
Approved by:	rodrigc (mentor)
Differential Revision:	https://reviews.freebsd.org/D4719
2015-12-31 07:03:41 +00:00
Alexander V. Chernikov
4fb3a8208c 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
2015-12-31 05:03:27 +00:00
Marcelo Araujo
2bfd3dfb9f 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
2015-12-31 02:01:20 +00:00
Marcelo Araujo
09df572391 Clean up unused-but-set-variable spotted by gcc-4.9.
Approved by:	bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D4736
2015-12-31 01:57:55 +00:00
Marcelo Araujo
d74fdc6a35 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
2015-12-31 01:55:51 +00:00
Marcelo Araujo
f7e124adf5 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
2015-12-31 01:54:07 +00:00
Allan Jude
e80e04aeb7 Bump __FreeBSD_version because r292782 removes sys/crypto/sha2.h
Submitted by:	Oliver Pinter <oliver.pinter@hardenedbsd.org>
2015-12-30 23:27:24 +00:00
Ian Lepore
dfd3a89ff0 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.
2015-12-30 23:04:08 +00:00
Allan Jude
2155bb238f 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
2015-12-30 22:43:07 +00:00
Konstantin Belousov
6f73b583d9 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
2015-12-30 19:49:22 +00:00
Marius Strobl
258527a372 Change the - hopefully - last piece of ktr(9) to use PCPU_GET(cpuid)
instead of the MD module ID for KTR_CPU.
2015-12-30 18:57:29 +00:00
Dimitry Andric
802df53c82 Update various build glue files for the new llvm/clang version number. 2015-12-30 18:52:29 +00:00
Dimitry Andric
250e909a40 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).
2015-12-30 18:23:01 +00:00
Enji Cooper
67fe84f163 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
2015-12-30 18:13:43 +00:00
Jonathan T. Looney
912568c881 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
2015-12-30 18:08:05 +00:00
Jonathan T. Looney
8d03d93fb7 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
2015-12-30 18:04:50 +00:00
Andrew Turner
5f0a5fefc6 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
2015-12-30 17:36:34 +00:00
Bjoern A. Zeeb
88310b4011 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
2015-12-30 17:10:03 +00:00
Dimitry Andric
a27deaebb2 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.
2015-12-30 16:42:09 +00:00
Dimitry Andric
6a0fcfa92a Merge ^/head r292936 through r292950. 2015-12-30 16:20:24 +00:00
Dimitry Andric
28db8b1226 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
2015-12-30 16:14:30 +00:00
Hans Petter Selasky
f03f517b5e Add support for modifying coalescing parameters runtime.
MFC after:	1 week
Sponsored by:	Mellanox Technologies
2015-12-30 15:01:47 +00:00
Hans Petter Selasky
4fbd91a5af 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
2015-12-30 14:58:55 +00:00
Steven Hartland
0f79b5d72b 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
2015-12-30 14:57:42 +00:00
Hans Petter Selasky
4f18ce8ae0 10G ER/LR should present itself as LR.
MFC after:	1 week
Submitted by:	Shahar Klein <shahark@mellanox.com>
Sponsored by:	Mellanox Technologies
2015-12-30 14:54:08 +00:00
Dimitry Andric
9e2dc66723 Using trunk for now, instead of 3.7.1. 2015-12-30 14:06:01 +00:00
Dimitry Andric
b9695a57f6 Drop patches which are certain to be obsolete now. 2015-12-30 14:05:33 +00:00
Marius Strobl
45005f7907 - (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
2015-12-30 13:49:20 +00:00
Dimitry Andric
0623d7483d Update clang to trunk r256633. 2015-12-30 13:34:49 +00:00
Dimitry Andric
7d523365ff Update llvm to trunk r256633. 2015-12-30 13:13:10 +00:00
Dimitry Andric
e3b65fde50 Merge ^/head r292913 through r292935. 2015-12-30 12:10:04 +00:00
Dimitry Andric
45b533945f Vendor import of clang trunk r256633:
https://llvm.org/svn/llvm-project/cfe/trunk@256633
2015-12-30 11:49:41 +00:00
Dimitry Andric
dd58ef019b Vendor import of llvm trunk r256633:
https://llvm.org/svn/llvm-project/llvm/trunk@256633
2015-12-30 11:46:15 +00:00
Enji Cooper
b9083c2190 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
2015-12-30 11:15:07 +00:00
Dimitry Andric
aae7733a76 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
2015-12-30 09:15:02 +00:00
Justin Hibbits
3f068cbf5c 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
2015-12-30 03:43:25 +00:00
Warner Losh
1cf827546a Use __alignof__ instead of assuming int64_t to get the right
alignment.

Differential Revision: https://reviews.freebsd.org/D4708
2015-12-30 03:36:22 +00:00