]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoFix the KASSERT and improve wording in r282426.
glebius [Wed, 6 May 2015 08:07:11 +0000 (08:07 +0000)]
Fix the KASSERT and improve wording in r282426.

Submitted by: alc

9 years agoFix panic when prepare_batch_buffer() returns error.
melifaro [Wed, 6 May 2015 07:53:43 +0000 (07:53 +0000)]
Fix panic when prepare_batch_buffer() returns error.

9 years agoDo a proper emulation of guest writes to MSR_EFER.
neel [Wed, 6 May 2015 05:40:20 +0000 (05:40 +0000)]
Do a proper emulation of guest writes to MSR_EFER.
- Must-Be-Zero bits cannot be set.
- EFER_LME and EFER_LMA should respect the long mode consistency checks.
- EFER_NXE, EFER_FFXSR, EFER_TCE can be set if allowed by CPUID capabilities.
- Flag an error if guest tries to set EFER_LMSLE since bhyve doesn't enforce
  segment limits in 64-bit mode.

MFC after: 2 weeks

9 years agoAdd macros for AMD-specific bits in MSR_EFER: LMSLE, FFXSR and TCE.
neel [Wed, 6 May 2015 05:12:29 +0000 (05:12 +0000)]
Add macros for AMD-specific bits in MSR_EFER: LMSLE, FFXSR and TCE.

AMDID_FFXSR is at bit 25 so correct its value to 0x02000000.

MFC after: 1 week

9 years agoFix DragonFly 4.0.5 release date.
osa [Wed, 6 May 2015 01:29:31 +0000 (01:29 +0000)]
Fix DragonFly 4.0.5 release date.

Reported by: vangyzen

9 years agoThis patch adds support for the extended baud rate register
ganbold [Wed, 6 May 2015 01:07:59 +0000 (01:07 +0000)]
This patch adds support for the extended baud rate register
available on the aml8726-m6 (and later) SoC which allows for
lower speeds.

Differential Revision: https://reviews.freebsd.org/D2433
Submitted by: John Wehle

9 years agoAdd the code necessary to run the imx6 chip at its lowest clock/power
ian [Tue, 5 May 2015 23:27:49 +0000 (23:27 +0000)]
Add the code necessary to run the imx6 chip at its lowest clock/power
operating point (396MHz/950mV).

9 years agoFix building BEAGLEBONE images with Crochet using the
gjb [Tue, 5 May 2015 21:08:50 +0000 (21:08 +0000)]
Fix building BEAGLEBONE images with Crochet using the
sysutils/u-boot-beaglebone port:

 - In arm/BEAGLEBONE.conf, set EMBEDDEDPORTS to the
   sysutils/u-boot-beaglebone port.
 - In arm/release.sh, remove BEAGLEBONE from setting WANT_UBOOT
 - In tools/arm/crochet-BEAGLEBONE.conf, override the
   beaglebone_check_uboot(), and set BEAGLEBONE_UBOOT to
   /tmp/external/u-boot-beaglebone, and create symlinks to the
   u-boot files in /usr/local/share/u-boot-beaglebone and the
   uEnv.txt file in crochet/board/Beaglebone/files.

Sponsored by: The FreeBSD Foundation

9 years agoAdd new USB ID.
hselasky [Tue, 5 May 2015 19:34:23 +0000 (19:34 +0000)]
Add new USB ID.

PR: 199843
MFC after: 1 week

9 years agoStart to reduce the diff between the Atmel kernel configs.
andrew [Tue, 5 May 2015 18:29:51 +0000 (18:29 +0000)]
Start to reduce the diff between the Atmel kernel configs.

9 years agoThe VIRT kernel config targets armv6.
andrew [Tue, 5 May 2015 18:04:47 +0000 (18:04 +0000)]
The VIRT kernel config targets armv6.

9 years agoMove the first batch of common armv6 options to std.armv6.
andrew [Tue, 5 May 2015 17:59:02 +0000 (17:59 +0000)]
Move the first batch of common armv6 options to std.armv6.

9 years agoRemove buildenv_setup(), and set EMBEDDEDPORTS to the
gjb [Tue, 5 May 2015 16:37:59 +0000 (16:37 +0000)]
Remove buildenv_setup(), and set EMBEDDEDPORTS to the
sysutils/u-boot-rpi2 port, since these cases are already
handled by arm/release.sh.

Sponsored by: The FreeBSD Foundation

9 years agoAdd initial support for building RPI2 images.
gjb [Tue, 5 May 2015 16:28:04 +0000 (16:28 +0000)]
Add initial support for building RPI2 images.

In release.sh, allow overriding buildenv_setup() before
the handoff to arm/release.sh.

Copy arm/RPI-B.conf -> arm/RPI2.conf, set UBOOT_PORT and
the correct KERNEL, and add the buildenv_setup() override
to install the sysutils/u-boot-rpi2 port/package.

Copy tools/arm/crochet-RPI-B.conf -> tools/arm/crochet-RPI2.conf,
and set the correct entries for the RaspberryPi2 board.

Thanks to: loos@
Sponsored by: The FreeBSD Foundation

9 years agoCreate std.arm and std.armv6 config files and include the right one from
ian [Tue, 5 May 2015 16:09:25 +0000 (16:09 +0000)]
Create std.arm and std.armv6 config files and include the right one from
each of the existing kernel configs.  This gives a place to put config
that applies to the entire arch.

Add the ARM_NEW_PMAP option to std.armv6.  This is working well in early
testing and it's time for wide exposure, but it's still nice to be able
to fall back to the old implementation for testing when a problem comes
along.  Eventually the option and the old implementation will go away.

The opportunity now exists to move a whole lot of boilerplate from all the
arm kernel config files into std.arm*, but that's a commit for another day.

9 years agoDocument r281617, wc(1) race when receiving SIGINFO fixed.
gjb [Tue, 5 May 2015 15:16:21 +0000 (15:16 +0000)]
Document r281617, wc(1) race when receiving SIGINFO fixed.

Sponsored by: The FreeBSD Foundation

9 years agoFix a FDP style nit. Wrap the lines as a result.
gjb [Tue, 5 May 2015 15:16:19 +0000 (15:16 +0000)]
Fix a FDP style nit.  Wrap the lines as a result.

Found with: textproc/igor
Sponsored by: The FreeBSD Foundation

9 years agoDocument r281802, support added for building FreeBSD/aarch64 virtual
gjb [Tue, 5 May 2015 15:16:17 +0000 (15:16 +0000)]
Document r281802, support added for building FreeBSD/aarch64 virtual
machine and memory stick images.

Sponsored by: The FreeBSD Foundation

9 years agoUpdate the svn revision marker.
gjb [Tue, 5 May 2015 15:16:15 +0000 (15:16 +0000)]
Update the svn revision marker.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r282434, openresolv updated to version 3.7.0.
gjb [Tue, 5 May 2015 15:16:12 +0000 (15:16 +0000)]
Document r282434, openresolv updated to version 3.7.0.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r282274, xen(4) PV domU kernel support removed.
gjb [Tue, 5 May 2015 15:16:10 +0000 (15:16 +0000)]
Document r282274, xen(4) PV domU kernel support removed.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r282213, kern.racct.enable tunable and RACCT_DISABLED
gjb [Tue, 5 May 2015 15:16:08 +0000 (15:16 +0000)]
Document r282213, kern.racct.enable tunable and RACCT_DISABLED
kernel configuration option.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r282212, several improvements/updates to the HyperV drivers.
gjb [Tue, 5 May 2015 15:16:05 +0000 (15:16 +0000)]
Document r282212, several improvements/updates to the HyperV drivers.

Add Microsoft OSTC to sponsors.ent.

Sponsored by: The FreeBSD Foundation

9 years agoDocument r282208, chmod(1), chflags(1), chgrp(1), and chown(8) now
gjb [Tue, 5 May 2015 15:16:02 +0000 (15:16 +0000)]
Document r282208, chmod(1), chflags(1), chgrp(1), and chown(8) now
affect symbolic links when '-R' is used.

Add Multiplay to sponsors.ent.

Sponsored by: The FreeBSD Foundation

9 years agoFix a typo.
gjb [Tue, 5 May 2015 15:16:00 +0000 (15:16 +0000)]
Fix a typo.

Sponsored by: The FreeBSD Foundation

9 years agoTweak seekdir, telldir and readdir so that when htere are deletes going on,
julian [Tue, 5 May 2015 14:52:33 +0000 (14:52 +0000)]
Tweak seekdir, telldir and readdir so that when htere are deletes going on,
as seek to teh last location saved will still work. This is needed for Samba
to be able to correctly handle delete requests from windows. This does not
completely fix seekdir when deletes are present but fixes the worst of the
problems. The real solution must involve some changes to the API for eh VFS
and getdirentries(2).

Obtained from: Panzura inc
MFC after: 1 week

9 years agoAdd DEV_ACPI to opt_acpi.h to be used to detect when ACPI is enabled in
andrew [Tue, 5 May 2015 14:19:22 +0000 (14:19 +0000)]
Add DEV_ACPI to opt_acpi.h to be used to detect when ACPI is enabled in
the kernel.

9 years agoUpdate the comment on what CPUs this driver supports.
andrew [Tue, 5 May 2015 14:17:15 +0000 (14:17 +0000)]
Update the comment on what CPUs this driver supports.

9 years agocp: Remove fts sorting.
jilles [Tue, 5 May 2015 13:23:03 +0000 (13:23 +0000)]
cp: Remove fts sorting.

In an attempt to improve performance, cp reordered directories first
(although the comment says directories last). This is not effective with new
UFS layout policies.

The sorting reorders multiple arguments passed to cp, which may be
undesirable.

Additionally, the comparison function does not induce a total order. Per
POSIX, this causes undefined behaviour in qsort().

NetBSD removed the sorting in 2009.

On filesystems that return directory entries in hash/btree order, sorting by
d_fileno before statting improves performance on large directories. However,
this can only be implemented in fts(3).

PR: 53475
Reviewed by: bde (in 2004)
MFC after: 1 week

9 years agoAdd "The Design and Implementation of the FreeBSD OS, 2nd Ed.".
osa [Tue, 5 May 2015 11:39:54 +0000 (11:39 +0000)]
Add "The Design and Implementation of the FreeBSD OS, 2nd Ed.".

9 years agoMove the point we attach the ofw driver on arm64 to nexus.c. This will
andrew [Tue, 5 May 2015 11:13:16 +0000 (11:13 +0000)]
Move the point we attach the ofw driver on arm64 to nexus.c. This will
allow us to have a single place to decide to use ofw or acpi.

9 years agoDocument DragonFly releases 4.0.2 - 4.0.5 and OpenBSD 5.7.
osa [Tue, 5 May 2015 11:12:20 +0000 (11:12 +0000)]
Document DragonFly releases 4.0.2 - 4.0.5 and OpenBSD 5.7.
Fix typo for NetBSD 6.1.5.

9 years agoAdd FDT to the list of known GUIDs.
andrew [Tue, 5 May 2015 11:07:43 +0000 (11:07 +0000)]
Add FDT to the list of known GUIDs.

9 years agozfs: do not hold an extra reference on a root vnode while a filesystem is mounted
avg [Tue, 5 May 2015 11:01:06 +0000 (11:01 +0000)]
zfs: do not hold an extra reference on a root vnode while a filesystem is mounted

At present zfs_domount() acquires a reference on the filesystem's root vnode
and that reference is kept until zfs_umount.
The latter calls vflush(rootrefs = 1) to dispose of the extra reference.

There is no explanation of why that reference is kept - what problem it
solves or what behavior it improves.
Also, that logic is FreeBSD specific.

There is one real problem with that reference, though.
zfs recv -F may receive a full, non-incremental stream to a mounted filesystem.
In that case the received root object is likely to have a different z_gen
attribute value. Because of that, zfs_rezget will leave the previous root znode
and vnode disassociated from the actual object (z_sa_hdl == NULL).
Thus, future calls to VFS_ROOT() -> zfs_root() will produce a new vnode-znode
pair, while the old one will be kept alive by the outstanding reference.
So, the outstanding reference will not actually be for the new root vnode
(or, more precisely, vnodes - because a root vnode may be recycled and a newer
one can be created).
As a result, when vflush(rootrefs = 1) s called there will be two problems:

- a leaked reference on the old root vnode preventing a graceful unmount
- insufficient references on the actual root vnode leading to a crash upon
  access to the vnode after it is destroyed by vgone() + vdrop()

The second issue will actually override the first one.

Differential Revision: https://reviews.freebsd.org/D2353
Reviewed by: delphij, kib, smh
MFC after: 17 days

9 years agoDisable the use of floating-point and vector registers in the loader. They
andrew [Tue, 5 May 2015 11:00:50 +0000 (11:00 +0000)]
Disable the use of floating-point and vector registers in the loader. They
need the vfp unit to be enabled which may not be the case.

9 years agodmu_recv_end_check: don't leak hold if dsl_destroy_snapshot_check_impl fails
avg [Tue, 5 May 2015 10:56:16 +0000 (10:56 +0000)]
dmu_recv_end_check: don't leak hold if dsl_destroy_snapshot_check_impl fails

The leak may happen if !drc_newfs && drc_force and there is an error
iterating through snapshots or any of snapshot checks fails.

See https://www.illumos.org/issues/5870
See https://reviews.csiden.org/r/206/

Reviewed by: mahrens (as mahrens@delphix.com)
MFC after: 15 days
Sponsored by: ClusterHQ

9 years agoFix major copy/paste and other style errors.
pluknet [Tue, 5 May 2015 10:44:17 +0000 (10:44 +0000)]
Fix major copy/paste and other style errors.

9 years agoCopy new attribute types when linking. bfd will copy attributes as needed,
andrew [Tue, 5 May 2015 10:35:29 +0000 (10:35 +0000)]
Copy new attribute types when linking. bfd will copy attributes as needed,
however it will fail to output them if the type is not set correctly. This
can happen when it finds an attribute it hasn't seen before, for example
when building shared objects it will use the attributes from crti.o, hwever
this file has no attributes set.

Differential Revision: https://reviews.freebsd.org/D2413
Reviewed by: imp

9 years agoWhen cross-building ${LIBSTAND} may be set to the host copy. Point to the
andrew [Tue, 5 May 2015 10:32:59 +0000 (10:32 +0000)]
When cross-building ${LIBSTAND} may be set to the host copy. Point to the
version built with the toolchain.

Differential Revision: https://reviews.freebsd.org/D2312
Submitted by: jhb

9 years agoAdd support for Sierra MC7354 card
garga [Tue, 5 May 2015 10:19:43 +0000 (10:19 +0000)]
Add support for Sierra MC7354 card

Author: Jeremy Porter <jporter@netgate.com>
Differential Revision: https://reviews.freebsd.org/D2444
Reviewed by: gnn, hselasky
MFC after: 1 week
Sponsored by: Netgate

9 years agoEnlarge the buffer for storing macros as some macros can be longer than 5
bapt [Tue, 5 May 2015 09:54:47 +0000 (09:54 +0000)]
Enlarge the buffer for storing macros as some macros can be longer than 5

9 years agoUpdate the list of known roff commands (adding the mdoc package)
bapt [Tue, 5 May 2015 09:50:21 +0000 (09:50 +0000)]
Update the list of known roff commands (adding the mdoc package)

Obtained from: NetBSD

9 years agoProperly assign open and close brackets and checks memory
bapt [Tue, 5 May 2015 09:33:32 +0000 (09:33 +0000)]
Properly assign open and close brackets and checks memory

Obtained from: NetBSD

9 years agoAdd apple-boot, apple-hfs and apple-ufs aliases to MBR scheme.
ae [Tue, 5 May 2015 09:33:02 +0000 (09:33 +0000)]
Add apple-boot, apple-hfs and apple-ufs aliases to MBR scheme.
Sort DOSPTYP_* entries in diskmbr.h by value.
Document these scheme-specific types in gpart(8).

MFC after: 1 week

9 years agoEnsure we read existing values of the stk table
bapt [Tue, 5 May 2015 09:29:32 +0000 (09:29 +0000)]
Ensure we read existing values of the stk table

Obtained from: NetBSD

9 years agoUse stdup(3) and check its return instead from homebrew version using strcpy(3)
bapt [Tue, 5 May 2015 09:26:32 +0000 (09:26 +0000)]
Use stdup(3) and check its return instead from homebrew version using strcpy(3)
and malloc(3)

Obtained from: NetBSD

9 years agocosmetic fixes
bapt [Tue, 5 May 2015 09:24:29 +0000 (09:24 +0000)]
cosmetic fixes

Obtained from: NetBSD

9 years agoApply seom style(9) fixes from NetBSD
bapt [Tue, 5 May 2015 09:01:42 +0000 (09:01 +0000)]
Apply seom style(9) fixes from NetBSD

Obtained from: NetBSD

9 years agoPrevent useless use of strdup(3)
bapt [Tue, 5 May 2015 08:25:25 +0000 (08:25 +0000)]
Prevent useless use of strdup(3)

Obtained from: NetBSD

9 years agoReplace homebrewed NIL by NULL
bapt [Tue, 5 May 2015 08:17:40 +0000 (08:17 +0000)]
Replace homebrewed NIL by NULL

9 years agoUse stdbool instead of homebrewed boolean
bapt [Tue, 5 May 2015 08:15:10 +0000 (08:15 +0000)]
Use stdbool instead of homebrewed boolean

9 years agoAnother function to ansify
bapt [Tue, 5 May 2015 07:52:41 +0000 (07:52 +0000)]
Another function to ansify

9 years agoRemove unused variables
bapt [Tue, 5 May 2015 07:51:57 +0000 (07:51 +0000)]
Remove unused variables

9 years agoExplicitly use O_RDONLY instead of 0
bapt [Tue, 5 May 2015 07:49:46 +0000 (07:49 +0000)]
Explicitly use O_RDONLY instead of 0

9 years agoUse strlcpy(3) instead of strcpy(3)
bapt [Tue, 5 May 2015 07:47:36 +0000 (07:47 +0000)]
Use strlcpy(3) instead of strcpy(3)

9 years agoupper the warning level to 3
bapt [Tue, 5 May 2015 07:42:40 +0000 (07:42 +0000)]
upper the warning level to 3

9 years agoAnother bit of ansification
bapt [Tue, 5 May 2015 07:42:10 +0000 (07:42 +0000)]
Another bit of ansification

9 years agoAnsify to allow to work on it later
bapt [Tue, 5 May 2015 07:33:38 +0000 (07:33 +0000)]
Ansify to allow to work on it later

9 years agoFix an error in r281551, part of the getfsstat() / kern_getfsstat()
peter [Tue, 5 May 2015 05:14:12 +0000 (05:14 +0000)]
Fix an error in r281551, part of the getfsstat() / kern_getfsstat()
rework.  The number of entries was supposed to be returned to the user,
not used as a scratch variable.

This broke RELENG_4 jails starting up on current systems.

9 years agoAdd some data found in TI's application note "SCPA035: PCI1510
imp [Tue, 5 May 2015 04:23:55 +0000 (04:23 +0000)]
Add some data found in TI's application note "SCPA035: PCI1510
Implementation Guide" about default values.

9 years agoWhen dealing with the TI12XX family of parts, we sometimes need to
imp [Tue, 5 May 2015 04:13:48 +0000 (04:13 +0000)]
When dealing with the TI12XX family of parts, we sometimes need to
initialize the MFUNC registers. Our old test of assuming that if this
register is set at all is not quite right. Many scenarios (including
the power-on defaults for chips w/o EEPROMs) land us in trouble. The
MFUNC0 pin should be set to signal #INTA and the MFUNC1 pin should be
set to signal #INTB of multi-socketed devices. Since my memory recalls
issues with blindly clearing the upper bytes of this register, perform
the heuristic only when both MFUNC0 and 1 are clear. We won't work
well using these pins for GPIO, and the serial interrupts won't save
us because we go out of our way to generally disable them. They are
needed to support legacy drivers for 16-bit PC Cards that are
hard-wired to specific IRQ values. Since FreeBSD never had any of
these, we configure the more reliable direct signaling. This was just
one small piece of that which had been left out back in the day.

9 years agoAdd a sanity check to the swap size in zfsboot of bsdinstall
allanjude [Tue, 5 May 2015 03:08:49 +0000 (03:08 +0000)]
Add a sanity check to the swap size in zfsboot of bsdinstall
Loop until the user enters a valid size (>100mb or 0)

Differential Revision: https://reviews.freebsd.org/D2299
Reported By: Shawn Webb
Reviewed by: roberto
Approved by: brd
MFC after: 2 weeks
Sponsored by: ScaleEngine Inc.

9 years agoNow that DMA works, enable the audio driver on RPi 2.
loos [Tue, 5 May 2015 01:45:38 +0000 (01:45 +0000)]
Now that DMA works, enable the audio driver on RPi 2.

9 years agoEnable DMA for sdhci on RPi 2 (BCM2836).
loos [Tue, 5 May 2015 00:27:55 +0000 (00:27 +0000)]
Enable DMA for sdhci on RPi 2 (BCM2836).

9 years agoFix DMA on RPi 2.
loos [Tue, 5 May 2015 00:19:04 +0000 (00:19 +0000)]
Fix DMA on RPi 2.

BCM2836 has a different base address for peripherals.

Obtained from: netbsd

9 years agoRemove limitation on input lines by using getline(3)
bapt [Mon, 4 May 2015 22:27:55 +0000 (22:27 +0000)]
Remove limitation on input lines by using getline(3)

9 years agoExtend the list of known nroff/troff commands
bapt [Mon, 4 May 2015 22:18:58 +0000 (22:18 +0000)]
Extend the list of known nroff/troff commands

Obtained from: heirloom doctools

9 years agoTake from heirloom's doctools version of checknr(1) some cosmetic fixes
bapt [Mon, 4 May 2015 22:05:12 +0000 (22:05 +0000)]
Take from heirloom's doctools version of checknr(1) some cosmetic fixes
This helps working on synchronising both tools

9 years agoRemove "capability mode sandbox enabled" messages.
brooks [Mon, 4 May 2015 21:44:51 +0000 (21:44 +0000)]
Remove "capability mode sandbox enabled" messages.

These messages serve little purpose and break some consumers.

PR: 199855
Differential Revision: https://reviews.freebsd.org/D2440
Reviewed by: rwatson
Approved by: pjd
MFC after: 1 week
Sponsored by: DARPA, AFRL

9 years agoRemove a debugging line that snuck in with r282419.
gjb [Mon, 4 May 2015 21:34:19 +0000 (21:34 +0000)]
Remove a debugging line that snuck in with r282419.

Pointyhat: gjb
MFC after: 3 days
X-MFC-With: r282419
Sponsored by: The FreeBSD Foundation

9 years agoMFV r225523, r282431:
gjb [Mon, 4 May 2015 21:07:20 +0000 (21:07 +0000)]
MFV r225523, r282431:
 r225523 (hrs):
  Import openresolv-3.4.4.

 r282431:
  Import openresolv-3.7.0.

PR: 199854
Submitted by: yuri@rawbw.com
MFC after: 1 week
Relnotes: yes
Sponsored by: The FreeBSD Foundation

9 years agoIn preparation for the next cycle of official ARM images, add ARM_NEW_PMAP
loos [Mon, 4 May 2015 20:59:23 +0000 (20:59 +0000)]
In preparation for the next cycle of official ARM images, add ARM_NEW_PMAP
to supported kernels.

This is a temporary solution and should be reverted when ARM_NEW_PMAP is
enabled by default.

9 years agoImport openresolv 3.7.0.
gjb [Mon, 4 May 2015 20:51:27 +0000 (20:51 +0000)]
Import openresolv 3.7.0.

PR: 199854
Obtained from: http://roy.marples.name/projects/openresolv
Sponsored by: The FreeBSD Foundation

9 years agoImplement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100)
jhibbits [Mon, 4 May 2015 20:36:00 +0000 (20:36 +0000)]
Implement a driver for the PowerPC-base RouterBoard (RB333/600/800/1100)

Summary:
This has been tested on the RB800, but should work on the RB333, RB600, and
RB1100 as well.

It's currently missing ECC support, but read and write are complete.

Reviewers: imp

Reviewed By: imp

Subscribers: imp

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

9 years agoImplement in-order execution of non-NCQ commands.
mav [Mon, 4 May 2015 19:55:01 +0000 (19:55 +0000)]
Implement in-order execution of non-NCQ commands.

Using status updates in r282364, block queue on BSY, DRQ or ERR bits set.
This can be a performance penalization for non-NCQ commands, but it is
required for proper error recovery and standard compliance.

MFC after: 2 weeks

9 years agoFix arithmetical bug in vnode_pager_haspage(). The check against object size
glebius [Mon, 4 May 2015 18:49:25 +0000 (18:49 +0000)]
Fix arithmetical bug in vnode_pager_haspage().  The check against object size
should be done not with the number of pages in the first block, but with the
overall number of pages.  While here, add KASSERT that makes sure that BMAP
doesn't return completely irrelevant blocks.

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

9 years agoParse filename until first space then print the rest of the line after file
bapt [Mon, 4 May 2015 18:20:31 +0000 (18:20 +0000)]
Parse filename until first space then print the rest of the line after file
inclusion

This is the same behaviour of heirloom's soelim

9 years agoImplement a mechanism for making changes in the kernel<->driver PPS
ian [Mon, 4 May 2015 17:59:39 +0000 (17:59 +0000)]
Implement a mechanism for making changes in the kernel<->driver PPS
interface without breaking ABI or API compatibility with existing drivers.

The existing data structures used to communicate between the kernel and
driver portions of PPS processing contain no spare/padding fields and no
flags field or other straightforward mechanism for communicating changes
in the structures or behaviors of the code.  This makes it difficult to
MFC new features added to the PPS facility.  ABI compatibility is
important; out-of-tree drivers in module form are known to exist.  (Note
that the existing api_version field in the pps_params structure must
contain the value mandated by RFC 2783 and any RFCs that come along after.)

These changes introduce a pair of abi-version fields which are filled in
by the driver and the kernel respectively to indicate the interface
version.  The driver sets its version field before calling the new
pps_init_abi() function.  That lets the kernel know how much of the
pps_state structure is understood by the driver and it can avoid using
newer fields at the end of the structure that it knows about if the driver
is a lower version.  The kernel fills in its version field during the init
call, letting the driver know what features and data the kernel supports.

To implement the new version information in a way that is backwards
compatible with code from before these changes, the high bit of the
lightly-used 'kcmode' field is repurposed as a flag bit that indicates the
driver is aware of the abi versioning scheme.  Basically if this bit is
clear that indicates a "version 0" driver and if it is set the driver_abi
field indicates the version.

These changes also move the recently-added 'mtx' field of pps_state from
the middle to the end of the structure, and make the kernel code that uses
this field conditional on the driver being abi version 1 or higher.  It
changes the only driver currently supplying the mtx field, usb_serial, to
use pps_init_abi().

Reviewed by: hselasky@

9 years agoDo not remove libmap32.conf in make delete-old as it may remove user modified
bapt [Mon, 4 May 2015 17:01:51 +0000 (17:01 +0000)]
Do not remove libmap32.conf in make delete-old as it may remove user modified
version by mistake

9 years agoStyle fix
bapt [Mon, 4 May 2015 16:59:09 +0000 (16:59 +0000)]
Style fix

Reported by: bdrewery

9 years agoRemove now unneeded libmap32.conf
bapt [Mon, 4 May 2015 16:34:08 +0000 (16:34 +0000)]
Remove now unneeded libmap32.conf

9 years agoRework PRIVATELIB
bapt [Mon, 4 May 2015 16:28:54 +0000 (16:28 +0000)]
Rework PRIVATELIB

Now when a lib is marked as PRIVATELIB it is renamed into libprivate$foo instead
of being installed in /usr/lib/private and playing with rpath.

Also allow to install headers for PRIVATELIBS in that case the headers will be
installed in /usr/include/private/$foo

Keep the headers under a private namespace to prevent third party build system
to easily find them to ensure they are only used on purpose.

This allows for non base applications to statically link against a library in
base which is linked to a privatelib

Treating PRIVATELIBS as regular libraries allows to push them into our current
compatX packages if needed.

While here finish promotion of libevent as PRIVATELIB
Install header for bsdstat and libucl

Differential Revision: https://reviews.freebsd.org/D2365
Reviewed by: brooks, des
Discussed with: imp

9 years agoAdd logic to detect if the net/bsdec2-image-upload port needs
gjb [Mon, 4 May 2015 15:04:39 +0000 (15:04 +0000)]
Add logic to detect if the net/bsdec2-image-upload port needs
to be installed. [1]

For the cw-ec2-portinstall and ec2ami targets, touch the
.TARGET file after completion to prevent duplicate invocations.

Add cw-ec2-portinstall and ec2ami to CLEANFILES.

Submitted by: cperciva[1]
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoOn an icache sync by address/len, round the length up if the operation spans
ian [Mon, 4 May 2015 14:55:21 +0000 (14:55 +0000)]
On an icache sync by address/len, round the length up if the operation spans
a cacheline boundary.

PR: 199740
Submitted by: Juergen Weiss <weiss@uni-mainz.de>

9 years agoVarious updates to the ftruncate(2) documentation:
jhb [Mon, 4 May 2015 14:47:00 +0000 (14:47 +0000)]
Various updates to the ftruncate(2) documentation:
- Note that ftruncate(2) can operate on shared memory objects and cross
  reference shm_open(2).
- Note that ftruncate(2) does not change the file position pointer (aka
  seek pointer) of the file descriptor.
- ftruncate(2) will fail with EINVAL for all sorts of other fd types than
  just sockets, so instead note that it fails for all but regular files and
  shared memory objects.
- Note that ftruncate(2) also appeared in 4.2BSD along with truncate(2).
  (Or at least the manpage for both appeared in 4.2, I did not check the
  kernel code itself to see if either predated 4.2.)

PR: 199472 (2)
Submitted by: andrew@ugh.net.au (2)
MFC after: 1 week

9 years agoPartially revert r255486, the first argument to socketpair() is a socket
jhb [Mon, 4 May 2015 14:23:31 +0000 (14:23 +0000)]
Partially revert r255486, the first argument to socketpair() is a socket
domain, not a file descriptor.  Use 'domain' instead of the original 'd'
for this argument to match socket(2).

PR: 199491
Reported by: sp55aa@qq.com
MFC after: 1 week

9 years agoRestore CPU dependent compile time conditionals.
cy [Mon, 4 May 2015 12:42:52 +0000 (12:42 +0000)]
Restore CPU dependent compile time conditionals.

MFC after: 1 month (with r281143 and r282408)

9 years agoMFV ntp 4.2.8p2 (r281348)
cy [Mon, 4 May 2015 04:45:59 +0000 (04:45 +0000)]
MFV ntp 4.2.8p2 (r281348)

Reviewed by:    delphij (suggested MFC)
Approved by: roberto
Security:       CVE-2015-1798, CVE-2015-1799
Security:       VuXML ebd84c96-dd7e-11e4-854e-3c970e169bc2
MFC after: 1 month

9 years agoEmulate the 'CMP r/m8, imm8' instruction encountered when booting a Windows
neel [Mon, 4 May 2015 04:27:23 +0000 (04:27 +0000)]
Emulate the 'CMP r/m8, imm8' instruction encountered when booting a Windows
Vista guest.

Reported by: Leon Dang (ldang@nahannisys.com)
MFC after: 1 week

9 years agoFix string concatenation - "wlan_##name" -> "wlan_" #name
adrian [Mon, 4 May 2015 00:47:22 +0000 (00:47 +0000)]
Fix string concatenation - "wlan_##name" -> "wlan_" #name

PR: kern/197623
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoUse bssid validation for data frames only + add RUN -> RUN state transition
adrian [Mon, 4 May 2015 00:32:10 +0000 (00:32 +0000)]
Use bssid validation for data frames only + add RUN -> RUN state transition

However, IBSS merge will be performed only if a driver calls
ieee80211_ibss_merge(); so, this applicable to the ath(4) only.
Also, this should fix bug 167870.

PR: kern/199632
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoAdd node_clear_keyixmap() and use it in the ieee80211_free_node() / node_reclaim().
adrian [Mon, 4 May 2015 00:29:19 +0000 (00:29 +0000)]
Add node_clear_keyixmap() and use it in the ieee80211_free_node() / node_reclaim().

PR: kern/199672
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix the voltage and clock levels for cpufreq on RPi 2.
loos [Mon, 4 May 2015 00:01:35 +0000 (00:01 +0000)]
Fix the voltage and clock levels for cpufreq on RPi 2.

Submitted by: Daisuke Aoyama <aoyama@peach.ne.jp>

9 years ago[iwn] Do not filter control frames in monitor mode.
adrian [Sun, 3 May 2015 23:40:12 +0000 (23:40 +0000)]
[iwn] Do not filter control frames in monitor mode.

PR: kern/197143
Submitted by:  Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoHandle properly IBSS merges (works with patch from bug 199632).
adrian [Sun, 3 May 2015 23:39:44 +0000 (23:39 +0000)]
Handle properly IBSS merges (works with patch from bug 199632).

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix various powersave races + optimize tx/rx pointer update when powersave is off.
adrian [Sun, 3 May 2015 23:39:02 +0000 (23:39 +0000)]
Fix various powersave races + optimize tx/rx pointer update when powersave is off.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years ago[iwn?] Use correct sequence numbers with non-QoS STAs.
adrian [Sun, 3 May 2015 23:38:32 +0000 (23:38 +0000)]
[iwn?] Use correct sequence numbers with non-QoS STAs.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoFix warning about comparison of integers of different signs.
adrian [Sun, 3 May 2015 23:37:13 +0000 (23:37 +0000)]
Fix warning about comparison of integers of different signs.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>

9 years ago[iwn?] Fix memory leak in wpi_reset_tx_ring().
adrian [Sun, 3 May 2015 23:36:25 +0000 (23:36 +0000)]
[iwn?] Fix memory leak in wpi_reset_tx_ring().

PR: kern/197143
Differential Revision: Andriy Voskoboinyk <s3erios@gmail.com>

9 years agoUse nitems() for counting elements in arrays.
adrian [Sun, 3 May 2015 23:35:44 +0000 (23:35 +0000)]
Use nitems() for counting elements in arrays.

PR: kern/197143
Submitted by: Andriy Voskoboinyk <s3erios@gmail.com>