Commit Graph

245543 Commits

Author SHA1 Message Date
Dimitry Andric
f1eeb689ab Pull in r373338 from upstream llvm trunk (by Simon Pilgrim):
Revert rL349624 : Let TableGen write output only if it changed,
  instead of doing so in cmake, attempt 2

  Differential Revision: https://reviews.llvm.org/D55842
  -----------------
  As discussed on PR43385 this is causing Visual Studio msbuilds to
  perpetually rebuild all tablegen generated files

Pull in r373664 from upstream llvm trunk (by Nico Weber):

  Reland r349624: Let TableGen write output only if it changed, instead
  of doing so in cmake

  Move the write-if-changed logic behind a flag and don't pass it with
  the MSVC generator. msbuild doesn't have a restat optimization, so
  not doing write-if-change there doesn't have a cost, and it should
  fix whatever causes PR43385.

This should fix the scenario where an incremental build from before
r353358 (the clang 9.0.0 upgrade) to r353358 or later fails to update
the timestamp of the generated lib/clang/headers/arm_fp16.h header.

After such a build, installing world from read-only source and object
directories would attempt to generate the header again, leading to
"clang-tblgen: error opening arm_fp16.h.d:Read-only file system".

Reported by:	avg, np
PR:		241402
MFC after:	1 month
X-MFC-With:	r353358
2019-10-29 16:51:12 +00:00
Kristof Provost
65d553b0f0 netpfil tests: Add missing copyright & license statements 2019-10-29 09:47:12 +00:00
Li-Wen Hsu
24f584f149 Temporarily disable failing case in CI:
- lib.libexecinfo.backtrace_test.backtrace_fmt_basic

PR:		241562
Sponsored by:	The FreeBSD Foundation
2019-10-29 04:28:24 +00:00
Scott Long
a6c2525c49 Add device IDs for the next generation of Intel HDA audio.
MFC after:	3 days
2019-10-28 23:31:22 +00:00
Jeremie Le Hen
6f42902de3 Grammar fix.
Reported by:	imp
Differential Revision:	https://reviews.freebsd.org/D21880
2019-10-28 21:48:20 +00:00
Edward Tomasz Napierala
fd2ced61ce Document the fact that Linux binaries depend on pty(4).
The source part of the review will be addressed in a different way.

Reviewed by:	emaste, brooks
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21492
2019-10-28 21:22:46 +00:00
Simon J. Gerraty
17adf17b30 Building head on stable/11 requires libzstd
Add lib/libzstd to _elftoolchain_libs

tools/build/Makefile needs to create the install dir for libzstd
Since this would make the line too long, rework to use a list
in one per line format (easier to add in future)
and dispense with the .for loop

Reviewed by:	emaste bapt
Differential Revision:	https://reviews.freebsd.org/D220134
2019-10-28 20:45:29 +00:00
Vincenzo Maffione
484456b2d8 netmap: enter NET_EPOCH on generic txsync
After r353292, netmap generic adapter on if_vlan interfaces panics on
asserting the NET_EPOCH. In more detail, this happens when
nm_os_generic_xmit_frame() is called, that is in the generic txsync
routine.
Fix the issue by entering the NET_EPOCH during the generic txsync.
We amortize the cost of entering/exiting over a whole batch of
transmissions.

PR:		241489
Reported by:	Aleksandr Fedorov <aleksandr.fedorov@itglobal.com>
2019-10-28 19:00:27 +00:00
Conrad Meyer
f5ef5f675d Remove bogus requirement from libexecinfo test
The bogus requirement was causing CI infrastructure (which does not mount
procfs) to skip the test.  Procfs has not been needed by libexecinfo on
FreeBSD (nor NetBSD) for years.  Both now use a sysctl to obtain the path to
the current process image.

X-MFC-With:	r354126
2019-10-28 17:12:45 +00:00
Konstantin Belousov
af592d0465 Fix reset of the kernel stack pointer in TSS for !PTI case on pmap activation
after r354095.

Reported and tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
2019-10-28 10:50:37 +00:00
Li-Wen Hsu
cfa8b64827 Follow r354121 to fix some python3 errors in sys.netpfil.*
stderr:

Traceback (most recent call last):
  File "/usr/tests/sys/netpfil/common/pft_ping.py", line 135, in <module>
    main()
  File "/usr/tests/sys/netpfil/common/pft_ping.py", line 124, in main
    ping(args.sendif[0], args.to[0], args)
  File "/usr/tests/sys/netpfil/common/pft_ping.py", line 74, in ping
    raw = sp.raw(str(PAYLOAD_MAGIC))
  File "/usr/local/lib/python3.6/site-packages/scapy/compat.py", line 52, in raw
    return bytes(x)
TypeError: string argument without an encoding

MFC with:	r354121
Sponsored by:	The FreeBSD Foundation
2019-10-27 21:07:50 +00:00
Cy Schubert
e5f2f48e62 Remove trailing tab.
MFC after:	3 days
2019-10-27 18:27:25 +00:00
Toomas Soome
903fe2b762 loader: zio_checksum_verify should check byteswap
We do have both native and byteswap checksum callbacks in place but the
selection is not wired.

MFC after:	1 week
2019-10-27 08:35:29 +00:00
Conrad Meyer
43e9023f2d libexecinfo: Integrate NetBSD test into FreeBSD 2019-10-27 05:32:08 +00:00
Bjoern A. Zeeb
f0297f121a Upgrade (scapy) py2 tests to work on py3.
In order to move python2 out of the test framework to avoid py2 vs. py3
confusions upgrade the remaining test cases using scapy to work with py3.
That means only one version of scapy needs to be installed in the CI system.
It also gives a path forward for testing i386 issues observed in the CI
system with some of these tests.

Fixes are:
- Use default python from environment (which is 3.x these days).
- properly ident some lines as common for the rest of the file to avoid
  errors.
- cast the calculated offset to an int as the division result is considered
  a float which is not accepted input.
- when comparing payload to a magic number make sure we always add the
  payload properly to the packet and do not try to compare string in
  the result but convert the data payload back into an integer.
- fix print formating.

Discussed with:	lwhsu, kp (taking it off his todo :)
MFC after:	2 weeks
2019-10-26 21:19:55 +00:00
Alan Somers
cefbdf3eaa Commit missing file from r354116
Pointy-hat-to:	Me
Reported by:	Dan Mack
MFC after:	2 weeks
MFC-With:	354116
2019-10-26 19:20:59 +00:00
Toomas Soome
4efce32a51 loader: rs_alloc() may return NULL
rs_alloc() in zfs reader code may return NULL, so we need to check the return value and error out if needed.
MFC after:	1 week
2019-10-26 18:29:02 +00:00
Konstantin Belousov
20795e252a Provide dummy definition of the amd64 struct pcb for -m32 compilation.
I do not see a need in the proper x86/include/pcb.h header.

Reported and tested by:	antoine
MFC after:	1 week
2019-10-26 18:22:52 +00:00
Emmanuel Vadot
4d5937015d arm64: rockchip: dts: Build the Khadas board DTS
We boot on thoses boards so build them.

Submitted by:	s199p.wa1k9r@gmail.com
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D22158
2019-10-26 17:51:43 +00:00
Alan Somers
1af3a11218 MFZoL: Avoid retrieving unused snapshot props
This patch modifies the zfs_ioc_snapshot_list_next() ioctl to enable it
to take input parameters that alter the way looping through the list of
snapshots is performed. The idea here is to restrict functions that
throw away some of the snapshots returned by the ioctl to a range of
snapshots that these functions actually use. This improves efficiency
and execution speed for some rollback and send operations.

Reviewed-by: Tom Caputi <tcaputi@datto.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Signed-off-by: Alek Pinchuk <apinchuk@datto.com>
Closes #8077
zfsonlinux/zfs@4c0883fb4a

MFC after:	2 weeks
2019-10-26 17:11:02 +00:00
Emmanuel Vadot
c571e05c2c dtc: Allow multiple dts-v1 tag
Some dts are including dtsi that also contain a /dts-v1/ tag at the
top. GNU DTC doesn't seems to have a problem with that so fix our
dtc to behave the same.

Reviewed by:	kevans
MFC after:	1 week
2019-10-26 17:10:27 +00:00
Conrad Meyer
499fe48de8 Sync up with NetBSD libexecinfo changes 2014-2019
Drop portions that are unlit or redundant with llvm-libunwind: builtin.c,
unwind.h, and unwind_arm_ehabi_stub.c.

This code should now work with -fPIE binaries, should we choose to build any
that way.

When backtrace() array is full, signal an error so the underlying
Itanium-style C++ exception handling library (llvm-libunwind) knows to stop
tracing instead of continuing.  (It should stop on its own when it finishes
unwinding, so this is mostly an extra seatbelt against an infinite loop bug
in the unwinder.)
2019-10-26 06:59:59 +00:00
Navdeep Parhar
bddf824729 Fix typo in cxgbe.4.
MFC after:	1 week
2019-10-25 22:39:26 +00:00
Navdeep Parhar
adb0cd8408 cxgbe(4): Use correct FetchBurstMin values for T6.
MFC after:	1 week
Sponsored by:	Chelsio Communications
2019-10-25 21:53:05 +00:00
Mitchell Horne
29c8b9137b RISC-V: skip cpu-map when parsing elf_hwcap
The fill_elf_hwcap() function expects to find only cpu nodes under the
/cpus entry of the device tree. Newer versions of QEMU insert a cpu-map
node which describes the CPU topology, breaking this function. To fix
this, simply skip any non-cpu entries.

Reviewed by:	markj, kp, jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D22151
2019-10-25 21:39:29 +00:00
Oleksandr Tymoshenko
aea1c841f4 arm64: rk3399: add SPI driver and include it in GENERIC config
SPI driver for Rockchip's RK3399 SoC. Implements PIO mode, CS selection,
SPI mode and frequency configuration.

Reviewed by:	manu
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D22148
2019-10-25 21:38:38 +00:00
Ravi Pokala
a3a63d8ac2 Args for buf_track() might be unused
If neither FULL_BUF_TRACKING nor BUF_TRACKING are defined, then the body of
buf_track() becomes empty. Mark the arguments with "__unused" so the
compiler doesn't complain about unused arguments in that case.

Reported by:	Bruce Leverett (Panasas)
Reviewed by:	cem (on IRC)
MFC after:	1 month
Sponsored by:	Panasas
2019-10-25 21:32:28 +00:00
Oleksandr Tymoshenko
145bad4026 arm64: rk3399: Add clock and gate for SPI clocks
MFC after:	1 month
2019-10-25 21:21:21 +00:00
Dimitry Andric
1927000d52 Pull in r372186 from upstream llvm trunk (by Eli Friedman):
[ARM] VFPv2 only supports 16 D registers.

  r361845 changed the way we handle "D16" vs. "D32" targets; there used
  to be a negative "d16" which removed instructions from the
  instruction set, and now there's a "d32" feature which adds
  instructions to the instruction set.  This is good, but there was an
  oversight in the implementation: the behavior of VFPv2 was changed.
  In particular, the "vfp2" feature was changed to imply "d32". This is
  wrong: VFPv2 only supports 16 D registers.

  In practice, this means if you specify -mfpu=vfpv2, the compiler will
  generate illegal instructions.

  This patch gets rid of "vfp2d16" and "vfp2d16sp", and fixes "vfp2"
  and "vfp2sp" so they don't imply "d32".

  Differential Revision: https://reviews.llvm.org/D67375

Pull in r372187 from upstream clang trunk (by Eli Friedman):

  [ARM] Update clang for removal of vfp2d16 and vfp2d16sp

  Matching fix for https://reviews.llvm.org/D67375 (r372186).

  Differential Revision: https://reviews.llvm.org/D67467

This should fix clang generating invalid opcodes for floating point
operations on armv6.

Requested by:	mmel
MFC after:	3 days
2019-10-25 21:00:49 +00:00
Mark Johnston
ecae3df1db Apply kernel module linker scripts to firmware files.
Use a separate make variable to specify the linker script so that it is
only applied at link time and not during intermediate generation of .fwo
files.

This ensures that the .text padding inserted by the amd64 linker script
is applied to the stub module load handlers embedded in firmware
modules.

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D22125
2019-10-25 20:15:04 +00:00
Konstantin Belousov
5e921ff49e amd64: move pcb out of kstack to struct thread.
This saves 320 bytes of the precious stack space.

The only negative aspect of the change I can think of is that the
struct thread increased by 320 bytes obviously, and that 320 bytes are
not swapped out anymore. I believe the freed stack space is much more
important than that.  Also, current struct thread size is 1392 bytes
on amd64, so UMA will allocate two thread structures per (4KB) slab,
which leaves a space for pcb without increasing zone memory use.

Reviewed by:	alc, markj
Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D22138
2019-10-25 20:09:42 +00:00
Peter Jeremy
5dae892735 Fix use of uninitialised variable.
The RK805 regs array was being allocated before it's required size was
known, causing the driver to use memory it didn't own.  That memory
was subsequently allocated and used elsewhere causing later fatal data
aborts in rk805_map().

Whilst I'm here, add a sanity check to catch unsupported PMICs (this
shouldn't ever get hit because the probe should have failed).

Reviewed by:	manu
MFC after:	1 week
Sponsored by:	Google
2019-10-25 19:38:02 +00:00
Bjoern A. Zeeb
6e6b5143f5 Properly set VNET when nuking recvif from fragment queues.
In theory the eventhandler invoke should be in the same VNET as
the the current interface. We however cannot guarantee that for
all cases in the future.

So before checking if the fragmentation handling for this VNET
is active, switch the VNET to the VNET of the interface to always
get the one we want.

Reviewed by:	hselasky
MFC after:	3 weeks
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D22153
2019-10-25 18:54:06 +00:00
Emmanuel Vadot
ecd9fdeb46 arm64: rockchip: Add RK3399 TypeC phy driver
This is a driver for the USB3 PHY present in the RK3399.
While the phy support DP (Display Port) the driver doesn't has we have
no driver to test this with for now.
All the lane and pll configuration is just magic values from rockchip.
While the manual have some info on those registers it's really hard to
understand how to calculate those values (if there is a way).

MFC after:	1 month
2019-10-25 18:10:02 +00:00
Emmanuel Vadot
7d888a5b2b arm64: rockchip: Add rk_dwc3 driver
This is a simplebus like driver that attaches the dwc3 child node and
enable the clocks needed for the module.

MFC after:	1 month
2019-10-25 18:08:59 +00:00
Emmanuel Vadot
f5be484b45 arm64: rk3399: Add clock and gate for usb3 clocks
MFC after:	1 month
2019-10-25 18:08:25 +00:00
Emmanuel Vadot
d1ecd3ac13 flash: Add GigaDevice gd25q128 flash
Add this flash chip which is a 128Mb spi flash.

MFC after:	1 week
2019-10-25 17:56:24 +00:00
Bjoern A. Zeeb
c0750d9d04 frag6-test: update for r354046, conform to 8200 for overlapping fragments
The change to conform to RFC 8200 for overlapping fragments now frees
the entire reassembly queue if the overlapping fragments are not an
exact match.
As a result we do see one less packet in the timeout statistics from
expiry.  No other statistics change as the event is not counted.
It can be argued that we should improve the statistics counters in
that case.
This test case update should have been committed alongside the original
commit.

Pointyhat to:	bz
MFC after:	3 weeks
X-MFC with:	r354046
Sponsored by:	Netflix
2019-10-25 17:41:08 +00:00
Gleb Smirnoff
42a621624d Add couple more assertions to vm_pager_assert_in(). The bogus page is
not allowed at ends of the request, and all non-bogus pages must be
consecutive.

Reviewed by:	kib
2019-10-25 16:59:54 +00:00
Andriy Gapon
174bd5b040 superio: do not crash if failed to create the character device
MFC after:	1 week
2019-10-25 16:30:24 +00:00
Bjoern A. Zeeb
702828f643 frag6: do not leak counter in error cases
When allocating the IPv6 fragement packet queue entry we do checks
against counters and if we pass we increment one of the counters
to claim the spot.  Right after that we have two cases (malloc and MAC)
which can both fail in which case we free the entry but never released
our claim on the counter.  In theory this can lead to not accepting new
fragments after a long time, especially if it would be MAC "refusing"
them.
Rather than immediately subtracting the value in the error case, only
increment it after these two cases so we can no longer leak it.

MFC after:	3 weeks
Sponsored by:	Netflix
2019-10-25 16:29:09 +00:00
Andriy Gapon
c8001490f8 superio_io.h: fix the copyright
MFC after:	1 week
2019-10-25 16:28:39 +00:00
Andriy Gapon
0aee3bdc56 superio: add a simple ioctl interface
MFC after:	1 week
2019-10-25 16:07:24 +00:00
Andriy Gapon
dbb15ea500 owc_gpiobus: add missing space in r354077 2019-10-25 15:46:54 +00:00
Andriy Gapon
b8c776ba02 owc_gpiobus_read_data: add recovery time to the read slot
Reviewed by:	imp
MFC after:	2 weeks
2019-10-25 15:39:46 +00:00
Andriy Gapon
bb7b803bf2 owc_gpiobus_read_data: compare times in sbintime_t units
Previously the code used sbttous() before microseconds comparison in one
place, sbttons() and nanoseconds in another, division by SBT_1US and
microseconds in yet another.

Now the code consistently uses multiplication by SBT_1US to convert
microseconds to sbintime_t before comparing them with periods between
calls to sbinuptime().  This is fast, this is precise enough (below
0.03%) and the periods defined by the protocol cannot overflow.

Reviewed by:	imp (D22108)
MFC after:	2 weeks
2019-10-25 15:38:09 +00:00
Andrew Turner
6c1633e18a Remove the arm4 ID register masks, they are not needed after r353641.
Sponsored by:	DARPA, AFRL
2019-10-25 14:46:09 +00:00
Andrew Turner
a3b4443c72 Make special register names lowercase so they don't conflict with future
ID register macros.

MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
2019-10-25 14:30:27 +00:00
Andriy Gapon
c1750b821b owc_gpiobus_read_data: disable preemption earlier
Now this is done before starting the low pulse that has rather tight
timing.

Reviewed by:	imp (D22108)
MFC after:	2 weeks
2019-10-25 14:20:59 +00:00
Andriy Gapon
46ecf8e0bc ow_temp: better scopes for the lock
The lock is used only for start / stop signaling.
It is used only for 'flags' field and the related condition variable.

This change is a follow-up to r354067, it was suggested by Warner in
D22107.

Suggested by:	imp
MFC after:	1 week
2019-10-25 13:47:17 +00:00