]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoChange the documentation to reflect where the -V option should be used
bapt [Sun, 14 Jun 2015 21:50:38 +0000 (21:50 +0000)]
Change the documentation to reflect where the -V option should be used

Suggested by: kientzle

9 years agoInvalid pages do not need neither update of the activation count nor
kib [Sun, 14 Jun 2015 20:23:41 +0000 (20:23 +0000)]
Invalid pages do not need neither update of the activation count nor
they coould be dirty.  Move the handling if the invalid pages in the
inactive scan earlier.

Remove some code duplication in the scan by introducing the
'drop_page' label, which centralizes the object and the page unlock.

Suggested and reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoFix name of a constant.
tuexen [Sun, 14 Jun 2015 20:16:36 +0000 (20:16 +0000)]
Fix name of a constant.

MFC after: 3 days

9 years agoFix typo in comment.
kib [Sun, 14 Jun 2015 19:19:46 +0000 (19:19 +0000)]
Fix typo in comment.

MFC after: 3 days

9 years agoStop the heartbeat timer when removing a net.
tuexen [Sun, 14 Jun 2015 17:48:44 +0000 (17:48 +0000)]
Stop the heartbeat timer when removing a net.
Thanks to the reporter of
https://code.google.com/p/sctp-refimpl/issues/detail?id=14
for reporting the issue.

MFC after: 3 days

9 years agoLatest clang uses openat(2).
sjg [Sun, 14 Jun 2015 16:31:06 +0000 (16:31 +0000)]
Latest clang uses openat(2).

If the pathname is absolute or dirfd is AT_FDCWD we can
handle it exactly like open(2).
Otherwise we output an A record to indicate that the path of
an open directory needs to be used (earlier in the trace).

Differential Revision: D2810
Reviewed by: jhb
MFC after: a bit

9 years agoTell the compiler that -dc and -r are linker flags.
tijl [Sun, 14 Jun 2015 15:40:17 +0000 (15:40 +0000)]
Tell the compiler that -dc and -r are linker flags.

Reviewed by: adrian

9 years agofd: reduce excessive zeroing on fd close
mjg [Sun, 14 Jun 2015 14:10:05 +0000 (14:10 +0000)]
fd: reduce excessive zeroing on fd close

fde_file as NULL is already an indicator of an unused fd. All other
fields are populated when fp is installed.

9 years agofd: move out actual fp installation to _finstall
mjg [Sun, 14 Jun 2015 14:08:52 +0000 (14:08 +0000)]
fd: move out actual fp installation to _finstall

Use it in fd passing functions as the first step towards fd code cleanup.

9 years agonit: Rename racct_alloc_resource to racct_adjust_resource.
jlh [Sun, 14 Jun 2015 08:33:14 +0000 (08:33 +0000)]
nit: Rename racct_alloc_resource to racct_adjust_resource.

This is more accurate as the amount can be negative.

MFC after: 2 weeks

9 years agoNetBSD commit log:
jlh [Sun, 14 Jun 2015 07:47:18 +0000 (07:47 +0000)]
NetBSD commit log:
  Use a constant array for the MIB. Newer LLVM decided that mib[] warranted
  stack protections, with the obvious crash after the setup was done.
  As a positive side effect, code size shrinks a bit.

I'm not sure why this hasn't bitten us yes, but it is certainly possible and
there are no real drawbacks to this change anyway.

Submitted by: pfg
Obtained from: NetBSD
MFC after: 1 week

9 years agoAs the next step in eliminating PG_CACHE pages, free rather than cache
alc [Sun, 14 Jun 2015 05:23:39 +0000 (05:23 +0000)]
As the next step in eliminating PG_CACHE pages, free rather than cache
pages in vm_pageout_scan().  The reactivation rate of cache pages created
by vm_pageout_scan() is extremely low; typically no more than 0.5% to
2.25% of the pages are ever reactivated.  At the same time, caching pages
is more expensive than freeing them.  For example, in a test with
PostgreSQL, this change reduced the amount of time spent in the inactive
queue scan by 1/6.

Differential Revision: https://reviews.freebsd.org/D2805
Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

9 years agoNO_WARNS when building for host
sjg [Sun, 14 Jun 2015 03:34:09 +0000 (03:34 +0000)]
NO_WARNS when building for host

9 years agoAvoid circular dependency with nm
sjg [Sun, 14 Jun 2015 03:33:27 +0000 (03:33 +0000)]
Avoid circular dependency with nm

9 years agoNeed to provide -I for meta mode
sjg [Sun, 14 Jun 2015 03:32:49 +0000 (03:32 +0000)]
Need to provide -I for meta mode

9 years agoNeeds libxo
sjg [Sun, 14 Jun 2015 03:31:23 +0000 (03:31 +0000)]
Needs libxo

9 years agoCreate proper targets for linux*syscalls.c
sjg [Sun, 14 Jun 2015 03:30:39 +0000 (03:30 +0000)]
Create proper targets for linux*syscalls.c

9 years agoWe cannot build makewhatis and mandoc
sjg [Sun, 14 Jun 2015 03:29:24 +0000 (03:29 +0000)]
We cannot build makewhatis and mandoc

9 years agoAvoid trailing white-space
sjg [Sun, 14 Jun 2015 03:28:48 +0000 (03:28 +0000)]
Avoid trailing white-space

9 years agoWatch out for bin/cat in host stage tree
sjg [Sun, 14 Jun 2015 03:28:25 +0000 (03:28 +0000)]
Watch out for bin/cat in host stage tree

9 years agoAvoid anoying warning
sjg [Sun, 14 Jun 2015 03:27:22 +0000 (03:27 +0000)]
Avoid anoying warning

9 years agoFix typo - this upsets llvm/gcc-4.9, but not gcc-4.2 for some reason.
adrian [Sun, 14 Jun 2015 00:31:22 +0000 (00:31 +0000)]
Fix typo - this upsets llvm/gcc-4.9, but not gcc-4.2 for some reason.

9 years agoFix incorrect library path.
adrian [Sat, 13 Jun 2015 22:36:42 +0000 (22:36 +0000)]
Fix incorrect library path.

9 years agoFix previous commit (r284357)
ngie [Sat, 13 Jun 2015 22:29:43 +0000 (22:29 +0000)]
Fix previous commit (r284357)

I forgot to convert the && to a ||

Pointyhat to: ngie
X-MFC with: r283678, r284336, r284357

9 years agoFix inverted check by skipping over the model-specific checks if the maker
ngie [Sat, 13 Jun 2015 22:27:59 +0000 (22:27 +0000)]
Fix inverted check by skipping over the model-specific checks if the maker
or product is NULL, not if they are both not NULL

Reported by: araujo, kib
X-MFC with: r283678, r284336
Pointyhat to: allanjude

9 years agoFix up crunchgen binary generation to work with external cross-build
adrian [Sat, 13 Jun 2015 22:01:21 +0000 (22:01 +0000)]
Fix up crunchgen binary generation to work with external cross-build
tools.

* Allow STRIP to be overridden by the environment
* Use CC to tie things together, not LD

Tested:

* i386, mips32

Submitted by: kan

9 years agoWhen using -L the code skips a socket if the local or foreign
tuexen [Sat, 13 Jun 2015 20:15:44 +0000 (20:15 +0000)]
When using -L the code skips a socket if the local or foreign
address is loopback. So it is shown if both are not loopback.
The man page says that it is shown if the local or foreign
address is not loopback. Change the man page to reflect the
code.

MFC after: 3 days

9 years agoAdd support for SCTP.
tuexen [Sat, 13 Jun 2015 20:11:02 +0000 (20:11 +0000)]
Add support for SCTP.

MFC after: 3 days

9 years agoAllow more than one local or remote address per socket. This is needed to
tuexen [Sat, 13 Jun 2015 20:05:20 +0000 (20:05 +0000)]
Allow more than one local or remote address per socket. This is needed to
support SCTP (and MPTCP in the future). No functional change for existing
protocols.

MFC after: 3 days

9 years agoAllow more than one socket entry for a file descriptor. This is needed
tuexen [Sat, 13 Jun 2015 20:01:54 +0000 (20:01 +0000)]
Allow more than one socket entry for a file descriptor. This is needed
for supporting 1-to-many style SCTP sockets. For other sochets, there
is no functional change.

MFC after: 3 days

9 years agoSimplify printaddr(). No functional change.
tuexen [Sat, 13 Jun 2015 19:56:04 +0000 (19:56 +0000)]
Simplify printaddr(). No functional change.

MFC after: 3 days

9 years agoremoved extra keyword
sjg [Sat, 13 Jun 2015 19:53:24 +0000 (19:53 +0000)]
removed extra keyword

9 years agoWe no longer need CSU_DIR.i386
sjg [Sat, 13 Jun 2015 19:52:35 +0000 (19:52 +0000)]
We no longer need CSU_DIR.i386
and until there is an alternative we need MK_INSTALL_AS_USER=yes

9 years agoFix panic when adding vtnet interfaces to a bridge
kp [Sat, 13 Jun 2015 19:39:21 +0000 (19:39 +0000)]
Fix panic when adding vtnet interfaces to a bridge

vtnet interfaces are always in promiscuous mode (at least if the
VIRTIO_NET_F_CTRL_RX feature is not negotiated with the host).  if_promisc() on
a vtnet interface returned ENOTSUP although it has IFF_PROMISC set. This
confused the bridge code. Instead we now accept all enable/disable promiscuous
commands (and always keep IFF_PROMISC set).

There are also two issues with the if_bridge error handling.

If if_promisc() fails it uses bridge_delete_member() to clean up. This tries to
disable promiscuous mode on the interface. That runs into an assert, because
promiscuous mode was never set in the first place. (That's the panic reported in
PR 200210.)
We can only unset promiscuous mode if the interface actually is promiscuous.
This goes against the reference counting done by if_promisc(), but only the
first/last if_promic() calls can actually fail, so this is safe.

A second issue is a double free of bif. It's already freed by
bridge_delete_member().

PR: 200210
Differential Revision: https://reviews.freebsd.org/D2804
Reviewed by: philip (mentor)

9 years agoFix the following clang 3.7.0 warnings in lib/libfetch/http.c:
dim [Sat, 13 Jun 2015 19:26:48 +0000 (19:26 +0000)]
Fix the following clang 3.7.0 warnings in lib/libfetch/http.c:

    lib/libfetch/http.c:1628:26: error: address of array 'purl->user'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.user = purl->user ?
                                                   ~~~~~~^~~~ ~
    lib/libfetch/http.c:1630:30: error: address of array 'purl->pwd'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.password = purl->pwd?
                                                       ~~~~~~^~~~
    lib/libfetch/http.c:1657:25: error: address of array 'url->user'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.user = url->user ?
                                                   ~~~~~^~~~ ~
    lib/libfetch/http.c:1659:29: error: address of array 'url->pwd'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.password = url->pwd ?
                                                       ~~~~~^~~ ~
    lib/libfetch/http.c:1669:25: error: address of array 'url->user'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.user = url->user ?
                                                   ~~~~~^~~~ ~
    lib/libfetch/http.c:1671:29: error: address of array 'url->pwd'
    will always evaluate to 'true' [-Werror,-Wpointer-bool-conversion]
                                    aparams.password = url->pwd ?
                                                       ~~~~~^~~ ~

Since url->user and url->pwd are arrays, they can never be NULL, so the
checks can be removed.

Reviewed by: bapt
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D2673

9 years agoAdd META_MODE support.
sjg [Sat, 13 Jun 2015 19:20:56 +0000 (19:20 +0000)]
Add META_MODE support.

Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp

9 years agoFix typo when deregistering the VLAN unconfig event handler
bryanv [Sat, 13 Jun 2015 16:13:31 +0000 (16:13 +0000)]
Fix typo when deregistering the VLAN unconfig event handler

Submitted by: Masao Uebayashi <uebayasi@tombiinc.com>
MFC after: 3 days

9 years agoUse ${CRUNCHGEN} rather than bare word.
sjg [Sat, 13 Jun 2015 15:36:13 +0000 (15:36 +0000)]
Use ${CRUNCHGEN} rather than bare word.

Reviewed by: brooks

9 years agoUnbreak libxo's handling of characters not representable in current locale
kan [Sat, 13 Jun 2015 15:14:39 +0000 (15:14 +0000)]
Unbreak libxo's handling of characters not representable in current locale

The xo_format_string_direct function loops forever never advancing the
processed string pointer when it encounters a character that makes
mbrtowc fail. Make it emit '?' character instead, as it seems this is
what the code intent was, sans bugs.

Differential Revision: https://reviews.freebsd.org/D2802
Reviewed by: marcel

9 years agoelfcopy: Handle objects without a ".shstrtab" section string table
emaste [Sat, 13 Jun 2015 14:24:31 +0000 (14:24 +0000)]
elfcopy: Handle objects without a ".shstrtab" section string table

As of LLVM revision 238073, LLVM stores symbols and section names in
the same string table.  From the upstream commit mesage:

  With the scheme of naming sections like ".text.foo" where foo is a
  symbol, there is a big potential saving in using a single one.

This is a cherry-pick of ELF Tool Chain revision 3225.

Sponsored by: The FreeBSD Foundation

9 years agoAdd if_vlan, ipfw{,_nat}.ko, and libalias to the AR934X kernel config
allanjude [Sat, 13 Jun 2015 06:09:00 +0000 (06:09 +0000)]
Add if_vlan, ipfw{,_nat}.ko, and libalias to the AR934X kernel config

This makes the TP-Link WDR3600 routers more useful

Differential Revision: https://reviews.freebsd.org/D2780
Approved by: adrian
Sponsored by: ScaleEngine Inc.

9 years agoacpi_ibm.ko panics if SMBIOS information is not available
allanjude [Sat, 13 Jun 2015 05:55:26 +0000 (05:55 +0000)]
acpi_ibm.ko panics if SMBIOS information is not available

Add a check for NULL before strcmp on smbios information incase it is not populated

Differential Revision: https://reviews.freebsd.org/D2750
Reviewed by: ngie, jhb
Approved by: rpaulo
Sponsored by: ScaleEngine Inc.

9 years agoPHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases it via...
davidcs [Sat, 13 Jun 2015 01:28:19 +0000 (01:28 +0000)]
PHY LOCK acquires the hardware lock via bxe_acquire_phy_lock() and releases it via bxe_release_phy_lock(). It was simply acquiring a mutex earlier which can cause the PHY to use bogus values. Fixes intermittent link failures.

bxe_ioctl() completes all functions within its context as opposed to a taskqueue earlier.

bxe_handle_rx_mode_tq() no longer required. bxe_set_rx_mode() handles the functionality within its context

Submitted by:gary.zambrano@qlogic.com
MFC after:5 days

9 years agoReduce the arm/armv6 image size from 1G to 480M.
gjb [Fri, 12 Jun 2015 19:42:27 +0000 (19:42 +0000)]
Reduce the arm/armv6 image size from 1G to 480M.

Since the images are effectively mostly zeros at 1G,
reduce the size to allow installation on smaller SD
cards, such as 512Mb.

While here, stop writing the /boot.txt file on the
WANDBOARD, which isn't used anyway.

Discussed with: imp
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoFix the reporting of the PMTUD state for specific paths.
tuexen [Fri, 12 Jun 2015 18:59:29 +0000 (18:59 +0000)]
Fix the reporting of the PMTUD state for specific paths.

MFC after: 3 days

9 years agoCode cleanup.
tuexen [Fri, 12 Jun 2015 17:20:09 +0000 (17:20 +0000)]
Code cleanup.

MFC after: 3 days

9 years agoMerge OpenSSL 1.0.1o.
jkim [Fri, 12 Jun 2015 16:48:26 +0000 (16:48 +0000)]
Merge OpenSSL 1.0.1o.

9 years agoIn case of an output error, continue with the next net, don't try to
tuexen [Fri, 12 Jun 2015 16:01:41 +0000 (16:01 +0000)]
In case of an output error, continue with the next net, don't try to
continue sending on the same net.

This fixes a bug where an invalid mbuf chain was constructed, if a
full size frame of control chunks should be sent and there is a
output error.

Based on a discussion with rrs@, change move to the next net. This fixes
the bug and improves the behaviour.

Thanks to Irene Ruengeler for spending a lot of time in narrowing this
problem down.
MFC after: 3 days

9 years agoReport the values of x86 segment registers to remote debuggers.
jhb [Fri, 12 Jun 2015 15:14:08 +0000 (15:14 +0000)]
Report the values of x86 segment registers to remote debuggers.

While here, also report %eflags from the i386 trapframe.

Differential Revision: https://reviews.freebsd.org/D2743
Reviewed by: kib
Obtained from: 1 month

9 years agoEnsure that the upper 16 bits of segment registers manually saved in
jhb [Fri, 12 Jun 2015 15:06:17 +0000 (15:06 +0000)]
Ensure that the upper 16 bits of segment registers manually saved in
trapframes are cleared by explicitly pushing a zero and then moving
the segment register into the low 16 bits.  Certain Intel processors
treat a push of a segment register as a move of the segment register
into the low 16 bits leaving the upper 16 bits of the word in the
stack unchanged.

Reviewed by: kib
MFC after: 1 month

9 years agoAdd a missing word, should have been in r284290.
brueffer [Fri, 12 Jun 2015 15:03:59 +0000 (15:03 +0000)]
Add a missing word, should have been in r284290.

Submitted by: Fabian Keil

9 years agoFree the segment objects properly.
marcel [Fri, 12 Jun 2015 14:53:56 +0000 (14:53 +0000)]
Free the segment objects properly.

9 years agoGet rid of some more NO_OBJs
sjg [Fri, 12 Jun 2015 14:30:27 +0000 (14:30 +0000)]
Get rid of some more NO_OBJs

Differential Revision:       D2748

9 years agoUnbreak mouse on resume on Thinkpads when hw.psm.trackpoint_support=0,
glebius [Fri, 12 Jun 2015 13:57:04 +0000 (13:57 +0000)]
Unbreak mouse on resume on Thinkpads when hw.psm.trackpoint_support=0,
which is default.  It was broken in r281441.

It appears that set_trackpoint_parameters() call on resume disables the
mouse.  So, we need not call it on resume if hw.psm.trackpoint_support=0.

The problem is that the probe functions are used both for probing and
for reiniting on resume. And the absense of the softc parameter is used
as a mark to distinguish reinit and probe, which is quite ugly. At the
same time the softc parameter is needed to call set_trackpoint_parameters().

o Change the arguments of probefunc_t to always supply the softc, and
  use additional enum argument to tell probing from initing.
o Don't call set_trackpoint_parameters() from global doinitialize(),
  instead call it from the enable_trackpoint() only.
o In enable_synaptics() call enable_trackpoint() in both probe and
  reinit cases.

Together with:  Jan Kokemüller <jan.kokemueller gmail.com>

9 years agoRename ECAM PCI driver file.
br [Fri, 12 Jun 2015 13:54:25 +0000 (13:54 +0000)]
Rename ECAM PCI driver file.

Requested by: imp

9 years agoAdd generic ECAM PCI device driver found in Gem5 simulator.
br [Fri, 12 Jun 2015 13:16:50 +0000 (13:16 +0000)]
Add generic ECAM PCI device driver found in Gem5 simulator.
Work based on Cavium Thunder PCIe driver by Semihalf.

Reviewed by: andrew, jhb
Sponsored by: HEIF5
Differential Revision: https://reviews.freebsd.org/D2386

9 years agoA miss from r284310. vm_pager_get_pages() updates the array, so there is
glebius [Fri, 12 Jun 2015 13:15:14 +0000 (13:15 +0000)]
A miss from r284310. vm_pager_get_pages() updates the array, so there is
no need for vm_page_lookup().

9 years agoWe need to handle 64-bit BARs ourselves to avoid that the
marcel [Fri, 12 Jun 2015 12:27:10 +0000 (12:27 +0000)]
We need to handle 64-bit BARs ourselves to avoid that the
PCI infrastructure instantiates a non-existent resource.
This has BARs suddenly show up with pciconf(8) under
VMware as well.  Now that we read the BAR ourselves, ask
for the correct resource type.

9 years agoMake KPI of vm_pager_get_pages() more strict: if a pager changes a page
glebius [Fri, 12 Jun 2015 11:32:20 +0000 (11:32 +0000)]
Make KPI of vm_pager_get_pages() more strict: if a pager changes a page
in the requested array, then it is responsible for disposition of previous
page and is responsible for updating the entry in the requested array.
Now consumers of KPI do not need to re-lookup the pages after call to
vm_pager_get_pages().

Reviewed by: kib
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agozfs clone should not mount the clone if canmount == noauto
avg [Fri, 12 Jun 2015 11:21:35 +0000 (11:21 +0000)]
zfs clone should not mount the clone if canmount == noauto

Creation of a new filesystem does not imply an intent to mount it.

Since canmount property is not inherited and its default value is 'on',
the only scenario where this matters is zfs clone -o canmount=noauto.
zfs create -o canmount=noauto already does not mount the new filesystem.

Also see:
https://www.illumos.org/issues/5984
https://reviews.csiden.org/r/228/
https://github.com/FransUrbo/zfs/commit/dd0e0e69f5b1c83bf2895ac00a0b83af77473175
https://github.com/zfsonlinux/zfs/issues/2241

Reviewed by: mahrens
MFC after: 8 days
Sponsored by: ClusterHQ

9 years agoMFV r284042: 1778 Assertion failed: rn->rn_nozpool == B_FALSE, file
avg [Fri, 12 Jun 2015 11:16:43 +0000 (11:16 +0000)]
MFV r284042: 1778 Assertion failed: rn->rn_nozpool == B_FALSE, file
../common/libzfs_import.c, line 1077, function zpool_open_func

illumos/illumos-gate@bd0f709169e67f4bd34526e186a7c34f595f0d9b

Author: Andrew Stormont <andyjstormont@gmail.com>
MFC after: 13 days

9 years agoMFV r284036: 5961 Fix stack overflow in zfs_create_fs
avg [Fri, 12 Jun 2015 11:10:49 +0000 (11:10 +0000)]
MFV r284036: 5961 Fix stack overflow in zfs_create_fs

illumos/illumos-gate@c701fde6911c957e71b37aac4daf672bd828f4d7

Author: glebius
MFC after: 11 days

9 years agoMFV r284030: 5818 zfs {ref}compressratio is incorrect with 4k sector size
avg [Fri, 12 Jun 2015 10:57:05 +0000 (10:57 +0000)]
MFV r284030: 5818 zfs {ref}compressratio is incorrect with 4k sector size

illumos/illumos-gate@81cd5c555f505484180a62ca5a2fbb00d70c57d6

Author: Matthew Ahrens <mahrens@delphix.com>
MFC after: 17 days

9 years agoMFV r283534: 5515 dataset user hold doesn't reject empty tags
avg [Fri, 12 Jun 2015 10:52:53 +0000 (10:52 +0000)]
MFV r283534: 5515 dataset user hold doesn't reject empty tags

illumos/illumos-gate@752fd8dabccac68d6d09f82f3bf3561e055e400b

Author: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
MFC after: 10 days

9 years agoMFV r284040: check that datasets are snapshots
avg [Fri, 12 Jun 2015 10:41:24 +0000 (10:41 +0000)]
MFV r284040: check that datasets are snapshots

5946 zfs_ioc_space_snaps must check that firstsnap and lastsnap refer to snapshots
5945 zfs_ioc_send_space must ensure that fromsnap refers to a snapshot
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.ross@nexenta.com>

illumos/illumos-gate@24218bebb460e4015fac2c9f2cec1902eddbcd7b

Note that the upstream commit is modified during MFV: in the upstream
the check is done by inspecting ds_is_snapshot field while in FreeBSD
we call dsl_dataset_is_snapshot().
This is because illumos/illumos-gate@bc9014e6a81272073b9854d9f65dd59e18d18c35
(r277428 in vendor-sys/illumos) is not MFV-ed yet.

MFC after: 10 days

9 years agoseveral lockstat improvements
avg [Fri, 12 Jun 2015 10:01:24 +0000 (10:01 +0000)]
several lockstat improvements

0. For spin events report time spent spinning, not a loop count.
While loop count is much easier and cheaper to obtain it is hard
to reason about the reported numbers, espcially for adaptive locks
where both spinning and sleeping can happen.
So, it's better to compare apples and apples.

1. Teach lockstat about FreeBSD rw locks.
This is done in part by changing the corresponding probes
and in part by changing what probes lockstat should expect.

2. Teach lockstat that rw locks are adaptive and can spin on FreeBSD.

3. Report lock acquisition events for successful rw try-lock operations.

4. Teach lockstat about FreeBSD sx locks.
Reporting of events for those locks completely mirrors
rw locks.

5. Report spin and block events before acquisition event.
This is behavior documented for the upstream, so it makes sense to stick
to it.  Note that because of FreeBSD adaptive lock implementations
both the spin and block events may be reported for the same acquisition
while the upstream reports only one of them.

Differential Revision: https://reviews.freebsd.org/D2727
Reviewed by: markj
MFC after: 17 days
Relnotes: yes
Sponsored by: ClusterHQ

9 years agoxen-blk{front/back}: remove broken FreeBSD extensions
royger [Fri, 12 Jun 2015 07:50:34 +0000 (07:50 +0000)]
xen-blk{front/back}: remove broken FreeBSD extensions

The FreeBSD extension adds a new request type, called blkif_segment_block
which has a size of 112bytes for both i386 and amd64. This is fine on
amd64, since requests have a size of 112B there also. But this is not true
for i386, where requests have a size of 108B. So on i386 we basically
overrun the ring slot when queuing a request of type blkif_segment_block_t,
which is very bad.

Remove this extension (including a cleanup of the public blkif.h header
file) from blkfront and blkback.

Sponsored by: Citrix Systems R&D
Tested-by: cperciva
9 years agoussreq: use saved fdp pointer insted of td->td_proc->p_fd
mjg [Fri, 12 Jun 2015 06:28:22 +0000 (06:28 +0000)]
ussreq: use saved fdp pointer insted of td->td_proc->p_fd

No functional changes.

9 years agoReorganize targets/pseudo/userland
sjg [Fri, 12 Jun 2015 03:26:05 +0000 (03:26 +0000)]
Reorganize targets/pseudo/userland

This target mainly exists to help check things build.
Eventually targets that build real packages or images will be more
important.
As such move the pseudo targets that only exist for the benefit of
'userland' to under it.

9 years agoAt revision r247852 accidentally was removed from print the variable obj.
araujo [Fri, 12 Jun 2015 02:16:14 +0000 (02:16 +0000)]
At revision r247852 accidentally was removed from print the variable obj.
While here, declare some global variables as static to silence clang
warnings.

Differential Revision: D2722
Reviewed by: delphij, mahrens

9 years agoLanguage cleanup.
brueffer [Fri, 12 Jun 2015 00:02:31 +0000 (00:02 +0000)]
Language cleanup.

Noticed during wblock's manpage walkthrough at BSDCan 2015.

9 years agoImprove grammar.
brueffer [Thu, 11 Jun 2015 23:05:49 +0000 (23:05 +0000)]
Improve grammar.

PR: 200673
Submitted by: Fabian Keil
Obtained from: ElectroBSD

9 years agoMisc fixes from projects/bmake
sjg [Thu, 11 Jun 2015 21:13:05 +0000 (21:13 +0000)]
Misc fixes from projects/bmake

Differential Revision:       D2748
Reviewed by: brooks imp

9 years agoDo not override variables on command line that build needs to change.
sjg [Thu, 11 Jun 2015 21:11:33 +0000 (21:11 +0000)]
Do not override variables on command line that build needs to change.

It is sufficient to explicitly set DEPENDFILE in env for each sub-make.

9 years agoEnsure SYMLINKS fully specified
sjg [Thu, 11 Jun 2015 21:09:03 +0000 (21:09 +0000)]
Ensure SYMLINKS fully specified

Differential Revision:       D2748
Reviewed by: brooks

9 years agoAdd a ugold(4) manpage, adapted from the OpenBSD one.
brueffer [Thu, 11 Jun 2015 19:06:58 +0000 (19:06 +0000)]
Add a ugold(4) manpage, adapted from the OpenBSD one.

9 years agoMerge OpenSSL 1.0.1n.
jkim [Thu, 11 Jun 2015 19:00:55 +0000 (19:00 +0000)]
Merge OpenSSL 1.0.1n.

9 years agopf: Remove frc_direction
kp [Thu, 11 Jun 2015 17:57:47 +0000 (17:57 +0000)]
pf: Remove frc_direction

We don't use the direction of the fragments for anything. The frc_direction
field is assigned, but never read.
Just remove it.

Differential Revision: https://reviews.freebsd.org/D2773
Approved by: philip (mentor)

9 years agoMFV r284276: Fix long options.
delphij [Thu, 11 Jun 2015 17:32:36 +0000 (17:32 +0000)]
MFV r284276: Fix long options.

Reported by: jkim
MFC after: 13 days

9 years agoRegen for r284274.
jkim [Thu, 11 Jun 2015 17:21:27 +0000 (17:21 +0000)]
Regen for r284274.

9 years agoEnable clang on armeb, it is now able to build targeting armeb. This is
andrew [Thu, 11 Jun 2015 16:49:14 +0000 (16:49 +0000)]
Enable clang on armeb, it is now able to build targeting armeb. This is
the last arm platform to move away from gcc.

Tested by: jmg

9 years agoAdd basic support for ACPI. It splits out the nexus driver to two new
andrew [Thu, 11 Jun 2015 15:45:33 +0000 (15:45 +0000)]
Add basic support for ACPI. It splits out the nexus driver to two new
drivers, one for fdt, one for acpi. It then uses this to decide if it will
use fdt or acpi.

The GICv2 (interrupt controller) and Generic Timer drivers have been
updated to handle both cases.

As this is early code we still need FDT to find the kernel console, and
some parts are still missing, including PCI support.

Differential Revision: https://reviews.freebsd.org/D2463
Reviewed by: jhb, jkim, emaste
Obtained from: ABT Systems Ltd
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

9 years agoImport ugold driver from OpenBSD supporting digital USB temperature
hselasky [Thu, 11 Jun 2015 15:23:47 +0000 (15:23 +0000)]
Import ugold driver from OpenBSD supporting digital USB temperature
meters. The driver is currently not part of the default kernel build.

Obtained from: OpenBSD
MFC after: 2 weeks

9 years agoUpdate tests after sizing changes to the fixed VHD format.
marcel [Thu, 11 Jun 2015 15:19:59 +0000 (15:19 +0000)]
Update tests after sizing changes to the fixed VHD format.

9 years agoHandle the case in which ncyls is 0.
marcel [Thu, 11 Jun 2015 15:18:54 +0000 (15:18 +0000)]
Handle the case in which ncyls is 0.
While here, update copyright.

9 years agoFor the fixed VHD format, round the raw image size to the next
marcel [Thu, 11 Jun 2015 14:30:31 +0000 (14:30 +0000)]
For the fixed VHD format, round the raw image size to the next
multiple of the cylinder size. This is what qemu-img seems to
be doing. Make sure to handle boundary cases where increasing
the image size by 1 cyclinder's worth would also result in a
change of geometry.

9 years agoUse INCLUDEDIR rather than hard coded /usr/include
sjg [Thu, 11 Jun 2015 14:25:53 +0000 (14:25 +0000)]
Use INCLUDEDIR rather than hard coded /usr/include

Differential Revision: D2748
Reviewed by: brooks imp

9 years agoPass the ACPI table pointer to the arm64 kernel from loader.efi.
andrew [Thu, 11 Jun 2015 14:02:23 +0000 (14:02 +0000)]
Pass the ACPI table pointer to the arm64 kernel from loader.efi.

Sponsored by: The FreeBSD Foundation

9 years agoStop using VFP in pcpu.h when we mean ARMv6 and later.
andrew [Thu, 11 Jun 2015 13:58:40 +0000 (13:58 +0000)]
Stop using VFP in pcpu.h when we mean ARMv6 and later.

9 years agoFix the spelling of __ARM_ARCH >= 6 in sys/arm/arm.
andrew [Thu, 11 Jun 2015 13:54:18 +0000 (13:54 +0000)]
Fix the spelling of __ARM_ARCH >= 6 in sys/arm/arm.

9 years agoWith MK_AUTO_OBJ=yes objdir is created during sys.mk
sjg [Thu, 11 Jun 2015 13:53:15 +0000 (13:53 +0000)]
With MK_AUTO_OBJ=yes objdir is created during sys.mk

If a makefile sets NO_OBJ, we should honor that by setting
.OBJDIR back to .CURDIR

9 years agoFor debugging we sometimes run makefiles forcing level > 0
sjg [Thu, 11 Jun 2015 13:51:52 +0000 (13:51 +0000)]
For debugging we sometimes run makefiles forcing level > 0

Ensure setup that should have happened at level 0 is done.

9 years agopf: Save the protocol number in the pf_fragment
kp [Thu, 11 Jun 2015 13:26:16 +0000 (13:26 +0000)]
pf: Save the protocol number in the pf_fragment

When we try to look up a pf_fragment with pf_find_fragment() we compare (see
pf_frag_compare()) addresses (and family), id but also protocol.  We failed to
save the protocol to the pf_fragment in pf_fragcache(), resulting in failing
reassembly.

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

9 years agodrop key_sa_stir_iv as it isn't used...
jmg [Thu, 11 Jun 2015 13:05:37 +0000 (13:05 +0000)]
drop key_sa_stir_iv as it isn't used...

Reviewed by: eri, ae

9 years agoConsider sorting.
br [Thu, 11 Jun 2015 13:00:20 +0000 (13:00 +0000)]
Consider sorting.

9 years agoSplit out db_unwind_frame() so it can be used by DTrace.
br [Thu, 11 Jun 2015 12:47:13 +0000 (12:47 +0000)]
Split out db_unwind_frame() so it can be used by DTrace.

Sponsored by: ARM Ltd.
Differential Revision: https://reviews.freebsd.org/D2741

9 years agoTweaks for r284178:
kib [Thu, 11 Jun 2015 04:41:54 +0000 (04:41 +0000)]
Tweaks for r284178:

Do not include machine/atomic.h explicitely, the header is already included
by sys/systm.h.

Force inlining of tc_getgen() and tc_setgen().  The functions are used
more than once, which causes compilers with non-aggressive inlining
policies to generate calls.

Suggested by: bde
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoRemove NO_OBJ
sjg [Thu, 11 Jun 2015 04:22:17 +0000 (04:22 +0000)]
Remove NO_OBJ

For meta mode we will want objdirs.

Differential Revision: D2748
Reviewed by: brooks imp

9 years agoMerge bmake-20150606
sjg [Thu, 11 Jun 2015 04:00:22 +0000 (04:00 +0000)]
Merge bmake-20150606

Only change to bmake is man page - document .OBJDIR target.
We also get latest dirdeps.mk and friends.
> Description of fields to fill in above:                     76 columns --|
> PR:                       If a GNATS PR is affected by the change.
> Differential Revision:    https://reviews.freebsd.org/D### (*full* phabric URL needed).
> Submitted by:             If someone else sent in the change.
> Reviewed by:              If someone else reviewed your modification.
> Approved by:              If you needed approval for this commit.
> Obtained from:            If the change is from a third party.
> MFC after:                N [day[s]|week[s]|month[s]].  Request a reminder email.
> MFH:                      Ports tree branch name.  Request approval for merge.
> Relnotes:                 Set to 'yes' for mention in release notes.
> Security:                 Vulnerability reference (one per line) or description.
> Sponsored by:             If the change was sponsored by an organization.
> Empty fields above will be automatically removed.

_M   contrib/bmake
M    contrib/bmake/ChangeLog
M    contrib/bmake/Makefile
M    contrib/bmake/bmake.1
M    contrib/bmake/bmake.cat1
M    contrib/bmake/make.1
M    contrib/bmake/mk/ChangeLog
M    contrib/bmake/mk/dirdeps.mk
M    contrib/bmake/mk/gendirdeps.mk
M    contrib/bmake/mk/install-mk
M    contrib/bmake/mk/meta.stage.mk
M    contrib/bmake/mk/meta.sys.mk
M    contrib/bmake/mk/mkopt.sh
M    contrib/bmake/targ.c
M    usr.bin/bmake/Makefile

9 years agoAdd accessor functions for iterating over segments. A segment
marcel [Thu, 11 Jun 2015 03:02:40 +0000 (03:02 +0000)]
Add accessor functions for iterating over segments. A segment
can be in bus address space, physical memory space or virtual
memory space.