]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
7 years agoremove trailing whitespace. No code changes.
luigi [Tue, 18 Oct 2016 15:41:57 +0000 (15:41 +0000)]
remove trailing whitespace. No code changes.

7 years agofix a stale sentence in the manpage
luigi [Tue, 18 Oct 2016 15:24:56 +0000 (15:24 +0000)]
fix a stale sentence in the manpage

7 years agoAdd support for non-contiguous IPv6 masks in ipfw(8) rules.
ae [Tue, 18 Oct 2016 15:14:46 +0000 (15:14 +0000)]
Add support for non-contiguous IPv6 masks in ipfw(8) rules.

For example fe::640:0:0/ffff::ffff:ffff:0:0 will match
addresses fe:*:*:*:0:640:*:*

Submitted by: Eugene Mamchits <mamchits at yandex-team dot ru>
Obtained from: Yandex LLC
MFC after: 2 weeks
Sponsored by: Yandex LLC

7 years agoRestore svn r306772 that was overwritten by netmap import at svn r307394
sbruno [Tue, 18 Oct 2016 14:48:41 +0000 (14:48 +0000)]
Restore svn r306772 that was overwritten by netmap import at svn r307394

#include <sys/selinfo.h> should be here as all drivers that support
netmap need to use this file regardless.

7 years agoSet default capabilities at attach.
sbruno [Tue, 18 Oct 2016 14:02:45 +0000 (14:02 +0000)]
Set default capabilities at attach.

ref: https://github.com/NextBSD/NextBSD/commit/6425f45e5fc89f64925995bbcfc09c7558d896ea

Submitted by: mmacy@nextbsd.org

7 years agoAssert that we're assigning a non-null taskqueue.
sbruno [Tue, 18 Oct 2016 14:00:26 +0000 (14:00 +0000)]
Assert that we're assigning a non-null taskqueue.
ref: https://github.com/NextBSD/NextBSD/commit/535865d02c162e415d7436899cd6db5000a0cc7b

Fix cpu assignment by assuring stride is non-zero, assert that all tasks
have a valid taskqueue.
ref: https://github.com/NextBSD/NextBSD/commit/db398176234fe3ce9f8e8b671f56000f8276feba

Start cpu assignment from zero.
ref: https://github.com/NextBSD/NextBSD/commit/d99d39b6b6c5dfac1eb440c41e36ebf4c897198e

Submitted by: mmacy@nextbsd.org

7 years agoEnsure that tasks with a specific cpu set prior to smp starting get
sbruno [Tue, 18 Oct 2016 13:55:34 +0000 (13:55 +0000)]
Ensure that tasks with a specific cpu set prior to smp starting get
re-attached to a thread running on that cpu.

ref: https://github.com/NextBSD/NextBSD/commit/fcc20e306bc93ebbbe51f3775d1afb527970a2e9

Submitted by: mmacy@nextbsd.org

7 years agoAdd PCB_FP_USERMASK so we can mask off floating point flags that should
andrew [Tue, 18 Oct 2016 13:39:55 +0000 (13:39 +0000)]
Add PCB_FP_USERMASK so we can mask off floating point flags that should
not be sent to userspace, for example the future flag to tell when we are
using floating point in the kernel.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agomakewhatis: avoid skipping another page after one with no mlinks
emaste [Tue, 18 Oct 2016 13:37:59 +0000 (13:37 +0000)]
makewhatis: avoid skipping another page after one with no mlinks

Submitted by: Ingo Schwarze
MFC after: 3 weeks
MFC with: r307003

7 years agoWhen deciding whether or not to call tqg_attach_cpu(), reference rid
sbruno [Tue, 18 Oct 2016 13:29:30 +0000 (13:29 +0000)]
When deciding whether or not to call tqg_attach_cpu(), reference rid
directly.

ref: https://github.com/NextBSD/NextBSD/commit/c9b47b468b8a3350811acfd9e167a8b91dc8f0c6

Submitted by: mmacy@nextbsd.org

7 years agoToggle v4/v6 rxcsum together
sbruno [Tue, 18 Oct 2016 13:22:44 +0000 (13:22 +0000)]
Toggle v4/v6 rxcsum together

Only re-init if driver is running

ref: https://github.com/NextBSD/NextBSD/commit/106518e874ec9a61daf4c09894170d24e2f4d60d

Submitted by: mmacy@nextbsd.org

7 years agoTell gtask to what we've been bound.
sbruno [Tue, 18 Oct 2016 13:16:27 +0000 (13:16 +0000)]
Tell gtask to what we've been bound.

ref: https://github.com/NextBSD/NextBSD/commit/54414984cfebb920bbc40aadeb601bdce448d8d7

Submitted by: mmacy@nextbsd.org

7 years agoFix misusage of CPU_FFS when binding queues to cpus
sbruno [Tue, 18 Oct 2016 13:12:19 +0000 (13:12 +0000)]
Fix misusage of CPU_FFS when binding queues to cpus

ref: https://github.com/NextBSD/NextBSD/commit/922d0bdf2277f30954f143107d2a3eddb02abd2d

Submitted by: mmacy@nextbsd.org

7 years agofstyp tests comes with pre-created EL filesystems,
br [Tue, 18 Oct 2016 12:58:17 +0000 (12:58 +0000)]
fstyp tests comes with pre-created EL filesystems,
but fstyp cannot detect EL filesystem on EB machine,
so exclude test files from distribution and skip the
test.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoREGULATOR: Move functions for handling with regulator ranges to
mmel [Tue, 18 Oct 2016 12:27:46 +0000 (12:27 +0000)]
REGULATOR: Move functions for handling with regulator ranges to
common file. They can be useful for other PMICs.

MFC after: 2 weeks

7 years agoTEGRA: Attach cpufreq and coretemp drivers only on tegra124 SoC.
mmel [Tue, 18 Oct 2016 12:26:22 +0000 (12:26 +0000)]
TEGRA: Attach cpufreq and coretemp drivers only on tegra124 SoC.
It's needed by GENERIC kernel.

MFC after: 2 weeks

7 years agoTEGRA: Really implement early printf. The original version
mmel [Tue, 18 Oct 2016 12:21:45 +0000 (12:21 +0000)]
TEGRA: Really implement early printf. The original version
was cut&pasted from another SoC.

Pointy-hat to: mmel

MFC after: 2 weeks

7 years agoFix comment. We have different VM layout on MIPS, so test is skipped.
br [Tue, 18 Oct 2016 10:20:58 +0000 (10:20 +0000)]
Fix comment. We have different VM layout on MIPS, so test is skipped.

Requested by: kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoSkip test on MIPS as it modifies TLS pointer in set_mcontext().
br [Tue, 18 Oct 2016 10:13:54 +0000 (10:13 +0000)]
Skip test on MIPS as it modifies TLS pointer in set_mcontext().

Discussed with: kib
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoFix a double-free when an inp transitions to INP_TIMEWAIT state
jch [Tue, 18 Oct 2016 07:16:49 +0000 (07:16 +0000)]
Fix a double-free when an inp transitions to INP_TIMEWAIT state
after having been dropped.

This fixes enforces in_pcbdrop() logic in tcp_input():

"in_pcbdrop() is used by TCP to mark an inpcb as unused and avoid future packet
delivery or event notification when a socket remains open but TCP has closed."

PR: 203175
Reported by: Palle Girgensohn, Slawa Olhovchenkov
Tested by: Slawa Olhovchenkov
Reviewed by: Slawa Olhovchenkov
Approved by: gnn, Slawa Olhovchenkov
Differential Revision: https://reviews.freebsd.org/D8211
MFC after: 1 week
Sponsored by: Verisign, inc

7 years agoAdd a new flag to mkimg (-a num) to specify the active partition for
imp [Tue, 18 Oct 2016 05:43:12 +0000 (05:43 +0000)]
Add a new flag to mkimg (-a num) to specify the active partition for
those partitioning schemes that have this concept. Implement it as an
override for mbr's setting 0x80 in the flags for the first partition
when we have boot code.

Differential Revision: https://reviews.freebsd.org/D4403

7 years agoAdd preliminary support for Raspberry PI3 images to nanobsd.
imp [Tue, 18 Oct 2016 04:02:00 +0000 (04:02 +0000)]
Add preliminary support for Raspberry PI3 images to nanobsd.

7 years agoAlso include the DTBs in /boot/dtb for omap4 systems.
imp [Tue, 18 Oct 2016 04:01:58 +0000 (04:01 +0000)]
Also include the DTBs in /boot/dtb for omap4 systems.

7 years agoAdd support for building pandaboard images with nanobsd.
imp [Tue, 18 Oct 2016 04:01:56 +0000 (04:01 +0000)]
Add support for building pandaboard images with nanobsd.

7 years agoSkip the checks in mtools. They are false positive for errors.
imp [Tue, 18 Oct 2016 04:01:54 +0000 (04:01 +0000)]
Skip the checks in mtools. They are false positive for errors.

7 years agoMake sure tcp_mss() has the same check as tcp_mss_update() to have t_maxseg set
hiren [Tue, 18 Oct 2016 02:40:25 +0000 (02:40 +0000)]
Make sure tcp_mss() has the same check as tcp_mss_update() to have t_maxseg set
to at least 64.

This is still just a coverup to avoid kernel panic and not an actual fix.

PR: 213232
Reviewed by: glebius
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D8272

7 years ago o Provide a private definition for UUIDs (mkimg_uuid_t) because
marcel [Tue, 18 Oct 2016 01:55:07 +0000 (01:55 +0000)]
 o  Provide a private definition for UUIDs (mkimg_uuid_t) because
    UUIDs are not portable.
 o  Move mkimg_uuid() to a new file and merge both gpt_uuid_enc()
    and vhd_uuid_enc() into a single mkimg_uuid_enc() that lives
    in the same file.
 o  Move the OS-specific implementation of generating a UUID to
    osdep_uuidgen() and provide the implementations for FreeBSD,
    macOS and Linux.
 o  Expect the partitioning scheme headers to be found by having
    a search to the directory in which the headers live. This
    avoids conflicts on non-FreeBSD machines.

7 years agoAdd LORDER, TSORT and TSORTFLAGS variables and replace the
marcel [Tue, 18 Oct 2016 01:42:42 +0000 (01:42 +0000)]
Add LORDER, TSORT and TSORTFLAGS variables and replace the
hardcoded utility names and tsort flags.

7 years agoUse proper integer-pointer type conversions.
jhibbits [Tue, 18 Oct 2016 00:55:15 +0000 (00:55 +0000)]
Use proper integer-pointer type conversions.

As part of an effort to extend Book-E to the 64-bit world, make the necessary
changes to the DPAA/dTSEC driver set to be integer-pointer conversion clean.
This means no more casts to int, and use uintptr_t where needed.

Since the NCSW source is effectively obsolete, direct changes to the source tree
are safe.

7 years agoLimit the number of mbufs that can be allocated for IPV6_2292PKTOPTIONS
gnn [Mon, 17 Oct 2016 23:25:31 +0000 (23:25 +0000)]
Limit the number of mbufs that can be allocated for IPV6_2292PKTOPTIONS
(and IPV6_PKTOPTIONS).

PR: 100219
Submitted by: Joseph Kong
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D5157

7 years agoAdd sysctl to make amd64 minidump retry count tunable at runtime.
stevek [Mon, 17 Oct 2016 22:57:41 +0000 (22:57 +0000)]
Add sysctl to make amd64 minidump retry count tunable at runtime.

PR: 213462
Submitted by: RaviPrakash Darbha <rdarbha@juniper.net>
Reviewed by: cemi, markj
Approved by: sjg (mentor)
Obtained from: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D8254

7 years agoFix relnotes build of supported hardware list after r307529
bjk [Mon, 17 Oct 2016 22:48:29 +0000 (22:48 +0000)]
Fix relnotes build of supported hardware list after r307529

urtwn is merged into rtwn, so there is not a separate hardware list
to include anymore.

7 years agoMove mksubr from kdump into libsysdecode.
jhb [Mon, 17 Oct 2016 22:37:07 +0000 (22:37 +0000)]
Move mksubr from kdump into libsysdecode.

Restructure this script so that it generates a header of tables instead
of a source file.  The tables are included in a flags.c source file which
provides functions to decode various system call arguments.

For functions that decode an enumeration, the function returns a pointer
to a string for known values and NULL for unknown values.

For functions that do more complex decoding (typically of a bitmask), the
function accepts a pointer to a FILE object (open_memstream() can be used
as a string builder) to which decoded values are written.  If the
function operates on a bitmask, the function returns true if any bits
were decoded or false if the entire value was valid.  Additionally, the
third argument accepts a pointer to a value to which any undecoded bits
are stored.  This pointer can be NULL if the caller doesn't care about
remaining bits.

Convert kdump over to using decoder functions from libsysdecode instead of
mksubr.  truss also uses decoders from libsysdecode instead of private
lookup tables, though lookup tables for objects not decoded by kdump remain
in truss for now.  Eventually most of these tables should move into
libsysdecode as the automated table generation approach from mksubr is
less stale than the static tables in truss.

Some changes have been made to truss and kdump output:
- The flags passed to open() are now properly decoded in that one of
  O_RDONLY, O_RDWR, O_WRONLY, or O_EXEC is always included in a decoded
  mask.
- Optional arguments to open(), openat(), and fcntl() are only printed
  in kdump if they exist (e.g. the mode is only printed for open() if
  O_CREAT is set in the flags).
- Print argument to F_GETLK/SETLK/SETLKW in kdump as a pointer, not int.
- Include all procctl() commands.
- Correctly decode pipe2() flags in truss by not assuming full
  open()-like flags with O_RDONLY, etc.
- Decode file flags passed to *chflags() as file flags (UF_* and SF_*)
  rather than as a file mode.
- Fix decoding of quotactl() commands by splitting out the two command
  components instead of assuming the raw command value matches the
  primary command component.

In addition, truss and kdump now build without triggering any warnings.
All of the sysdecode manpages now include the required headers in the
synopsis.

Reviewed by: kib (several older versions), wblock (manpages)
MFC after: 2 months
Differential Revision: https://reviews.freebsd.org/D7847

7 years agoUse 'cmd' rather than 'command' to match the function prototype.
jhb [Mon, 17 Oct 2016 22:36:37 +0000 (22:36 +0000)]
Use 'cmd' rather than 'command' to match the function prototype.

7 years agoFix dates + add an UPDATING entry.
avos [Mon, 17 Oct 2016 21:35:13 +0000 (21:35 +0000)]
Fix dates + add an UPDATING entry.

7 years agocxgbe(4): Adjust whitespace to line up the column titles in cim_qcfg
np [Mon, 17 Oct 2016 20:57:54 +0000 (20:57 +0000)]
cxgbe(4): Adjust whitespace to line up the column titles in cim_qcfg
with the values displayed.

7 years agortwn(4), urtwn(4): merge common code, add support for 11ac devices.
avos [Mon, 17 Oct 2016 20:38:24 +0000 (20:38 +0000)]
rtwn(4), urtwn(4): merge common code, add support for 11ac devices.

All devices:
- add support for rate adaptation via ieee80211_amrr(9);
- use short preamble for transmitted frames when needed;
- multi-bss support:
 * for RTL8821AU: 2 VAPs at the same time;
 * other: 1 any VAP + 1 sta VAP.
RTL8188CE:
- fix IQ calibration bug (reason of significant speed degradation);
- add h/w crypto acceleration support.
USB:
- A-MPDU Tx support;
- short GI support;
Other:
- add support for RTL8812AU / RTL8821AU chipsets
(a/b/g/n only; no ac yet);
- split merged code into subparts:
 * bus glue (usb/*, pci/*, rtl*/usb/*, rtl*/pci/*)
 * common (if_rtwn*)
 * chip-specific (rtl*/*)
- various other bugfixes.

Due to code reorganization, module names / requirements were changed too:
urtwn urtwnfw -> rtwn rtwn_usb rtwnfw
rtwn  rtwnfw  -> rtwn rtwn_pci rtwnfw

Tested with RTL8188CE, RTL8188CUS, RTL8188EU and RTL8821AU.

Tested by: kevlo, garga,
Peter Garshtja <peter.garshtja@ambient-md.com>,
Kevin McAleavey <kevin.mcaleavey@knosproject.com>,
Ilias-Dimitrios Vrachnis <id@vrachnis.com>,
<otacilio.neto@bsd.com.br>
Relnotes: yes

7 years agoMake pass driver better support CAM_CDB_POINTER flag.
mav [Mon, 17 Oct 2016 15:02:17 +0000 (15:02 +0000)]
Make pass driver better support CAM_CDB_POINTER flag.

Previously pass driver just ignored the flag, making random kernel code
access user-space pointer, sometime causing crashes even for correctly
written applications if user-level context was switched or swapped out.
This patch tries to copyin the CDB into kernel space to avoid it.

MFC after: 2 weeks

7 years agomakesyscalls.sh: remove trailing space on the "created from" line
emaste [Mon, 17 Oct 2016 13:52:24 +0000 (13:52 +0000)]
makesyscalls.sh: remove trailing space on the "created from" line

In r10905 and r10906 makesyscalls was modified to avoid emitting a
literal $Id$ string in the generated file, with:

    gsub("[$]Id: ", "", $0)
    gsub(" [$]", "", $0)

Then r11294 added some functionality and also tried to address the $Id$
problem in a different way, by removing every $:

    sed -e 's/\$//g ...

This rendered the gsub infeffective. The gsub was later updated to
track the $Id$ -> $FreeBSD$ switch, even though it did not do anything.

Revert the addition of the s/\$//g, and update the gsub to keep the
resulting format the same.

Discussed with: bde
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agolibmd: introduce functions that operate on an fd instead of filename
emaste [Mon, 17 Oct 2016 13:47:22 +0000 (13:47 +0000)]
libmd: introduce functions that operate on an fd instead of filename

Reviewed by: allanjude, cem
MFC after: 2 months
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8264

7 years agoelfdump: correct DT_AUXILIARY / DT_USED / DT_FILTER definitions
emaste [Mon, 17 Oct 2016 13:36:50 +0000 (13:36 +0000)]
elfdump: correct DT_AUXILIARY / DT_USED / DT_FILTER definitions

r109332 introduced these three as DT_SUNW_*. Update to the correct
names already used elsewhere in FreeBSD and the Sun "Linker and
Libraries Guide"

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

7 years agoIncrease timeout so low-end platforms have a chance to complete test
br [Mon, 17 Oct 2016 10:21:53 +0000 (10:21 +0000)]
Increase timeout so low-end platforms have a chance to complete test
procedures.

This fixes operation in QEMU/MIPS64.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

7 years agoFix device delete child function.
hselasky [Mon, 17 Oct 2016 10:20:38 +0000 (10:20 +0000)]
Fix device delete child function.

When detaching device trees parent devices must be detached prior to
detaching its children. This is because parent devices can have
pointers to the child devices in their softcs which are not
invalidated by device_delete_child(). This can cause use after free
issues and panic().

Device drivers implementing trees, must ensure its detach function
detaches or deletes all its children before returning.

While at it remove now redundant device_detach() calls before
device_delete_child() and device_delete_children(), mostly in
the USB controller drivers.

Tested by: Jan Henrik Sylvester <me@janh.de>
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D8070
MFC after: 2 weeks

7 years agoTypo fixed: arbitraty -> arbitrary.
maxim [Mon, 17 Oct 2016 09:40:18 +0000 (09:40 +0000)]
Typo fixed: arbitraty -> arbitrary.

PR: 213559
Submitted by: olgeni

7 years agoRevert timeout part of r307507.
mav [Mon, 17 Oct 2016 09:16:44 +0000 (09:16 +0000)]
Revert timeout part of r307507.

I misread 5 minutes as 5 seconds.  Timeout of 5 minutes may have sense.

MFC after: 2 weeks

7 years agoReplicate r307507 for ATA disks.
mav [Mon, 17 Oct 2016 08:38:24 +0000 (08:38 +0000)]
Replicate r307507 for ATA disks.

MFC after: 2 weeks

7 years agoConsider device as clean even if SYNCHRONIZE CACHE failed.
mav [Mon, 17 Oct 2016 08:35:56 +0000 (08:35 +0000)]
Consider device as clean even if SYNCHRONIZE CACHE failed.

If device reservation was preempted by other initiator, our sync request
will always fail.  Without this change CAM tried to sync cache on every
following device close, including numerous GEOM tasting opens/closes,
causing lots of useless noise in logs.

While there, increase SYNCHRONIZE CACHE timeout to default value.

MFC after: 2 weeks

7 years agoIf vm_fault_hold(9) finds that fs.m is wired, do not free it after a
kib [Mon, 17 Oct 2016 08:17:06 +0000 (08:17 +0000)]
If vm_fault_hold(9) finds that fs.m is wired, do not free it after a
pager error, leave the page to the wire owner.  E.g. the page might be
a part of the invalidated buffer.

Reported and tested by: pho
Reviewed by: alc, markj
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D8197

7 years agoExport vm_page_xunbusy_maybelocked().
kib [Mon, 17 Oct 2016 08:14:23 +0000 (08:14 +0000)]
Export vm_page_xunbusy_maybelocked().

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

7 years ago[net80211] add some more RX flags.
adrian [Mon, 17 Oct 2016 04:30:10 +0000 (04:30 +0000)]
[net80211] add some more RX flags.

7 years agoAllow root_rw_mount to be both lower and upper case. Before, if it was
imp [Mon, 17 Oct 2016 04:07:13 +0000 (04:07 +0000)]
Allow root_rw_mount to be both lower and upper case. Before, if it was
upper case, you'd wind up with a read-only filesystem when you should
sometimes.

PR: 213549

7 years agoAssume all coreboot BIOSes have the need for these workarounds because
imp [Mon, 17 Oct 2016 04:07:12 +0000 (04:07 +0000)]
Assume all coreboot BIOSes have the need for these workarounds because
coreboot implements the keyboard controller and it's common to all
Chromebooks. The workaround won't hurt and may help.

7 years agoGuard against bad service name argument(s) to load_rc_config()
dteske [Sun, 16 Oct 2016 20:59:28 +0000 (20:59 +0000)]
Guard against bad service name argument(s) to load_rc_config()

MFC after: 3 days
X-MFC-to: stable/11 stable/10

7 years agoFix tst.args1.c on LP64 platforms.
markj [Sun, 16 Oct 2016 19:50:10 +0000 (19:50 +0000)]
Fix tst.args1.c on LP64 platforms.

The untyped probe arguments have a width larger than int on such platforms,
so printing their value without a cast can give unexpected results.

MFC after: 1 week

7 years agotst.kpriv.ksh fails because DTrace privilege levels are unimplemented.
markj [Sun, 16 Oct 2016 19:46:55 +0000 (19:46 +0000)]
tst.kpriv.ksh fails because DTrace privilege levels are unimplemented.

MFC after: 1 week

7 years agoReference the libc symbols ypresp_{allfn,data} instead of local symbols.
markj [Sun, 16 Oct 2016 19:12:22 +0000 (19:12 +0000)]
Reference the libc symbols ypresp_{allfn,data} instead of local symbols.

This fixes a regression introduced in r285926.

PR: 213506
MFC after: 3 days

7 years agoAdd vfs.zfs.zil_log_limit sysctl.
mav [Sun, 16 Oct 2016 18:49:15 +0000 (18:49 +0000)]
Add vfs.zfs.zil_log_limit sysctl.

It is at least partially broken now, but that is another question.

7 years agoadd a missing header.
luigi [Sun, 16 Oct 2016 18:27:41 +0000 (18:27 +0000)]
add a missing header.

7 years agoadd two missing files for the netmap import
luigi [Sun, 16 Oct 2016 15:22:17 +0000 (15:22 +0000)]
add two missing files for the netmap import

7 years agoImport the current version of netmap, aligned with the one on github.
luigi [Sun, 16 Oct 2016 14:13:32 +0000 (14:13 +0000)]
Import the current version of netmap, aligned with the one on github.

This commit, long overdue, contains contributions in the last 2 years
from Stefano Garzarella, Giuseppe Lettieri, Vincenzo Maffione, including:
+ fixes on monitor ports
+ the 'ptnet' virtual device driver, and ptnetmap backend, for
  high speed virtual passthrough on VMs (bhyve fixes in an upcoming commit)
+ improved emulated netmap mode
+ more robust error handling
+ removal of stale code
+ various fixes to code and documentation (some mixup between RX and TX
  parameters, and private and public variables)

We also include an additional tool, nmreplay, which is functionally
equivalent to tcpreplay but operating on netmap ports.

7 years agoaw_ccu on H3 needs access to PRCM space. The r_pio controller works now.
jmcneill [Sun, 16 Oct 2016 12:55:31 +0000 (12:55 +0000)]
aw_ccu on H3 needs access to PRCM space. The r_pio controller works now.

7 years agoOptimize ZIL itx memory allocation on FreeBSD.
mav [Sun, 16 Oct 2016 10:43:12 +0000 (10:43 +0000)]
Optimize ZIL itx memory allocation on FreeBSD.

These allocations can reach up to 128KB, while FreeBSD kernel allocator
can cache allocations only up to 64KB.  To avoid expensive allocations
for each large ZIL write use caching zio_buf_alloc() allocator instead.

To make it possible de-inline few instances of zil_itx_destroy().

7 years agoDo not try to create /dev/efi device node before devfs is initialized.
kib [Sun, 16 Oct 2016 06:07:43 +0000 (06:07 +0000)]
Do not try to create /dev/efi device node before devfs is initialized.
Split efirt.ko initialization into early stage where runtime services
KPI environment is created, to be used e.g. for RTC, and the later
devfs node creation stage, per module.

Switch the efi device to use make_dev_s(9) instead of make_dev(9).  At
least, this gracefully handles the duplicated device name issue.

Remove ARGSUSED comment from efidev_ioctl(), all unused arguments are
annotated with __unused attribute.

Reported by: ambrisko, O. Hartmann <ohartman@zedat.fu-berlin.de>
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

7 years agostyle(9) nit: space after |.
imp [Sun, 16 Oct 2016 05:53:18 +0000 (05:53 +0000)]
style(9) nit: space after |.

7 years agoFix booting on systems that use loader(8) (most of them).
jhibbits [Sun, 16 Oct 2016 04:22:04 +0000 (04:22 +0000)]
Fix booting on systems that use loader(8) (most of them).

r306065/r306067 introduced ofw_parse_bootargs(), setting environment variables
from Open Firmware's /chosen/bootargs property.  On systems booting with
loader(8) (meaning, most systems), the initial static kenv is created with no
extra space, causing kern_setenv() to panic.  Since these already have the
environment set directly, there is no need to parse bootargs anyway.

Found by: swills

7 years agoSwitch to using the portable partition scheme headers.
marcel [Sun, 16 Oct 2016 02:55:52 +0000 (02:55 +0000)]
Switch to using the portable partition scheme headers.

7 years agoRe-apply change 306811 or alternatively, revert change 307385.
marcel [Sun, 16 Oct 2016 02:43:51 +0000 (02:43 +0000)]
Re-apply change 306811 or alternatively, revert change 307385.

7 years agoRevert change 306811 so that the change can be re-done using
marcel [Sun, 16 Oct 2016 02:05:22 +0000 (02:05 +0000)]
Revert change 306811 so that the change can be re-done using
svn copy instead of svn move.  This to preserve history on
the originals headers as well.

7 years agoRemove an unused field from struct pmcstat_image.
markj [Sat, 15 Oct 2016 23:46:55 +0000 (23:46 +0000)]
Remove an unused field from struct pmcstat_image.

MFC after: 3 days

7 years agoAdd driver for GPIO controlled regulator.
jmcneill [Sat, 15 Oct 2016 20:04:14 +0000 (20:04 +0000)]
Add driver for GPIO controlled regulator.

Reviewed by: gonzo, manu, mmel
Differential Revision: https://reviews.freebsd.org/D8257

7 years agoFix typos in sdiff(1) message and improve display
bapt [Sat, 15 Oct 2016 19:55:07 +0000 (19:55 +0000)]
Fix typos in sdiff(1) message and improve display

7 years agoFix typo in comments.
np [Sat, 15 Oct 2016 18:20:15 +0000 (18:20 +0000)]
Fix typo in comments.

7 years agoaxp209: Add support for regulators
manu [Sat, 15 Oct 2016 17:49:41 +0000 (17:49 +0000)]
axp209: Add support for regulators

Except for LDO4, all regulators are supported.

MFC after: 1 week

7 years agoFix the build, struct vfpstate needs to be visible to userspace as it's
andrew [Sat, 15 Oct 2016 16:29:06 +0000 (16:29 +0000)]
Fix the build, struct vfpstate needs to be visible to userspace as it's
part of struct pcb which is in a header used in libutil.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoImprove wording
bapt [Sat, 15 Oct 2016 15:55:04 +0000 (15:55 +0000)]
Improve wording

Submitted by: lidl

7 years agoAdd LU option to control reported provisioning type.
mav [Sat, 15 Oct 2016 14:40:34 +0000 (14:40 +0000)]
Add LU option to control reported provisioning type.

MFC after: 2 weeks

7 years agoMove cleanup() into the edit.c file which is the only users of that function
bapt [Sat, 15 Oct 2016 13:45:09 +0000 (13:45 +0000)]
Move cleanup() into the edit.c file which is the only users of that function
Remove common.{c,h}

7 years agoTurn editit into a static function
bapt [Sat, 15 Oct 2016 13:42:38 +0000 (13:42 +0000)]
Turn editit into a static function

7 years agoRemove the common.h include which is actually not used in sdiff.c
bapt [Sat, 15 Oct 2016 13:41:58 +0000 (13:41 +0000)]
Remove the common.h include which is actually not used in sdiff.c

7 years agoMatch "allwinner,sun8i-h3-apb0-gates-clk" compatible string.
jmcneill [Sat, 15 Oct 2016 13:27:01 +0000 (13:27 +0000)]
Match "allwinner,sun8i-h3-apb0-gates-clk" compatible string.

7 years agoUse SRCTOP to find the sources of libucl
bapt [Sat, 15 Oct 2016 13:17:27 +0000 (13:17 +0000)]
Use SRCTOP to find the sources of libucl

7 years agodirectly create the socket with SOCK_NONBLOCK instead of calling fcntl(2)
bapt [Sat, 15 Oct 2016 13:16:52 +0000 (13:16 +0000)]
directly create the socket with SOCK_NONBLOCK instead of calling fcntl(2)

7 years agoFix typo
bapt [Sat, 15 Oct 2016 12:32:59 +0000 (12:32 +0000)]
Fix typo

Reported by: "N.J. Mann" <njm@njm.me.uk>

7 years agoProvide a complete A23 PLL1 factor table, from 60MHz to 1872MHz.
jmcneill [Sat, 15 Oct 2016 12:23:54 +0000 (12:23 +0000)]
Provide a complete A23 PLL1 factor table, from 60MHz to 1872MHz.

7 years agoRegen
bapt [Sat, 15 Oct 2016 12:11:30 +0000 (12:11 +0000)]
Regen

7 years agoRemove GNU rcs from base.
bapt [Sat, 15 Oct 2016 12:07:37 +0000 (12:07 +0000)]
Remove GNU rcs from base.

GNU rcs is still available as a package:
- rcs: Latest GPLv3 GNU rcs version.
- rcs57: Copy of the latest version of GNU rcs (GPLv2) from base.

Relnotes: yes

7 years agoAdd LUN options to limit UNMAP and WRITE SAME sizes.
mav [Sat, 15 Oct 2016 10:29:33 +0000 (10:29 +0000)]
Add LUN options to limit UNMAP and WRITE SAME sizes.

CTL itself has no limits on on UNMAP and WRITE SAME sizes.  But depending
on backends large requests may take too much time.  To avoid that new
configuration options allow to hint initiator maximal sizes it should not
exceed.

MFC after: 2 weeks

7 years agoCheck we are in a critical section when calling vfp_discard. As we may call
andrew [Sat, 15 Oct 2016 09:54:22 +0000 (09:54 +0000)]
Check we are in a critical section when calling vfp_discard. As we may call
it with a NULL thread pointer only check when it is non-NULL.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

7 years agoaibs / atk0110: add support for querying sensors via GGRP and GITM
avg [Sat, 15 Oct 2016 09:10:35 +0000 (09:10 +0000)]
aibs / atk0110: add support for querying sensors via GGRP and GITM

Comparing to the Linux driver there is still one missing feature.
The Linux driver finds and enables "Embedded Controller" item in
the 0x11 group if it's not enabled yet.

I tested the new method, Torfinn Ingolfsen tested the old method
and helped to fix several bugs in the earlier versions of the patch.

Tested by: Torfinn Ingolfsen <torfinn.ingolfsen@getmail.no>
Reviewed by: rpaulo
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D8227

7 years agoImprove phrasing of the STANDARDS section.
ed [Sat, 15 Oct 2016 08:09:55 +0000 (08:09 +0000)]
Improve phrasing of the STANDARDS section.

Reported by: wblock
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D8205

7 years agoImplement -t. Use symbolic names in place of the magical 0x7.
imp [Sat, 15 Oct 2016 06:16:35 +0000 (06:16 +0000)]
Implement -t. Use symbolic names in place of the magical 0x7.

Submitted by: ambrisko@

7 years agoCreate a pcibios-version environment FORTH word. This allows one to
imp [Sat, 15 Oct 2016 05:53:09 +0000 (05:53 +0000)]
Create a pcibios-version environment FORTH word. This allows one to
conditionally compile forth code before using the pcibios- words.

7 years agoFix cases where the TFO pending counter would leak references, and eventually, memory.
pkelsey [Sat, 15 Oct 2016 01:41:28 +0000 (01:41 +0000)]
Fix cases where the TFO pending counter would leak references, and eventually, memory.

Also renamed some tfo labels and added/reworked comments for clarity.

Based on an initial patch from jtl.

PR: 213424
Reviewed by: jtl
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D8235

7 years agor307082 added the TCP_HHOOK kernel option and made some existing code only
jtl [Sat, 15 Oct 2016 00:29:15 +0000 (00:29 +0000)]
r307082 added the TCP_HHOOK kernel option and made some existing code only
compile when that option is configured. In tcp_destroy(), the error
variable is now only used in code enclosed in an '#ifdef TCP_HHOOK' block.
This broke the build for VNET images.

Enclose the error variable itself in an #ifdef block.

Submitted by: Shawn Webb <shawn.webb at hardenedbsd.org>
Reported by: Shawn Webb <shawn.webb at hardenedbsd.org>
PointyHat to: jtl

7 years agoMake BRCM2837 port conform FreeBSD/ARM64 guidelines
gonzo [Fri, 14 Oct 2016 22:23:03 +0000 (22:23 +0000)]
Make BRCM2837 port conform FreeBSD/ARM64 guidelines

- Rename SOC_BCM2837 to SOC_BRCM_BCM2837, put it to opt_soc.h
- do not use files.XXX files, just move required sources to
    conf/files.arm64 and make them depend on soc_brcm_bcm2837

Suggested by: andrew

7 years agoCreate macros for the MAIR memory attributes. While here add an uncached
andrew [Fri, 14 Oct 2016 22:20:14 +0000 (22:20 +0000)]
Create macros for the MAIR memory attributes. While here add an uncached
memory type, however the VM code still needs to be taught about this.

MFC after: 1 week
Sponsored by: ABT Systems Ltd

7 years agoReprogram I/O APIC interrupt pins when registering an I/O APIC.
jhb [Fri, 14 Oct 2016 21:51:50 +0000 (21:51 +0000)]
Reprogram I/O APIC interrupt pins when registering an I/O APIC.

All I/O APIC pins are masked when an I/O APIC is first probed.  The
APIC enumerator (MP Table or MADT) then parses its associated tables to
configure individual pins to set custom delivery modes or alternate
routing (e.g. routing IRQ 0 to intpin 2).  Pins for regular interrupt
pins are left masked until the first interrupt is assigned.  However,
pins with unusual settings (e.g. NMI or SMI) are never assigned an
interrupt and thus never re-programmed.  The I/O APIC code used to
reprogram all interrupt pins during registration but this was lost in
r151979.

In theory, this is mostly a no-op as the ACPI APIC table does not
include a way to enumerate NMI or SMI pins for the I/O APIC, so only
systems using an MP Table would be affected.

Reported by: avg
MFC after: 1 month

7 years agoDrop support for using mmap() with /dev/kmem.
jhb [Fri, 14 Oct 2016 20:01:07 +0000 (20:01 +0000)]
Drop support for using mmap() with /dev/kmem.

Using the device pager with /dev/kmem is not stable since KVA mappings
are transient, but the device pager caches the PA associated with a
given offset forever.  Interestingly, mips' implementation of
memmap() already refused requests for /dev/kmem.

Note that kvm_read/kvm_write do not use mmap, but use read and write on
/dev/kmem, so this should not affect libkvm users.

Reviewed by: kib
MFC after: 2 months

7 years agoRemove redundant kern_clocksource.c. It is already in conf/files.arm64
gonzo [Fri, 14 Oct 2016 17:40:48 +0000 (17:40 +0000)]
Remove redundant kern_clocksource.c. It is already in conf/files.arm64

Reported by: andrew

7 years agoUpdate i386 build of loader.efi (but leave it disabled) so that we at
sbruno [Fri, 14 Oct 2016 17:25:29 +0000 (17:25 +0000)]
Update i386 build of loader.efi (but leave it disabled) so that we at
least build it now.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D7801