]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoMFV r286765: 5817 change type of arcs_size from uint64_t to refcount_t
Alexander Motin [Fri, 14 Aug 2015 09:39:23 +0000 (09:39 +0000)]
MFV r286765: 5817 change type of arcs_size from uint64_t to refcount_t

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@2fd872a734cf486007a8dba532cec52bfb4d40e5

As a way to make it more difficult to introduce bugs into the ARC, and to
make it easier to diagnose issues when bugs do creep in, it would be
beneficial to change the type of the arc_state_t's arcs_size field to be
a refcount_t instead of a uint64_t. This would allow us to make stricter
checks when incrementing and decrementing the value with debugging enabled,
but still fallback to simple, fast atomic operations when debugging is
disabled.

8 years ago5817 change type of arcs_size from uint64_t to refcount_t
Alexander Motin [Fri, 14 Aug 2015 09:37:54 +0000 (09:37 +0000)]
5817 change type of arcs_size from uint64_t to refcount_t

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@2fd872a734cf486007a8dba532cec52bfb4d40e5

As a way to make it more difficult to introduce bugs into the ARC, and to
make it easier to diagnose issues when bugs do creep in, it would be
beneficial to change the type of the arc_state_t's arcs_size field to be
a refcount_t instead of a uint64_t. This would allow us to make stricter
checks when incrementing and decrementing the value with debugging enabled,
but still fallback to simple, fast atomic operations when debugging is
disabled.

8 years agoMFV r285025: 6033 arc_adjust() should search MFU lists for oldest buffer
Alexander Motin [Fri, 14 Aug 2015 09:33:46 +0000 (09:33 +0000)]
MFV r285025: 6033 arc_adjust() should search MFU lists for oldest buffer
when adjusting MFU size.

illumos/illumos-gate@31c46cf23cd1cf4d66390a983dc5072d7d299ba2

https://www.illumos.org/issues/6033
  When we're looking for the list containing oldest buffer we never
  actually look at the MFU lists even when we try to evict from MFU.
  looks like a copy paste error, the fix is here:

Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Xin Li <delphij@delphij.net>
Reviewed by: Prakash Surya <me@prakashsurya.com>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Alek Pinchuk <alek@nexenta.com>
Obtained from:  illumos

8 years agoMFV r277431: 5497 lock contention on arcs_mtx
Alexander Motin [Fri, 14 Aug 2015 09:31:07 +0000 (09:31 +0000)]
MFV r277431: 5497 lock contention on arcs_mtx

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Richard Elling <richard.elling@richardelling.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Prakash Surya <prakash.surya@delphix.com>

illumos/illumos-gate@244781f10dcd82684fd8163c016540667842f203

This patch attempts to reduce lock contention on the current arc_state_t
mutexes. These mutexes are used liberally to protect the number of LRU
lists within the ARC (e.g. ARC_mru, ARC_mfu, etc). The granularity at
which these locks are acquired has been shown to greatly affect the
performance of highly concurrent, cached workloads.

8 years agoRevert part of r205231, introducing multiple ARC state locks.
Alexander Motin [Fri, 14 Aug 2015 09:25:54 +0000 (09:25 +0000)]
Revert part of r205231, introducing multiple ARC state locks.

This local implementation will be replaced by one from Illumos to reduce
code divergence and make further merges easier.

8 years agoMove the stack protector to a new "secure" directory
Pedro F. Giffuni [Fri, 14 Aug 2015 03:03:13 +0000 (03:03 +0000)]
Move the stack protector to a new "secure" directory

As part of the code refactoring to support FORTIFY_SOURCE we want
a new subdirectory "secure" to keep the files related to security.
Move the stack protector functions to this new directory.

No functional change.

Differential Review: https://reviews.freebsd.org/D3333

8 years agoMake clear the bcopy(3) manpage regards when it was marked as LEGACY
Marcelo Araujo [Fri, 14 Aug 2015 01:27:30 +0000 (01:27 +0000)]
Make clear the bcopy(3) manpage regards when it was marked as LEGACY
as well as when it was removed from POSIX specification.

Reviewed by: theraven, wblock, bapt, rodrigc
Approved by: bapt, rodrigc (mentor)
Differential Revision: D3374

8 years agoMFV of 286748,tzdata2015f
Edwin Groothuis [Thu, 13 Aug 2015 23:57:44 +0000 (23:57 +0000)]
MFV of 286748,tzdata2015f

Update to tzdata2015f:

Changes affecting future time stamps

    North Korea switches to +0830 on 2015-08-15.  (Thanks to Steffen Thorsen.)
    The abbreviation remains "KST".  (Thanks to Robert Elz.)
    Uruguay no longer observes DST.  (Thanks to Steffen Thorsen and Pablo Camargo.)
    Changes affecting past and future time stamps
    Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC. (Thanks to Roman Tudos.)

8 years agoVendor import of tzdata2015f:
Edwin Groothuis [Thu, 13 Aug 2015 23:57:00 +0000 (23:57 +0000)]
Vendor import of tzdata2015f:

Update to tzdata2015f:

Changes affecting future time stamps

    North Korea switches to +0830 on 2015-08-15.  (Thanks to Steffen Thorsen.)
    The abbreviation remains "KST".  (Thanks to Robert Elz.)
    Uruguay no longer observes DST.  (Thanks to Steffen Thorsen and Pablo Camargo.)
    Changes affecting past and future time stamps
    Moldova starts and ends DST at 00:00 UTC, not at 01:00 UTC. (Thanks to Roman Tudos.)

Obtained from: ftp://ftp.iana.org/tz/releases/

8 years agoSpell binaries in the customary way.
Warner Losh [Thu, 13 Aug 2015 22:32:42 +0000 (22:32 +0000)]
Spell binaries in the customary way.

Submitted by: jhb@

8 years agoStop removing ELF toolchain tools
Antoine Brodin [Thu, 13 Aug 2015 22:04:30 +0000 (22:04 +0000)]
Stop removing ELF toolchain tools

8 years agos/as/at/ in previous commit.
Marcel Moolenaar [Thu, 13 Aug 2015 19:12:55 +0000 (19:12 +0000)]
s/as/at/ in previous commit.

Pointed out by: jmallett@

8 years agoRemove arm64 workaround for Clang 3.4 crash
Ed Maste [Thu, 13 Aug 2015 19:05:18 +0000 (19:05 +0000)]
Remove arm64 workaround for Clang 3.4 crash

8 years agoPlug a memory leak.
Xin LI [Thu, 13 Aug 2015 18:45:52 +0000 (18:45 +0000)]
Plug a memory leak.

MFC after: 2 weeks

8 years agoAvoid left-shifting negative signed values in bxe(4).
Dimitry Andric [Thu, 13 Aug 2015 18:24:41 +0000 (18:24 +0000)]
Avoid left-shifting negative signed values in bxe(4).

Reviewed by: davidcs
MFC after: 3 days

8 years agoRemove remnant of WITHOUT_ELFTOOLCHAIN_TOOLS missed in r286730
Ed Maste [Thu, 13 Aug 2015 18:01:50 +0000 (18:01 +0000)]
Remove remnant of WITHOUT_ELFTOOLCHAIN_TOOLS missed in r286730

8 years agoUpdate src.conf(5) after r286730
Ed Maste [Thu, 13 Aug 2015 17:54:28 +0000 (17:54 +0000)]
Update src.conf(5) after r286730

8 years agoRoll WITHOUT_ELFTOOLCHAIN_TOOLS into WITHOUT_TOOLCHAIN
Ed Maste [Thu, 13 Aug 2015 17:50:47 +0000 (17:50 +0000)]
Roll WITHOUT_ELFTOOLCHAIN_TOOLS into WITHOUT_TOOLCHAIN

The option was added only to ease the transition from GNU Binutils to
ELF Tool Chain tools, and that process is now complete (for the viable
replacements). Noting the removal in UPDATING is sufficient as we have
not shipped a release with the option.

Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3240

8 years agoSmall cleanup.
Christian Brueffer [Thu, 13 Aug 2015 16:11:04 +0000 (16:11 +0000)]
Small cleanup.

- fix mandoc -Tlint warnings
- use appropriate macros
- canonize FreeBSD spelling

8 years agoAdd a new PPS driver for AM335x (beaglebone) timer hardware. This can be
Ian Lepore [Thu, 13 Aug 2015 15:19:30 +0000 (15:19 +0000)]
Add a new PPS driver for AM335x (beaglebone) timer hardware.  This can be
used as a module or compiled-in.

8 years agoChange md(4) to use weak symbols as start, end and size for the embedded
Marcel Moolenaar [Thu, 13 Aug 2015 15:16:34 +0000 (15:16 +0000)]
Change md(4) to use weak symbols as start, end and size for the embedded
root disk. The embedded image is linked into the kernel in the .mfs
section.

Add rules and variables to kern.pre.mk and kern.post.mk that handle the
linking of the image. First objcopy is used to generate an object file.
Then, the object file is linked into the kernel.

Submitted by: Steve Kiernan <stevek@juniper.net>
Reviewed by: brooks@
Obtained from: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D2903

8 years agoInstead of having separate do_sync functions for ARM_ARCH 6 vs.
Marcel Moolenaar [Thu, 13 Aug 2015 14:53:29 +0000 (14:53 +0000)]
Instead of having separate do_sync functions for ARM_ARCH 6 vs.
ARM_ARCH >= 7, use the dmb() macro defined in machine/atomic.h

Submitted by: Steve Kiernan <stevek@juniper.net>
Reviewed by: imp@
Differential Revision: https://reviews.freebsd.org/D3355

8 years agoThe Broadcom BCM56060 chip has a Cortex-A9R4 core.
Marcel Moolenaar [Thu, 13 Aug 2015 14:50:11 +0000 (14:50 +0000)]
The Broadcom BCM56060 chip has a Cortex-A9R4 core.

Submitted by: Steve Kiernan <stevek@juniper.net>
Reviewed by: imp@
Differential Revision: https://reviews.freebsd.org/D3357

8 years agoConstify the pointers to eventtimer and timecounter name strings.
Ian Lepore [Thu, 13 Aug 2015 14:43:25 +0000 (14:43 +0000)]
Constify the pointers to eventtimer and timecounter name strings.

The need for this appears as soon as you try to set the names to something
that isn't a "quoted literal".  (I'm actually confused why quoted strings
aren't a problem as well, we must have some warning disabled.)

8 years agoFix text mode operation.
Marcel Moolenaar [Thu, 13 Aug 2015 14:43:11 +0000 (14:43 +0000)]
Fix text mode operation.

We first map 64KB at 0xA0000 and then determine whether to work
in text or graphics mode.  When graphics mode, the mapping is
precisely what we need and everything is fine.  But text mode,
has the frame buffer relocated to 0xB8000. We didn't map that
much to safely add 0x18000 bytes to the base address.

Now we first check whether to work in text or graphics mode and
then map the frame buffer at the right address and with the
right size (0xA0000+64KB for graphics, 0xB8000+32KB for text).

PR: 202276
Tested by: ed@

8 years agoMove lle update code from from gigantic ip_arpinput() to
Alexander V. Chernikov [Thu, 13 Aug 2015 13:38:09 +0000 (13:38 +0000)]
Move lle update code from from gigantic ip_arpinput() to
separate bunch of functions. The goal is to isolate actual lle
updates to permit more fine-grained locking.

Do all lle link-level update under AFDATA wlock.

Sponsored by: Yandex LLC

8 years agoarm64: turn unknown el0 exception into a SIGILL
Ed Maste [Thu, 13 Aug 2015 13:21:00 +0000 (13:21 +0000)]
arm64: turn unknown el0 exception into a SIGILL

It seems we get EXCP_UNKNOWN from QEMU when executing zeroed memory.
Print a register dump here and signal illegal instruction. Also print
a register dump for other invalid exceptions, before panic.

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3370

8 years agoUse g_conf_printf_escaped() to escape illegal symbols in file name.
Andrey V. Elsukov [Thu, 13 Aug 2015 13:20:29 +0000 (13:20 +0000)]
Use g_conf_printf_escaped() to escape illegal symbols in file name.

PR: 202289
MFC after: 1 week

8 years agoRevert part of r280687, reporting "1" (true) for empty value.
Alexander Motin [Thu, 13 Aug 2015 13:19:56 +0000 (13:19 +0000)]
Revert part of r280687, reporting "1" (true) for empty value.

For example, it made gpart partitions without label report "1" as label.

PR: 202089
MFC after: 3 days

8 years agoAdd missing cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c that
Peter Wemm [Thu, 13 Aug 2015 05:42:56 +0000 (05:42 +0000)]
Add missing cddl/contrib/opensolaris/uts/common/fs/zfs/bqueue.c that
was left out of r286705.

Forgotten by:  mav

8 years agoUse nitems instead of "sizeof ypaliases/sizeof ypaliases[0]".
Marcelo Araujo [Thu, 13 Aug 2015 02:36:37 +0000 (02:36 +0000)]
Use nitems instead of "sizeof ypaliases/sizeof ypaliases[0]".
Make the if statement more expressive.

Differential Revision: D3366
Reviewed by: ed
Approved by: bapt, rodrigc (mentor)

8 years agoRemove the mention of memcpy(3) that is build on top of bcopy(3).
Marcelo Araujo [Thu, 13 Aug 2015 02:31:23 +0000 (02:31 +0000)]
Remove the mention of memcpy(3) that is build on top of bcopy(3).
Fix some phrases to make it more clear.

Differential Revision: D3378
Reported by: bde@
Reviewed by: wblock
Approved by: bapt, rodrigc (mentor)
Sponsored by: gandi.net

8 years agoMFV 286711: 6096 ZFS_SMB_ACL_RENAME needs to cleanup better
Alexander Motin [Thu, 13 Aug 2015 00:13:55 +0000 (00:13 +0000)]
MFV 286711: 6096 ZFS_SMB_ACL_RENAME needs to cleanup better

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: George Wilson <gwilson@zfsmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>

illumos/illumos-gate@8f5190a540d64d2debee6664bbc740e4c38f5b7f

8 years ago6096 ZFS_SMB_ACL_RENAME needs to cleanup better
Alexander Motin [Thu, 13 Aug 2015 00:12:52 +0000 (00:12 +0000)]
6096 ZFS_SMB_ACL_RENAME needs to cleanup better

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed by: George Wilson <gwilson@zfsmail.com>
Approved by: Robert Mustacchi <rm@joyent.com>

illumos/illumos-gate@8f5190a540d64d2debee6664bbc740e4c38f5b7f

8 years agoMFV 286709:
Alexander Motin [Thu, 13 Aug 2015 00:10:36 +0000 (00:10 +0000)]
MFV 286709:
6093 zfsctl_shares_lookup should only VN_RELE() on zfs_zget() success

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@0f92170f1ec2737ee5a0e51b5f74093904811452

8 years ago6093 zfsctl_shares_lookup should only VN_RELE() on zfs_zget() success
Alexander Motin [Thu, 13 Aug 2015 00:07:23 +0000 (00:07 +0000)]
6093 zfsctl_shares_lookup should only VN_RELE() on zfs_zget() success

Reviewed by: Gordon Ross <gwr@nexenta.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Dan McDonald <danmcd@omniti.com>

illumos/illumos-gate@0f92170f1ec2737ee5a0e51b5f74093904811452

8 years agoMFV 286707: 5959 clean up per-dataset feature count code
Alexander Motin [Wed, 12 Aug 2015 23:59:17 +0000 (23:59 +0000)]
MFV 286707: 5959 clean up per-dataset feature count code

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@ca0cc3918a1789fa839194af2a9245f801a06b1a

A ZFS feature flags (large blocks) tracks its refcounts as the number of
datasets that have ever used the feature. Several features of this type
are planned to be added (new checksum functions). This code should be made
common infrastructure rather than duplicating the code for each feature.

8 years ago5959 clean up per-dataset feature count code
Alexander Motin [Wed, 12 Aug 2015 23:38:58 +0000 (23:38 +0000)]
5959 clean up per-dataset feature count code

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Alex Reece <alex@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@ca0cc3918a1789fa839194af2a9245f801a06b1a

A ZFS feature flags (large blocks) tracks its refcounts as the number of
datasets that have ever used the feature. Several features of this type
are planned to be added (new checksum functions). This code should be made
common infrastructure rather than duplicating the code for each feature.

8 years agoMFV r286704: 5960 zfs recv should prefetch indirect blocks
Alexander Motin [Wed, 12 Aug 2015 22:41:06 +0000 (22:41 +0000)]
MFV r286704: 5960 zfs recv should prefetch indirect blocks
5925 zfs receive -o origin=

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>

While running 'zfs recv' we noticed that every 128th 8K block required a
read. We were seeing that restore_write() was calling dmu_tx_hold_write()
and the indirect block was not cached. We should prefetch upcoming indirect
blocks to avoid having to go to disk and blocking the restore_write().

Allow an incremental send stream to be received as a clone, even if the
stream does not mark it as a clone.

8 years ago5960 zfs recv should prefetch indirect blocks
Alexander Motin [Wed, 12 Aug 2015 22:36:02 +0000 (22:36 +0000)]
5960 zfs recv should prefetch indirect blocks
5925 zfs receive -o origin=

Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Author: Paul Dagnelie <pcd@delphix.com>

While running 'zfs recv' we noticed that every 128th 8K block required a
read. We were seeing that restore_write() was calling dmu_tx_hold_write()
and the indirect block was not cached. We should prefetch upcoming indirect
blocks to avoid having to go to disk and blocking the restore_write().

8 years agoReinstate unify_tcp_port_space and associated code that was lost during
Navdeep Parhar [Wed, 12 Aug 2015 22:09:58 +0000 (22:09 +0000)]
Reinstate unify_tcp_port_space and associated code that was lost during
the last OFED update (r278886).

iWARP on FreeBSD is properly integrated with the network stack and the
iWARP drivers _never_ operate out of any private TCP port-space that is
invisible to the kernel.  Instead, an iWARP connection shows up as a TCP
socket (which is what it is) fully visible to the kernel and standard
tools like netstat, sockstat, etc.

8 years agoIn ipfw2, avoid left-shifting negative integers, which is undefined.
Dimitry Andric [Wed, 12 Aug 2015 21:07:57 +0000 (21:07 +0000)]
In ipfw2, avoid left-shifting negative integers, which is undefined.
While here, make some other arguments to htonl(3) unsigned too.

MFC after: 3 days

8 years agoIf a specific timecounter has been chosen via sysctl, and a new timecounter
Ian Lepore [Wed, 12 Aug 2015 20:50:20 +0000 (20:50 +0000)]
If a specific timecounter has been chosen via sysctl, and a new timecounter
with higher quality registers (presumably in a module that has just been
loaded), do not undo the user's choice by switching to the new timecounter.

Document that behavior, and also the fact that there is no way to unregister
a timecounter (and thus no way to unload a module containing one).

8 years agoMake LAG LACP fast timeout tunable through IOCTL.
Hiren Panchasara [Wed, 12 Aug 2015 20:21:04 +0000 (20:21 +0000)]
Make LAG LACP fast timeout tunable through IOCTL.

Differential Revision: D3300
Submitted by: LN Sundararajan <lakshmi.n at msystechnologies>
Reviewed by: wblock, smh, gnn, hiren, rpokala at panasas
MFC after: 2 weeks
Sponsored by: Panasas

8 years agoIn gcc's libcpp, stop using the INTTYPE_MAXIMUM() macro, which relies on
Dimitry Andric [Wed, 12 Aug 2015 20:16:13 +0000 (20:16 +0000)]
In gcc's libcpp, stop using the INTTYPE_MAXIMUM() macro, which relies on
undefined behavior.  The code used this macro to avoid problems on some
broken systems which define SSIZE_MAX incorrectly, but this is not
needed on FreeBSD, obviously.

MFC after: 3 days

8 years agoWhen the wait*(2) syscalls wait for any process (P_ALL), they should
Mariusz Zaborski [Wed, 12 Aug 2015 20:08:54 +0000 (20:08 +0000)]
When the wait*(2) syscalls wait for any process (P_ALL), they should
ignore processes created with the pdfork(2) syscall.

PR: 201054
Approved by: pjd (mentor)
Discussed with: emaste, rwatson

8 years agoRemove all dregs of the old PPS driver from this code, in preparation for
Ian Lepore [Wed, 12 Aug 2015 19:40:32 +0000 (19:40 +0000)]
Remove all dregs of the old PPS driver from this code, in preparation for
redoing it as a separate driver.  Now that each hardware timer is handled by
a separate instance of the timer driver, it no longer makes sense to bundle
the pps driver with the regular timecounter code.  (When all 8 timers were
handled by one driver there was no choice about this.)

Split the hardware register definitions out to their own file, so that the
new pps driver (coming in a separate commit later) can share them.

With the PPS driver gone, the question of which hardware timer to use for
what purpose becomes much easier (some instances can't do the PPS capture).
Now we can just hardcore timer2 for eventtimer and timer3 for timecounter.

This also now only instantiates devices for the 2 hardware timers actually
used to implement eventtimer and timecounter.  This is required so that
other drivers can come along and attach to other hardware timers to provide
other functionality.  (In addition to PPS, this hardware can also do PWM
stuff, general pulse width and frequency measurements, etc.  Maybe some
day we'll have drivers for those things.)

8 years agoFix the fixing of the build I broke. rescue/rescue has the right
Warner Losh [Wed, 12 Aug 2015 19:39:11 +0000 (19:39 +0000)]
Fix the fixing of the build I broke. rescue/rescue has the right
target, but rescue doesn't.

Pointy hat: imp@

8 years agoRemove a bogus printf that whines every time loading a driver module
Ian Lepore [Wed, 12 Aug 2015 19:26:36 +0000 (19:26 +0000)]
Remove a bogus printf that whines every time loading a driver module
triggers a fresh round of probing.

8 years agoAdd a MODULE_VERSION(), because other things MODULE_DEPEND() on this.
Ian Lepore [Wed, 12 Aug 2015 19:25:22 +0000 (19:25 +0000)]
Add a MODULE_VERSION(), because other things MODULE_DEPEND() on this.

8 years agoFix build.
Xin LI [Wed, 12 Aug 2015 19:21:58 +0000 (19:21 +0000)]
Fix build.

8 years agoMFV r284763: 5981 Deadlock in dmu_objset_find_dp
Alexander Motin [Wed, 12 Aug 2015 19:10:29 +0000 (19:10 +0000)]
MFV r284763: 5981 Deadlock in dmu_objset_find_dp

illumos/illumos-gate@1d3f896f5469c69c1339890ec3d68e9feddb0343

https://www.illumos.org/issues/5981
  When dmu_objset_find_dp gets called with a read lock held, it fans out
  the work to the task queue. Each task in turn acquires its own read
  lock before calling the callback. If during this process anyone tries
  to a acquire a write lock, it will stall all read lock requests.Thus
  the tasks will never finish, the read lock of the caller will never
  get freed and the write lock never acquired.  deadlock.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Arne Jansen <jansen@webgods.de>

8 years agoDocument build-tools better. Add rescue back because it builds /bin/sh
Warner Losh [Wed, 12 Aug 2015 19:00:47 +0000 (19:00 +0000)]
Document build-tools better. Add rescue back because it builds /bin/sh
which has a build-tools target (see commit for how build-tools and
cross-tools differ).

8 years agoMFV r284762: 5269 zpool import slow
Alexander Motin [Wed, 12 Aug 2015 18:47:30 +0000 (18:47 +0000)]
MFV r284762: 5269 zpool import slow

illumos/illumos-gate@12380e1e701fda28c9e9f32d01cafb54af279eb5

https://www.illumos.org/issues/5269
  When importing a pool (at boot or with zpool import) with many
  filesystem, the process can take minutes. It doesn't matter whether
  the pool has been exported cleanly or uncleanly.  The problem is that
  each dataset has its own log chain. On import, all datasets have to be
  checked if there are logs to replay.  The idea is to speed up this
  process by paralellizing it.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Arne Jansen <jansen@webgods.de>

8 years agoMFV r286682: 5765 add support for estimating send stream size with
Alexander Motin [Wed, 12 Aug 2015 18:23:08 +0000 (18:23 +0000)]
MFV r286682: 5765 add support for estimating send stream size with
lzc_send_space when source is a bookmark

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Albert Lee <trisk@nexenta.com>
Author: Max Grossman <max.grossman@delphix.com>

illumos/illumos-gate@643da460c8ca583e39ce053081754e24087f84c8

8 years ago5765 add support for estimating send stream size with lzc_send_space when so
Alexander Motin [Wed, 12 Aug 2015 18:08:40 +0000 (18:08 +0000)]
5765 add support for estimating send stream size with lzc_send_space when so
urce is a bookmark

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Albert Lee <trisk@nexenta.com>

illumos/illumos-gate@643da460c8ca583e39ce053081754e24087f84c8

8 years agoPerform cleanups in response to D3307.
Ed Schouten [Wed, 12 Aug 2015 17:46:26 +0000 (17:46 +0000)]
Perform cleanups in response to D3307.

- Document the kern_kevent_anonymous() function.
- Add assertions to ensure that we don't silently leave the kqueue
  linked from a file descriptor table.

Reviewed by: jmg
Differential Revision: https://reviews.freebsd.org/D3364

8 years agoAdd the last remaining system calls: send() and recv().
Ed Schouten [Wed, 12 Aug 2015 17:42:20 +0000 (17:42 +0000)]
Add the last remaining system calls: send() and recv().

There is still one TODO item for these calls: add file descriptor
passing. The data structures are already prepared for this. It's just
the translation that's missing.

Obtained from: http://github.com/NuxiNL/freebsd

8 years agoAdd a routine to return the hardware instance/unit number from ti,hwmods,
Ian Lepore [Wed, 12 Aug 2015 17:23:15 +0000 (17:23 +0000)]
Add a routine to return the hardware instance/unit number from ti,hwmods,
given the hardware name.

The ti,hwmods property is used (among other things) to associate an fdt node
with a specific instance of some hardware.  For example given a device node
that contains the property ti,hwmods = "timer3", if you call this passing
"timer" as the hwmod string to look for it would return 3.

8 years agoMFV r286224: 5695 dmu_sync'ed holes do not retain birth time
Alexander Motin [Wed, 12 Aug 2015 17:21:41 +0000 (17:21 +0000)]
MFV r286224: 5695 dmu_sync'ed holes do not retain birth time

illumos/illumos-gate@70163ac57e58ace1c5c94dfbe85dca5a974eff36

https://www.illumos.org/issues/5695
  In dmu_sync_ready(), a hole block pointer will have it's logical size
  explicitly set as it's necessary for replay purposes. To "undo" this,
  dmu_sync_done() will zero out any hole that it finds. This becomes a
  problem when using the "hole_birth" feature, as this will also wipe out
  any birth time that might have happened to be set on the hole.
  ...
  As a fix, the logic to zero out a hole is only applied to old style
  holes with a birth time of zero. Holes created with the "hole_birth"
  feature enabled will have a non-zero birth time, and will be skipped
  (thus preserving the ltime, type, and level information as well).
  In addition, zdb was updated to also print the ltime, type, and level
  information for these new style holes. Previously, only the logical
  birth time would be printed.

Author: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>

8 years agoWhy on earth have we been building rescue as a build tool for the past
Warner Losh [Wed, 12 Aug 2015 17:19:52 +0000 (17:19 +0000)]
Why on earth have we been building rescue as a build tool for the past
12 years? Nothing downstream in the build uses it. Eliminate it as a
build tool.

Reviewed by: emaste@ ("just delete it")

8 years agoAdd the CNTHCTL_EL2 register bits missed in r286674
Andrew Turner [Wed, 12 Aug 2015 17:09:57 +0000 (17:09 +0000)]
Add the CNTHCTL_EL2 register bits missed in r286674

8 years agoSet the counter-timer virtual offset to a know value, it may not have been
Andrew Turner [Wed, 12 Aug 2015 17:06:22 +0000 (17:06 +0000)]
Set the counter-timer virtual offset to a know value, it may not have been
set by the boot code and are reset to an implementation defined value that
may be unknown.

Sponsored by: ABT Systems Ltd

8 years agoCrunchgen needs to be bootstrapped to pick up the STRIP->STRIPBIN
Warner Losh [Wed, 12 Aug 2015 16:43:15 +0000 (16:43 +0000)]
Crunchgen needs to be bootstrapped to pick up the STRIP->STRIPBIN
changes to prevent the 'rescue: not found' errors from happening.
Bump FreeBSD_version to 1100078 since there's been no version bumps
since this change was made. Only people that installed since r284356
really need to do this bootstrapping, but since crunchgen needs to
bootstrap for other reasons, bumping the number was the simplest.

8 years agoetc/rc.d/hostname: permit setting hostname if already set
Mark Felder [Wed, 12 Aug 2015 16:22:10 +0000 (16:22 +0000)]
etc/rc.d/hostname: permit setting hostname if already set

Approved by: dteske
Differential Revision: https://reviews.freebsd.org/D2577

8 years agoProperly return ENOTDIR when calling *at() on a non-vnode.
Ed Schouten [Wed, 12 Aug 2015 16:17:00 +0000 (16:17 +0000)]
Properly return ENOTDIR when calling *at() on a non-vnode.

We already properly return ENOTDIR when calling *at() on a non-directory
vnode, but it turns out that if you call it on a socket, we see EINVAL.
Patch up namei to properly translate this to ENOTDIR.

8 years agoRemove unused TCPTV_SRTTDFLT. We initialize srtt with TCPTV_SRTTBASE when we
Hiren Panchasara [Wed, 12 Aug 2015 16:08:37 +0000 (16:08 +0000)]
Remove unused TCPTV_SRTTDFLT. We initialize srtt with TCPTV_SRTTBASE when we
don't have any rtt estimate.

Differential Revision: D3334
Sponsored by: Limelight Networks

8 years agoAdd support for the Broadcom TruManage integrated serial port.
Marcel Moolenaar [Wed, 12 Aug 2015 15:48:14 +0000 (15:48 +0000)]
Add support for the Broadcom TruManage integrated serial port.

PR: 191266

8 years agoBetter support memory mapped console devices, such as VGA and EFI
Marcel Moolenaar [Wed, 12 Aug 2015 15:26:32 +0000 (15:26 +0000)]
Better support memory mapped console devices, such as VGA and EFI
frame buffers and memory mapped UARTs.

1.  Delay calling cninit() until after pmap_bootstrap(). This makes
    sure we have PMAP initialized enough to add translations. Keep
    kdb_init() after cninit() so that we have console when we need
    to break into the debugger on boot.
2.  Unfortunately, the ATPIC code had be moved as well so as to
    avoid a spurious trap #30. The reason for which is not known
    at this time.
3.  In pmap_mapdev_attr(), when we need to map a device prior to the
    VM system being initialized, use virtual_avail as the KVA to map
    the device at. In particular, avoid using the direct map on amd64
    because we can't demote by virtue of not being able to allocate
    yet. Keep track of the translation.
    Re-use the translation after the VM has been initialized to not
    waste KVA and to satisfy the assumption in uart(4) that the handle
    returned for the low-level console is the same as later returned
    when the device is probed and attached.
4.  In pmap_unmapdev() remove the mapping from the table when called
    pre-init. Otherwise keep the mapping. During bus probe and attach
    device resources are mapped and unmapped multiple times, which
    would have us destroy the mapping used by the low-level console.
5.  In pmap_init(), set pmap_initialized to signal that we're not
    pre-init anymore. On amd64, bring the direct map in sync with the
    translations created at that time.
6.  Implement bus_space_map() and bus_space_unmap() for real: when
    the tag corresponds to memory space, call the corresponding
    pmap_mapdev() and pmap_unmapdev() functions to construct and
    actual handle.
7.  In efifb.c and vt_vga.c, remove the crutches and hacks and simply
    call pmap_mapdev_attr() or bus_space_map() as desired.

Notes:
1.  uart(4) already used bus_space_map() during low-level console
    setup but since serial ports have traditionally been I/O port
    based, the lack of a proper implementation for said function
    was not a problem. It has always supported memory mapped UARTs
    for low-level consoles by setting hw.uart.console accordingly.
2.  The use of the direct map on amd64 without setting caching
    attributes has been a bigger problem than previously thought.
    This change has the fortunate (and unexpected) side-effect of
    fixing various EFI frame buffer problems (though not all).

PR: 191564, 194952

Special thanks to:
1.  XipLink, Inc -- generously donated an Intel Bay Trail E3800
    based eval board (ADLE3800PC).
2.  The FreeBSD Foundation, in particular emaste@ -- for UEFI
    support in general and testing.
3.  Everyone who tested the proposed for PR 191564.
4.  jhb@ and kib@ for being a soundboard and applying a clue bat
    if so needed.

8 years agoFix mandoc warnings/errors.
Christian Brueffer [Wed, 12 Aug 2015 11:56:19 +0000 (11:56 +0000)]
Fix mandoc warnings/errors.

MFC after: 1 week

8 years agoUnignore signals when starting CloudABI processes.
Ed Schouten [Wed, 12 Aug 2015 11:30:31 +0000 (11:30 +0000)]
Unignore signals when starting CloudABI processes.

As CloudABI processes cannot adjust their signal handlers, we need to
make sure that we start up CloudABI processes with consistent signal
masks. Though the POSIx standard signal behavior is all right, we do
need to make sure that we ignore SIGPIPE, as it would otherwise be
hard to interact with pipes and sockets.

Extend execsigs() to iterate over ps_sigignore and call sigdflt() for
each of the ignored signals.

Reviewed by: kib
Obtained from: https://github.com/NuxiNL/freebsd
Differential Revision: https://reviews.freebsd.org/D3365

8 years agoUse CAP_EVENT instead of CAP_PDWAIT.
Ed Schouten [Wed, 12 Aug 2015 11:07:03 +0000 (11:07 +0000)]
Use CAP_EVENT instead of CAP_PDWAIT.

The cloudlibc pdwait() function ends up using FreeBSD's kqueue() in
combination with EVFILT_PROCDESC. This depends on CAP_EVENT -- not
CAP_PDWAIT.

Obtained from: https://github.com/NuxiNL/freebsd

8 years agoFix a few mandoc warnings.
Christian Brueffer [Wed, 12 Aug 2015 10:34:05 +0000 (10:34 +0000)]
Fix a few mandoc warnings.

MFC after: 1 week

8 years agoIn x2APIC mode, IPI generation is atomic because it is performed by
Konstantin Belousov [Wed, 12 Aug 2015 09:55:52 +0000 (09:55 +0000)]
In x2APIC mode, IPI generation is atomic because it is performed by
single ICR MSR write.  This is in contrast with the xAPIC mode, where
we must read current ICR value, do bit fiddling and perform two 32-bit
register writes.  As a consequence, there is no need to disable
interrupts around ICR value calculation and write.

Note that typical users of ipi_raw() and ipi_vectored() take spinlock,
which already disables interrupts.  For them, the change removes
unneeded CLI and POPFL/Q instructions.

Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoInitialization of smp_tlb_wait does not require release semantic, no
Konstantin Belousov [Wed, 12 Aug 2015 09:46:39 +0000 (09:46 +0000)]
Initialization of smp_tlb_wait does not require release semantic, no
data is synchronized by store/load to the variable.  The
lapic_write_icr() function ensures that store buffers are flushed
before IPI command is issued.

Discussed with: bde
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoAP should load aps_ready with acquire semantic to see BSP updates to
Konstantin Belousov [Wed, 12 Aug 2015 09:43:12 +0000 (09:43 +0000)]
AP should load aps_ready with acquire semantic to see BSP updates to
the SMP structures, synchronized with the load by release store in
release_aps().

The change is formal, x86 strong memory model implicitely provided
the guarantees.

Discussed with: bde
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

8 years agoMake blocking CloudABI futex operations work.
Ed Schouten [Wed, 12 Aug 2015 08:41:48 +0000 (08:41 +0000)]
Make blocking CloudABI futex operations work.

Blocking on locks and condition variables can be accomplished by polling
and using the special filters CONDVAR, LOCK_RDLOCK and LOCK_WRLOCK.

For now it wouldn't make sense to implement this functionality into
kqueue() itself, for the reason that they are CloudABI specific and
would require us to resize 'struct kevent' to hold all of the parameters
of interest.

Add a bandaid to the CloudABI poll system call to call into the futex
code directly if it detects specific combinations of events that are
used by the C library.

Obtained from: https://github.com/NuxiNL/freebsd

8 years agoFix set of sign extension bugs in r286625.
Alexander Motin [Wed, 12 Aug 2015 08:36:58 +0000 (08:36 +0000)]
Fix set of sign extension bugs in r286625.

8 years agoMake poll() and kqueue() on CloudABI work.
Ed Schouten [Wed, 12 Aug 2015 07:59:00 +0000 (07:59 +0000)]
Make poll() and kqueue() on CloudABI work.

This change implements two functions, cloudabi64_kevent_copyin() and
cloudabi64_kevent_copyout(), that convert CloudABI structures to
FreeBSD's struct kevent. CloudABI uses two structures: subscription_t
and event_t. The former is used for input, whereas the latter is used
for output. Unlike struct kevent, fields aren't overloaded for multiple
purposes or for separate event types.

For poll() we call into the newly introduced kern_kevent_anonymous()
function that allows us to poll without a file descriptor. This function
is not only used by poll(), but also by functions such as
sleep() and clock_nanosleep().

Reviewed by: jmg
Obtained from: https://github.com/NuxiNL/freebsd
Differential Revision: https://reviews.freebsd.org/D3308

8 years agoUse bus_alloc_resource_any(), rather than bus_alloc_resource()
Marcel Moolenaar [Wed, 12 Aug 2015 04:03:04 +0000 (04:03 +0000)]
Use bus_alloc_resource_any(), rather than bus_alloc_resource()
with start 0 and end ~0. This avoids confusion WRT to what the
value of length can or should be.

8 years agoMark usr/include/c++/v1/tr1 as obsolete
Julio Merino [Wed, 12 Aug 2015 03:03:51 +0000 (03:03 +0000)]
Mark usr/include/c++/v1/tr1 as obsolete

The directory usr/include/c++/v1 was marked as obsolete but its tr1 subdir
was not, resulting in a removal error in delete-old.

8 years agoDescribe that bcopy(3) is deprecated and marked as LEGACY in
Marcelo Araujo [Wed, 12 Aug 2015 00:49:20 +0000 (00:49 +0000)]
Describe that bcopy(3) is deprecated and marked as LEGACY in
POSIX.1-2001 and removed from the specification in POSIX.1-2008.
New softwares shall use memcpy(3) or memmove(3).

Differential Revision: D3358
Reviewed by: wblock
Approved by: rodrigc
Sponsored by: gandi.net

8 years agoDisable building INDEX-9 and INDEX-10 because they are not useful for
Xin LI [Tue, 11 Aug 2015 22:43:28 +0000 (22:43 +0000)]
Disable building INDEX-9 and INDEX-10 because they are not useful for
users who uses only FreeBSD -CURRENT, and building these indexes are
only useful to those who share ports tree across different FreeBSD
releases, and system administrator with that need can always enable
this behavior.

MFC after: 2 weeks (only the principals, not actual change)

8 years agoFix and re-enable UTF-8 tests.
Jilles Tjoelker [Tue, 11 Aug 2015 21:59:36 +0000 (21:59 +0000)]
Fix and re-enable UTF-8 tests.

8 years agoMake this compile again when PPS_SYNC is defined. Also remove a couple
Ian Lepore [Tue, 11 Aug 2015 19:25:26 +0000 (19:25 +0000)]
Make this compile again when PPS_SYNC is defined.  Also remove a couple
comment blocks and constants that no longer apply.

8 years agoFix assertion panic caused by combination of r286598 and TRIM.
Alexander Motin [Tue, 11 Aug 2015 19:15:55 +0000 (19:15 +0000)]
Fix assertion panic caused by combination of r286598 and TRIM.

8 years agoIf any function fail (the ptr variable will be equal to NULL), we shouldn't
Mariusz Zaborski [Tue, 11 Aug 2015 18:17:31 +0000 (18:17 +0000)]
If any function fail (the ptr variable will be equal to NULL), we shouldn't
return buffer. Instead we should free it and return NULL.

Approved by: pjd (mentor)

8 years agoThe nvlist_move_nvpair() function can fail in two cases, if:
Mariusz Zaborski [Tue, 11 Aug 2015 18:01:10 +0000 (18:01 +0000)]
The nvlist_move_nvpair() function can fail in two cases, if:
- the nvlist error is set, or
- the nvlist case ignore flag is not set and there is attend to
  add element with duplicated name.
In both cases the nvlist_move_nvpair() function free nvpair structure.
If library will try to unpack a binary blob which contains duplicated
names it will end up with using memory after free.

To prevent that, the nvlist_move_nvpair() function interface is changed
to report about failure and checks are added to the nvpair_xunpack()
function.

Discovered thanks to the american fuzzy lop.

Approved by: pjd (mentor)

8 years agoDon't set parent if the unpack operation fail. In some
Mariusz Zaborski [Tue, 11 Aug 2015 17:54:51 +0000 (17:54 +0000)]
Don't set parent if the unpack operation fail. In some
case this could crash the library, because of the NULL pointer references.

Discovered thanks to american fuzzy lop.

Approved by: pjd (mentor)

8 years agoFix comment describing legacy target and wrap to 80 columns
Ed Maste [Tue, 11 Aug 2015 17:48:58 +0000 (17:48 +0000)]
Fix comment describing legacy target and wrap to 80 columns

8 years agoMake the nvlist_next(9) function handle NULL pointer variable.
Mariusz Zaborski [Tue, 11 Aug 2015 17:41:32 +0000 (17:41 +0000)]
Make the nvlist_next(9) function handle NULL pointer variable.
This simplifies removing the first element from nvlist.

Reviewed by: AllanJude
Approved by: pjd (mentor)

8 years agoUse correct src/dst ports when removing states.
Mariusz Zaborski [Tue, 11 Aug 2015 17:24:34 +0000 (17:24 +0000)]
Use correct src/dst ports when removing states.

Submitted by: Milosz Kaniewski <m.kaniewski@wheelsystems.com>,
UMEZAWA Takeshi <umezawa@iij.ad.jp> (orginal)
Reviewed by: glebius
Approved by: pjd (mentor)
Obtained from: OpenBSD
MFC after: 3 days

8 years agoInstead of defining the actualy user and group id in the drmP.h files
Koop Mast [Tue, 11 Aug 2015 16:51:44 +0000 (16:51 +0000)]
Instead of defining the actualy user and group id in the drmP.h files
define GID_VIDEO in sys/conf.h, and use it together with UID_ROOT
to define DRM_DEV_UID and DRM_DEV_GID in the drmP.h files.

So there is one place where the UID's and GID's are defined.

Submitted by: ed@
Reviewed by: ed@, dumbbell@
Differential Revision: https://reviews.freebsd.org/D3360

8 years agoActually disable the invalid test
Baptiste Daroussin [Tue, 11 Aug 2015 16:08:10 +0000 (16:08 +0000)]
Actually disable the invalid test

8 years agoReenable the test.
Baptiste Daroussin [Tue, 11 Aug 2015 16:07:24 +0000 (16:07 +0000)]
Reenable the test.

Sorry I was testing on the wrong branch.

8 years agoBuild libelf and libdwarf in the legacy stage
Ed Maste [Tue, 11 Aug 2015 15:43:09 +0000 (15:43 +0000)]
Build libelf and libdwarf in the legacy stage

They need to be built and installed (including headers) prior to the
DTrace CTF tools.

Reviewed by: imp (as part of a larger change)
Sponsored by: The FreeBSD Foundation

8 years agoFall back to O_RDONLY -- not O_WRONLY.
Ed Schouten [Tue, 11 Aug 2015 14:08:46 +0000 (14:08 +0000)]
Fall back to O_RDONLY -- not O_WRONLY.

If CloudABI processes open files with a set of requested rights that do
not match any of the privileges granted by O_RDONLY, O_WRONLY or O_RDWR,
we'd better fall back to O_RDONLY -- not O_WRONLY.

8 years agoProperly convert the error number to CloudABI's indexing.
Ed Schouten [Tue, 11 Aug 2015 14:07:04 +0000 (14:07 +0000)]
Properly convert the error number to CloudABI's indexing.

We currently return FreeBSD's errno value directly, which is of course
not correct.

8 years agoAdd support for anonymous kqueues.
Ed Schouten [Tue, 11 Aug 2015 13:47:23 +0000 (13:47 +0000)]
Add support for anonymous kqueues.

CloudABI's polling system calls merge the concept of one-shot polling
(poll, select) and stateful polling (kqueue). They share the same data
structures.

Extend FreeBSD's kqueue to provide support for waiting for events on an
anonymous kqueue. Unlike stateful polling, there is no need to support
timeouts, as an additional timer event could be used instead.
Furthermore, it makes no sense to use a different number of input and
output kevents. Merge this into a single argument.

Obtained from: https://github.com/NuxiNL/freebsd
Differential Revision: https://reviews.freebsd.org/D3307

8 years agoStart to support PSCI 1.0. For all the functions we currently support this
Andrew Turner [Tue, 11 Aug 2015 13:42:58 +0000 (13:42 +0000)]
Start to support PSCI 1.0. For all the functions we currently support this
can be seen as the same as 0.2. There are changes with the data passed to
CPU_SUSPEND, however we don't yet use this call.

Sponsored by: ABT Systems Ltd