Commit Graph

227520 Commits

Author SHA1 Message Date
Bryan Drewery
1ca30d8e1c AUTO_OBJ: Don't create TARGET. directories during 'make universe'.
Reported by:	rpokala
Sponsored by:	Dell EMC Isilon
2017-11-08 02:28:24 +00:00
Mark Johnston
bd0e1beb98 Correct the type of foff.
No functional change intended.

Github PR:	124
Submitted by:	Wuyang Chung <wuyang.m.chung@outlook.com>
MFC after:	1 week
2017-11-08 01:53:03 +00:00
Justin Hibbits
9a7a0683b1 DS1307: Add the mcp7941x enable bit
Summary:
Existing code recognizes the mcp7941x RTC, but this RTC has an
enable bit at the same location as the "Clock Halt" bit on the ds1307, with an
opposite assertion (set == on, whereas CH set == clock stopped).  Thus the
current code halts the clock, with no way to enable it.

Reviewed By:	ian
MFC after:	2 weeks
Differential Revision: https://reviews.freebsd.org/D12961
2017-11-08 01:28:20 +00:00
Justin Hibbits
81d7ebb695 Add the ISEL feature macro for those powerpc cores that have it
This is mostly for completeness, we don't currently use it for anything else.
2017-11-08 01:26:44 +00:00
Justin Hibbits
bc3acf82cc Clear the WE bit in C code rather than the asm
According to EREF rlwinm is supposed to clear the upper 32 bits of the
register of 64-bit cores.  However, from experience it seems there's a bug
in the e5500 which causes the result to be duplicated in the upper bits of
the register.  This causes problems when applied to stashed SRR1 accessed
to retrieve context, as the upper bits are not masked out, so a
set_mcontext() fails.  This causes sigreturn() to in turn return with
EINVAL, causing make(1) to exit with error.

This bit is unused in e500mc derivatives (including e5500), so could just be
conditional on non-powerpc64, but there may be other non-Freescale cores
which do use it.  This is also the same as the POW bit on Book-S, so could
be cleared unconditionally with the only penalty being a few clock cycles
for these two interrupts.
2017-11-08 01:23:37 +00:00
Glen Barber
0ff7d32714 Fix the 'casper' package, following r325062.
Submitted by:	woodsb02
Sponsored by:	The FreeBSD Foundation
2017-11-08 01:00:59 +00:00
Navdeep Parhar
5c2bacde58 Update the iw_cxgbe bits in the projects branch.
Submitted by:	Krishnamraju Eraparaju @ Chelsio
Sponsored by:	Chelsio Communications
2017-11-07 23:52:14 +00:00
Bryan Drewery
502304ef16 Reenable AUTO_OBJ by default.
The problem with it was a bogus .OBJDIR in some cases where creation of
object directories were purposely not attempted, such as for 'make cleandir'
and in etc/ sub-directories.  In these cases bmake would start with a
bogus .OBJDIR like etc/ due to MAKEOBJDIR being a dynamic value based on
.CURDIR, SRCTOP, and OBJTOP.  OBJTOP would not yet be defined but is
during early src.sys.obj.mk.  That file and auto.obj.mk both were not
modifying .OBJDIR unless they expected to create the objdir.  Thus in
these cases the .OBJDIR was left as etc/* rather than fixed to the
proper .CURDIR.

The issues were fixed in r325404 and r325416.  An assertion to avoid the
bad .OBJDIR was added in r325405.

Sponsored by:	Dell EMC Isilon
2017-11-07 18:20:08 +00:00
John Baldwin
2b6e6d8500 Wrap to 80 columns. No functional change. 2017-11-07 17:45:39 +00:00
Emmanuel Vadot
530fdf6771 ctl: Make max_luns and max_ports tunable variables instead of hardcoded
defines.

Reviewed by:	trasz (earlier version), bapt (earlier version), bcr (manpages)
MFC after:	2 Weeks
Sponsored by:	Gandi.net
Differential Revision:	https://reviews.freebsd.org/D12836
2017-11-07 16:59:52 +00:00
Bartek Rutkowski
cee09850f7 Make sysctl_kern_proc_umask execute fast path when requested pid in
curproc->p_pid or 0, avoiding unnecessary locking. Update libc consumer
to skip calling getpid().

Submitted by:	Pawel Biernacki <pawel.biernacki@gmail.com>
Reviewed by:	mjg, robak
Approved by:	mjg
Sponsored by:	Mysterious Code Ltd.
Differential Revision:	D12972
2017-11-07 15:13:32 +00:00
Warner Losh
3fa561a45b Note interactive shell errors for make buildenv and add a warning for
people tempted to add back the || true to get rid of them.

Sponsored by: Netflix
2017-11-07 15:01:38 +00:00
Marcin Wojtas
fceb938715 Change function validate_tx_req_id() to inline in ENA driver
The function is in hot path of the driver (TX) and asking compiler for
making this function inline was changed for consistency and higher
readability.

Submitted by: Michal Krawczyk <mk@semihalf.com>
Reviewed by: rlibby, byenduri_gmail.com
Obtained from: Semihalf
Sponsored by: Amazon, Inc.
Differential Revision: https://reviews.freebsd.org/D12854
2017-11-07 13:26:11 +00:00
Marcin Wojtas
cd5d5804b1 Fix ENA driver error handling in attach and basic style fixes
The patch contains following changes:

* In conditional checks, always check for NULL or 0 instead of negating values
* Use malloc and free explicitely, instead of ENA_MEM_FREE and ENA_MEM_FREE (the
  dmadev passed to macro is never used, and could be a little misleading)
* Always check for NULL after calling malloc (few checks were missing)
* Rework naming of the goto tags in ena_attach() for consistency
* Fix error handling in ena_attach() - few goto instructions were leading to the
  wrong tag
* Destroy MMIO req read request if attach failed
* Remove checking for NULL after calling malloc with M_WAITOK flag

Submitted by: Michal Krawczyk <mk@semihalf.com>
Reviewed by: byenduri_gmail.com
Obtained from: Semihalf
Sponsored by: Amazon.com, Inc.
Differential Revision: https://reviews.freebsd.org/D12853
2017-11-07 13:20:41 +00:00
Warner Losh
25dfe63ccb Use MACHINE_CPUARCH in preference MACHINE for userland.
Sponsored by: Netflix
2017-11-07 09:57:26 +00:00
Konstantin Belousov
5ca9d4efa5 Bump __FreeBSD_version after struct mbuf KBI breakage in r325506.
Sponsored by:	Mellanox Technologies
2017-11-07 09:47:54 +00:00
Warner Losh
8f3b60c5f1 Correct the detection of hard float arm
* Don't test MACHINE, it's irrelevant to userland and should never be
  used in userland Makefiles.
* If we match armv[67] and CPUTYPE is undefined OR it doesn't have
  'soft' in it, choose armhf.
* Add a note that the soft float on armv[67] may be broken.

Sponsored by: Netflix
2017-11-07 09:47:05 +00:00
Konstantin Belousov
06193f0be0 Use hardware timestamps to report packet timestamps for SO_TIMESTAMP
and other similar socket options.

Provide new control message SCM_TIME_INFO to supply information about
timestamp.  Currently it indicates that the timestamp was
hardware-assisted and high-precision, for software timestamps the
message is not returned.  Reserved fields are added to ABI to report
additional info about it, it is expected that raw hardware clock value
might be useful for some applications.

Reviewed by:	gallatin (previous version), hselasky
Sponsored by:	Mellanox Technologies
MFC after:	2 weeks
X-Differential revision:	https://reviews.freebsd.org/D12638
2017-11-07 09:46:26 +00:00
Konstantin Belousov
3cf8254f1e Add a place for a driver to report rx timestamps in nanoseconds from
boot for the received packets.

The rcv_tstmp field overlaps the place of Ln header length indicators,
not used by received packets.  The basic pkthdr rearrangement change
in sys/mbuf.h was provided by gallatin.

There are two accompanying M_ flags: M_TSTMP means that there is the
timestamp (and it was generated by hardware).

Another flag M_TSTMP_HPREC indicates that the timestamp is
high-precision.  Practically M_TSTMP_HPREC means that hardware
provided additional precision comparing with the stamps when the flag
is not set.  E.g., for ConnectX all packets are stamped by hardware
when PCIe transaction to write out the completion descriptor is
performed, but PTP packet are stamped on port.  For Intel cards, when
PTP assist is enabled, only PTP packets are stamped in the limited
number of registers, so if Intel cards ever start support this
mechanism, they would always set M_TSTMP | M_TSTMP_HPREC if hardware
timestamp is present for the given packet.

Add IFCAP_HWRXTSTMP interface capability to indicate the support for
hardware rx timestamping, and ifconfig(8) command to toggle it.

Based on the patch by:	gallatin
Reviewed by:	gallatin (previous version), hselasky
Sponsored by:	Mellanox Technologies
MFC after:	2 weeks (? mbuf KBI issue)
X-Differential revision:	https://reviews.freebsd.org/D12638
2017-11-07 09:29:14 +00:00
Hans Petter Selasky
c2c014f24c Merge ^/head r323559 through r325504. 2017-11-07 08:39:14 +00:00
Enji Cooper
d61b3d7a72 Redo r325502
:U:Mfoo expands to :Mfoo, apparently. Explicit check for CPUTYPE being
defined, and test for it's value not containing *soft* before calling CRTARCH
armhf.

Tested, somewhat. Unfortunately recent changes appear to have affected
cross-builds where it no longer works, per my tests after universe12a being
upgraded from 07/2017 to 11/2017 sources (DESTDIR isn't being used in WORLDTMP;
MK_SYSTEM_COMPILER might be causing issues right now).

MFC after:	1 week
MFC with:	r325502
Reported by:	imp
2017-11-07 06:26:48 +00:00
Enji Cooper
c03bb93303 Handle arm/armv[67] hosted/targeted builds gracefully
CPUTYPE (apparently) isn't defined in non-cross-builds, which caused
arm/armv[67] hosted/targeted builds to fail when evaluating CPUTYPE.

Add the :U modifier to CPUTYPE so it evaluates to "". This allows armv[67] to
get past the conditional successfully.

MFC after:	1 week
Reported by:	bob prohaska <fbsd@www.zefox.net>
2017-11-07 05:02:36 +00:00
Enji Cooper
5252514fb4 Remove unnecessary src.opts.mk .include
MK_<FOO> isn't used in lib/libcompiler_rt/Makefile at all. Remove it to reduce
namespace pollution.

MFC after:	1 week
2017-11-07 04:56:53 +00:00
Enji Cooper
a2a142486a Use bsd.compiler.mk instead of src.opts.mk
- MK_PROFILE is controlled in bsd.opts.mk, which is pulled in via bsd.own.mk,
  which is pulled in via bsd.init.mk . All upstream Makefiles which build off
  of this one use bsd.init.mk.
- COMPILER_{TYPE,VERSION} is set via bsd.compiler.mk .

This reduces the namespace pollution/complexity somewhat.

MFC after:	1 week
2017-11-07 04:55:23 +00:00
Sean Bruno
abec47242a Fix NOINET/NOINET6 build during compilation of iflib.
Reported by:	kib
2017-11-06 19:54:25 +00:00
Bryan Drewery
2f445a5314 Reapply r295227: Stop hiding link install commands.
This was lost in the release-pkg merge in r298107.

Sponsored by:	Dell EMC Isilon
2017-11-06 19:33:50 +00:00
Sean Bruno
9c92bb71de Fix ixgbe(4) support for ifconfig's vlanhwtag flag. Disabling this flag
will now prevent the driver from stripping vlan tags from packets.

PR:		219390
Submitted by:	Piotr Pietruszewski <piotr.pietruszewski@intel.com>
Reported by:	Charles Goncalves <halfling@halfling.com.br>
Obtained from:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D12795
2017-11-06 18:08:59 +00:00
Glen Barber
bb0c3a6b03 Specify WITH_UNIFIED_OBJDIR in chroot_arm_build_release() to
ensure the output image is created in the correct .OBJDIR.

Sponsored by:	The FreeBSD Foundation
2017-11-06 17:59:04 +00:00
Stephen Hurd
333260daf5 bnxt: Add support for new phy_types and speeds - Part #2
Use our ifm_list of supported media types rather than nested switch
statements to find the current media type.  Find a supported type that
matches the current speed.

Remove all workarounds while updating ifmr->ifm_active.

For BNXT_IFMEDIA_ADD, added Three more speeds IFM_10G_T, IFM_2500_T & IFM_2500_KX.

Submitted by:	Bhargava Chenna Marreddy <bhargava.marreddy@broadcom.com>
Reviewed by:	shurd, sbruno
Approved by:	sbruno (mentor)
Sponsored by:	Broadcom Limited
Differential Revision:	https://reviews.freebsd.org/D12896
2017-11-06 16:41:29 +00:00
Stephen Hurd
35e4e998d8 Only chain non-LRO mbufs when LRO is not possible
Preserve packet order between tcp_lro_rx() and if_input() to avoid
creating extra corner cases. If no packets can be LROed, combine them
into one chain for submission via if_input(). If any packet can
potentially be LROed however, retain old behaviour and call if_input()
for each packet.

This should keep the 12% improvement for small packet forwarding intact,
but mostly avoids impacting the LRO case.

Reviewed by:	cem, sbruno
Approved by:	sbruno (mentor)
Sponsored by:	Limelight Networks
Differential Revision:	https://reviews.freebsd.org/D12876
2017-11-06 16:23:21 +00:00
Andriy Gapon
da86af2815 Add an UPDATING entry for the posix_fallocate/ZFS change, r325320 2017-11-06 15:29:33 +00:00
Warner Losh
63c69e1beb Centralize all 32-bit builds on 64-bit platform stuff.
Move the addition of the -m32 and other flags to defs.mk. Remove
redunant copies of -m32 that come from multiple locations.

Sponsored by: Netflix
2017-11-06 15:22:24 +00:00
Warner Losh
9b19f65c83 Prefer bsd.init.mk to src.opts.mk
Final sweep to prefer bsd.init.mk to src.opts.mk everywhere as a
design pattern.  The rule is that all Makefiles in this subtree should
start with .include <bsd.init.mk> so that we properly include
../Makefile.inc and defs.mk before anything else.

Sponsored by: Netflix
2017-11-06 15:22:17 +00:00
Warner Losh
6923ad3ada MACHINE can never be powerpc64, so cleanup code that thinks it can.
Sponsored by: Netflix
2017-11-06 15:22:11 +00:00
Warner Losh
25f44449ad Move machine and other link creation to defs.mk
Steal the code from kmod.mk and use it to automatically create
links. Modify it a little for the needs of the loader (no need to
guess the OBJS dependency, and we have 32-on-64 cases to contend
with). Remove 15 redundant implementations (which were mostly
different, but kinda the same).

A future commit should factor out this code and that of kmod.mk so we
have only one copy of it in the tree.

Sposnored by: Netflix
2017-11-06 15:22:04 +00:00
Warner Losh
a766a5008a Prefer bsd.init.mk to other constructs.
Sponsored by: Netflix
2017-11-06 15:21:56 +00:00
Warner Losh
4780427469 Use DO32 for all the places that we need to flag we're building a 32
bit version of a library. Use a generic name since this may be usefule
elsewhere.

Sponsored by: Netflix
2017-11-06 15:21:51 +00:00
Warner Losh
7e3b76ca57 Define LIBFICL32 to be libficl.a on i386 and libficl32.a on amd64.
Sponsored by: Netflix
2017-11-06 15:21:45 +00:00
Warner Losh
268e2d82c4 Powerpc is a 32-bit boot loader.
Stop building libsa32 on powerpc. Build everything on powerpc64
-m32. Transition to using LIBSA from LIBSA32. This elimiantes the
useless build of libsa on powerpc64 (nothing used to use it) and
should be a more direct way of saying this.

Sponsored by: Netflix
2017-11-06 15:21:39 +00:00
Mateusz Guzik
db520fdd46 rwlock: fix up compilation without KDTRACE_HOOKS after r324787 2017-11-06 05:14:05 +00:00
Justin Hibbits
37f275860c Set the PRD extension list base address in little endian
All data accesses with the SATA controller are little endian.  This was
missed when writing the extension code.
2017-11-06 05:09:18 +00:00
Mateusz Guzik
ce80021f4e namecache: bump numcache after dropping all locks
This makes no difference correctness-wise, but shortens total hold time.
2017-11-05 22:29:45 +00:00
Bryan Drewery
f7ef435bb6 Rework r325076: Just use the pre-existing OBJDIR.
Like was done in usr.sbin/mergemaster in r249906, we can just use
the already-built OBJDIR for install(1).

Sponsored by:	Dell EMC Isilon
2017-11-05 22:29:34 +00:00
Mateusz Guzik
119b826a62 namecache: wlock buckets in cache_lookup_nomakeentry
Since the case of an empty chain was already covered, it si very likely
that the existing entry is matching. Skipping readlocking saves on lock
upgrade.
2017-11-05 22:28:39 +00:00
Justin Hibbits
78220c7be8 Fix an off-by-one error missed in the initial commit of this driver
When the segment count is > 16 it spills into an 'indirect descriptor list',
which immediately follows the main table, but the indirect list is entry 15, so
needs to be skipped for the general list.
2017-11-05 22:09:59 +00:00
Konstantin Belousov
93b09f581a Remove badsect(8).
Failure modes of the modern (that is, produced in the last 25 years)
hard drives and SSDs made the utility outdated.  Since the kernel
interface to support it was removed in r324853, cut the userspace
remnants as well.

Discussed with:	bde (who does not like the removal)
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2017-11-05 22:00:54 +00:00
Mateusz Guzik
ba324b5946 namecache: skip locking in cache_lookup_nomakeentry if there is no entry 2017-11-05 21:59:39 +00:00
Enji Cooper
6f74a1c952 Fix cosmetic nit when printing out "override $mode" and "$owner/$group ..."
The wrong index was being checked for == ' ' in the resulting stringified
mode from strmode(3) -- it should have been the 11th value, not the 10th.

MFC after:	3 days
PR:		76711
Submitted by:	Vasil Dimov <vd@datamax.bg>
2017-11-05 21:43:26 +00:00
Enji Cooper
792bc22266 Choose a simpler, more philosophically correct version for CRTARCH with armv[67]
This is a rework of r325443.

PR:		222925
Tested with:	make buildenv with appropriate TARGET/TARGET_ARCH pairs
2017-11-05 20:38:40 +00:00
Konstantin Belousov
b535ed2898 Zero the structure instead of the pointer to it.
Reported by:	Don Morris <Don.Morris@dell.com>
MFC after:	4 days
2017-11-05 20:03:57 +00:00