]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoFix my stupid restoral of old code.. must be c_iflags now.
rrs [Tue, 14 Apr 2015 00:02:39 +0000 (00:02 +0000)]
Fix my stupid restoral of old code.. must be  c_iflags now.

Thanks jhb for catching my stupidity...
MFC after: 3 days

9 years agoRestore the two lines accidentally deleted that allow CALLOUT_DIRECT to be
rrs [Mon, 13 Apr 2015 23:06:13 +0000 (23:06 +0000)]
Restore the two lines accidentally deleted that allow CALLOUT_DIRECT to be
specifed in the flags.

Thanks Mark Johnston for noticing this ;-o

MFC after: 3 days

9 years agoRevert r281055 as it breaks installing test scripts in the mixed PROGS/SCRIPT
ngie [Mon, 13 Apr 2015 21:29:40 +0000 (21:29 +0000)]
Revert r281055 as it breaks installing test scripts in the mixed PROGS/SCRIPT
case

Repro is as follows:

% sudo pkg install -y kyua
% sudo rm -Rf /usr/tests
% sudo make hier
% (cd lib/libthr/tests/; make obj; make depend; make all; sudo make install)
% (cd /usr/tests/lib/libthr; kyua list)

Failure seen in Jenkins build starting here:
https://jenkins.freebsd.org/job/FreeBSD_HEAD-tests2/927/

Pointyhat to: bapt

9 years agoSync with OpenBSD: Use volatile instead of __volatile__.
delphij [Mon, 13 Apr 2015 20:23:46 +0000 (20:23 +0000)]
Sync with OpenBSD: Use volatile instead of __volatile__.

MFC after: 2 weeks

9 years agoipcs: fix warnings (WARNS=1 -> WARNS=6)
eadler [Mon, 13 Apr 2015 19:58:11 +0000 (19:58 +0000)]
ipcs: fix warnings (WARNS=1 -> WARNS=6)
- fix shadow warnings
- change type from off_t to size_t which is more correct and avoids
  signed/unsigned compare
- use new initializer format to avoid "missing values" warning

Reviewed by: jhb

9 years agoSync with NetBSD:
delphij [Mon, 13 Apr 2015 19:46:30 +0000 (19:46 +0000)]
Sync with NetBSD:

 - Mention xz(1) in gzip(1).
 - Strip away path from header name when decompressing.

MFC after: 2 weeks

9 years agoModify the return value of the uhci/ehci/xhci PCI probe routines to
neel [Mon, 13 Apr 2015 19:13:51 +0000 (19:13 +0000)]
Modify the return value of the uhci/ehci/xhci PCI probe routines to
'BUS_PROBE_DEFAULT'. This allows bhyve's 'ppt' driver to claim ownership
of the device and pass it through to the guest.

In the common case where there are no competing drivers for USB controllers
this change is a no-op.

Reviewed by: hselasky
MFC after: 2 weeks

9 years agoAdd psci for arm64. This is currently used when rebooting and powering off
andrew [Mon, 13 Apr 2015 16:41:33 +0000 (16:41 +0000)]
Add psci for arm64. This is currently used when rebooting and powering off
in qemu.

Sponsored by: The FreeBSD Foundation

9 years agoCreate the correct symlinks for the machine directory, and only create the
andrew [Mon, 13 Apr 2015 16:00:09 +0000 (16:00 +0000)]
Create the correct symlinks for the machine directory, and only create the
x86 symlink on i386 and amd64. Before this incorrect symlinks were being
created on armi and i386.

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

9 years agoAdd config option PAE_TABLES for the i386 kernel. It switches pmap to
kib [Mon, 13 Apr 2015 15:22:45 +0000 (15:22 +0000)]
Add config option PAE_TABLES for the i386 kernel.  It switches pmap to
use PAE format for the page tables, but does not incur other
consequences of the full PAE config.  In particular, vm_paddr_t and
bus_addr_t are left 32bit, and max supported memory is still limited
by 4GB.

The option allows to have nx permissions for memory mappings on i386
kernel, while keeping the usual i386 KBI and avoiding the kernel data
sizing problems typical for the PAE config.

Intel documented that the PAE format for page tables is available
starting with the Pentium Pro, but it is possible that the plain
Pentium CPUs have the required support (Appendix H).  The goal is to
enable the option and non-exec mappings on i386 for the GENERIC
kernel.  Anybody wanting a useful system on 486, have to reconfigure
the modern i386 kernel anyway.

Discussed with: alc, jhb
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoBring in the start of the arm64 kernel.
andrew [Mon, 13 Apr 2015 14:43:10 +0000 (14:43 +0000)]
Bring in the start of the arm64 kernel.

This is only the minimum set of files needed to boot in qemu. As such it is
missing a few things.

The bus_dma code is currently only stub functions with a full implementation
from the development tree to follow.

The gic driver has been copied as the interrupt framework is different. It
is expected the two drivers will be merged by the arm intrng project,
however this will need to be imported into the tree and support for arm64
would need to be added.

This includes code developed by myself, SemiHalf, Ed Maste, and Robin
Randhawa from ARM. This has been funded by the FreeBSD Foundation, with
early development by myself in my spare time with assistance from Robin.

Differential Revision: https://reviews.freebsd.org/D2199
Reviewed by: emaste, imp
Relnotes: yes
Sponsored by: The FreeBSD Foundation

9 years agoUpdate the arm devmap code to also work with arm64.
andrew [Mon, 13 Apr 2015 13:21:27 +0000 (13:21 +0000)]
Update the arm devmap code to also work with arm64.

There are a few differences between the two. On arm we need to provide a
list of addresses we may be mapping before we have initialised the virtual
memory subsystem, however on arm64 we allocate a small (2MiB for a 4k
granule) range to be used for such purposes.

Differential Revision: https://reviews.freebsd.org/D2249
Sponsored by: The FreeBSD Foundation

9 years agoFix a possible refcount leak in regen_tmpaddr().
markj [Mon, 13 Apr 2015 01:55:42 +0000 (01:55 +0000)]
Fix a possible refcount leak in regen_tmpaddr().

public_ifa6 may be set to NULL after taking a reference to a previous
address list element. Instead, only take the reference after leaving the
loop but before releasing the address list lock.

Differential Revision: https://reviews.freebsd.org/D2253
Reviewed by: ae
MFC after: 2 weeks

9 years agoREADME:
eadler [Sun, 12 Apr 2015 23:43:41 +0000 (23:43 +0000)]
README:
- the reference to 'ancient' LINT file was added in 2000 [r64047 | alex
  | 2000-07-31].   Remove the reference entirely now.
- add the tests directory

9 years agoFix build on i386.
jkim [Sun, 12 Apr 2015 22:40:27 +0000 (22:40 +0000)]
Fix build on i386.

Reported by: bz

9 years agoRemove obsolete bits about maximum number of file systems.
pluknet [Sun, 12 Apr 2015 21:14:58 +0000 (21:14 +0000)]
Remove obsolete bits about maximum number of file systems.
NMOUNT has gone together with static mount table in 4.3BSD-Reno.

MFC after: 1 week

9 years agoAdd definition for the gcc gnu_inline attribute.
pfg [Sun, 12 Apr 2015 16:43:55 +0000 (16:43 +0000)]
Add definition for the gcc gnu_inline attribute.

This uses a non-standard (who would guess that) inlining method
that is useful for legacy GNU software. This attribute was added
in GCC 4.1.3. Older versions of clang would just ignore the
attribute but as lately it is supported also there.

This is currently unused but it is required for the
FORTIFY_SOURCE extension.

9 years agoAccept LE event on hccontrol socket.
takawata [Sun, 12 Apr 2015 15:08:41 +0000 (15:08 +0000)]
Accept LE event on hccontrol socket.

9 years agoAdd HCI/LMP revision information.
takawata [Sun, 12 Apr 2015 14:38:18 +0000 (14:38 +0000)]
Add HCI/LMP revision information.

9 years agoAdd a driver for the ARM Power State Coordination Interface (PSCI). This
andrew [Sun, 12 Apr 2015 13:00:58 +0000 (13:00 +0000)]
Add a driver for the ARM Power State Coordination Interface (PSCI). This
handles versions 0.1 and 0.2 of the standard on 32-bit ARM.

With this driver we can shutdown in QEMU. Further work is needed to
turn secondary cores on on boot and to support later revisions of the
specification.

Submitted by: Robin Randhawa <Robin.Randhawa at ARM.com>
Sponsored by: The FreeBSD Foundation

9 years agoFix a very minor typo.
markm [Sun, 12 Apr 2015 11:23:59 +0000 (11:23 +0000)]
Fix a very minor typo.

9 years agoDefine capabilities bits from the revision 007 of the document 302223
kib [Sun, 12 Apr 2015 10:28:15 +0000 (10:28 +0000)]
Define capabilities bits from the revision 007 of the document 302223
"Intelб╝ Processor Vendor-Specific ACPI Interface Specification",
issied Dec 2014.  Previous revision 005 was from Sep 2006.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoAdd libxo(3) support to iscsictl(8).
trasz [Sun, 12 Apr 2015 09:36:50 +0000 (09:36 +0000)]
Add libxo(3) support to iscsictl(8).

PR: 198396
Submitted by: Marie Helene Kvello-Aune <marieheleneka at gmail.com>
MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoSwitch to the new v6 pmap code to increase its testing. It will now be
andrew [Sun, 12 Apr 2015 08:10:18 +0000 (08:10 +0000)]
Switch to the new v6 pmap code to increase its testing. It will now be
built as part of universe.

9 years agoRework r281162. Indeed, the flexible array member is preferable here.
dchagin [Sun, 12 Apr 2015 06:21:58 +0000 (06:21 +0000)]
Rework r281162. Indeed, the flexible array member is preferable here.

Suggested by:   Justin T. Gibbs

MFC after: 3 days

9 years agoStart enabling the available GPIO pins on the Carambola 2.
adrian [Sun, 12 Apr 2015 00:02:32 +0000 (00:02 +0000)]
Start enabling the available GPIO pins on the Carambola 2.

The carambola2 exposes all the gpio pins, but some are reserved for
core functions (eg usb, ethernet, etc.) Others are configured by default
to be available as normal GPIO pins to do interesting things with.

GPIO 18->23 is the I2S, SLIC and SPDIF device pins, but none of those
are currently used.  So, just allow those to show up.

Tested:

* AR9344, Carambola 2
* (.. bitbang SPI to an Adafruit LCD via libgpio, because FreeBSD could
  do with more shiny output devices that aren't network interfaces.)

TODO:

There are some other pins aren't currently included here, but should be.
The LED pins are for the internal switch inside the AR9344.

* GPIO 0+1 are "LED0 + LED1", but they're tied to high for bootstrapping.
* GPIO 13-17 are "LED2..7", but they're tied (H, L, L, L, H) for bootstrapping.
* GPIO 11 and 12 are UART RTS/CTS or I2S; but GPIO 12 is tied L for bootstrap.

9 years agoCorrect an off-by-one error in vm_reserv_reclaim_contig() that results in
alc [Sat, 11 Apr 2015 22:57:13 +0000 (22:57 +0000)]
Correct an off-by-one error in vm_reserv_reclaim_contig() that results in
an infinite loop.

Submitted by: Svatopluk Kraus
MFC after: 1 week

9 years agoChange the virtual address used to not be 0xc0000000, the arm loader
andrew [Sat, 11 Apr 2015 20:44:21 +0000 (20:44 +0000)]
Change the virtual address used to not be 0xc0000000, the arm loader
doesn't handle this address.

9 years agouiomove_object_page(): Avoid instantiating pages in sparse regions on reads.
will [Sat, 11 Apr 2015 18:51:41 +0000 (18:51 +0000)]
uiomove_object_page(): Avoid instantiating pages in sparse regions on reads.

Check whether the page being requested is either resident or on swap.  If
not, read from the zero_region instead of instantiating an unnecessary page.

This avoids consuming memory for sparse files on tmpfs, when they are read
by applications that do not use SEEK_HOLE/SEEK_DATA (which is most of them).

Reviewed by: kib
MFC after: 1 week
Sponsored by: Spectra Logic

9 years agoAdd support for controlling the trackpoint when Synaptics is enabled.
rpaulo [Sat, 11 Apr 2015 18:45:22 +0000 (18:45 +0000)]
Add support for controlling the trackpoint when Synaptics is enabled.

To accomplish this, we must put the Synaptics hardware in passthrough
mode when talking to the trackpoint.

I only performed minor style modifications.

Submitted by: Jan Kokemüller <jan.kokemueller at gmail.com>
MFC after: 1 week

9 years agoImprove Synaptics support for newer touchpads.
rpaulo [Sat, 11 Apr 2015 18:44:07 +0000 (18:44 +0000)]
Improve Synaptics support for newer touchpads.

Enable two finger scrolling by default and disable the edge scrolling if
the touchpad has no physical zone for it.  Disable directional scrolling
by default to avoid using extended buttons as scroll buttons.

Add support for ClickPad.  On Lenovo laptops, this is the button
reported when one presses the touchpad.

While there, fix a problem where the extended buttons were not reporting
the button release event correctly: we need to save the state of the
buttons and report it to sysmouse until we receive a packet from the
touchpad indicating the button has been released.  This makes it
possible to use an extended button to resize a window.  On Lenovo
laptops, the major buttons are actually reported as extended buttons.

Tested by: many (current@)
MFC after: 1 week

9 years agoAdd support for the QEMU virt SoC. This is a SoC built depending on the
andrew [Sat, 11 Apr 2015 17:52:47 +0000 (17:52 +0000)]
Add support for the QEMU virt SoC. This is a SoC built depending on the
command line arguments passed in. It will then generate a dtb on the fly,
as such no dts will be added as it may be incorrect.

Relnotes: yes

9 years agoAdd support for the uart classes to set their default register shift value.
andrew [Sat, 11 Apr 2015 17:16:23 +0000 (17:16 +0000)]
Add support for the uart classes to set their default register shift value.
This is needed with the pl011 driver. Before this change it would default
to a shift of 0, however the hardware places the registers at 4-byte
addresses meaning the value should be 2.

This patch fixes this for the pl011 when configured using the fdt. The
other drivers have a default value of 0 to keep this a no-op.

MFC after: 1 week

9 years agoReplace struct filedesc argument in getsock_cap with struct thread
mjg [Sat, 11 Apr 2015 16:00:33 +0000 (16:00 +0000)]
Replace struct filedesc argument in getsock_cap with struct thread

This is is a step towards removal of spurious arguments.

9 years agofd: remove filedesc argument from fdclose
mjg [Sat, 11 Apr 2015 15:40:28 +0000 (15:40 +0000)]
fd: remove filedesc argument from fdclose

Just accept a thread instead. This makes it consistent with fdalloc.

No functional changes.

9 years agoAdd fdt support to the arm loader.efi
andrew [Sat, 11 Apr 2015 11:00:53 +0000 (11:00 +0000)]
Add fdt support to the arm loader.efi

9 years agoOnly add -fPIC to CFLAGS and -Wl,-znocombreloc to LDFLAGS on x86, they
andrew [Sat, 11 Apr 2015 10:36:48 +0000 (10:36 +0000)]
Only add -fPIC to CFLAGS and -Wl,-znocombreloc to LDFLAGS on x86, they
shouldn't be used on arm.

9 years agoMove reloc.c to the top level Makefile as it has become generic.
andrew [Sat, 11 Apr 2015 10:21:26 +0000 (10:21 +0000)]
Move reloc.c to the top level Makefile as it has become generic.

9 years agoUpdate the arm efi ldscript to generate a valid efi binary
andrew [Sat, 11 Apr 2015 10:07:58 +0000 (10:07 +0000)]
Update the arm efi ldscript to generate a valid efi binary

9 years agoThis modifies several FreeBSD drivers to use the GNU approach to
ganbold [Sat, 11 Apr 2015 08:34:41 +0000 (08:34 +0000)]
This modifies several FreeBSD drivers to use the GNU approach to
supply clk81 information.  It also changes the hardware strings
in some of the drivers to match what's present in the GNU files.

Submitted by:  John Wehle
Reviewed by:   imp

9 years agoThis modifies several FreeBSD drivers to use the hardware strings
ganbold [Sat, 11 Apr 2015 08:30:37 +0000 (08:30 +0000)]
This modifies several FreeBSD drivers to use the hardware strings
present in the GNU dts files.

Submitted by:  John Wehle
Reviewed by:   imp

9 years agoThis modifies the FreeBSD Amlogic DTS files to use the GNU files
ganbold [Sat, 11 Apr 2015 08:27:38 +0000 (08:27 +0000)]
This modifies the FreeBSD Amlogic DTS files to use the GNU files
as the base.

Submitted by: John Wehle
Reviewed by: imp

9 years agoThe GNU files don't include a DTS for the aml8726-m8b (which has
ganbold [Sat, 11 Apr 2015 08:25:53 +0000 (08:25 +0000)]
The GNU files don't include a DTS for the aml8726-m8b (which has
cortex-a5 cores unlike the aml8726-m8 which has cortex-a9 cores).

Submitted by: John Wehle
Reviewed by: imp

9 years agoThe GNU Amlogic DTS files have some errors (e.g. bad register
ganbold [Sat, 11 Apr 2015 08:17:39 +0000 (08:17 +0000)]
The GNU Amlogic DTS files have some errors (e.g. bad register
address, bad IRQ, etc) which are fixed by this patch.

John has sent these changes to the author of the files who said
he'll propagate the changes further upstream.

Submitted by: John Wehle
Reviewed by: imp

9 years agoFix even more warnings..
ngie [Sat, 11 Apr 2015 07:37:21 +0000 (07:37 +0000)]
Fix even more warnings..

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix more warnings I didn't catch in the first go-around
ngie [Sat, 11 Apr 2015 07:35:30 +0000 (07:35 +0000)]
Fix more warnings I didn't catch in the first go-around

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix warnings, bump WARNS to 6, and use a temporary socket instead of one in /tmp
ngie [Sat, 11 Apr 2015 07:33:04 +0000 (07:33 +0000)]
Fix warnings, bump WARNS to 6, and use a temporary socket instead of one in /tmp

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Remove the .t wrapper and put the "magic" of determining the number of
ngie [Sat, 11 Apr 2015 06:40:38 +0000 (06:40 +0000)]
- Remove the .t wrapper and put the "magic" of determining the number of
  testcases into the .c file
- Require root for now because it fails with SOCK_RAW without root privileges
- Increment the test count properly on socket create failure

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix the knob twiddling to work properly per src.opts.mk
ngie [Sat, 11 Apr 2015 06:38:50 +0000 (06:38 +0000)]
Fix the knob twiddling to work properly per src.opts.mk

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agonetmap: improve the netmap attach message on FreeBSD.
rpaulo [Sat, 11 Apr 2015 06:20:46 +0000 (06:20 +0000)]
netmap: improve the netmap attach message on FreeBSD.

MFC after: 1 week

9 years agoCatch up with r281373 and r281379.
jkim [Sat, 11 Apr 2015 05:38:07 +0000 (05:38 +0000)]
Catch up with r281373 and r281379.

9 years agoGenerate temporary files with mkstemp instead of mktemp
ngie [Sat, 11 Apr 2015 05:20:01 +0000 (05:20 +0000)]
Generate temporary files with mkstemp instead of mktemp

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoGarbage collect argc/argv and bump WARNS to 6
ngie [Sat, 11 Apr 2015 03:57:35 +0000 (03:57 +0000)]
Garbage collect argc/argv and bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoGarbage collect argc/argv and bump WARNS to 6
ngie [Sat, 11 Apr 2015 03:56:23 +0000 (03:56 +0000)]
Garbage collect argc/argv and bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Garbage collect argc/argv
ngie [Sat, 11 Apr 2015 03:54:43 +0000 (03:54 +0000)]
- Garbage collect argc/argv
- Use random paths instead of one in /tmp

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Garbage collect argc/argv; bump WARNS to 6
ngie [Sat, 11 Apr 2015 03:43:43 +0000 (03:43 +0000)]
- Garbage collect argc/argv; bump WARNS to 6
- Make the socket path random and move it out of /tmp as that's outside ATF's
  prescribed path

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix warnings and bump WARNS to 6
ngie [Sat, 11 Apr 2015 03:38:49 +0000 (03:38 +0000)]
Fix warnings and bump WARNS to 6
- Staticize variables as needed
- Garbage collect argc/argv
- Fix -Wsign-compare warnings by casting small sizeof to (int)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoGarbage collect argc/argv and bump WARNS to 6
ngie [Sat, 11 Apr 2015 03:35:33 +0000 (03:35 +0000)]
Garbage collect argc/argv and bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoMark signum unused in signal_handler; bump WARNS to 6
ngie [Sat, 11 Apr 2015 03:24:49 +0000 (03:24 +0000)]
Mark signum unused in signal_handler; bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoMerge ACPICA 20150410.
jkim [Sat, 11 Apr 2015 03:23:41 +0000 (03:23 +0000)]
Merge ACPICA 20150410.

9 years agoFix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6
ngie [Sat, 11 Apr 2015 03:19:48 +0000 (03:19 +0000)]
Fix a -Wuninitialized warning by setting the socket to -1 and bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Don't use /tmp because it's outside ATF's prescribed sandbox
ngie [Sat, 11 Apr 2015 03:18:14 +0000 (03:18 +0000)]
- Don't use /tmp because it's outside ATF's prescribed sandbox
- Replace a hardcoded PATH_MAX value with sizeof(path)
- Use path like an array, not a pointer, and always try to unlink it in cleanup

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix warnings and bump WARNS to 6
ngie [Sat, 11 Apr 2015 03:13:09 +0000 (03:13 +0000)]
Fix warnings and bump WARNS to 6
- Garbage collect argc/argv (-Wunused)
- sleep(3) will always return an unsigned int; don't check for return codes <0
  (-Wsign-compare)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Garbage collect argc/argv (-Wunused)
ngie [Sat, 11 Apr 2015 02:59:45 +0000 (02:59 +0000)]
- Garbage collect argc/argv (-Wunused)
- Bump WARNS to 6

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Use static buffers for temporary file paths instead of strdup of constant strings
ngie [Sat, 11 Apr 2015 02:50:44 +0000 (02:50 +0000)]
- Use static buffers for temporary file paths instead of strdup of constant strings
- Don't use /tmp because it's outside ATF's prescribed sandbox
- Use mkstemp instead of mktemp to eliminate warning

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoAttempt to fix build after 281351 by defining full prototype for the
delphij [Sat, 11 Apr 2015 01:06:59 +0000 (01:06 +0000)]
Attempt to fix build after 281351 by defining full prototype for the
functions that were moved to ip_reass.c.

9 years agoMerge changes from vendor driver version 1.1.1:
delphij [Sat, 11 Apr 2015 00:45:03 +0000 (00:45 +0000)]
Merge changes from vendor driver version 1.1.1:

v1.1.1 2015-03-26
 * Support 4Kn drive.
 * Change the SCSI target ID of the disk to be the index of physical
   connetion to the HBA.
 * Support staggered drive spin up.
 * Fix a bug that command would be timeout because of improper
   interrupt service routine.
 * Error handling to avoid scsi command lost which caused system
   hang up.
 * Fix a bug that fail to get the devcie's serial number via
   FreeNAS WebGUI.

Many thanks to HighPoint for continued support of FreeBSD!

MFC after: 2 weeks

9 years agoFix libfifolog dependency on libz
emaste [Fri, 10 Apr 2015 21:24:38 +0000 (21:24 +0000)]
Fix libfifolog dependency on libz

Consumers should not need to encode fifolog's dependency on libz.
Handle it automatically in src.libnames.mk.

Differential Revision: https://reviews.freebsd.org/D2278
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation

9 years agoiwn, wlan: fix typos
eadler [Fri, 10 Apr 2015 20:55:17 +0000 (20:55 +0000)]
iwn, wlan: fix typos
Fxi tow typos

Obtained from: DragonFlyBSD
MFC after: 3 days

9 years agoUse explicitly sized types in EFI module metadata
emaste [Fri, 10 Apr 2015 19:26:45 +0000 (19:26 +0000)]
Use explicitly sized types in EFI module metadata

This will allow the same metadata struct to be used on all platforms.

Differential Revision: https://reviews.freebsd.org/D2275
Reviewed by: jhb

9 years agoFix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the
ae [Fri, 10 Apr 2015 19:09:51 +0000 (19:09 +0000)]
Fix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the
interface index is specified as zero, the system should select the
interface to use for outgoing multicast packets. Even the comment
for the in6p_set_multicast_if() function says about index of zero.
But in fact for zero index the function just returns EADDRNOTAVAIL.

I.e. if you first set some interface and then will try reset it
with zero ifindex, you will get EADDRNOTAVAIL.

Reset im6o_multicast_ifp to NULL when interface index specified as
zero. Also return EINVAL in case when ifnet_byindex() returns NULL.
This will be the same behaviour as when ifindex is bigger than
V_if_index. And return EADDRNOTAVAIL only when interface is not
multicast capable.

Reported by: Olivier Cochard-Labbé
MFC after: 2 weeks
Sponsored by: Yandex LLC

9 years agoRemove docs that are not shipped with nvi anymore
bapt [Fri, 10 Apr 2015 19:07:43 +0000 (19:07 +0000)]
Remove docs that are not shipped with nvi anymore

Reported by: emaste

9 years agotmpfs_getattr(): Return more correct allocated byte counts.
will [Fri, 10 Apr 2015 19:04:39 +0000 (19:04 +0000)]
tmpfs_getattr(): Return more correct allocated byte counts.

For VREG vnodes, return the resident page count (multiplied by PAGE_SIZE)
for the tmpfs node's anonymous VM object that stores actual file contents.

For all other vnodes, return the tmpfs_node's tn_size, which should not
be rounded to a page.

This change allows using stat(2) to identify a sparse file on tmpfs.

Reviewed by: kib
MFC after: 1 week

9 years agoAdd build support for i386 loader.efi
emaste [Fri, 10 Apr 2015 18:49:43 +0000 (18:49 +0000)]
Add build support for i386 loader.efi

Kernel changes are required for this to be useful but this will allow
others to experiment.

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

9 years agoLimit EFI framebuffer metadata to amd64 for now
emaste [Fri, 10 Apr 2015 18:08:09 +0000 (18:08 +0000)]
Limit EFI framebuffer metadata to amd64 for now

The i386 loader.efi does not yet exist. Avoid dealing with vt and
framebuffer issues there until the initial bootstrapping is done.

9 years agoUpdate nvi to 2.1.3 which fixes the data corruption when locale conversion
bapt [Fri, 10 Apr 2015 17:50:28 +0000 (17:50 +0000)]
Update nvi to 2.1.3 which fixes the data corruption when locale conversion
failed

9 years agoFor reasons that I am not understand yet, using the libmd version of
delphij [Fri, 10 Apr 2015 17:21:47 +0000 (17:21 +0000)]
For reasons that I am not understand yet, using the libmd version of
SHA256 would make libarchive based application to give:

archive_read_extract(): Lzma library error: Corrupted input data

(Internally this is LZMA_DATA_ERR)

However, the libmd version of SHA256 is supposed to give same result
as the bundled version do, and xz(1) is not affected.

As a precaution, revert the SHA256 portion of r281316 for now until
we figure out why it breaks libarchive interoperability as we can't
yet rule out this change have introduced an ABI breakage.

9 years agoUse OF_getencpropalloc() to handle endianess of the properties.
ian [Fri, 10 Apr 2015 13:50:57 +0000 (13:50 +0000)]
Use OF_getencpropalloc() to handle endianess of the properties.

Submitted by: Michal Meloun

9 years agoAdd a pmap_kremove_device() to undo mappings made with pmap_kenter_device().
ian [Fri, 10 Apr 2015 13:26:35 +0000 (13:26 +0000)]
Add a pmap_kremove_device() to undo mappings made with pmap_kenter_device().

Previously we used pmap_kremove(), but with ARM_NEW_PMAP it does the remove
in a way that isn't SMP-coherent (which is appropriate in some circumstances
such as mapping/unmapping sf buffers).  With matching enter/remove routines
for device mappings, each low-level implementation can do the right thing.

Reviewed by: Svatopluk Kraus <onwahe@gmail.com>

9 years agoImport nvi 2.1.3
bapt [Fri, 10 Apr 2015 13:26:05 +0000 (13:26 +0000)]
Import nvi 2.1.3

Approved by: peter

9 years agoThe "get latency" and "get bitmode" device commands are read operations,
ian [Fri, 10 Apr 2015 13:20:31 +0000 (13:20 +0000)]
The "get latency" and "get bitmode" device commands are read operations,
not writes.

9 years agoRedo r274966. Instead of global all-interface all-vnet undocumented sysctl,
glebius [Fri, 10 Apr 2015 09:50:13 +0000 (09:50 +0000)]
Redo r274966. Instead of global all-interface all-vnet undocumented sysctl,
use per-interface flag, and document it.

Sponsored by: Nginx, Inc.

9 years agoUse _exit, not exit in forked process
ngie [Fri, 10 Apr 2015 09:37:53 +0000 (09:37 +0000)]
Use _exit, not exit in forked process

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove argc/argv (-Wunused)
ngie [Fri, 10 Apr 2015 09:27:23 +0000 (09:27 +0000)]
Remove argc/argv (-Wunused)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix warnings
ngie [Fri, 10 Apr 2015 09:26:21 +0000 (09:26 +0000)]
Fix warnings

- Remove argc/argv (-Wunused)
- Mark some parameters to socket_listen_update __unused (-Wunused)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove argc/argv (-Wunused)
ngie [Fri, 10 Apr 2015 09:23:00 +0000 (09:23 +0000)]
Remove argc/argv (-Wunused)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years ago- Parameterize out the number of accept/connect attempts
ngie [Fri, 10 Apr 2015 09:21:07 +0000 (09:21 +0000)]
- Parameterize out the number of accept/connect attempts
- Randomize the bind port to allow 2+ consecutive calls in < 10 minutes, and
  to also not fail if (for instance) there's a server already listening on port
  8080
- Don't leak the listening socket / fds into the child process
- Fix warnings:
-- Remove argc/argv (-Wunused)
-- Mark sig __unused (-Wunused)
-- Mark quit static (-Wmissing-variable-declarations)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoPort the EFI reloc codeto work on arm64. This used the rela relocation
andrew [Fri, 10 Apr 2015 09:15:35 +0000 (09:15 +0000)]
Port the EFI reloc codeto work on arm64. This used the rela relocation
table so wiill need the addend included in the relocation calculation.

Sponsored by: The FreeBSD Foundation

9 years agoFix -Wunused warnings, bump WARNS to 6
ngie [Fri, 10 Apr 2015 08:01:49 +0000 (08:01 +0000)]
Fix -Wunused warnings, bump WARNS to 6

The output is still broken if prove -rv is run and the testcase aborts
prematurely with fail_assertion (the testcase doesn't really conform to TAP
protocol properly, except when it completes fully)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix -Wunused warnings, bump WARNS to 6
ngie [Fri, 10 Apr 2015 07:59:46 +0000 (07:59 +0000)]
Fix -Wunused warnings, bump WARNS to 6

The testcase fails today on subtest # 9

The output is still broken if prove -rv is run and the testcase aborts
prematurely (the testcase doesn't really conform to TAP protocol properly,
except when it completes fully)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoFix warnings, fix a typo in a testcase description, bump WARNS to 3
ngie [Fri, 10 Apr 2015 07:35:53 +0000 (07:35 +0000)]
Fix warnings, fix a typo in a testcase description, bump WARNS to 3

- Remove argc/argv (-Wunused)
- Cast len in comparison to size_t (-Wsign-compare)

MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division

9 years agoUMA zone limit can be lowered, so remove protection against from
glebius [Fri, 10 Apr 2015 06:56:49 +0000 (06:56 +0000)]
UMA zone limit can be lowered, so remove protection against from
the sysctl_handle_uma_zone_max().

Sponsored by: Nginx, Inc.

9 years agoo Use Jenkins hash. With previous hash, for a single source IP address and
glebius [Fri, 10 Apr 2015 06:55:43 +0000 (06:55 +0000)]
o Use Jenkins hash. With previous hash, for a single source IP address and
  sequential IP ID case (e.g. ping -f), distribution fell into 8-10 buckets
  out of 64. With Jenkins hash, distribution is even.
o Add random seed to the hash.

Sponsored by: Nginx, Inc.

9 years agoMove all code related to IP fragment reassembly to ip_reass.c. Some
glebius [Fri, 10 Apr 2015 06:02:37 +0000 (06:02 +0000)]
Move all code related to IP fragment reassembly to ip_reass.c.  Some
function names have changed and comments are reformatted or added, but
there is no functional change.

Claim copyright for me and Adrian.

Sponsored by: Nginx, Inc.

9 years ago- Fix support with new elftoolchain readelf(1)
bdrewery [Thu, 9 Apr 2015 22:16:35 +0000 (22:16 +0000)]
- Fix support with new elftoolchain readelf(1)
- Fix not finding global symbols by checking for D and R.
- Follow symlinks
- Show which matching symbol was used to consider the library needed.

Discussed with: bapt

9 years agoNow that IP reassembly is no longer under single lock, book-keeping amount
glebius [Thu, 9 Apr 2015 22:13:27 +0000 (22:13 +0000)]
Now that IP reassembly is no longer under single lock, book-keeping amount
of allocations in V_nipq is racy.  To fix that, we would simply stop doing
book-keeping ourselves, and rely on UMA doing that.  There could be a
slight overcommit due to caches, but that isn't a big deal.

o V_nipq and V_maxnipq go away.
o net.inet.ip.fragpackets is now just SYSCTL_UMA_CUR()
o net.inet.ip.maxfragpackets could have been just SYSCTL_UMA_MAX(), but
  historically it has special semantics about values of 0 and -1, so
  provide sysctl_maxfragpackets() to handle these special cases.
o If zone limit lowers either due to net.inet.ip.maxfragpackets or due to
  kern.ipc.nmbclusters, then new function ipq_drain_tomax() goes over
  buckets and frees the oldest packets until we are in the limit.
  The code that (incorrectly) did that in ip_slowtimo() is removed.
o ip_reass() doesn't check any limits and calls uma_zalloc(M_NOWAIT).
  If it fails, a new function ipq_reuse() is called. This function will
  find the oldest packet in the currently locked bucket, and if there is
  none, it will search in other buckets until success.

Sponsored by: Nginx, Inc.

9 years agortsold does not need to link to libkvm
bapt [Thu, 9 Apr 2015 21:52:14 +0000 (21:52 +0000)]
rtsold does not need to link to libkvm

9 years agorpc.locked does not need to link to libutil
bapt [Thu, 9 Apr 2015 21:48:17 +0000 (21:48 +0000)]
rpc.locked does not need to link to libutil

9 years agobhyvectl does not need to link to libutil
bapt [Thu, 9 Apr 2015 21:39:58 +0000 (21:39 +0000)]
bhyvectl does not need to link to libutil

9 years agoFix overlinking in bhyve:
bapt [Thu, 9 Apr 2015 21:38:40 +0000 (21:38 +0000)]
Fix overlinking in bhyve:

libvmmapi is actually needed to be linked to libutil, not bhyve nor bhyveload