Commit Graph

217510 Commits

Author SHA1 Message Date
Gavin Atkinson
4a6db06fee Correct spelling in syslog: getttimeofday -> gettimeofday 2016-11-11 21:53:38 +00:00
Justin Hibbits
5bb79eade4 Replace another fdt_is_compatible() call. 2016-11-11 21:29:48 +00:00
Dimitry Andric
3cc771c38b Pull in r263169 from upstream llvm trunk (by Tim Northover):
AArch64: only try to use scaled fcvt ops on legal vector types.

  Before we ended up calling getSimpleVectorType on a <3 x float>, which
  asserted.

This fixes an assertion when building the print/ghostscript9-agpl-base
port for AArch64.

PR:		213865
MFC after:	3 days
2016-11-11 21:01:45 +00:00
Conrad Meyer
a0329fb4d2 queue.3: Document existing QMD_* macros
Feedback from:	bapt, bdrewery, emaste
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D3983
2016-11-11 20:44:33 +00:00
Conrad Meyer
3a37091931 ioat(4): Fix race between process_events and reset_hw
In the case where a hardware error is detected during
ioat_process_events, hardware may advance (by one descriptor, probably)
and a subsequent ioat_process_events may race the intended ioat_reset_hw
followup.  In that case, the second process_events would observe a
completion update that does not match the software "last_seen" status,
and attempt to successfully complete already-failed descriptors.

Guard against this race with the resetting_cleanup flag.

Reviewed by:	bdrewery, markj
Sponsored by:	Dell EMC Isilon
2016-11-11 20:09:54 +00:00
Konstantin Belousov
836055542f Increase the max allowed size of the microcode update blob for x86.
Newer CPUs (SkyLakes) have updates of 100K size, which is bigger than
current limit 32K. Increase it to 4M but leave the check around to
prevent kernel memory allocator abuse.  Some time ago, the memory for
update was allocated by contigmalloc(9), and it was reasonable to be
conservative as much as possible.  Since all uses of contigmalloc(9)
appear to be either misunderstanding or too cautious, and were
removed, provide more slack than strictly neccessary.

Submitted by:	Oliver Pinter
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D8486
2016-11-11 18:57:41 +00:00
Glen Barber
0eaded92d0 Spell 'PACKAGE' correctly.
Submitted by:	Kyle Evans, emaste
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2016-11-11 18:47:53 +00:00
Justin Hibbits
472df8b8bd Use ofw_bus_node_is_compatible() instead of fdt_is_compatible()
No need to have two functions that do the same thing, let's let fdt_* go away,
and use ofw_bus_* equivalents instead.

Requested by:	andrew
2016-11-11 18:10:13 +00:00
Stephen J. Kiernan
4f8155ddbc Add support for LOADER_RC setting in the pkgfs manifest (defaults to
/loader.rc) to specify a Forth file to read from the pkgfs tarball and
process by Ficl.

This allows for the tarball to do runtime things like load a
platform-specific FDT blob, among other things.

Reviewed by:	imp
Approved by:	sjg (mentor)
MFC after:	2 weeks
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D8494
2016-11-11 17:41:17 +00:00
Stephen J. Kiernan
e72f9ec49f The file_loadraw function grew an argument, update install function
accordingly.

Reviewed by:	imp
Approved by:	sjg (mentor)
MFC after:	2 weeks
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D8494
2016-11-11 16:59:26 +00:00
Andrew Turner
a2696bf3c0 Use ofw_bus_node_is_compatible in more drivers used on arm.
Sponsored by:	ABT Systems Ltd
2016-11-11 15:42:12 +00:00
Andriy Gapon
f1cd40a19d update SMB_BWRITE documentation, clarify SMB_BREAD
After removal of SMB_TRANS some information in the description of
SMB_BWRITE has become stale.  E.g., the maximum block size has been
restored to 32.

Also, the descriptions of SMB_BREAD and SMB_BWRITE had some
incorrect information on the SMBus protocol details.

MFC after:	1 week
X-MFC with:	r308242
Differential Revision: https://reviews.freebsd.org/D8431
2016-11-11 15:16:37 +00:00
Andrew Turner
87acb7f815 Use the modern spelling of ofw_bus_node_is_compatible in sys/arm.
Sponsored by:	ABT Systems Ltd
2016-11-11 15:13:30 +00:00
Andriy Gapon
88cc0bb940 iicsmb: SMB_MAXBLOCKSIZE can be used again
The constant was set to the correct value in r308242.
While there, fix iicsmb_bread() to not use a value of an out parameter
'count'.

MFC after:	3 weeks
X-MFC after:	r308242
2016-11-11 15:11:54 +00:00
Andriy Gapon
678d569fc2 intpm: clean up intsmb_bread and intsmb_pcall
The hardware does not implement SMBus Process Call command, so remove
ifdef-ed out code from intsmb_pcall.  The code used exactly the same
start sequence as for Write Word command.

intsmb_bread code used to access an in value of the count parameter,
but that parameter is supposed to be an out only parameter.
For example, smb(4) does not initialize it before calling smbus_bread.

MFC after:	3 weeks
2016-11-11 15:08:12 +00:00
Andriy Gapon
cf3a35a755 smbmsg: use a more convenient way of accessing data read from a slave
Developers writing code for accessing /dev/smb may use this base utility
as an example.  Now that SMB_READB, SMB_READW, SMB_PCALL behave as
documented, wwe can use them in a more convenient way than before.

MFC after:	4 weeks
X-MFC after:	r308527
2016-11-11 15:00:13 +00:00
Andriy Gapon
f43618f59f smb: fix SMB_READB, SMB_READW, SMB_PCALL to work as documented
Previously, those ioctls were defined as 'in' only, so rdata.byte and
rdata.word were never updated in the userland.  The read data went only
to rbuf if it was provided.  Thus, consumers were forced to always use it.

Now the ioctls are marked as in-out.
Compatibility handlers are provided for old ioctls.

PR:		213481
Reported by:	Lewis Donzis <lew@perftech.com>
MFC after:	2 weeks
Relnotes:	maybe
Differential Revision: https://reviews.freebsd.org/D8430
2016-11-11 14:41:02 +00:00
Andrew Turner
30add35afa Fix ata_at91_alloc_resource to use rman_res_t.
Sponsored by:	ABT Systems Ltd
2016-11-11 14:30:09 +00:00
Andrew Turner
639e990770 Remove more unneeded users of the fdt_pic_decode_t table.
Sponsored by:	ABT Systems Ltd
2016-11-11 14:22:35 +00:00
Andrew Turner
c6c4276bb7 Replace OF_getprop ... fdt32_to_cpu with OF_getencprop. The latter
correctly adjusts for the endian.

MFC after:	1 week
Sponsored by:	ABT Systems Ltd
2016-11-11 14:19:12 +00:00
Cy Schubert
449287a2a5 MFV r305100: Update amd from am-utils 6.1.5 to 6.2.
Used extensively on my network over the past month.

Reviewed by:	pfg, brooks
Suggested by:	pfg
Obtained from:	ftp://ftp.am-utils.org/pub/am-utils/
MFC after:	6 weeks
Relnotes:	yes
Differential Revision:	D8405
2016-11-11 02:42:53 +00:00
Shteryana Shopova
3b49535a5a Reply to a snmpEngineID discovery PDU with a Report PDU as per the
requirements of RFC 3414 section 4.

PR:	174974
Submitted by:	pguyot@kallisys.net
Reported by:	several people
Reviewed by:	bz@
2016-11-10 20:51:26 +00:00
Mark Johnston
cc59e3a79b Add the laundry page count to the displays of systat, top, and vmstat.
Reviewed by:	alc, kib
Differential Revision:	https://reviews.freebsd.org/D8467
2016-11-10 19:55:45 +00:00
Dimitry Andric
0ef0edf2bb Pull in r263301 from upstream llvm trunk (by Ahmed Bougacha):
[AArch64] Don't blindly lower f16/f128 FCCMPs.

  Instead, extend f16 (like we do when lowering a standalone SETCC),
  and let f128 be legalized to the RT calls.

  Fixes PR26803.

This fixes a fatal "Cannot select" backend error when building the
net/freerdp port for AArch64.

PR:		214380
MFC after:	3 days
2016-11-10 19:40:14 +00:00
Kristof Provost
2fd47dea4e pfctl: fix nested inline anchors
Import the OpenBSD fix for nested inline anchors.

PR:		196314
Submitted by:	krichy@cflinux.hu
Obtained from:	OpenBSD
2016-11-10 18:41:43 +00:00
Adrian Chadd
339be86fdb [net80211] implement "first RX defines the BAW" hack.
Unfortunately (sigh) some firmware doesn't provide the RX BA starting point,
so we need to cope and set a "close enough" sequence number so we (hopefully!)
don't discard frames as duplicates.

Tested:

* QCA9880v2, athp driver (under development), STA mode
2016-11-10 18:36:40 +00:00
Antoine Brodin
111bf579e3 Add limits(1) to native-xtools so that it can be used in qemu user-mode jails 2016-11-10 16:27:34 +00:00
Ruslan Bukin
ef37962496 Implement riscv jumpto() so world can be compiled.
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
2016-11-10 12:54:33 +00:00
Andriy Gapon
593077d613 pmc_process_csw_out: ignore deleted counters
I see the fllowing panic on AMD when exiting pmcstat:

panic: [pmc,1473] pp_pmcval outside of expected range cpu=2 ri=17
pp_pmcval=fffffffffa529f5b pm_reloadcount=10000

It seems that at least on AMD a performance counter keeps counting after
overflowing.  When pmcstat exits it sets counters that it used to
PMC_STATE_DELETED and waits until their use count goes to zero.
amd_intr() wouldn't reload a counter in that state and, thus, a counter
would be allowed to overflow.  That means that the counter's value would
be allowed to go outside the expected range.

MFC after:	2 weeks
2016-11-10 11:12:45 +00:00
Andriy Gapon
a18f280538 fix a watchdogd regression introduced in r308040
The code assumed that 'timeout' and 'timeout_sec' are in sync
which they weren't if no '-t' option was passed to watchdogd.

Reported by:	Olivier Smedts <olivier@gid0.org>,
		Alex Deiter <alex.deiter@gmail.com>
Tested by:	Olivier Smedts <olivier@gid0.org>,
		Alex Deiter <alex.deiter@gmail.com>
MFC after:	5 days
X-MFC with:	r308040
2016-11-10 10:45:12 +00:00
Marcelo Araujo
46542a426e We can't use protect(1) inside a jail(8)!
To avoid have warning for services that are using oomprotect, oomprotect
will only be applied on services that won't run inside jails.

Reported by:	allanjude
MFC after:	2 weeks.
2016-11-10 07:05:41 +00:00
Baptiste Daroussin
9625abb359 make pxeboot consistent with common/dev_net.c
Always define boot.netif.server in kenv in pxeboot
Add "boot.tftproot.server" to kenv when pxeboot uses tftpfs
Change the code order when setting env for TFTP or NFS to be the same as
common/dev_net.c

Reported by:	tsoome
2016-11-09 21:51:48 +00:00
Toomas Soome
fc0d6c840e boot/forth spelling issue in forth word
Reviewed by:	dteske, imp
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D8484
2016-11-09 21:28:46 +00:00
Alan Cox
ebcddc7217 Introduce a new page queue, PQ_LAUNDRY, for storing unreferenced, dirty
pages, specificially, dirty pages that have passed once through the inactive
queue.  A new, dedicated thread is responsible for both deciding when to
launder pages and actually laundering them.  The new policy uses the
relative sizes of the inactive and laundry queues to determine whether to
launder pages at a given point in time.  In general, this leads to more
intelligent swapping behavior, since the laundry thread will avoid pageouts
when the marginal benefit of doing so is low.  Previously, without a
dedicated queue for dirty pages, the page daemon didn't have the information
to determine whether pageout provides any benefit to the system.  Thus, the
previous policy often resulted in small but steadily increasing amounts of
swap usage when the system is under memory pressure, even when the inactive
queue consisted mostly of clean pages.  This change addresses that issue,
and also paves the way for some future virtual memory system improvements by
removing the last source of object-cached clean pages, i.e., PG_CACHE pages.

The new laundry thread sleeps while waiting for a request from the page
daemon thread(s).  A request is raised by setting the variable
vm_laundry_request and waking the laundry thread.  We request launderings
for two reasons: to try and balance the inactive and laundry queue sizes
("background laundering"), and to quickly make up for a shortage of free
pages and clean inactive pages ("shortfall laundering").  When background
laundering is requested, the laundry thread computes the number of page
daemon wakeups that have taken place since the last laundering.  If this
number is large enough relative to the ratio of the laundry and (global)
inactive queue sizes, we will launder vm_background_launder_target pages at
vm_background_launder_rate KB/s.  Otherwise, the laundry thread goes back
to sleep without doing any work.  When scanning the laundry queue during
background laundering, reactivated pages are counted towards the laundry
thread's target.

In contrast, shortfall laundering is requested when an inactive queue scan
fails to meet its target.  In this case, the laundry thread attempts to
launder enough pages to meet v_free_target within 0.5s, which is the
inactive queue scan period.

A laundry request can be latched while another is currently being
serviced.  In particular, a shortfall request will immediately preempt a
background laundering.

This change also redefines the meaning of vm_cnt.v_reactivated and removes
the functions vm_page_cache() and vm_page_try_to_cache().  The new meaning
of vm_cnt.v_reactivated now better reflects its name.  It represents the
number of inactive or laundry pages that are returned to the active queue
on account of a reference.

In collaboration with:	markj
Reviewed by:	kib
Tested by:	pho
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8302
2016-11-09 18:48:37 +00:00
Jason Evans
bde951447f Update jemalloc to 4.3.1. 2016-11-09 18:42:30 +00:00
Alexander Motin
c925d87e2a Fix copy/paste bug in r308464.
MFC after:	1 week
2016-11-09 17:57:55 +00:00
Ed Maste
a402c1e54f c++filt: flush output after newline
Some tools spawn c++filt and pass it a single line at a time for
demangling. This is akin to r276689 for addr2line.

Sponsored by:	The FreeBSD Foundation
2016-11-09 15:04:29 +00:00
Alexander Motin
2b064d4653 Add some device IDs found in my new laptop. 2016-11-09 08:57:59 +00:00
Marcelo Araujo
712a6ae66e Add flag -B which does the same like batch mode but without exiting after
print. Also add a new flag -s that add blocks size to statistics.

PR:		198347, 212726
Submitted by:	Ben RUBSON <ben.rubson@gmail.com>
Tested by:	pi
MFC After:	2 weeks.
2016-11-09 07:31:39 +00:00
Hans Petter Selasky
82364f24b5 Allow higher sample rates to have more jitter than lower ones.
PR:		208791
MFC after:	3 days
2016-11-09 07:09:27 +00:00
Kevin Lo
a28ed036b6 Sort DLINK section and add USB device ID of D-Link DWA-131 rev E1. 2016-11-09 06:47:29 +00:00
Marcelo Araujo
e7d88f5e13 Fix missing '-' for the flags -s and -d on both manpage and usage.
Reported by:	garga, bde
2016-11-09 04:42:09 +00:00
Luiz Otavio O Souza
3c9cab9453 Add the DTS for the Netgate SG-1000 (micro-Firewall).
The SG-1000 boots with GENERIC ARM kernel on -head.

Obtained from:	pfSense
Sponsored by:	Rubicon Communications, LLC (Netgate)
2016-11-09 04:07:15 +00:00
Bryan Drewery
28323add09 Fix improper use of "its".
Sponsored by:	Dell EMC Isilon
2016-11-08 23:59:41 +00:00
John Baldwin
b5b4f379e0 Pass the correct flag to find_symdef() from _rtld_bind().
When symbol versioning was added to rtld, the boolean 'in_plt' argument
to find_symdef() was converted to a bitmask of flags.  The first flag
added was 'SYMLOOK_IN_PLT' which replaced the 'in_plt' bool.  This
happened to still work by accident as SYMLOOK_IN_PLT had the value of 1
which is the same as 'true', so there should be no functional change.

Tested on:	amd64
Reviewed by:	kan
MFC after:	2 weeks
Sponsored by:	DARPA / AFRL
2016-11-08 22:41:11 +00:00
Conrad Meyer
8fc77fff81 cam: Zero bio pointer in user-supplied SCSI CCBs
The BUF_TRACKING bio pointer only makes sense for kernel consumers of
CCBs.

PR:		214250
Reported by:	trasz@
Reviewed by:	imp@, markj@
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D8477
2016-11-08 21:17:24 +00:00
Ed Maste
199f4e8d68 add missing i386 symbols libgcc_s symbol version map
After r308294 they were missing on i386 (and previously were exported
only accidentally).

Reported by:	antoine
2016-11-08 17:36:19 +00:00
Andrew Turner
feabce61dc Start to remove the old pre-INTRNG code from the arm platforms. These have
all moved to use INTRNG.

Reviewed by:	manu, mmel
Sponsored by:	ABT Systems Ltd
Differential Revision:	https://reviews.freebsd.org/D8469
2016-11-08 12:15:57 +00:00
Marcelo Araujo
31500ce90d Add -d flag that prints domain only.
PR:		212875
Submitted by:	Ben RUBSON <ben.rubson@gmail.com>
Reviewed by:	pi
2016-11-08 11:36:33 +00:00
Konstantin Belousov
9a639daf77 Tweaks for the buffer pager.
Pass current thread credentials instead of NOCRED.
Only allow unmapped buffers for filesystem which proclaimed the support.

For all filesystems which currently use buffer pager (UFS, msdosfs and
cd9660), the changes are effectively nop.

Tested by:	pho
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2016-11-08 10:10:55 +00:00