]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoInclude xz(1)-compressed images when not a snapshot build.
Glen Barber [Thu, 21 May 2015 20:22:55 +0000 (20:22 +0000)]
Include xz(1)-compressed images when not a snapshot build.

Do not suffix non-snapshot checksum files with SNAP_SUFFIX.

Sponsored by: The FreeBSD Foundation

9 years agocd(1) to .CURDIR before calling stat(1) to fix the path
Glen Barber [Thu, 21 May 2015 20:18:13 +0000 (20:18 +0000)]
cd(1) to .CURDIR before calling stat(1) to fix the path
to sh(1).

Include xz(1)-compressed images when renaming snapshot
builds.

Use OSRELEASE in place of REVISION-BRANCH for checksum
filenames.

Sponsored by: The FreeBSD Foundation

9 years agoThe 'hostbridge' device exists to allow guests to infer msi/msix
Tycho Nightingale [Thu, 21 May 2015 20:11:52 +0000 (20:11 +0000)]
The 'hostbridge' device exists to allow guests to infer msi/msix
capablity by advertising pcie capability.

Since the 'hostbridge' device isn't a true pci-to-pci bridge, and
doesn't actaully use the bridge configuration space layout, change
the header-type from type 1 to type 0 to avoid confusion.

Reviewed by: neel

9 years agoRaise the SDHCI timeout to 10 seconds and add a sysctl to allow changing
Luiz Otavio O Souza [Thu, 21 May 2015 20:09:36 +0000 (20:09 +0000)]
Raise the SDHCI timeout to 10 seconds and add a sysctl to allow changing
this value at runtime.

The SD card specification says that a block write or a block erase can take
up to 250ms to complete and thus, under some circumstances, the existent 2
seconds timeout was triggering with normal usage.

This change fixes the sporadic controller timeout that happens on RPi and
RPi 2.

Discussed with: ian (some time ago)

9 years agoDo not probe Intel PIIX4 south bridge quirks on amd64. These quirky south
Jung-uk Kim [Thu, 21 May 2015 19:31:10 +0000 (19:31 +0000)]
Do not probe Intel PIIX4 south bridge quirks on amd64.  These quirky south
bridges only supported Intel Pentium and Pentium II era processors and there
is no reason for hardware virtualizations to emulate these quirks.

MFC after: 1 week

9 years agoEliminate unneeded includes.
Xin LI [Thu, 21 May 2015 18:29:36 +0000 (18:29 +0000)]
Eliminate unneeded includes.

MFC after: 2 weeks

9 years agoAdd an option "--get-vmcs-exit-inst-length" to display the instruction length
Neel Natu [Thu, 21 May 2015 18:29:11 +0000 (18:29 +0000)]
Add an option "--get-vmcs-exit-inst-length" to display the instruction length
of the instruction that caused the VM-exit.

MFC after: 1 week

9 years agoEmulate the "CMP r/m, reg" instruction (opcode 39H).
Neel Natu [Thu, 21 May 2015 18:23:37 +0000 (18:23 +0000)]
Emulate the "CMP r/m, reg" instruction (opcode 39H).

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

9 years agoEnsure that the static structs emitted by the MODULE_DEPEND() and
Dimitry Andric [Thu, 21 May 2015 17:40:53 +0000 (17:40 +0000)]
Ensure that the static structs emitted by the MODULE_DEPEND() and
MODULE_VERSION() macros don't end up as .comm symbols, when all the
version fields are zero.

Normally, such symbols will end up in .bss, but for kernel module
version objects, this can lead to "garbage" version numbers.

Fix this by instructing the compiler to always put these structs in the
.data segment instead.

Reported by: delphij, ae
MFC after: 1 week

9 years agoAdd the MMC/SD driver for Allwinner SoCs.
Luiz Otavio O Souza [Thu, 21 May 2015 17:39:42 +0000 (17:39 +0000)]
Add the MMC/SD driver for Allwinner SoCs.

This is based on the patch sent by Alexander Fedorov with the following
fixes/improvements:

 - Better error handling;
 - Clock is derived from PLL6 (obtained from netbsd);
 - No more unnecessary busy loops on interrupt handler;
 - style(9) fixes and code cleanup.

I also want to thanks Martin Galvan who has sent an alternative
implementation with some interesting fixes.

Tested on CubieBoard2, Banana-Pi (thanks to netgate!) and Cubieboard1
(Pratik Singhal).

This is intended to pave the way for the upcoming GSoC work (and make
easier the build of images for the supported boards).

PR: 196081
Submitted by: Alexander Fedorov <alexander.fedorov@rtlservice.com>

9 years agoInclude the TARGET in the EC2 AMI name.
Glen Barber [Thu, 21 May 2015 17:39:42 +0000 (17:39 +0000)]
Include the TARGET in the EC2 AMI name.

Without this, AWS rejects subsequent image uploads of a different
architecture because the name conflicts.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoRevert r282971. It depends on condvar consumers not destroying condvars
John Baldwin [Thu, 21 May 2015 16:43:26 +0000 (16:43 +0000)]
Revert r282971.  It depends on condvar consumers not destroying condvars
until all threads sleeping on a condvar have resumed execution after being
awakened.  However, there are cases where that guarantee is very hard to
provide.

9 years agoremove stray ; that came in r272673...
John-Mark Gurney [Thu, 21 May 2015 15:38:43 +0000 (15:38 +0000)]
remove stray ; that came in r272673...

9 years agoddb: finish converting boolean values.
Pedro F. Giffuni [Thu, 21 May 2015 15:16:18 +0000 (15:16 +0000)]
ddb: finish converting boolean values.

The replacement started at r283088 was necessarily incomplete without
replacing boolean_t with bool.  This also involved cleaning some type
mismatches and ansifying old C function declarations.

Pointed out by: bde
Discussed with: bde, ian, jhb

9 years agoMark libgomp.so.1 as an old lib not an old file
Baptiste Daroussin [Thu, 21 May 2015 15:05:46 +0000 (15:05 +0000)]
Mark libgomp.so.1 as an old lib not an old file

9 years agoRemove stray DEBUG_FLAGS=-g that snuck in with r137868
Warner Losh [Thu, 21 May 2015 14:36:15 +0000 (14:36 +0000)]
Remove stray DEBUG_FLAGS=-g that snuck in with r137868

9 years agoRemove stray DEBUG_FLAGS=-g that snuck in with r184761.
Warner Losh [Thu, 21 May 2015 14:36:14 +0000 (14:36 +0000)]
Remove stray DEBUG_FLAGS=-g that snuck in with r184761.

9 years agoRemove stray DEBUG_FLAGS=-g that's been here since the initial import.
Warner Losh [Thu, 21 May 2015 14:36:12 +0000 (14:36 +0000)]
Remove stray DEBUG_FLAGS=-g that's been here since the initial import.

9 years agoRemove the stray DEBUG_FLAGS=-g line that snuck in with the
Warner Losh [Thu, 21 May 2015 14:36:11 +0000 (14:36 +0000)]
Remove the stray DEBUG_FLAGS=-g line that snuck in with the
soft-updates journaling project merge in r207141.

9 years agoRemoved files not installed anymore with mandoc
Baptiste Daroussin [Thu, 21 May 2015 13:04:14 +0000 (13:04 +0000)]
Removed files not installed anymore with mandoc

9 years agoRemove demandoc(1) from the build
Baptiste Daroussin [Thu, 21 May 2015 13:02:43 +0000 (13:02 +0000)]
Remove demandoc(1) from the build

9 years agoDrop libmandoc and incorporate it into the main mandoc Makefile
Baptiste Daroussin [Thu, 21 May 2015 12:51:56 +0000 (12:51 +0000)]
Drop libmandoc and incorporate it into the main mandoc Makefile

This simplifies maintainance of mandoc(1).
Note that the same direction was taken on OpenBSD

9 years agoRemove clause 3 and 4 from the license
Baptiste Daroussin [Thu, 21 May 2015 08:38:25 +0000 (08:38 +0000)]
Remove clause 3 and 4 from the license

Obtained from: NetBSD

9 years ago* fix roff terminology in .Nd
Baptiste Daroussin [Thu, 21 May 2015 08:28:48 +0000 (08:28 +0000)]
* fix roff terminology in .Nd
* remove .Xr to self
* add AUTHORS section

Submitted by: schwarze at OpenBSD

9 years agoadd an include on sys/types.h because we do explicitly use size_t
Baptiste Daroussin [Thu, 21 May 2015 08:26:24 +0000 (08:26 +0000)]
add an include on sys/types.h because we do explicitly use size_t
remove unused stdbool.h

Suggested by: schwarze at OpenBSD

9 years agoUse the POSIX PATH_MAX macro from limits.h instead of non standard MAXPATHLEN
Baptiste Daroussin [Thu, 21 May 2015 08:23:45 +0000 (08:23 +0000)]
Use the POSIX PATH_MAX macro from limits.h instead of non standard MAXPATHLEN

Submitted by: schwarze at OpenBSD

9 years agosort headers
Baptiste Daroussin [Thu, 21 May 2015 08:20:42 +0000 (08:20 +0000)]
sort headers

9 years agoAdd missing break statement.
Ganbold Tsagaankhuu [Thu, 21 May 2015 07:35:20 +0000 (07:35 +0000)]
Add missing break statement.

Submitted by:   John Wehle

9 years agoAdd driver for usbclock generator for earlier amlogic chip.
Ganbold Tsagaankhuu [Thu, 21 May 2015 07:23:50 +0000 (07:23 +0000)]
Add driver for usbclock generator for earlier amlogic chip.

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

9 years agoRemove unnecessary break statements.
Ganbold Tsagaankhuu [Thu, 21 May 2015 07:09:01 +0000 (07:09 +0000)]
Remove unnecessary break statements.

Submitted by:    John Wehle

9 years agoThe RTC initialization values are based on the SoC which can be
Ganbold Tsagaankhuu [Thu, 21 May 2015 07:01:08 +0000 (07:01 +0000)]
The RTC initialization values are based on the SoC which can be
determined at runtime so there's no need to set the values in
each DTS.
Tested on YYHD18 (aml8726-m3), VSATV102 (aml8726-m6), and
ODROIDC1 (aml8726-m8b).

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

9 years agoImport proposed fix from upstream for
Enji Cooper [Thu, 21 May 2015 05:06:08 +0000 (05:06 +0000)]
Import proposed fix from upstream for
atf-sh/atf_check_test:flush_stdout_on_timeout

Many thanks for jmmv for the fix!

MFC after: 1 week
PR: 197060

Original commit message:

From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001
From: Julio Merino <jmmv@google.com>
Date: Tue, 17 Feb 2015 18:10:11 -0500
Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death

The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it
was playing solely with time.  Fix this by making the test more robust
and rename it while we are at it: there is nothing left about "timeouts"
in this test, considering that ATF itself does not enforce deadlines
any longer.

Fixes FreeBSD PR 197060.

9 years ago_Really_, _Really_ fix buildworld by moving the conditionals down, fixing some
Enji Cooper [Thu, 21 May 2015 05:02:08 +0000 (05:02 +0000)]
_Really_, _Really_ fix buildworld by moving the conditionals down, fixing some
typos, and fixing the dependency when MK_LIBCPLUSPLUS != no

- `:D` operator evaluation is immediate, i.e. like .if defined(..). So r283159
  was in effect a no-op commit.
- Fix dependency in MK_LIBCPLUSPLUS case in two ways:
-- lib/libc++ was the wrong dependency. It should have been libcxxrt.
-- lib/libc++ was missing __L, so again it was depending on the directory, not
   the relevant .PHONY target.

Tested with: make tinderbox (amd64, arm, sparc64) and JFLAG=-j16
In collaboration with: bdrewery, imp, peter
BIG pointyhat to: ngie (for trying to commit things at 6am while staying up all
                        night working on other tasks)

9 years agoTemporarily revert r282922 which bumped the max descriptors.
Peter Grehan [Thu, 21 May 2015 04:19:22 +0000 (04:19 +0000)]
Temporarily revert r282922 which bumped the max descriptors.

While there is no issued with the number of descriptors in
a virtio indirect descriptor, it's a guest's choice as to
whether indirect descriptors are used. For the case where
they aren't, the virtio block ring size is still 64 which
is less than the now reported max_segs of 67. This results
in an assertion in recent Linux guests even though it was
benign since they were using indirect descs.

The intertwined relationship between virtio ring size,
max seg size and blockif queue size will be addressed
in an upcoming commit, at which point the max descriptors
will again be bumped up to 67.

9 years agoCreate links to the libprocstat man pages for all of the libprocstat functions so...
Allan Jude [Thu, 21 May 2015 03:32:44 +0000 (03:32 +0000)]
Create links to the libprocstat man pages for all of the libprocstat functions so they can be looked up by name

Add a cross refrence to libprocstat in the procstat.1 man page

Differential Revision: https://reviews.freebsd.org/D2578
Suggested by: jmg
Reviewed by: brueffer
Approved by: wblock (mentor)
MFC after: 1 week
Sponsored by: ScaleEngine Inc.

9 years agoImport proposed fix from
Enji Cooper [Thu, 21 May 2015 03:26:46 +0000 (03:26 +0000)]
Import proposed fix from
https://github.com/jmmv/atf/commit/0e546407567ea858e261e72f75c5ed61e07d0ddf.patch

PR: 197060

Original commit message:

From 0e546407567ea858e261e72f75c5ed61e07d0ddf Mon Sep 17 00:00:00 2001
From: Julio Merino <jmmv@google.com>
Date: Tue, 17 Feb 2015 18:10:11 -0500
Subject: [PATCH] Fix atf-sh/atf_check_test:flush_stdout_on_death

The test atf-sh/atf_check_test:flush_stdout_on_timeout was flaky as it
was playing solely with time.  Fix this by making the test more robust
and rename it while we are at it: there is nothing left about "timeouts"
in this test, considering that ATF itself does not enforce deadlines
any longer.

Fixes FreeBSD PR 197060.

9 years agoDo grammar fix in the comment to record the right commit message for
Konstantin Belousov [Wed, 20 May 2015 23:15:56 +0000 (23:15 +0000)]
Do grammar fix in the comment to record the right commit message for
r283162.

Fix a cosmetic issue with vm_page_alloc() calling vm_page_free_toq()
with the page not completely satisfying vm_page_free() assertions.
The page is not owned by the object, since insertion failed.  But
besides m->object reset to NULL, we should also set VPO_UNMANAGED flag
for consistency.

Reported by: pho
Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoRemove the write-only variable phent. We currently do not check the
Konstantin Belousov [Wed, 20 May 2015 23:03:22 +0000 (23:03 +0000)]
Remove the write-only variable phent.  We currently do not check the
size of the program header's entries.

Reported by: adrian (by using gcc 4.9)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoMake kerberos use the same sqlite libraries as other sqlite consumer.
Baptiste Daroussin [Wed, 20 May 2015 18:56:29 +0000 (18:56 +0000)]
Make kerberos use the same sqlite libraries as other sqlite consumer.

This reduces the number of copy of sqlite we have to just one and easier
tracking version of sqlite

Differential Revision: https://reviews.freebsd.org/D2443
Reviewed by: imp, stas, bjk

9 years agoFix breakage I didn't fully solve in r283151 by depending on the .PHONY
Enji Cooper [Wed, 20 May 2015 18:41:54 +0000 (18:41 +0000)]
Fix breakage I didn't fully solve in r283151 by depending on the .PHONY
target, not the directory when building libctf for libproc

Reported by: many, Jenkins
Submitted by: rodrigc

9 years agoFix memory leak.
Mariusz Zaborski [Wed, 20 May 2015 17:48:22 +0000 (17:48 +0000)]
Fix memory leak.

Approved by: pjd (mentor)

9 years agoStyle.
Mariusz Zaborski [Wed, 20 May 2015 17:47:01 +0000 (17:47 +0000)]
Style.

Approved by: pjd (mentor)

9 years agoAlways use the nv_free function.
Mariusz Zaborski [Wed, 20 May 2015 17:44:58 +0000 (17:44 +0000)]
Always use the nv_free function.

Approved by: pjd (mentor)

9 years agoCorrect variable name in the interface.
Mariusz Zaborski [Wed, 20 May 2015 17:42:40 +0000 (17:42 +0000)]
Correct variable name in the interface.

Approved by: pjd (mentor)

9 years agoRemove the write-only variable phent. We currently do not check the
Konstantin Belousov [Wed, 20 May 2015 15:37:15 +0000 (15:37 +0000)]
Remove the write-only variable phent.  We currently do not check the
size of the program header's entries.

Reported by: adrian (by using gcc 4.9)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoUnbreak the arm64/sparc64 tinderbox by only compiling lib/libproc and
Enji Cooper [Wed, 20 May 2015 13:05:33 +0000 (13:05 +0000)]
Unbreak the arm64/sparc64 tinderbox by only compiling lib/libproc and
lib/librtld_db on architectures where they're supported

Reported by: bz, Jenkins
Pointyhat to: bapt

9 years agocddl/lib/libctf isn't always a requirement for lib/libproc; its use is dependent
Enji Cooper [Wed, 20 May 2015 13:04:00 +0000 (13:04 +0000)]
cddl/lib/libctf isn't always a requirement for lib/libproc; its use is dependent
on MK_CTF != "no". Use the other divined value instead of reinventing the wheel

9 years agoAdd _more_ missing dependencies for lib/libproc to further squash build races
Enji Cooper [Wed, 20 May 2015 12:56:40 +0000 (12:56 +0000)]
Add _more_ missing dependencies for lib/libproc to further squash build races

Verified via `cd lib/libproc; make -VLIBADD`

Pointyhat to: ngie

9 years agoAvoid trying to build cxbge on 32-bit MIPS
Ed Maste [Wed, 20 May 2015 12:54:22 +0000 (12:54 +0000)]
Avoid trying to build cxbge on 32-bit MIPS

It lacks required 64-bit atomics.

Reviewed by: imp (earlier version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2585

9 years agoArticulate all dependencies for lib/libproc to squash build races after r283139
Enji Cooper [Wed, 20 May 2015 12:46:30 +0000 (12:46 +0000)]
Articulate all dependencies for lib/libproc to squash build races after r283139
on !arm64 and !sparc64

Pointyhat to: bapt
Sponsored by: EMC / Isilon Storage Division

9 years agoBuild cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are
Enji Cooper [Wed, 20 May 2015 12:26:09 +0000 (12:26 +0000)]
Build cddl/{sbin,usr.bin,usr.sbin} in parallel as all of the applications are
freestanding (they require libraries build via make libraries in buildworld)

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

9 years agoIn the reply to SADB_X_SPDGET message use the same sequence number that
Andrey V. Elsukov [Wed, 20 May 2015 11:59:53 +0000 (11:59 +0000)]
In the reply to SADB_X_SPDGET message use the same sequence number that
was in the request. Some IKE deamons expect it will the same. Linux and
NetBSD also follow this behaviour.

PR: 137309
MFC after: 2 weeks

9 years agoAdd dependencies for libzfs_core and libzpool I missed on my first pass on this
Enji Cooper [Wed, 20 May 2015 11:16:17 +0000 (11:16 +0000)]
Add dependencies for libzfs_core and libzpool I missed on my first pass on this
Makefile

MFC with: r283144
Sponsored by: EMC / Isilon Storage Division

9 years agoArticulate dependencies for cddl/lib/libdtrace and cddl/lib/libzfs
Enji Cooper [Wed, 20 May 2015 11:03:53 +0000 (11:03 +0000)]
Articulate dependencies for cddl/lib/libdtrace and cddl/lib/libzfs

Parallelize the build in this subdirectory

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

9 years agoRemove usr/share/dtrace/{tcpconn,tcpstate,tcptrack,udptrack} if MK_CDDL == no
Enji Cooper [Wed, 20 May 2015 10:56:09 +0000 (10:56 +0000)]
Remove usr/share/dtrace/{tcpconn,tcpstate,tcptrack,udptrack} if MK_CDDL == no

Sponsored by: EMC / Isilon Storage Division

9 years agoEVENTHANDLER_REGISTER() doesn't fail.
Gleb Smirnoff [Wed, 20 May 2015 09:42:33 +0000 (09:42 +0000)]
EVENTHANDLER_REGISTER() doesn't fail.

9 years agoRemove the warning about invalid PE checksum; apparently nothing
Edward Tomasz Napierala [Wed, 20 May 2015 09:40:34 +0000 (09:40 +0000)]
Remove the warning about invalid PE checksum; apparently nothing
cares about those checksums anyway.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoOnly build sys/boot/usb/tools if MK_USB != no
Enji Cooper [Wed, 20 May 2015 09:36:25 +0000 (09:36 +0000)]
Only build sys/boot/usb/tools if MK_USB != no

Sponsored by: EMC / Isilon Storage Division

9 years agoFix buildworld by adding libproc and librtld_db to the _prebuild_libs
Baptiste Daroussin [Wed, 20 May 2015 09:23:37 +0000 (09:23 +0000)]
Fix buildworld by adding libproc and librtld_db to the _prebuild_libs
Those are needed to build libdtrace

9 years agoti_pruss: pass the correct IRQ to userland.
Rui Paulo [Wed, 20 May 2015 06:23:01 +0000 (06:23 +0000)]
ti_pruss: pass the correct IRQ to userland.

Also, fix several problems with the kqueue notification.

Submitted by: Manuel Stühn freebsdnewbie at freenet.de

9 years agoD2432 (Patch for Amlogic single core PIC) moved the SMP option out
Ganbold Tsagaankhuu [Wed, 20 May 2015 05:49:52 +0000 (05:49 +0000)]
D2432 (Patch for Amlogic single core PIC) moved the SMP option out
of AML8726 and into board specific config files since some boards
(e.g. YYHD18) use the aml8726-m3 which only have a single core.

r283057 applied most of D2432, however while it removed SMP from
AML8726, it missed adding the SMP option to the board specific
config files.

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

9 years agoAdd a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire and purge all
Hiren Panchasara [Wed, 20 May 2015 01:08:01 +0000 (01:08 +0000)]
Add a new sysctl net.inet.tcp.hostcache.purgenow=1 to expire and purge all
entries in hostcache immediately.

In collaboration with: bz, rwatson
MFC after: 1 week
Relnotes: yes
Sponsored by: Limelight Networks

9 years agoReduce overlinking.
Baptiste Daroussin [Tue, 19 May 2015 22:29:11 +0000 (22:29 +0000)]
Reduce overlinking.
Because of libdtrace there is still a bit a overlinking but nothing we can deal
with easily

9 years agoCorrectly link libdtrace and convert to LIBADD
Baptiste Daroussin [Tue, 19 May 2015 22:24:19 +0000 (22:24 +0000)]
Correctly link libdtrace and convert to LIBADD
Make dtrace only link to libdtrace

9 years agoFix underlinking
Baptiste Daroussin [Tue, 19 May 2015 22:23:15 +0000 (22:23 +0000)]
Fix underlinking

9 years agoRegister libdtrace and its direct and indirect dependencies
Baptiste Daroussin [Tue, 19 May 2015 22:22:53 +0000 (22:22 +0000)]
Register libdtrace and its direct and indirect dependencies
Register librdlt_db
Register libproc dependencies
Register libctf dependencies

9 years agoConvert to LIBADD
Baptiste Daroussin [Tue, 19 May 2015 21:59:00 +0000 (21:59 +0000)]
Convert to LIBADD

9 years agoConvert to LIBADD
Baptiste Daroussin [Tue, 19 May 2015 21:57:11 +0000 (21:57 +0000)]
Convert to LIBADD
Remove dependency on pthread, it is not needed

9 years agoRe-select the SD card before getting the SD status. On a couple Atmel
Warner Losh [Tue, 19 May 2015 21:16:53 +0000 (21:16 +0000)]
Re-select the SD card before getting the SD status. On a couple Atmel
boards, this prevents some error messages during enumeration and also
gives us the correct erase block size. They appear to be harmless
elsewhere.

# Note: we treat too many commands as 'can't fail' if they don't work
# after a couple of retries. We need to fix that, but not today...

9 years agoAdd NFS server to mix (for easier, in-place updates). Move to
Warner Losh [Tue, 19 May 2015 21:16:51 +0000 (21:16 +0000)]
Add NFS server to mix (for easier, in-place updates). Move to
partition 2 for root (since partition 1 is reserved for FAT
files the Atmel ROMs can load).

9 years agoImprove comment about unmapped I/O and fix typos.
Warner Losh [Tue, 19 May 2015 21:16:37 +0000 (21:16 +0000)]
Improve comment about unmapped I/O and fix typos.

Submitted by: Matteo Riondato
MFC After: 2 days

9 years agoAll FreeBSD platforms are elf: move i386-elf to i386
Ed Maste [Tue, 19 May 2015 21:00:53 +0000 (21:00 +0000)]
All FreeBSD platforms are elf: move i386-elf to i386

This was a leftover from when we had both i386 a.out and ELF.

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

9 years agoCorrect the wording as we are increasing the window size.
Hiren Panchasara [Tue, 19 May 2015 19:17:20 +0000 (19:17 +0000)]
Correct the wording as we are increasing the window size.

Reviewed by: jhb
Sponsored by: Limelight Networks

9 years agoFix two bugs that could result in PMC sampling effectively stopping.
John Baldwin [Tue, 19 May 2015 19:15:19 +0000 (19:15 +0000)]
Fix two bugs that could result in PMC sampling effectively stopping.
In both cases, the the effect of the bug was that a very small positive
number was written to the counter. This means that a large number of
events needed to occur before the next sampling interrupt would trigger.
Even with very frequently occurring events like clock cycles wrapping all
the way around could take a long time. Both bugs occurred when updating
the saved reload count for an outgoing thread on a context switch.

First, the counter-independent code compares the current reload count
against the count set when the thread switched in and generates a delta
to apply to the saved count. If this delta causes the reload counter
to go negative, it would add a full reload interval to wrap it around to
a positive value. The fix is to add the full reload interval if the
resulting counter is zero.

Second, occasionally the raw counter value read during a context switch
has actually wrapped, but an interrupt has not yet triggered. In this
case the existing logic would return a very large reload count (e.g.
2^48 - 2 if the counter had overflowed by a count of 2). This was seen
both for fixed-function and programmable counters on an E5-2643.
Workaround this case by returning a reload count of zero.

PR: 198149
Differential Revision: https://reviews.freebsd.org/D2557
Reviewed by: emaste
MFC after: 1 week
Sponsored by: Norse Corp, Inc.

9 years agoUse the proper mask when reloading sampling PMCs for Core CPUs.
John Baldwin [Tue, 19 May 2015 19:01:22 +0000 (19:01 +0000)]
Use the proper mask when reloading sampling PMCs for Core CPUs.

Differential Revision: https://reviews.freebsd.org/D2492
Reviewed by: emaste
MFC after: 1 month

9 years agoUse fixed enum values for PMC_CLASSES().
John Baldwin [Tue, 19 May 2015 18:58:18 +0000 (18:58 +0000)]
Use fixed enum values for PMC_CLASSES().

This removes one of the frequent causes of ABI breakage when new CPU
types are added to hwpmc(4).

Differential Revision: https://reviews.freebsd.org/D2586
Reviewed by: davide, emaste, gnn (earlier version)
MFC after: 2 weeks

9 years agoRemove executable property from several ixl(4) source files.
John Baldwin [Tue, 19 May 2015 18:35:18 +0000 (18:35 +0000)]
Remove executable property from several ixl(4) source files.

Differential Revision: https://reviews.freebsd.org/D2583
Reviewed by: erj

9 years agoBring back support for checking tables via "ipfw -n".
Alexander V. Chernikov [Tue, 19 May 2015 18:29:13 +0000 (18:29 +0000)]
Bring back support for checking tables via "ipfw -n".

Currently we have different table key types which can easily interfere
with each other (numbers and IPv4 address, interface names and hostnames,
  flows and hostnames/addresses).
This conflicts are solved by [auto-]creating _typed_ tables, so after
table is created, only keys of given type can be inserted to that table.
ipfw(8) consults with kernel about key/value type for particular table so
it knows key/value interpretation.
However, we have 2 cases (adding entries to non-existing table and
  parsing configuration file via `ipfw -n`) when kernel is unable to
  provide us table info we need. Fix the latter case by partially importing
  old `table_fill_xentry()` parse function responsible for guessing key type.

Sponsored by: Yandex LLC

9 years agoRemove unneded mbuf length adjustment, M_PREPEND() already did that.
Andrey V. Elsukov [Tue, 19 May 2015 17:14:27 +0000 (17:14 +0000)]
Remove unneded mbuf length adjustment, M_PREPEND() already did that.

PR: 139387
MFC after: 1 week

9 years agouse proper types to represent function pointers
Luigi Rizzo [Tue, 19 May 2015 16:51:30 +0000 (16:51 +0000)]
use proper types to represent function pointers

9 years agoProperly null-terminate strings in a kernel dump header. A version string
Alan Somers [Tue, 19 May 2015 16:23:47 +0000 (16:23 +0000)]
Properly null-terminate strings in a kernel dump header.  A version string
longer than 192 bytes will cause the version field of a dump header to
overflow. strncpy doesn't null terminate it, so savecore will print a
corrupted info file. Using strlcpy fixes the bug.

Differential Revision: https://reviews.freebsd.org/D2560
Reviewed by: markj
MFC after: 3 weeks
Sponsored by: Spectra Logic

9 years agoFixup to the kern_psignal manpage
Benjamin Kaduk [Tue, 19 May 2015 15:43:20 +0000 (15:43 +0000)]
Fixup to the kern_psignal manpage

r283105 misspelled kern_psignal as kernel_psignal in one occurrence, and
added trailing whitespace.

While here, change 'call' to the more standard 'function', and say why
the name was changed (taken from the commit message for r225617).

9 years agoremove a redundant ; at the end of a function
Luigi Rizzo [Tue, 19 May 2015 15:29:00 +0000 (15:29 +0000)]
remove a redundant ; at the end of a function

MFC after: 1 week

9 years agoAdd Performance Monitoring Counters support for AArch64.
Ruslan Bukin [Tue, 19 May 2015 15:25:47 +0000 (15:25 +0000)]
Add Performance Monitoring Counters support for AArch64.
Family-common and CPU-specific counters implemented.

Supported CPUs: ARM Cortex A53/57/72.

Reviewed by: andrew, bz, emaste, gnn, jhb
Sponsored by: ARM Limited
Differential Revision: https://reviews.freebsd.org/D2555

9 years agoremove an extra ; after MODULE_DEPEND
Luigi Rizzo [Tue, 19 May 2015 14:49:31 +0000 (14:49 +0000)]
remove an extra ; after MODULE_DEPEND
(would otherwise generate a warning with more verbose compiler flags)

MFC after: 1 week

9 years agoAdd GRP_COMDAT section group flag to ELF header
Ed Maste [Tue, 19 May 2015 14:23:33 +0000 (14:23 +0000)]
Add GRP_COMDAT section group flag to ELF header

Reviewed by: kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2582

9 years agoWhen sleeping in Sx state using MWAIT instruction, accept fast wakeup
Konstantin Belousov [Tue, 19 May 2015 14:21:00 +0000 (14:21 +0000)]
When sleeping in Sx state using MWAIT instruction, accept fast wakeup
requests from writes to the monitored line.

Submitted by: avg

9 years agoUpdate crunch bootstrapping test for recent fixes
Ed Maste [Tue, 19 May 2015 14:05:15 +0000 (14:05 +0000)]
Update crunch bootstrapping test for recent fixes

- r277259 crunchide: Correct 64-bit section header offset
- r281674 crunchide: always include both 32- and 64-bit ELF support

With built-in cross-size support we also no longer need a special case
for cross-build crunchide.

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

9 years agoUse MTX_SYSINIT() instead of mtx_init() to separate mutex initialization
Gleb Smirnoff [Tue, 19 May 2015 14:04:21 +0000 (14:04 +0000)]
Use MTX_SYSINIT() instead of mtx_init() to separate mutex initialization
from associated structures initialization.  The mutexes are global, while
the structures are per-vnet.

Submitted by: Nikos Vassiliadis <nvass gmx.com>

9 years agoDuring module unload unlock rules before destroying UMA zones, which
Gleb Smirnoff [Tue, 19 May 2015 14:02:40 +0000 (14:02 +0000)]
During module unload unlock rules before destroying UMA zones, which
may sleep in uma_drain(). It is safe to unlock here, since we are already
dehooked from pfil(9) and all pf threads had quit.

Sponsored by: Nginx, Inc.

9 years agoOnly several years late, catch the psignal man page up to the
Julian Elischer [Tue, 19 May 2015 11:33:04 +0000 (11:33 +0000)]
Only several years late, catch the psignal man page up to the
fact that psignal has been renamed to kern_psignal since 9.0.

MFC after: 1 week

9 years agoRead GEOM_UNCOMPRESS metadata using several requests that fit into
Andrey V. Elsukov [Tue, 19 May 2015 09:28:52 +0000 (09:28 +0000)]
Read GEOM_UNCOMPRESS metadata using several requests that fit into
MAXPHYS. For large compressed images the metadata size can be bigger
than MAXPHYS and this triggers KASSERT in g_read_data().
Also use g_free() to free memory allocated by g_read_data().

PR: 199476
MFC after: 2 weeks

9 years agoFix for DWC OTG device side isochronous transfers. The even or odd
Hans Petter Selasky [Tue, 19 May 2015 09:22:06 +0000 (09:22 +0000)]
Fix for DWC OTG device side isochronous transfers. The even or odd
isochronous frame bit needs to be flipped.

MFC after: 3 days

9 years agoChange SA's state before sending SADB_EXPIRE message. This state will
Andrey V. Elsukov [Tue, 19 May 2015 08:37:03 +0000 (08:37 +0000)]
Change SA's state before sending SADB_EXPIRE message. This state will
be reported to keying daemon.

MFC after: 2 weeks

9 years agoTeach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD
Andrey V. Elsukov [Tue, 19 May 2015 08:30:04 +0000 (08:30 +0000)]
Teach key_expire() send SADB_EXPIRE message with the SADB_EXT_LIFETIME_HARD
extension header type. The key_flush_sad() now will send SADB_EXPIRE
message when HARD lifetime expires. This is required by RFC 2367 and some
keying daemons rely on these messages. HARD lifetime messages have
precedence over SOFT lifetime messages, so now they will be checked first.
Also now SADB_EXPIRE messages will be send even the SA has not been used,
because keying daemons might want to rekey such SA.

PR: 200282, 200283
Submitted by: Tobias Brunner <tobias at strongswan dot org>
MFC after: 2 weeks

9 years agoConvert routerstation to use geom_uncompress.
Adrian Chadd [Tue, 19 May 2015 06:45:56 +0000 (06:45 +0000)]
Convert routerstation to use geom_uncompress.

9 years agoMigrate RSPRO to use the uncompress module, not uzip.
Adrian Chadd [Tue, 19 May 2015 06:45:06 +0000 (06:45 +0000)]
Migrate RSPRO to use the uncompress module, not uzip.

(This is hand-in-hand with what I'm about to do with freebsd-wifi-build.)

9 years agoQCA955x / AP135 platform tidyups.
Adrian Chadd [Tue, 19 May 2015 05:41:00 +0000 (05:41 +0000)]
QCA955x / AP135 platform tidyups.

* Change mips24k -> mips74k for hwpmc, but leave it disabled for now.
* don't build pci by default.
* build pci and qca955x_pci for AP135, as theres a PCIe NIC.
* don't build a hwpmc module, it doesn't really work out well
  for the mips boards at the moment.
* add ipfw and DEFAULT_TO_ACCEPT.

9 years agoThe AP135 PCIe NIC isn't an ath device, it's an 11ac part (linux ath10k.)
Adrian Chadd [Tue, 19 May 2015 05:33:07 +0000 (05:33 +0000)]
The AP135 PCIe NIC isn't an ath device, it's an 11ac part (linux ath10k.)
So, don't try to attach hints to it here.

9 years agoAdd initial support for the QCA955x PCIe host controller.
Adrian Chadd [Tue, 19 May 2015 05:31:58 +0000 (05:31 +0000)]
Add initial support for the QCA955x PCIe host controller.

The QCA955x looks a lot like the AR724x PCIe controller, except it
supports two root complexes.  Unfortunately I only have one, so
although this code has started down the path of supporting more than
one, it's definitely not yet ready.

Tested:

* AP135 board (QCA9558 SoC), with the 11ac NIC swapped for an AR9380
  PCIe NIC.

Notes:

* Yes, this driver isn't very pretty.  I decided to commit what I have
  versus holding onto something that isn't yet finished.  It is enough
  to bring up the above NIC and interrupt routing works, so it's a good
  start.

* However, yes, the DDR flush routine hooks need to be fixed up.
  I don't think I'm firing the right one at the moment.