]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoClean up the comment.
Konstantin Belousov [Thu, 28 Dec 2017 23:50:21 +0000 (23:50 +0000)]
Clean up the comment.

Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D13671

6 years agoRemove ELF note for Open Firmware. It is marked optional in a single 1996
Nathan Whitehorn [Thu, 28 Dec 2017 23:49:53 +0000 (23:49 +0000)]
Remove ELF note for Open Firmware. It is marked optional in a single 1996
draft of a never-finalized standard (CHRP) and is irrelevant in practice
on FreeBSD since we load the kernel with loader(8) on Open Firmware
platforms anyway. Moreover, loader(8), which is directly loaded by Open
Firmware, has never had an equivalent note.

MFC after: 2 weeks

6 years agohumanize_number(3): fix math edge case in rounding large numbers
Bartek Rutkowski [Thu, 28 Dec 2017 22:57:34 +0000 (22:57 +0000)]
humanize_number(3): fix math edge case in rounding large numbers

Fix for remainder overflow, when in rare cases adding remainder to divider
exceeded 1 and turned the total to 1000 in final formatting, taking up
the space for the unit character.

The fix continues the division of the original number if the above case
happens -- added the appropriate check to the for loop performing
the division. This lowers the value shown, to make it fit into the buffer
space provided (1.0M for 4+1 character buffer, as used by ls).

Add test case for the reported bug and extend test program to support
providing buffer length (ls -lh uses 5, tests hard-coded 4).

PR: 224498
Submitted by: Pawel Biernacki <pawel.biernacki@gmail.com>
Reported by: Masachika Ishizuka <ish@amail.plala.or.jp>
Reviewed by: cem, kib
Approved by: cem, kib
MFC after: 1 week
Sponsored by: Mysterious Code Ltd.
Differential Revision: D13578

6 years agoIn vm_swapout_map_deactivate_pages(), it is enough to lock the map for read.
Konstantin Belousov [Thu, 28 Dec 2017 22:56:30 +0000 (22:56 +0000)]
In vm_swapout_map_deactivate_pages(), it is enough to lock the map for read.

Reviewed by: alc, markj (as part of the larger patch)
Tested by: pho (again, as part of the larger patch)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D13671

6 years agoProbe Intel Denverton eMMC 5.0 controllers.
Marius Strobl [Thu, 28 Dec 2017 22:03:08 +0000 (22:03 +0000)]
Probe Intel Denverton eMMC 5.0 controllers.

6 years agoWith the advent of interrupt remapping, Intel has repurposed bit 11
Marius Strobl [Thu, 28 Dec 2017 21:46:09 +0000 (21:46 +0000)]
With the advent of interrupt remapping, Intel has repurposed bit 11
(now: Interrupt_Index[15]) and assigned the previously reserved bits
55:48 (Interrupt_Index[14:0] goes into 63:49 while Destination Field
used 63:56 and bit 48 now is Interrupt_Format) in the IO redirection
tables (see the VT-d specification, "5.1.5.1 I/OxAPIC Programming").
Thus, when not using interrupt remapping, ensure that all previously
reserved bits in the high part of the RTEs are zero instead of doing
a read-modify-write for their Destination Field bits only.
Otherwise, on machines based on Apollo Lake and its derivatives such
as Denverton, typically some of the previously preserved bits remain
set after boot when not employing interrupt remapping. The result is
that INTx interrupts are not getting delivered.
Note: With an AMD IOMMU, interrupt remapping apparently bypasses the
IO APIC altogether.

Submitted by: loos (modulo comment)
Reviewed by: jhb (modulo comment)

6 years agoRemove a few more dangling references to ie(4).
John Baldwin [Thu, 28 Dec 2017 21:35:53 +0000 (21:35 +0000)]
Remove a few more dangling references to ie(4).

6 years agoe1000: Add support for Ice Lake and Cannon Lake
Sean Bruno [Thu, 28 Dec 2017 21:26:40 +0000 (21:26 +0000)]
e1000: Add support for Ice Lake and Cannon Lake

Ths add initial support for Ice Lake and Cannon Lake ethernet devices.

This also addressed errata 1.5.4.4 for Sky Lake and Kabby Lake devices:
https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/i218-i219-ethernet-connection-spec-update.pdf?asset=9561

Submitted by: Kevin Bowling <kevin.bowling@kev009.com>
Relnotes: Yes
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D13660

6 years agostand/fdt: Avoid bailout when dtbo has no fixups
Kyle Evans [Thu, 28 Dec 2017 21:12:27 +0000 (21:12 +0000)]
stand/fdt: Avoid bailout when dtbo has no fixups

In the case of a simple dtbo where fragment uses target-path and the overlay
contains no references, /__fixups__ will not be included by either our dtc
or dtc from ports, but the file still has valid fragments to be applied.

Additional testing found that /__symbols__ might also be omitted if it's
empty, which is not necessarily an error.

Reviewed by: gonzo, imp
Differential Revision: https://reviews.freebsd.org/D13663

6 years agostand/fdt: Fix loading of multiple fdt_overlays
Kyle Evans [Thu, 28 Dec 2017 21:09:36 +0000 (21:09 +0000)]
stand/fdt: Fix loading of multiple fdt_overlays

fdt_load_dtb_overlays was written to unload previous overlay when a new
valid one is come across. fdt_apply_overlays further down is written to
iterate over all .dtbo's currently loaded and apply them one-by-one. Correct
fdt_load_dtb_overlays to stop dropping valid overlays that were previously
loaded and match expectations.

Reviewed by: gonzo, imp
Differential Revision: https://reviews.freebsd.org/D13659

6 years agoFix some typos.
Pedro F. Giffuni [Thu, 28 Dec 2017 20:40:56 +0000 (20:40 +0000)]
Fix some typos.

Obtained from: OpenBSD (CVS v1.5)

6 years agonetinet6/ip6_id.c: niels kindly dropped clause 3/4 from the license.
Pedro F. Giffuni [Thu, 28 Dec 2017 20:35:21 +0000 (20:35 +0000)]
netinet6/ip6_id.c: niels kindly dropped clause 3/4 from the license.

This bring back r327293 from OpenBSD, with the important difference that
we are now getting it from their ip6_id.c file.

Obtained from: OpenBSD (CVS v1.3)

6 years agoStart syncing changes from OpenBSD's ip6_id.c instead of ip_id.c.
Pedro F. Giffuni [Thu, 28 Dec 2017 20:26:51 +0000 (20:26 +0000)]
Start syncing changes from OpenBSD's ip6_id.c instead of ip_id.c.

correct non-repetitive ID code, based on comments from niels provos.
- seed2 is necessary, but use it as "seed2 + x" not "seed2 ^ x".
- skipping number is not needed, so disable it for 16bit generator (makes
  the repetition period to 30000)

Obtained from: OpenBSD (CVS rev. 1.2)
MFC after: 1 week

6 years agoRevert r327293
Pedro F. Giffuni [Thu, 28 Dec 2017 20:10:10 +0000 (20:10 +0000)]
Revert r327293
netinet6/ip6_id.c: niels kindly dropped clause 3/4 from the license.

I was looking at the wrong file. There is an important merge that must be
done before I can bring this change.

6 years agonetinet6/ip6_id.c: niels kindly dropped clause 3/4 from the license.
Pedro F. Giffuni [Thu, 28 Dec 2017 19:42:53 +0000 (19:42 +0000)]
netinet6/ip6_id.c: niels kindly dropped clause 3/4 from the license.

This file is supposed to be based on the OpenBSD CVS v1.6 but checking
the OpenBSD repository the license had already dropped the 2&3 clasues by
then. Catch up with the licensing.

Obtained from: OpenBSD (CVS 1.2)

6 years agoMinor formatting and style tweaks to some comments.
John Baldwin [Thu, 28 Dec 2017 18:51:35 +0000 (18:51 +0000)]
Minor formatting and style tweaks to some comments.

6 years agoRemove a stale reference to ie(4).
John Baldwin [Thu, 28 Dec 2017 17:55:58 +0000 (17:55 +0000)]
Remove a stale reference to ie(4).

This was missed in r304513.

Submitted by: kib

6 years agorpc.sprayd: Remove 3rd and 4th clauses in christos' license.
Pedro F. Giffuni [Thu, 28 Dec 2017 17:51:53 +0000 (17:51 +0000)]
rpc.sprayd: Remove 3rd and 4th clauses in christos' license.

Obtained from: NetBSD

6 years agorpc.sprayd: Bring some changes from NetBSD.
Pedro F. Giffuni [Thu, 28 Dec 2017 17:44:30 +0000 (17:44 +0000)]
rpc.sprayd: Bring some changes from NetBSD.

Most notable, other than some style issues:
CVS 1.11:
  do not use LOG_CONS.
CVS 1.13:
  consistently use exit instead of return in main().
  use LOG_WARNING instead of LOG_ERR for non critical errors.

Obtained from: NetBSD
MFC after: 2 weeks

6 years agosys/sys/chio.h: add NetBSD RCS ID.
Pedro F. Giffuni [Thu, 28 Dec 2017 14:26:33 +0000 (14:26 +0000)]
sys/sys/chio.h: add NetBSD RCS ID.

Make it easier to identify the point where we started diverging from
NetBSD. Newer versions of this file has been updated to a new license so
this information may become useful some day.

Obtained from: NetBSD

6 years agosys/i386/isa/elink*: sync with (older) NetBSD.
Pedro F. Giffuni [Thu, 28 Dec 2017 14:14:35 +0000 (14:14 +0000)]
sys/i386/isa/elink*: sync with (older) NetBSD.

Make it easier to identify the point where we started diverging from
NetBSD. Newer versions of these files have been updated to a new license
so this information may become useful some day.

Obtained from: NetBSD

6 years agoReuse kern_proc_vmmap_resident() for procfs_map resident count.
Konstantin Belousov [Thu, 28 Dec 2017 13:23:13 +0000 (13:23 +0000)]
Reuse kern_proc_vmmap_resident() for procfs_map resident count.

The existing algorithm in procfs_map() to calculate count of resident
pages in an entry is too primitive, resulting in too long run time for
large sparse mapping entries.  Re-use the kern_proc_vmmap_resident()
from kern_proc.c which only looks at the existing pages in the
iterations.

Also, this makes procfs to honor kern.proc_vmmap_skip_resident_count,
if user does not need this information.

Reported by: Glenn Weinberg <glenn.weinberg@intel.com>
PR: 224532
No objections from: des (procfs maintainer)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D13595

6 years agoMake kern_proc_vmmap_resident() externally accesible, and move the
Konstantin Belousov [Thu, 28 Dec 2017 13:16:32 +0000 (13:16 +0000)]
Make kern_proc_vmmap_resident() externally accesible, and move the
vmmap_skip_res_cnt control check inside it.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D13595

6 years agoStyle. Remove useless return.
Konstantin Belousov [Thu, 28 Dec 2017 13:01:27 +0000 (13:01 +0000)]
Style.  Remove useless return.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

6 years agoComplete r327264 by fixing yet another return without cleanup.
Konstantin Belousov [Thu, 28 Dec 2017 12:59:48 +0000 (12:59 +0000)]
Complete r327264 by fixing yet another return without cleanup.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

6 years agoUpdate pci_vendors to 2017.12.20
Eitan Adler [Thu, 28 Dec 2017 08:25:47 +0000 (08:25 +0000)]
Update pci_vendors to 2017.12.20

6 years agoFix a few speelling errors
Eitan Adler [Thu, 28 Dec 2017 08:22:26 +0000 (08:22 +0000)]
Fix a few speelling errors

- man pages
- bin/sh

Reviewed by: jilles

6 years agoRevert r327250 as it broke the build for some armv6 kernel and all armv4/5
Emmanuel Vadot [Thu, 28 Dec 2017 07:31:14 +0000 (07:31 +0000)]
Revert r327250 as it broke the build for some armv6 kernel and all armv4/5

Reported by: ian

6 years agoClose fd when we're done dv-sending the file.
Warner Losh [Thu, 28 Dec 2017 05:34:38 +0000 (05:34 +0000)]
Close fd when we're done dv-sending the file.

CID: 978413

6 years agoFree mp on a couple of error paths.
Warner Losh [Thu, 28 Dec 2017 05:34:34 +0000 (05:34 +0000)]
Free mp on a couple of error paths.

CID: 978387

6 years agoClose the fp rather than the fd since we fdopen the fd so we don't
Warner Losh [Thu, 28 Dec 2017 05:34:29 +0000 (05:34 +0000)]
Close the fp rather than the fd since we fdopen the fd so we don't
leak the FILE *.

CID: 978383

6 years agoWhen bind fails, make sure we closed the socket we tried to bind the
Warner Losh [Thu, 28 Dec 2017 05:34:24 +0000 (05:34 +0000)]
When bind fails, make sure we closed the socket we tried to bind the
address to.

CID: 978244

6 years agoClose fd and fd1 before returning now that we're done with them.
Warner Losh [Thu, 28 Dec 2017 05:34:19 +0000 (05:34 +0000)]
Close fd and fd1 before returning now that we're done with them.

CID: 978234, 978236

6 years agoDon't leak outfile. Free it before we return from bincvt.
Warner Losh [Thu, 28 Dec 2017 05:34:14 +0000 (05:34 +0000)]
Don't leak outfile. Free it before we return from bincvt.

CID: 273685

6 years agoPlug memory leak by freeing wantedblk{32,64}.
Warner Losh [Thu, 28 Dec 2017 05:34:08 +0000 (05:34 +0000)]
Plug memory leak by freeing wantedblk{32,64}.

CID: 273655, 273656

6 years agoFree zbuf when kflag is true too.
Warner Losh [Thu, 28 Dec 2017 05:34:04 +0000 (05:34 +0000)]
Free zbuf when kflag is true too.

CID: 273376

6 years agoClose slave on fork error to prevent pty fd leak.
Warner Losh [Thu, 28 Dec 2017 05:33:59 +0000 (05:33 +0000)]
Close slave on fork error to prevent pty fd leak.

CID: 978209

6 years agoFree path before returnig.
Warner Losh [Thu, 28 Dec 2017 05:33:54 +0000 (05:33 +0000)]
Free path before returnig.

CID: 977827

6 years agoClose cpfrom in an error case.
Warner Losh [Thu, 28 Dec 2017 05:33:49 +0000 (05:33 +0000)]
Close cpfrom in an error case.

CID: 271771

6 years agoFree data after we're done with it.
Warner Losh [Thu, 28 Dec 2017 05:33:44 +0000 (05:33 +0000)]
Free data after we're done with it.

CID: 271595, 275337, 1368743

6 years agoFree inb on error return.
Warner Losh [Thu, 28 Dec 2017 05:33:39 +0000 (05:33 +0000)]
Free inb on error return.

CID: 270099

6 years agoFree some variables before they go out of scope.
Warner Losh [Thu, 28 Dec 2017 05:33:34 +0000 (05:33 +0000)]
Free some variables before they go out of scope.

CID: 92074, 270099

6 years agoPlug two resource leaks.
Warner Losh [Thu, 28 Dec 2017 05:33:29 +0000 (05:33 +0000)]
Plug two resource leaks.

CID: 92077, 92074

6 years agoUse proper failure path rather than just returning.
Warner Losh [Thu, 28 Dec 2017 05:33:24 +0000 (05:33 +0000)]
Use proper failure path rather than just returning.

CID: 1199354100689410068931006892

6 years agoExplicitly ignore return value from remove. We wouldn't do anything
Warner Losh [Thu, 28 Dec 2017 05:33:19 +0000 (05:33 +0000)]
Explicitly ignore return value from remove. We wouldn't do anything
differently if we can't unlink the temporary file. Also, free the
temporary file name when we set it to NULL.

CID: 1006909, 719448

6 years agoDon't leak resources on duplicate -m or -M arguments. Last one wins.
Warner Losh [Thu, 28 Dec 2017 05:32:59 +0000 (05:32 +0000)]
Don't leak resources on duplicate -m or -M arguments. Last one wins.

CID: 12043851204384

6 years agoSPDX: fix wrong license ID tag in dev/cesa.
Pedro F. Giffuni [Thu, 28 Dec 2017 03:10:57 +0000 (03:10 +0000)]
SPDX: fix wrong license ID tag in dev/cesa.

6 years agoSPDX: fix wrong license ID tag in dev/spibus.
Pedro F. Giffuni [Thu, 28 Dec 2017 03:04:36 +0000 (03:04 +0000)]
SPDX: fix wrong license ID tag in dev/spibus.

6 years agoFix a few more speelling errors
Eitan Adler [Thu, 28 Dec 2017 01:31:28 +0000 (01:31 +0000)]
Fix a few more speelling errors

Reviewed by: bjk
Reviewed by: jilles (incl formal "accept")
Differential Revision: https://reviews.freebsd.org/D13650

6 years agoFix bug introduced in r326674, in which efi boot partitions created by
Nathan Whitehorn [Thu, 28 Dec 2017 01:21:30 +0000 (01:21 +0000)]
Fix bug introduced in r326674, in which efi boot partitions created by
the installer but not mounted (i.e. with boot1.efifat dd'ed to them
rather than the forthcoming proper filesystem) would get newfs_msdos run
on them immediately after the boot code was copied. This would overwrite
the bootstrap code, causing the EFI system partition to be blanked and
resulting in an unbootable system.

PR: 224562

6 years agoSPDX: fix wrong license ID tag in libkern.
Pedro F. Giffuni [Thu, 28 Dec 2017 01:20:30 +0000 (01:20 +0000)]
SPDX: fix wrong license ID tag in libkern.

6 years agoarm/ixp425: Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.
Pedro F. Giffuni [Thu, 28 Dec 2017 01:12:28 +0000 (01:12 +0000)]
arm/ixp425: Drop 3rd and 4th clauses from Ichiro FUKUHARA's license.

This syncs us with NetBSD as much of our changes have been upstreamed.

Obtained from: NetBSD

6 years agoSPDX: fix license ID tags for arm/xscale.
Pedro F. Giffuni [Wed, 27 Dec 2017 22:47:56 +0000 (22:47 +0000)]
SPDX: fix license ID tags for arm/xscale.

Use parenthesis for grouping as suggested by the spec.

6 years agocxgbe/iw_cxgbe: Fix iWARP over VLANs (catch up with r326169).
Navdeep Parhar [Wed, 27 Dec 2017 22:44:50 +0000 (22:44 +0000)]
cxgbe/iw_cxgbe: Fix iWARP over VLANs (catch up with r326169).

Submitted by: KrishnamRaju ErapaRaju @ Chelsio
Sponsored by: Chelsio Communications

6 years agoIn preparation for converting to libufs to read the superblock,
Kirk McKusick [Wed, 27 Dec 2017 22:18:56 +0000 (22:18 +0000)]
In preparation for converting to libufs to read the superblock,
change conflicting function names:

getino => getinode
bread => blkread

No functional change.

6 years agosparc64: Update idprom.h.
Pedro F. Giffuni [Wed, 27 Dec 2017 22:01:30 +0000 (22:01 +0000)]
sparc64: Update idprom.h.

We only take a small part of the NetBSD file in sys/dev/sun/idprom.h.
Bring some comments and update the license.

Obtained from: NetBSD (CVS rev 1.3)

6 years agoarm: hdmi_if.m is already in files.arm
Emmanuel Vadot [Wed, 27 Dec 2017 21:58:19 +0000 (21:58 +0000)]
arm: hdmi_if.m is already in files.arm

Do not require it in files.vendor

6 years agoarm: Add kern/kern_clocksource.c to files.arm
Emmanuel Vadot [Wed, 27 Dec 2017 21:39:57 +0000 (21:39 +0000)]
arm: Add kern/kern_clocksource.c to files.arm

Instead of adding it to every files.vendor, add it to the common arch file.

6 years agoSPDX: Small for a license ID tags.
Pedro F. Giffuni [Wed, 27 Dec 2017 21:36:37 +0000 (21:36 +0000)]
SPDX: Small for a license ID tags.

Use parenthesis for grouping as suggested by the spec.

6 years agoSPDX: Fix some License ID tags for libc.
Pedro F. Giffuni [Wed, 27 Dec 2017 21:21:03 +0000 (21:21 +0000)]
SPDX: Fix some License ID tags for libc.

6 years agoDon't pass rids to taskqgroup_attach()
Stephen Hurd [Wed, 27 Dec 2017 20:42:30 +0000 (20:42 +0000)]
Don't pass rids to taskqgroup_attach()

As everywhere else, we want to pass rman_get_start(irq->ii_res).  This
caused set affinity errors when not using MSI-X vectors (legacy and MSI
interrupts).

Reported by: sbruno
Sponsored by: Limelight Networks

6 years agoUse strl* here too.
Warner Losh [Wed, 27 Dec 2017 20:33:37 +0000 (20:33 +0000)]
Use strl* here too.

CID: 1383969

6 years agoccdconfig: Update licensing terms.
Pedro F. Giffuni [Wed, 27 Dec 2017 20:09:50 +0000 (20:09 +0000)]
ccdconfig: Update licensing terms.

The code originate in NetBSD and there are the copyright notes have been
assigned to the NetBSD Foundation. Update the files up to the point where
we started diverging.

Further relaxation of the licensing terms are possible after we
check the NetBSD updates, and contact the local authors.

In the case of ccdconfig.8 this reinstates the 3rd clause but since the
code is not directly from Berkeley, the change was bogus.

Obtained from: NetBSD

6 years agoRemove assertion that's not true for !EARLY_AP_STARTUP
Stephen Hurd [Wed, 27 Dec 2017 19:14:15 +0000 (19:14 +0000)]
Remove assertion that's not true for !EARLY_AP_STARTUP

gtask->gt_taskqueue is NULL when EARLY_AP_STARTUP is not enabled.
Remove assertion to allow this config to work.

Reported by: oleg
Sponsored by: Limelight Networks

6 years agoSPDX: Complete License ID tags for UFS.
Pedro F. Giffuni [Wed, 27 Dec 2017 19:13:50 +0000 (19:13 +0000)]
SPDX: Complete License ID tags for UFS.

6 years agoFix indentation.
Stephen Hurd [Wed, 27 Dec 2017 19:12:32 +0000 (19:12 +0000)]
Fix indentation.

Sponsored by: Limelight Networks

6 years agoFix a bunch of issues (and a few non-issues but appeasement is easier
Warner Losh [Wed, 27 Dec 2017 18:30:24 +0000 (18:30 +0000)]
Fix a bunch of issues (and a few non-issues but appeasement is easier
than arguing) Coverity found:

o Use open + fstat rather than stat + open to avoid any races for a
  file that's static for the life of the system. This will prevent any
  problems should someone insert a new device while installing a
  kernel in the future.
o Use strlcpy instead of strcpy as a failsafe to knowing that the
  strings can't possibly be larger than the buffer due to data
  source limits (though in the future these limits might be more
  dynamic).
o If we can't find the hints file, return rather than dereference
  a NULL pointer.
o Check for lastmod before calling strcmp in case a PNP entry
  comes before a module entry. That's not allowed, but within the
  realm of crazy things programmers do.
o Free lastmod before exiting search_hints() to avoid a leak.

CID: 138397113839701383969138396513839631383960

6 years agoif_awg: Respect rgmii-*id PHY configurations
Kyle Evans [Wed, 27 Dec 2017 18:22:02 +0000 (18:22 +0000)]
if_awg: Respect rgmii-*id PHY configurations

phy-mode can be one of: rgmii, rgmii-id, rgmii-txid, rgmii-rxid; as this was
written, any of these alternate -id configurations would break as we fail to
configure syscon for rgmii. Instead, simply check that phy-mode is
configured for rgmii and we'll let the PHY driver handle any internal delay
configuration.

The pine64 should eventually specify phy-mode = "rgmii-txid" to address
gigabit issues when rx delay is configured, motivating this change.

6 years agoctl: Correct comment in ctl_worker_thread
Emmanuel Vadot [Wed, 27 Dec 2017 15:39:31 +0000 (15:39 +0000)]
ctl: Correct comment in ctl_worker_thread

The incoming queue is handled before the RtR one.
No functional change.

MFC after: 3 days

6 years agoReplace send-mail with the more standarized sendmail, we do not create
Xin LI [Wed, 27 Dec 2017 06:23:50 +0000 (06:23 +0000)]
Replace send-mail with the more standarized sendmail, we do not create
links for send-mail in mailwrapper so it did not work anyway.

MFC after: 2 weeks

6 years agoDon't initialize lastlong before assigning it.
Xin LI [Wed, 27 Dec 2017 05:59:47 +0000 (05:59 +0000)]
Don't initialize lastlong before assigning it.

MFC after: 2 weeks

6 years agoother: Fix several typos and minor errors
Eitan Adler [Wed, 27 Dec 2017 03:23:58 +0000 (03:23 +0000)]
other: Fix several typos and minor errors

- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by: imp, benno

6 years agolib: Fix several typos and minor errors
Eitan Adler [Wed, 27 Dec 2017 03:23:41 +0000 (03:23 +0000)]
lib: Fix several typos and minor errors

- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by: imp, benno

6 years agokernel: Fix several typos and minor errors
Eitan Adler [Wed, 27 Dec 2017 03:23:21 +0000 (03:23 +0000)]
kernel: Fix several typos and minor errors

- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by: imp, benno

6 years agouserland: Fix several typos and minor errors
Eitan Adler [Wed, 27 Dec 2017 03:23:01 +0000 (03:23 +0000)]
userland: Fix several typos and minor errors

- duplicate words
- typos
- references to old versions of FreeBSD

Reviewed by: imp, benno

6 years agoMissing disk close in libufs.
Kirk McKusick [Tue, 26 Dec 2017 23:16:11 +0000 (23:16 +0000)]
Missing disk close in libufs.

6 years agoAdd a section describing how to tune ARM kernel options to use an MD_ROOT
Ian Lepore [Tue, 26 Dec 2017 22:05:55 +0000 (22:05 +0000)]
Add a section describing how to tune ARM kernel options to use an MD_ROOT
filesystem larger than about 50-55 MiB.

The description of VM_KMEM_SIZE_SCALE is roughly as hand-wavy as my
understanding of the option, but at least mentioning that it's a factor
and giving an empirical datapoint that works will give folks some idea
of what to tweak if they have problems.

6 years ago[mips] fix compilation of TP-WN1043ND kernel configuration
Michael Zhilin [Tue, 26 Dec 2017 19:50:23 +0000 (19:50 +0000)]
[mips] fix compilation of TP-WN1043ND kernel configuration

This compilation issue has been found thanks to freebsd-wifi-build:
 - gpioiic requires "gpio_if.h", so "device gpio" is mandatory
 - rtl8366rb works over MDIO interface, so "device mdio" is mandatory

Compilation is checked on FreeBSD 12-CURRENT machine.

6 years agoAdd a new ARM kernel option, LOCORE_MAP_MB, to control the size of the
Ian Lepore [Tue, 26 Dec 2017 19:02:56 +0000 (19:02 +0000)]
Add a new ARM kernel option, LOCORE_MAP_MB, to control the size of the
kernel VA mapping in the temporary page tables set up by locore-v6.S.

The number used to be hard-coded to 64MB, which is still the default if
the kernel option is not specified.  However, 64MB is insufficient for
using a large mdroot filesystem.  The hard-coded number can't be safely
increased because too large a number may run into memory-mapped IO space
on some SoCs that must not be mapped as ordinary memory.

6 years agoComplete the changing of the old "i2c-address" property to the modern "reg"
Ian Lepore [Tue, 26 Dec 2017 18:42:29 +0000 (18:42 +0000)]
Complete the changing of the old "i2c-address" property to the modern "reg"
property by updating the description text to match the updated example.

This should have been part of r327220

6 years agoUpdate the FDT example for the lm75 sensor to match current devicetree
Ian Lepore [Tue, 26 Dec 2017 18:34:07 +0000 (18:34 +0000)]
Update the FDT example for the lm75 sensor to match current devicetree
standards and what the existing driver expects.

Also change 'like' to 'such as' where the text is providing an example
rather than a simile.

6 years agoreadelf: report byte size for DT_PREINIT_ARRAYSZ
Ed Maste [Tue, 26 Dec 2017 18:10:34 +0000 (18:10 +0000)]
readelf: report byte size for DT_PREINIT_ARRAYSZ

Sponsored by: The FreeBSD Foundation

6 years agoRefactor vm_map_find(), creating a separate function, vm_map_alignspace(),
Alan Cox [Tue, 26 Dec 2017 17:59:37 +0000 (17:59 +0000)]
Refactor vm_map_find(), creating a separate function, vm_map_alignspace(),
for finding aligned free space in the given map.  With this change, we
always return KERN_NO_SPACE when we fail to find free space.  Whereas,
previously, we might return KERN_INVALID_ADDRESS.  Also, with this change,
we explicitly check for address wrap, rather than relying upon the map's
min and max addresses to establish sentinel-like regions.

This refactoring was inspired by the problem that we addressed in r326098.

Reviewed by: kib
Tested by: pho
Discussed with: markj
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D13346

6 years agoman4: Move back allwinner man page to share/man/man4
Emmanuel Vadot [Tue, 26 Dec 2017 16:50:49 +0000 (16:50 +0000)]
man4: Move back allwinner man page to share/man/man4

But only install them for arm or aarch64 since they are used on both arch.

6 years agoextres/syscon: Commit missing bits from r327106
Kyle Evans [Tue, 26 Dec 2017 16:38:04 +0000 (16:38 +0000)]
extres/syscon: Commit missing bits from r327106

r327106 introduced kobj to syscon so it can be subclassed and fit in with
the rest of the syscon framework. The diff for syscon.c was misapplied in a
clean tree prior to commit, so bring it back to what was included in the
review and tested. The entire file has basically been rewritten from what
was present prior to the kobj work.

Pointy hat to: me

6 years agoWhite cleanups.
Michael Tuexen [Tue, 26 Dec 2017 16:33:55 +0000 (16:33 +0000)]
White cleanups.

6 years agoEnsure that pass > 0 when starting a scan with vm_pages_needed == 1.
Mark Johnston [Tue, 26 Dec 2017 16:29:39 +0000 (16:29 +0000)]
Ensure that pass > 0 when starting a scan with vm_pages_needed == 1.

Otherwise the page daemon will not reclaim pages and thus will not
wake threads sleeping in VM_WAIT.

Reported and tested by: pho
Reviewed by: alc, kib
X-MFC with: r327168
Differential Revision: https://reviews.freebsd.org/D13640

6 years agosh: Don't leak wait* implementation details from jobs.c
Jilles Tjoelker [Tue, 26 Dec 2017 16:23:18 +0000 (16:23 +0000)]
sh: Don't leak wait* implementation details from jobs.c

6 years agonandtool: Add missing mode for open() with O_CREAT
Jilles Tjoelker [Tue, 26 Dec 2017 16:20:38 +0000 (16:20 +0000)]
nandtool: Add missing mode for open() with O_CREAT

If O_CREAT is given, open() needs a mode argument. Follow the umask by
passing 0666.

Reviewed by: imp
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D13607

6 years agoMove arm specific man page to man4.arm subfolder
Emmanuel Vadot [Tue, 26 Dec 2017 16:13:20 +0000 (16:13 +0000)]
Move arm specific man page to man4.arm subfolder

Reported by: ian

6 years agoClearify CID 1008197.
Michael Tuexen [Tue, 26 Dec 2017 16:12:04 +0000 (16:12 +0000)]
Clearify CID 1008197.

MFC after: 3 days

6 years agoClearify issue reported in CID 1008198.
Michael Tuexen [Tue, 26 Dec 2017 16:06:11 +0000 (16:06 +0000)]
Clearify issue reported in CID 1008198.

MFC after: 3 days

6 years agoarm64: a10_gpio.c and a10_mmc.c were renamed aw_gpio.c and aw_mmc.c
Emmanuel Vadot [Tue, 26 Dec 2017 15:35:19 +0000 (15:35 +0000)]
arm64: a10_gpio.c and a10_mmc.c were renamed aw_gpio.c and aw_mmc.c

6 years agoFix CID 1008428.
Michael Tuexen [Tue, 26 Dec 2017 15:29:11 +0000 (15:29 +0000)]
Fix CID 1008428.

MFC after: 1 week

6 years agoFix CID 1008936.
Michael Tuexen [Tue, 26 Dec 2017 15:24:42 +0000 (15:24 +0000)]
Fix CID 1008936.

6 years agoAllow the first (and second) argument of sn_calloc() be a sum.
Michael Tuexen [Tue, 26 Dec 2017 14:37:47 +0000 (14:37 +0000)]
Allow the first (and second) argument of sn_calloc() be a sum.
This fixes a bug reported in
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224103
PR: 224103

6 years agoarm: a10_gpio.c was renamed aw_gpio.c
Emmanuel Vadot [Tue, 26 Dec 2017 14:34:38 +0000 (14:34 +0000)]
arm: a10_gpio.c was renamed aw_gpio.c

While here order files in files.allwinner

6 years agoWhen adding support for sending SCTP packets containing an ABORT chunk
Michael Tuexen [Tue, 26 Dec 2017 12:35:02 +0000 (12:35 +0000)]
When adding support for sending SCTP packets containing an ABORT chunk
to ipfw in https://svnweb.freebsd.org/changeset/base/326233,
a dependency on the SCTP stack was added to ipfw by accident.

This was noted by Kevel Bowling in https://reviews.freebsd.org/D13594
where also a solution was suggested. This patch is based on Kevin's
suggestion, but implements the required SCTP checksum computation
without any dependency on other SCTP sources.

While there, do some cleanups and improve comments.

Thanks to Kevin Kevin Browling for reporting the issue and suggesting
a fix.

6 years agoAllwinner: gpio: Rename driver to aw_gpio and add man page for it
Emmanuel Vadot [Tue, 26 Dec 2017 12:11:04 +0000 (12:11 +0000)]
Allwinner: gpio: Rename driver to aw_gpio and add man page for it

Reviewed by: bcr (manpages)
Differential Revision: https://reviews.freebsd.org/D13617

6 years agoAllwinner: mmc: Rename driver to aw_mmc and add a man page for it
Emmanuel Vadot [Tue, 26 Dec 2017 12:06:56 +0000 (12:06 +0000)]
Allwinner: mmc: Rename driver to aw_mmc and add a man page for it

Reviewed by: bcr (manpages)
Differential Revision: https://reviews.freebsd.org/D13616