Commit Graph

222518 Commits

Author SHA1 Message Date
Nick Hibma
85ee43171a A test was moved but without the definition of $d.
The test however always succeeds because 'test -d' always returns true.

Also some speling fixes.
2017-04-19 12:39:45 +00:00
Hans Petter Selasky
7a742c41cf Zero number of CPUs should be translated into the default number of
CPUs when allocating a LinuxKPI workqueue. This also ensures that the
created taskqueue always have a non-zero number of worker threads.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
2017-04-19 11:38:07 +00:00
Ganbold Tsagaankhuu
5657848913 Use hwreset_get_by_ofw_idx() function instead, since there is
no reset-names dts property defined for IR in case of H3 SoC.
That way IR works on H3 SoC based board.
Tested on Orangepi mini 2 board.
2017-04-19 05:59:00 +00:00
Sepherosa Ziehau
9ba5e29c5c hyperv: Use kmem_malloc for hypercall memory due to NX bit change.
Reported by:	dexuan@
MFC after:	now
Sponsored by:	Microsoft
2017-04-19 02:39:48 +00:00
Simon J. Gerraty
d86e8e9c57 If MAKEOBJDIRPREFIX is a prefix match for .CURDIR, then __objdir is .CURDIR
Reviewed by:	bdrewery
2017-04-18 23:59:15 +00:00
Conrad Meyer
ac30bca611 da(4): Fix a TRIM regression introduced in r308155
According to Warner, multiple TRIM BIOs are collapsed into a single CCB with
NULL bp.  It is invalid to biotrack() NULL, and results in a fault.  So,
don't do that.

Reported by:	asomers@
Sponsored by:	Dell EMC Isilon
2017-04-18 21:05:05 +00:00
Kristof Provost
4e261006a1 pf: Also clear limit counters
The "pfctl -F info" command didn't clear the limit counters ( as shown in the
"pfctl -vsi" output).

Submitted by:	Max <maximos@als.nnov.ru>
2017-04-18 20:07:21 +00:00
John Baldwin
0780f5c3fb Regenerate to note that GDB is now off by default on most platforms.
Note that this commit also adds the default riscv settings for all
options since riscv was added to 'make targets' since the last time
this was generated.

Reminded by:	emaste
2017-04-18 19:54:04 +00:00
Glen Barber
5e50a31863 Use relative symlink for 'latest' to allow repo to work after being
moved.

Submitted by:	woodsb02
MFC after:	3 days
PR:		217197
Sponsored by:	The FreeBSD Foundation
2017-04-18 19:44:34 +00:00
Toomas Soome
64ad3fe3f9 loader: uboot disk ioctl should call disk_ioctl
As the uboot disk interface is using common/disk.c API, we also
should use disk_ioctl() call, this will give us chance to read partition
sizes and have feature parity with UEFI and BIOS implementations.

This does also fix arm boot issue on some systems, reported/tested by Ian,
thanks.

Reported by:	ian
Reviewed by:	ian
Differential Revision:	https://reviews.freebsd.org/D10421
2017-04-18 19:36:58 +00:00
Toomas Soome
c9296b3227 loader: F_READ/F_WRITE should be checked against masked flag
The work to make it possible to avoid bcache via using F_NORA modifier did
miss the fact that not all loader platforms are using the bcache, and so
it is possible the modifier is not cleared, as bcache strategy function is
not used.

For fix, we make sure the checks are dont with masked flag.

This patch does fix boot for platforms which do not use bcache.

Reported by:	emaste
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D10422
2017-04-18 18:07:54 +00:00
Ruslan Bukin
31cfa79fab Switch BERI Programmable Interrupt Controller to INTRNG.
Sponsored by:	DARPA, AFRL
2017-04-18 17:20:03 +00:00
John Baldwin
99b8bccddc Disable in-tree GDB by default on x86, mips, and powerpc.
GDB in ports contains all of the functionality as GDB in base
(including kgdb) for these platforms along with additional
functionality.  In-tree GDB remains enabled on ARM and sparc64.
GDB in ports does not currently support kernel debugging on arm,
and ports GDB for sparc64 has not been tested (though it does
include sparc64 support).

Reviewed by:	bdrewery, emaste, imp
Relnotes:	yes
Sponsored by:	DARPA / AFRL
Differential Revision:	https://reviews.freebsd.org/D10399
2017-04-18 16:27:48 +00:00
Toomas Soome
3384149c15 loader: zfs reader vdev_probe should check for minimum device size
The smallest device we can have in the pool is 64MB, since we are trying to
walk all four labels to find the most up to date uberblock, this limit will
also give us good method to check if we even should attempt to probe.

Enforcing the check also will make sure we are not getting wrapped while
calculating the label offset.

Also, after label check, we should verify if we actually got any UB or not.

PR:		218473
Reported by:	Masachika ISHIZUKA
Reviewed by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D10381
2017-04-18 15:43:47 +00:00
Sergey Kandaurov
b11ef6e971 Document kevent EVFILT_EMPTY.
Reviewed by:	hiren
X-MFC with:	r312277
2017-04-18 15:36:13 +00:00
Zbigniew Bodek
2fcf414549 Optimize Armada38x low-level MBUS settings
Add early init handler, which comprises various internal
bus optimisations for Armada 38x SoC's. Magic values used
due to undocumented registers.

Submitted by:	Marcin Wojtas <mw@semihalf.com>,
		Arnaud Ysmal <arnaud.ysmal@stormshield.eu>
Obtained from: Semihalf, Stormshield
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10219
2017-04-18 10:39:14 +00:00
Zbigniew Bodek
803b7f053e Fix bit assignment in PL310_POWER_CTRL
Align to ARM specification:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0246f/BEIEHICF.html

Submitted by: Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: meloun-miracle-cz
Differential revision: https://reviews.freebsd.org/D10223
2017-04-18 10:37:08 +00:00
Zbigniew Bodek
3d9dcb4574 Add PL310 device in ARMADA38X config
Submitted by: Arnaud Ysmal <arnaud.ysmal@stormshield.eu>
Obtained from: Stormshield
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10222
2017-04-18 10:35:30 +00:00
Zbigniew Bodek
9fdc4ca57c Execute PL310_ERRATA_727915 only for related revisions
Part of PL310 erratum 727915 in pl310_wbinv_range() was
executed uncoditionally for all possible controllers'
revisions. This patch adds appropriate condition, since
extra operations are required only for revisions between
r2p0 and r3p0.

Submitted by: Marcin Wojtas <mw@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: meloun-miracle-cz
Differential revision: https://reviews.freebsd.org/D10221
2017-04-18 10:34:10 +00:00
Zbigniew Bodek
06918748e5 Add PL310 platform initialization for Armada 38x
Introduce machine-dependent part of the arm/pl310 driver for
Armada 38x SoCs. Add prefetch and power savings configuration.

Submitted by: <arnaud.ysmal@stormshield.eu>
Obtained from: Stormshield
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10220
2017-04-18 10:32:21 +00:00
Zbigniew Bodek
2dc97081b1 Increase number of L2 tables required for kernel bootstrap
Memory space reserved for pmap_kernel_l2dtable_kva and
pmap_kernel_l2ptp_kva has not been taken into account in
original code. All the memory reserved from kernel space by
pmap_alloc_specials() function called in pmap_bootstrap()
should be mapped initially by initarm(). To create initial
mapping initarm() function reserves proper number of l2 page
tables. However the number of the l2 page tables does not take
into account memory for: pmap_kernel_l2ptp_kva,
pmap_kernel_l2dtable_kva, crashdumpmap, etc.

Submitted by: Grzegorz Bernacki <gjb@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Reviewed by: meloun-miracle-cz
Differential revision: https://reviews.freebsd.org/D10217
2017-04-18 10:25:59 +00:00
Zbigniew Bodek
c7df7863ae Reduce kmem_arena maximum size for Armada38x
VM_KMEM_SIZE_MAX allows to limit kmem arena size. In our case this was
necessary, as decreasing size of kmem_arena leaves more space for
kernel_arena.

kernel_arena is pool used for contigmalloc (in effect, DMA) allocations,
which failed on Armada38x. This resulted in 'no memory errors'
(e.g. USB_ERR_NOMEM errors) and failure of whole system. The need for
greater size of kernel_arena probably comes from more peripherals making
use of busdma.

Value used as upper limit is half of the default value
(0x1399a000).

Submitted by: Wojciech Macek <wma@semihalf.com>
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D10216
2017-04-18 10:20:42 +00:00
Alexander Motin
7ce9096841 Block FPDMA TRIM for ASMedia HBAs.
Experiments show FPDMA TRIM command timeouts on ASMedia HBAs, while the
same SSDs working fine on Intel HBAs.

MFC after:	2 weeks
2017-04-18 08:04:15 +00:00
Dimitry Andric
142446e535 Pull in r300429 from upstream llvm trunk (by Benjamin Kramer):
[X86] Remove special handling for 16 bit for A asm constraints.

  Our 16 bit support is assembler-only + the terrible hack that is
  .code16gcc. Simply using 32 bit registers does the right thing for
  the latter.

  Fixes PR32681.

This fixes some cases of assembling 16 bit code (i.e. SeaBIOS) that uses
the 'A' inline asm constraint, after r316989.

MFC after:	3 days
X-MFC-With:	r316989
2017-04-18 07:02:12 +00:00
Ganbold Tsagaankhuu
64af9561d6 Remove function declaration that doesn't exist. 2017-04-18 06:58:04 +00:00
Justin Hibbits
d7f8d4bc4a Add 32-bit caching to ldconfig script for powerpc64
Reported by:	ian@
2017-04-18 03:40:36 +00:00
Ed Maste
a3422d96bd libelftc: bump version number for r317075 2017-04-17 23:57:42 +00:00
Ed Maste
bee2765cc1 Update ELF Tool Chain to upstream r3520
Highlights of changes between r3490 and r3520:

- Improve C++ demangling
- Improve compatibility with Binutils tools wrt. error messages
- Handle additional types/sections/etc. in readelf and elfdump
- addr2line, cxxfilt: use setvbuf to set line buffering for filter use

PR:		218395
MFC after:	2 weeks
Relnotes:	Yes
Sponsored by:	The FreeBSD Foundation
2017-04-17 23:56:48 +00:00
Ed Maste
8cc1f6cc64 Import ELF Tool Chain snapshot at r3520
From http://svn.code.sf.net/p/elftoolchain/code/
2017-04-17 23:14:26 +00:00
Jung-uk Kim
af1973281e Use kmem_malloc() instead of malloc(9) for the native amd64 filter.
r316767 broke the BPF JIT compiler for amd64 because malloc()'d space is no
longer executable.

Discussed with:	kib, alc
2017-04-17 22:02:09 +00:00
Jung-uk Kim
c7ff2b13d1 Remove an unnecessary declaration missed in the previous commit. 2017-04-17 21:57:23 +00:00
Jung-uk Kim
e329e330d4 Move declarations for a machine-dependent function to the header file. 2017-04-17 21:51:26 +00:00
Jung-uk Kim
3a0e8b7373 Reduce diff with amd64 version. 2017-04-17 21:46:54 +00:00
Alexander Motin
f924326575 Optimize pathologic case of telldir() for Samba.
When application reads large directory, calling telldir() for each entry,
like Samba does, it creates exponential performance drop as number of
entries reach tenths to hundreds of thousands.  It is caused by full search
through the internal list, that never finds matches in that scenario, but
creates O(n^2) delays.  This patch optimizes that search, limiting it to
entries of the same buffer, turning time closer to O(n) in case of linear
directory scan.

PR:		218622
Reviewed by:	jhb, jilles
MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D10408
2017-04-17 19:03:31 +00:00
Ed Maste
f0e56c1f62 Remove trailing whitespace from r317061 2017-04-17 18:57:26 +00:00
Gleb Smirnoff
83c9dea1ba - Remove 'struct vmmeter' from 'struct pcpu', leaving only global vmmeter
in place.  To do per-cpu stats, convert all fields that previously were
  maintained in the vmmeters that sit in pcpus to counter(9).
- Since some vmmeter stats may be touched at very early stages of boot,
  before we have set up UMA and we can do counter_u64_alloc(), provide an
  early counter mechanism:
  o Leave one spare uint64_t in struct pcpu, named pc_early_dummy_counter.
  o Point counter(9) fields of vmmeter to pcpu[0].pc_early_dummy_counter,
    so that at early stages of boot, before counters are allocated we already
    point to a counter that can be safely written to.
  o For sparc64 that required a whole dummy pcpu[MAXCPU] array.

Further related changes:
- Don't include vmmeter.h into pcpu.h.
- vm.stats.vm.v_swappgsout and vm.stats.vm.v_swappgsin changed to 64-bit,
  to match kernel representation.
- struct vmmeter hidden under _KERNEL, and only vmstat(1) is an exclusion.

This is based on benno@'s 4-year old patch:
https://lists.freebsd.org/pipermail/freebsd-arch/2013-July/014471.html

Reviewed by:	kib, gallatin, marius, lidl
Differential Revision:	https://reviews.freebsd.org/D10156
2017-04-17 17:34:47 +00:00
Ed Maste
21d5d37ba4 dtc: update to upstream 227d6a3
- Report missing includes at the correct location.
- Add initial support for the -@ option emitting a symbol table.
- Add support for running tests with and without -@
- Add support for generating __fixups__ and __local_fixups__
- Attach the to-string transform to the node path.
2017-04-17 17:23:19 +00:00
Gleb Smirnoff
ca148cda3b Two more files missed in r317055: these files need sys/vmmeter.h, but now
they got it implicitly included via sys/pcpu.h.
2017-04-17 17:20:48 +00:00
Ed Maste
654fdfe87a dtc: remove unused (since r306806) string.hh 2017-04-17 17:18:49 +00:00
Gleb Smirnoff
75c4b0b5ac Remove unused assembly symbols pointing to vmmeter. 2017-04-17 17:18:07 +00:00
Gleb Smirnoff
fef0991322 Typo! 2017-04-17 17:07:51 +00:00
Gleb Smirnoff
9ed01c32e0 All these files need sys/vmmeter.h, but now they got it implicitly
included via sys/pcpu.h.
2017-04-17 17:07:00 +00:00
Gleb Smirnoff
6286dc78d4 Remove unneeded include of vm_phys.h. 2017-04-17 16:51:04 +00:00
Ed Maste
e06ffa3230 bsdgrep: fix zero-length matches without the -o flag
r316477 broke zero-length matches when not using the -o flag, by
skipping over them entirely.

Add a regression test so that it doesn't break again in the future.

Submitted by:	Kyle Evans <kevans91 at ksu.edu>
Reviewed by:	cem emaste ngie
Differential Revision:	https://reviews.freebsd.org/D10333
2017-04-17 14:59:55 +00:00
Ed Maste
22130a21ba bsdgrep: remove output separators between overlapping segments
Make bsdgrep more sensitive to context overlaps.  If it's printing
context that either overlaps or is immediately adjacent to another bit
of context, don't print a separator.

- Non-overlapping segments no longer have two separators between them

- Overlapping segments no longer have separators between them with
  overlapping sections repeated

Submitted by:	Kyle Evans <kevans91 at ksu.edu>
Reviewed by:	cem
Differential Revision:	https://reviews.freebsd.org/D10105
2017-04-17 13:36:30 +00:00
Ed Maste
a461896a2f bsdgrep: for -r, use the working directory if none specified
This is more sensible than the previous behaviour of grepping stdin,
and matches newer GNU grep behaviour.

PR:		216307
Submitted by:	Kyle Evans <kevans91 at ksu.edu>
Reviewed by:	cem, emaste, ngie
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/
2017-04-17 13:22:39 +00:00
Ed Maste
5ee1ea02fd bsdgrep: add -z/--null-data support
-z treats input and output data as sequences of lines terminated by a
zero byte instead of a newline. This brings it more in line with GNU grep
and brings us closer to passing the current tests with BSD grep.

Submitted by:	Kyle Evans <kevans91 at ksu.edu>
Reviewed by:	cem
Relnotes:	Yes
Differential Revision:	https://reviews.freebsd.org/D10101
2017-04-17 13:14:18 +00:00
Navdeep Parhar
46f48ee519 cxgbe: Add tunables to control the number of LRO entries and the number
of rx mbufs that should be presorted before LRO.  There is no change in
default behavior.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2017-04-17 09:00:20 +00:00
Ganbold Tsagaankhuu
8547646757 Belatedly add myself to committers-src.dot file. 2017-04-17 07:27:45 +00:00
Jilles Tjoelker
026dfd4aef sh: Fix use after free when resetting an in-use alias.
The special case of modifying an existing alias does not work correctly if
the alias is currently in use. Instead, handle this case by unaliasing the
old alias (if any) and then creating a new alias.
2017-04-16 22:10:02 +00:00