]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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

7 years agoIn UEFI mode expose the SMBIOS anchor base address via kenv so the kernel
ambrisko [Fri, 14 Oct 2016 17:10:53 +0000 (17:10 +0000)]
In UEFI mode expose the SMBIOS anchor base address via kenv so the kernel
etc. can find out where the SMBIOS entry point is located.  In pure
UEFI mode the BIOS is not mapped into the standard address space so the
SMBIOS table might not appear between 0xf0000 and 0xfffff.  The
UEFI environment can report this the location of the anchor.  If it is
reported then expose it as hint.smbios.0.mem.  This can then be used
by other tools.  However, we should make smbios(4) useful and have it
take this value and provide accesor function so ipmi(4) etc. don't
have to parse and figure things about the SMBIOS table.  I have some
simple patches to smbios(4) to expose this address as sysctl and
for ipmi(4) to get the base address.  However, the real fix is to
have ipmi(4) ask smbios(4) for what it wants and have smbios(4)
parse it out and return it.  This would make smbios(4) useful and reduce
duplicated code.  If this address doesn't point to the anchor then
finding SMBIOS info. will fail as if this didn't exist.  So there should
be no harm.

With this change and the following hack, dmidecode works on a bunch of
UEFI machines that I tested:

  if kenv hint.smbios.0.mem > /dev/null
  then
        mkdir -p /sys/firmware/efi
        mount -t tmpfs -o size=8k tmpfs /sys/firmware/efi
        echo "SMBIOS=`kenv hint.smbios.0.mem`" > /sys/firmware/efi/systab
  fi

Linux exposes this information via the /sys/firmware/efi/systab file which
dmidecode looks at.  We should update dmidecode to do this the FreeBSD
way when we determine what that is!

Reviewed by: jhb

7 years agoSimplify logic for libproc and librtld_db in lib/Makefile
emaste [Fri, 14 Oct 2016 17:04:07 +0000 (17:04 +0000)]
Simplify logic for libproc and librtld_db in lib/Makefile

7 years agoCreate a new linker set, Xficl_compile_set which contains a list of
imp [Fri, 14 Oct 2016 16:23:12 +0000 (16:23 +0000)]
Create a new linker set, Xficl_compile_set which contains a list of
functions to call at the appropriate time to register new forth
words. In the past we've done this with ifdef soup, but now if the
file is included in the build, we'll get the new forth words.

Use this new functionality to move the pci bios stuff out of loader.c
by moving it to biospci.c.

Move the pnp functionality to common/pnp.c.

Move the inb/outb forth words to the i386 sysdep.c file where their
implementation is defined.

Adjust the efi linker scripts and build machinery to cope.

his should be an invisible change to forth scripts and user
experience.

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

7 years agoRemove fetching of pInterp. Currently, there's no actual effect other
imp [Fri, 14 Oct 2016 16:23:05 +0000 (16:23 +0000)]
Remove fetching of pInterp. Currently, there's no actual effect other
than to store the location of a forth word that is subsequently never
used. It was last used before the 2.03 ficl upgrade in r51786. It was
only used from r43614 (so Feb-Sept 1999) on head and in the 3.x branch
(merged r43715 3.1 -> EOL). Remove it since nobody cared enough to
report the bug in the last 18 years rather than fix it. It's need
seems to have passed in the 2.03 ficl update.

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

7 years agoThe file /boot/boot.conf existed for the 3.0 release (r38764). It was
imp [Fri, 14 Oct 2016 16:05:44 +0000 (16:05 +0000)]
The file /boot/boot.conf existed for the 3.0 release (r38764). It was
replaced by /boot/loader.rc for 3.1 (r42682). In May 2000, this was
documented as deprecated (r61942) (between FreeBSD 4.0 and
4.1). Remove it since it's not been the preferred method in 17 years
and has been deprecated for 16.

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

7 years agoRework how we store the VFP registers in the pcb. This will be used when
andrew [Fri, 14 Oct 2016 15:53:48 +0000 (15:53 +0000)]
Rework how we store the VFP registers in the pcb. This will be used when
creating a floating-point context within the kernel without having to move
the stored values in memory.

Sponsored by: The FreeBSD Foundation

7 years agoadjust picobsd script to work with HEAD
luigi [Fri, 14 Oct 2016 15:16:44 +0000 (15:16 +0000)]
adjust picobsd script to work with HEAD

7 years agoThe code currently resets the keepalive timer each time a packet is
jtl [Fri, 14 Oct 2016 14:57:43 +0000 (14:57 +0000)]
The code currently resets the keepalive timer each time a packet is
received on a TCP session that has entered the ESTABLISHED state. This
results in a lot of calls to reset the keepalive timer.

This patch changes the behavior so we set the keepalive timer for the
keepalive idle time (TP_KEEPIDLE). When the keepalive timer fires, it will
first check to see if the session has been idle for TP_KEEPIDLE ticks. If
not, it will reschedule the keepalive timer for the time the session will
have been idle for TP_KEEPIDLE ticks.

For a session with regular communication, the keepalive timer should fire
approximately once every TP_KEEPIDLE ticks. For sessions with irregular
communication, the keepalive timer might fire more often. But, the
disruption from a periodic keepalive timer should be less than the regular
cost of resetting the keepalive timer on every packet.

(FWIW, this change saved approximately 1.73% of the busy CPU cycles on a
particular test system with a heavy TCP output load. Of course, the
actual impact is very specific to the particular hardware and workload.)

Reviewed by: gallatin, rrs
MFC after: 2 weeks
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D8243

7 years agoMFV r307314:
mav [Fri, 14 Oct 2016 12:03:04 +0000 (12:03 +0000)]
MFV r307314:
6988 spa_sync() spends half its time in dmu_objset_do_userquota_updates

Using a benchmark which creates 2 million files in one TXG, I observe
that the thread running spa_sync() is on CPU almost the entire time we
are syncing, and therefore can be a performance bottleneck. About 50% of
the time in spa_sync() is in dmu_objset_do_userquota_updates().

The problem is that dmu_objset_do_userquota_updates() calls
zap_increment_int(DMU_USERUSED_OBJECT) once for every file that was
modified (or created). In this benchmark, all the files are owned by the
same user/group, so all 2 million calls to zap_increment_int() are
modifying the same entry in the zap. The same issue exists for the
DMU_GROUPUSED_OBJECT.

We should keep an in-memory map from user to space delta while we are
syncing, and when we finish, iterate over the in-memory map and modify
the ZAP once per entry. This reduces the number of calls to
zap_increment_int() from "number of objects modified" to "number of
owners/groups of modified files".

This reduced the time spent in spa_sync() in the file create benchmark
by ~33%, from 11 seconds to 7 seconds.

Closes #107

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Steve Gonczi <steve.gonczi@delphix.com>
Reviewed by: Ned Bass <bass6@llnl.gov>
Reviewed by: Jinshan Xiong <jinshan.xiong@intel.com>
Author: Matthew Ahrens <mahrens@delphix.com>

openzfs/openzfs@5fc46359c569369d87728ca09f8705cdff6cc8e2

7 years agoMFV r307313:
mav [Fri, 14 Oct 2016 12:01:33 +0000 (12:01 +0000)]
MFV r307313:
5120 zfs should allow large block/gzip/raidz boot pool (loader project)

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Toomas Soome <tsoome@me.com>

openzfs/openzfs@c8811bd3e2427dddbac6c05a59cfe117d8fea370

FreeBSD still does not support booting from gzip-compressed datasets,
so keep one chunk of this commit out.

7 years agoFix build WITHOUT_FORTH
bapt [Fri, 14 Oct 2016 11:57:08 +0000 (11:57 +0000)]
Fix build WITHOUT_FORTH

MFC after: 1 week
Sponsored by: Gandi.net

7 years agohyperv/vmbus: Add __FBSDID
sephe [Fri, 14 Oct 2016 05:47:59 +0000 (05:47 +0000)]
hyperv/vmbus: Add __FBSDID

Sponsored by: Microsoft

7 years agohyperv/hn: Management parts always need suspend and resume.
sephe [Fri, 14 Oct 2016 05:41:51 +0000 (05:41 +0000)]
hyperv/hn: Management parts always need suspend and resume.

MFC after: 3 days
Sponsored by: Microsoft

7 years agohyperv/stor: Fix off-by-one bug; this brings back TRIM support.
sephe [Fri, 14 Oct 2016 05:32:47 +0000 (05:32 +0000)]
hyperv/stor: Fix off-by-one bug; this brings back TRIM support.

Submitted by: Hongjiang Zhang <honzhan microsoft com>
Reported by: Lili Deng <v-lide microsoft com>
MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D8238

7 years agoAdd initial Raspberry Pi 3 support
gonzo [Fri, 14 Oct 2016 03:37:35 +0000 (03:37 +0000)]
Add initial Raspberry Pi 3 support

RPI3 kernel config builds kernel compatible with latest upstream device
tree and firmware: https://github.com/raspberrypi/firmware/tree/master/boot
As of today it's 597c662a613df1144a6bc43e5f4505d83bd748ca

Default console is PL01x, so pi3-disable-bt dt overlay should be configured
in config.txt and stock U-Boot should be patched to use proper serial port.

Yet unsupported: SMP, VCHIQ, RNG driver. RNG requires some work due to
upstream device tree incompatibility.

Multiple people contributed to this work over time: db@, loos@, manu@

7 years agoMake bcm2835_machdep.c optional
gonzo [Fri, 14 Oct 2016 03:00:53 +0000 (03:00 +0000)]
Make bcm2835_machdep.c optional

bcm2835_machdep.c contains only bits enabled by "options PLATFORM", this
option available only on ARM, not ARM64

7 years agopartially convert lib/Makefile to SUBDIR.${MK_FOO} style
emaste [Fri, 14 Oct 2016 01:53:15 +0000 (01:53 +0000)]
partially convert lib/Makefile to SUBDIR.${MK_FOO} style

Cases other than MK_* (e.g. ${MACHINE_CPUARCH} == "i386") have been left
as is.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8246

7 years agoDo not set FB_FLAG_MEMATTR if VM_MEMATTR_WRITE_COMBINING is not available
gonzo [Fri, 14 Oct 2016 01:23:21 +0000 (01:23 +0000)]
Do not set FB_FLAG_MEMATTR if VM_MEMATTR_WRITE_COMBINING is not available

Pintyhat to: gonzo
Spotted by: jmallett

7 years agoFix BCM238x framebuffer driver build for ARM64
gonzo [Fri, 14 Oct 2016 00:42:08 +0000 (00:42 +0000)]
Fix BCM238x framebuffer driver build for ARM64

VM_MEMATTR_WRITE_COMBINING can be undefined for some platforms, use it only
if it's defined

7 years agoFix BCM283x(Raspberry Pi) SDHCI driver for ARM64 build
gonzo [Thu, 13 Oct 2016 23:29:24 +0000 (23:29 +0000)]
Fix BCM283x(Raspberry Pi) SDHCI driver for ARM64 build

- Revert BUS_SPACE_PHYSADDR back to rman_get_start. BUS_SPACE_PHYSADDR was
    introduced in 2013 as temporary wrapper until proper solution appears.
    It's ARM only and since we need this file for ARM64 build and no proper
    API has been introduced - just revert the change and make sure it's
    going to appear when people grep for BUS_SPACE_PHYSADDR in sources.

- Fix printf format for size_t variables

7 years agoStop closing the network device when netbooting for loaders using the common
bapt [Thu, 13 Oct 2016 22:43:49 +0000 (22:43 +0000)]
Stop closing the network device when netbooting for loaders using the common
dev_net.c code.

The NETIF_OPEN_CLOSE_ONCE flag was added in r201932 to prevent that behaviour
on some architectures (sparc64 and powerpc64) the default was left to always
open and close the device for each open and close of a file by the loader
because it was necessary for u-boot on arm.

Since it has been added, the flag was turned on for every arches including the
u-boot loader for arm.

This also fixes netbooting on RPi3 (tested by gonzo@)

For the loader.efi it greatly speeds up netbooting

Reviewed by: emaste, gonzo, tsoome
Approved by: gonzo
MFC after: 1 month
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D8230

7 years agogarbage collect _libatm, missed in r179308
emaste [Thu, 13 Oct 2016 21:35:48 +0000 (21:35 +0000)]
garbage collect _libatm, missed in r179308

7 years agoPlug a potential vnode lock leak in vm_fault_hold().
markj [Thu, 13 Oct 2016 20:39:34 +0000 (20:39 +0000)]
Plug a potential vnode lock leak in vm_fault_hold().

Reviewed by: alc, kib
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8242

7 years agopf: port extended DSCP support from OpenBSD
kp [Thu, 13 Oct 2016 20:34:44 +0000 (20:34 +0000)]
pf: port extended DSCP support from OpenBSD

Ignore the ECN bits on 'tos' and 'set-tos' and allow to use
DCSP names instead of having to embed their TOS equivalents
as plain numbers.

Obtained from: OpenBSD
Sponsored by: OPNsense
Differential Revision: https://reviews.freebsd.org/D8165

7 years ago- Revert r300854, r303657 which tried to fix regression from r297225.
glebius [Thu, 13 Oct 2016 20:15:47 +0000 (20:15 +0000)]
- Revert r300854, r303657 which tried to fix regression from r297225.
- Fix the regression proper way using RO_RTFREE().

Submitted by: ae

7 years agocxgbe(4): Allow the interface MTU to be set as high as the actual
np [Thu, 13 Oct 2016 19:40:21 +0000 (19:40 +0000)]
cxgbe(4): Allow the interface MTU to be set as high as the actual
hardware limit.

Submitted by: jpaetzel@
Differential Revision: https://reviews.freebsd.org/D8237

7 years agoFix panic() message reporting ufs instead of nandfs
martymac [Thu, 13 Oct 2016 19:33:07 +0000 (19:33 +0000)]
Fix panic() message reporting ufs instead of nandfs

PR: 213438
Approved by: kib

7 years agolibgcc_s: add libm dependencies from div{d,s,x}c3
emaste [Thu, 13 Oct 2016 19:18:00 +0000 (19:18 +0000)]
libgcc_s: add libm dependencies from div{d,s,x}c3

compiler-rt's complex division support routines contain calls to
compiler builtins such as `__builtin_scalbnl`.  Unfortunately Clang
turns these back into a call to `scalbnl`.

For now link libm's C version of the required support routines.

Reviewed by: ed
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8190

7 years agoIntroduce lib/libgcc_eh and lib/libgcc_s for LLVM's implementation
emaste [Thu, 13 Oct 2016 18:57:18 +0000 (18:57 +0000)]
Introduce lib/libgcc_eh and lib/libgcc_s for LLVM's implementation

They are not yet connected to the build, but I am adding them to allow
for easier testing, ports exp-runs, etc.

Reviewed by: ed
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D8188

7 years agoImprove typing of POSIX search tree functions.
ed [Thu, 13 Oct 2016 18:25:40 +0000 (18:25 +0000)]
Improve typing of POSIX search tree functions.

Back in 2015 when I reimplemented these functions to use an AVL tree, I
was annoyed by the weakness of the typing of these functions. Both tree
nodes and keys are represented by 'void *', meaning that things like the
documentation for these functions are an absolute train wreck.

To make things worse, users of these functions need to cast the return
value of tfind()/tsearch() from 'void *' to 'type_of_key **' in order to
access the key. Technically speaking such casts violate aliasing rules.
I've observed actual breakages as a result of this by enabling features
like LTO.

I've filed a bug report at the Austin Group. Looking at the way the bug
got resolved, they made a pretty good step in the right direction. A new
type 'posix_tnode' has been added to correspond to tree nodes. It is
still defined as 'void' for source-level compatibility, but in the very
far future it could be replaced by a proper structure type containing a
key pointer.

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

7 years agoWith build without TCP_HHOOK and with INVARIANTS. Before mutex.h came
glebius [Thu, 13 Oct 2016 18:02:29 +0000 (18:02 +0000)]
With build without TCP_HHOOK and with INVARIANTS.  Before mutex.h came
via sys/hhook.h -> sys/rmlock.h -> sys/mutex.h.

7 years agoFix octeon model comparison in Cavium SDK
emaste [Thu, 13 Oct 2016 17:16:32 +0000 (17:16 +0000)]
Fix octeon model comparison in Cavium SDK

buildkernel failed with GCC 5.3 with
error: comparison of constant '852736' with boolean expression is always true

Sponsored by: The FreeBSD Foundation

7 years ago'b' is short for --binary, it isn't 'a'.
imp [Thu, 13 Oct 2016 17:03:54 +0000 (17:03 +0000)]
'b' is short for --binary, it isn't 'a'.

PR: 213437
Submitted by: Ganael LAPLANCHE

7 years agoConvert ­ U+00AD soft hyphen to - in Cavium Octeon SDK
emaste [Thu, 13 Oct 2016 16:57:19 +0000 (16:57 +0000)]
Convert ­ U+00AD soft hyphen to - in Cavium Octeon SDK

Linux's copy of the Cavium SDK does not have these non-ASCII characters
and this reduces noise in diffs when comparing the two.

Sponsored by: The FreeBSD Foundation

7 years ago[net80211] remove now duplicate copy of the QOSDATA check macro.
adrian [Thu, 13 Oct 2016 16:45:01 +0000 (16:45 +0000)]
[net80211] remove now duplicate copy of the QOSDATA check macro.

7 years ago[net80211] add some more QoS frame subtypes.
adrian [Thu, 13 Oct 2016 16:41:34 +0000 (16:41 +0000)]
[net80211] add some more QoS frame subtypes.

7 years agoFix typos: use correct string format and value to compare.
br [Thu, 13 Oct 2016 15:26:51 +0000 (15:26 +0000)]
Fix typos: use correct string format and value to compare.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D8226

7 years agoFix strchr, strrchr implementation: convert c to char
br [Thu, 13 Oct 2016 15:23:53 +0000 (15:23 +0000)]
Fix strchr, strrchr implementation: convert c to char
(according to standard).

Discussed with: andrew
Reviewed by: emaste
Sponsored by: DARPA, AFRL
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D8239