]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoNeed to handle the !FDT case still too... I thought in r270025 we
imp [Fri, 22 May 2015 05:02:53 +0000 (05:02 +0000)]
Need to handle the !FDT case still too... I thought in r270025 we
wouldn't need it, but it appears that we still do for the moment...

9 years agoSwitch TI platform support code from using FreeBSD's custom-baked DTS
gonzo [Fri, 22 May 2015 03:16:18 +0000 (03:16 +0000)]
Switch TI platform support code from using FreeBSD's custom-baked DTS
files to vendor-provided ones. It should make easier to adopt platform
code to new revisions of hardware and to use DTS overlays for various
Beaglebone extensions (shields/capes).

Original dts filenames were not changed, they're now wrappers over dts
files provided by TI. So make sure you update .dtb files on your
devices as part of kernel update

GPIO addressing was changed: instead of one global /dev/gpioc0 there
are per-bank instances of /dev/gpiocX. Each bank has 32 pins so for
instance pin 121 on /dev/gpioc0 in old addressing scheme is now pin 25
on /dev/gpioc3

On Pandaboard serial console devices was changed from /dev/ttyu0 to
/dev/ttyu2 so you'll have to update /etc/ttys to get login prompt
on serial port in multiuser mode. Single user mode serial console
should work as-is

Differential Revision: https://reviews.freebsd.org/D2146
Reviewed by: rpaulo, ian, Michal Meloun, Svatopluk Kraus

9 years agoAdd helper method fdt_find_child to make access to child nodes easier.
gonzo [Fri, 22 May 2015 02:00:44 +0000 (02:00 +0000)]
Add helper method fdt_find_child to make access to child nodes easier.

Some FDT nodes have complex properties organized as a child sub-nodes
(e.g. timing for LCD panel) we need easy way to obtain handles for
these sub-nodes

9 years agoAdd stat counters for Jumbo Frames using SGE ring.
davidcs [Fri, 22 May 2015 01:44:07 +0000 (01:44 +0000)]
Add stat counters for Jumbo Frames using SGE ring.
Also remove the checks for IFCAP_LRO in bxe_alloc_fp_buffers() and bxe_pf_rx_q_prep() since both TPA and Jumbo can use SGE ring.

Submitted by:gary.zambrano@qlogic.com
Approved by:davidcs@freebsd.org
MFC after:5 days

9 years agoThe NFS client wasn't handling getdirentries(2) requests for sizes
rmacklem [Thu, 21 May 2015 23:14:18 +0000 (23:14 +0000)]
The NFS client wasn't handling getdirentries(2) requests for sizes
that are not an exact multiple of DIRBLKSIZ correctly. Fortunately
readdir(3) always uses an exact multiple of DIRBLKSIZ, so few applications
were affected. This patch fixes this problem by reducing the size
of the directory read to an exact multiple of DIRBLKSIZ.

Tested by: trasz
Reported by: trasz
Reviewed by: trasz
MFC after: 2 weeks

9 years agoFix make(1) syntax error for non-embedded targets.
gjb [Thu, 21 May 2015 22:50:39 +0000 (22:50 +0000)]
Fix make(1) syntax error for non-embedded targets.

Sponsored by: The FreeBSD Foundation

9 years agoIf TARGET or EMBEDDED_TARGET == arm, set EMBEDDED variable,
gjb [Thu, 21 May 2015 22:11:57 +0000 (22:11 +0000)]
If TARGET or EMBEDDED_TARGET == arm, set EMBEDDED variable,
which helps control some of the arm-specific bits a bit more
cleanly (but not really 'clean').

If BOARDNAME is defined (as is in the WANDBOARD configuration
RE uses), do some magic to work with the KERNCONF and BOARDNAME
to rename the file, making it a bit more intuitive for the
consumer to determine which they need.

Yes, it is ugly, that is why there is a big warning at the top.
It is, however, still much cleaner than the now 474-line shell
script, and this Makefile produces the hierarchy needed without
much evil.

MFC after: 1 week
X-MFC-Note: needs all previous Makefile.mirror commits
Sponsored by: The FreeBSD Foundation

9 years agoLimit the size of the posted receive buffers in Rx Rings to MJUMPAGESIZE. Previously...
davidcs [Thu, 21 May 2015 20:47:19 +0000 (20:47 +0000)]
Limit the size of the posted receive buffers in Rx Rings to MJUMPAGESIZE. Previously for jumbo MTUs, the rx ring buffers were
 MTU + any required pad. Now when this size greater than MJUMPAGESIZE, the packet is spanned across multiple buffers and the
mbufs are stiched together.

Submitted by:gary.zambrano@qlogic.com
Approved by:davidcs@freebsd.org

9 years agoRemove the arm/armv6 bits from Makefile.mirrors, which needs
gjb [Thu, 21 May 2015 20:43:02 +0000 (20:43 +0000)]
Remove the arm/armv6 bits from Makefile.mirrors, which needs
some re-thinking.

Sponsored by: The FreeBSD Foundation

9 years agoInclude xz(1)-compressed images when not a snapshot build.
gjb [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
gjb [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
tychon [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
loos [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
jkim [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.
delphij [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 [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 [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
dim [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.
loos [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.
gjb [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
jhb [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...
jmg [Thu, 21 May 2015 15:38:43 +0000 (15:38 +0000)]
remove stray ; that came in r272673...

9 years agoddb: finish converting boolean values.
pfg [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
bapt [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
imp [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.
imp [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.
imp [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
imp [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
bapt [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
bapt [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
bapt [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
bapt [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
bapt [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
bapt [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
bapt [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
bapt [Thu, 21 May 2015 08:20:42 +0000 (08:20 +0000)]
sort headers

9 years agoAdd missing break statement.
ganbold [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 [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 [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 [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
ngie [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
ngie [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.
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...
allanjude [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 agoDo grammar fix in the comment to record the right commit message for
kib [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
kib [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.
bapt [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
ngie [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.
oshogbo [Wed, 20 May 2015 17:48:22 +0000 (17:48 +0000)]
Fix memory leak.

Approved by: pjd (mentor)

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

Approved by: pjd (mentor)

9 years agoAlways use the nv_free function.
oshogbo [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.
oshogbo [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
kib [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
ngie [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
ngie [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
ngie [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
emaste [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
ngie [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
ngie [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
ae [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
ngie [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
ngie [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
ngie [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.
glebius [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
trasz [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
ngie [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
bapt [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.
rpaulo [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 [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 [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.
bapt [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
bapt [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
bapt [Tue, 19 May 2015 22:23:15 +0000 (22:23 +0000)]
Fix underlinking

9 years agoRegister libdtrace and its direct and indirect dependencies
bapt [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
bapt [Tue, 19 May 2015 21:59:00 +0000 (21:59 +0000)]
Convert to LIBADD

9 years agoConvert to LIBADD
bapt [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
imp [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
imp [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.
imp [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
emaste [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 [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.
jhb [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.
jhb [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().
jhb [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.
jhb [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".
melifaro [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.
ae [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 [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
asomers [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
bjk [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 [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.
br [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 [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
emaste [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
kib [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
emaste [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
glebius [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
glebius [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 [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
ae [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