freebsd.git
9 years agoEnable leds for VSATV102 in dts.
Ganbold Tsagaankhuu [Sun, 24 May 2015 07:09:16 +0000 (07:09 +0000)]
Enable leds for VSATV102 in dts.

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

9 years agoFix a lock up where we enter swapper() with interrupts disabled.
Andrew Turner [Sat, 23 May 2015 23:08:16 +0000 (23:08 +0000)]
Fix a lock up where we enter swapper() with interrupts disabled.

In smp_rendezvous_cpus we expect to wait for all cpus to enter
smp_rendezvous_action. If we call this holding a proc lock swapper may
attempt to also lock it, however as interrupts are disabled the cpu never
handles the ipi. Because smp_rendezvous_action waits for all signaled
cpus before contining it may get caught waiting for the cpu running swapper
as the proc mutex will be unlocked after smp_rendezvous_cpus finishes.

The fix is to enable interrupts in the configure stage as we should be
doing.

MFC after: 1 week

9 years agoUse the wait-for-event instruction to put the core we have just enabled
Andrew Turner [Sat, 23 May 2015 22:28:59 +0000 (22:28 +0000)]
Use the wait-for-event instruction to put the core we have just enabled
to sleep while it waits to start scheduling. The boot core can then use
the send-event instruction to wake the cores when they should enter the
scheduler.

MFC after: 1 week

9 years agoThe NFS client generated directory block(s) with d_fileno == 0
Rick Macklem [Sat, 23 May 2015 21:58:41 +0000 (21:58 +0000)]
The NFS client generated directory block(s) with d_fileno == 0
so that it would not return less data than requested.
Since returning less directory data than requested is not a problem
for FreeBSD and even UFS no longer returns directory structures
with d_fileno == 0, this patch stops the client from doing this.
Although entries with d_fileno == 0 should not be a problem,
the man pages no longer document that these entries should be
ignored, so there was a concern that these entries might be an
issue in the future.

Suggested by: trasz
Tested by: trasz
MFC after: 2 weeks

9 years agoUpdate P_TOTAL_STOP commentary.
Sergey Kandaurov [Sat, 23 May 2015 21:04:15 +0000 (21:04 +0000)]
Update P_TOTAL_STOP commentary.

9 years agoIf thread requested to not stop on non-boundary, then not only
Konstantin Belousov [Sat, 23 May 2015 19:09:04 +0000 (19:09 +0000)]
If thread requested to not stop on non-boundary, then not only
stopping signals should obey, but also all forms of single-threading.
Otherwise, thread might sleep interruptible while owning some
resources, and single-threading thread could try to access them.
An example is owning vnode lock while dumping core.

Submitted by: Conrad Meyer
Review: https://reviews.freebsd.org/D2612
Tested by: pho
MFC after: 1 week

9 years agoSimplify the allocation of page table pages for mips64. Specifically,
Alan Cox [Sat, 23 May 2015 16:54:46 +0000 (16:54 +0000)]
Simplify the allocation of page table pages for mips64.  Specifically,
when allocation fails, it suffices to perform VM_WAIT.  The direct map
covers the entirely of physical memory, so unlike 32-bit mips any
physical page can be used as a page table page.

9 years agoddb: de-register
Pedro F. Giffuni [Sat, 23 May 2015 14:59:27 +0000 (14:59 +0000)]
ddb:  de-register

9 years agoRemove an unused header.
Andrew Turner [Sat, 23 May 2015 14:48:03 +0000 (14:48 +0000)]
Remove an unused header.

9 years agoProperly update TX statistics for wlan(4).
Andrey V. Elsukov [Sat, 23 May 2015 09:49:40 +0000 (09:49 +0000)]
Properly update TX statistics for wlan(4).
ieee80211_pwrsave() can fail due to queue overflow, check its return code
and increment oerrors counter when it fails. Also handle more error cases
and update oerrors counter when we don't send mbuf due to some errors.
Return ENETDOWN when parent interface isn't ready. Update obytes and omcasts
counters in corresponding places.

PR: 184626
Differential Revision: https://reviews.freebsd.org/D2621
Reviewed by: adrian
MFC after: 1 week

9 years agoAdd support for the tuning cap for Hornet/AR9331 boards.
Adrian Chadd [Sat, 23 May 2015 08:02:54 +0000 (08:02 +0000)]
Add support for the tuning cap for Hornet/AR9331 boards.

This dramatically improves RX sensitivity and behaviour on the
AR9331 hardware I have, including the Carambola 2.

Tested:

* AR9331, Carambola 2 board

Submitted by: Zilvinas Valinskas <zilvinas.valinskas@gmail.com>

9 years agoExceptions don't deliver an error code in real mode.
Neel Natu [Sat, 23 May 2015 01:17:50 +0000 (01:17 +0000)]
Exceptions don't deliver an error code in real mode.

MFC after: 1 week

9 years agoUse mkimg(1) to create the i386 memstick images, similar to
Glen Barber [Sat, 23 May 2015 00:32:58 +0000 (00:32 +0000)]
Use mkimg(1) to create the i386 memstick images, similar to
how is done for amd64.  The exception here is there is no
EFI partition for i386.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoConvert to use libxo. Document use of libxo as well.
Marcel Moolenaar [Fri, 22 May 2015 23:07:55 +0000 (23:07 +0000)]
Convert to use libxo. Document use of libxo as well.

Obtained from:  Phil Shafer <phil@juniper.net>
Sponsored by:   Juniper Networks, Inc.

9 years agoFix staging virtual machine images for ftp propagation.
Glen Barber [Fri, 22 May 2015 21:38:11 +0000 (21:38 +0000)]
Fix staging virtual machine images for ftp propagation.

MFC after: 3 days
X-MFC-Note: needs all previous changes
Sponsored by: The FreeBSD Foundation

9 years agoAdjust default argument construction for -c to be getopt compliant for
Peter Wemm [Fri, 22 May 2015 21:33:13 +0000 (21:33 +0000)]
Adjust default argument construction for -c to be getopt compliant for
consistency, even though unbound understood it.

9 years agoFix typo in symbol name. It helps to hit save in all your buffers
Warner Losh [Fri, 22 May 2015 21:10:14 +0000 (21:10 +0000)]
Fix typo in symbol name. It helps to hit save in all your buffers
before committing.

9 years agoRemove the verification of instruction length after instruction decode. The
Neel Natu [Fri, 22 May 2015 21:09:11 +0000 (21:09 +0000)]
Remove the verification of instruction length after instruction decode. The
check has been bogus since r273375.

MFC after: 1 week

9 years agoFix a number of logic and/or naming problems in Makefile.mirrors.
Glen Barber [Fri, 22 May 2015 21:04:42 +0000 (21:04 +0000)]
Fix a number of logic and/or naming problems in Makefile.mirrors.
Reduce a number of duplicated logic.

As of this commit, this file does exactly what it is needed to do.

MFC after: 3 days
X-MFC-Note: needs all previous changes
Sponsored by: The FreeBSD Foundation

9 years agoExport the eflags field from the elf header. This allows better
Warner Losh [Fri, 22 May 2015 20:50:35 +0000 (20:50 +0000)]
Export the eflags field from the elf header. This allows better
discrimination between different subarch binaries, at least for mips
and arm. Arm is implemented, mips is still tbd, so not currently
exported. aarch64 does not export this because aarch64 binaries use
different tags and flags than arm.

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

9 years agoddb: Use NULL for pointers
Pedro F. Giffuni [Fri, 22 May 2015 19:04:06 +0000 (19:04 +0000)]
ddb:  Use NULL for pointers

Hinted by: DragonflyBSD

9 years agoipf(1): Use strchr(3) instead of deprecated index(3)
Ed Maste [Fri, 22 May 2015 18:31:26 +0000 (18:31 +0000)]
ipf(1): Use strchr(3) instead of deprecated index(3)

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

9 years agoDon't rely on the 'VM-exit instruction length' field in the VMCS to always
Neel Natu [Fri, 22 May 2015 17:34:22 +0000 (17:34 +0000)]
Don't rely on the 'VM-exit instruction length' field in the VMCS to always
have an accurate length on an EPT violation. This is not needed by the
instruction decoding code because it also has to work with AMD/SVM that
does not provide a valid instruction length on a Nested Page Fault.

In collaboration with: Leon Dang (ldang@nahannisys.com)
Discussed with: grehan
MFC after: 1 week

9 years agoCALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten
Jung-uk Kim [Fri, 22 May 2015 17:05:21 +0000 (17:05 +0000)]
CALLOUT_MPSAFE has lost its meaning since r141428, i.e., for more than ten
years for head.  However, it is continuously misused as the mpsafe argument
for callout_init(9).  Deprecate the flag and clean up callout_init() calls
to make them more consistent.

Differential Revision: https://reviews.freebsd.org/D2613
Reviewed by: jhb
MFC after: 2 weeks

9 years agoBump rx_overruns when indicated by the ICR mask.
Sean Bruno [Fri, 22 May 2015 17:01:43 +0000 (17:01 +0000)]
Bump rx_overruns when indicated by the ICR mask.

PR: 199716
MFC after: 3 days
Sponsored by: Limelight Networks

9 years agoFix a syntax error in bsdinstall/zfsboot
Allan Jude [Fri, 22 May 2015 15:57:42 +0000 (15:57 +0000)]
Fix a syntax error in bsdinstall/zfsboot

Differential Revision: https://reviews.freebsd.org/D2571
Submitted by: Michael Dexter
Approved by: dteske
MFC after: 1 week
X-MFC-With: r283023, r282443
Sponsored by: ScaleEngine Inc.

9 years agoAdd a miibus_statchg and use it to enable Gigabit mode when appropriate.
Andrew Turner [Fri, 22 May 2015 14:25:23 +0000 (14:25 +0000)]
Add a miibus_statchg and use it to enable Gigabit mode when appropriate.

MFC after: 1 week

9 years agoStart documenting ctl(4) sysctls.
Edward Tomasz Napierala [Fri, 22 May 2015 12:01:29 +0000 (12:01 +0000)]
Start documenting ctl(4) sysctls.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoAdvertise ctlstat(8) a little better.
Edward Tomasz Napierala [Fri, 22 May 2015 11:59:37 +0000 (11:59 +0000)]
Advertise ctlstat(8) a little better.

MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

9 years agoExpand ktr_mask to be a 64-bit unsigned integer.
John Baldwin [Fri, 22 May 2015 11:09:41 +0000 (11:09 +0000)]
Expand ktr_mask to be a 64-bit unsigned integer.

The mask does not really need to be updated with atomic operations and
the downside of losing races during transitions is not great (it is
not marked volatile, so those races are pretty wide open as it is).

Differential Revision: https://reviews.freebsd.org/D2595
Reviewed by: emaste, neel, rpaulo
MFC after: 2 weeks

9 years agoOnly reparent a traced process to its old parent if the tracing process is
John Baldwin [Fri, 22 May 2015 11:04:54 +0000 (11:04 +0000)]
Only reparent a traced process to its old parent if the tracing process is
not the old parent. Otherwise, proc_reap() will leave the zombie in place
resulting in the process' status being returned twice to its parent.

Add test cases for PT_TRACE_ME and PT_ATTACH which are fixed by
this change.

Differential Revision: https://reviews.freebsd.org/D2594
Reviewed by: kib
MFC after: 2 weeks

9 years agoAlways set p_oppid when attaching to an existing process via procfs
John Baldwin [Fri, 22 May 2015 11:03:51 +0000 (11:03 +0000)]
Always set p_oppid when attaching to an existing process via procfs
tracing.  This matches the behavior of ptrace(PT_ATTACH).  Also,
the procfs detach request assumes p_oppid is always set.

Reviewed by: kib
MFC after: 2 weeks

9 years agosfxge: relax assertion to allow RST flag in TSO packets
Andrew Rybchenko [Fri, 22 May 2015 07:39:21 +0000 (07:39 +0000)]
sfxge: relax assertion to allow RST flag in TSO packets

Kernel under stress load, mixed MC reboot and sfupdate really
generates TSO packet with RST flag.
It will generate many TCP packets with RST flag set.
May be RST flag should be set in the last segment only, but it could be
dropped. So, it is safer to keep the flag in all packets to be sure that
connection is reset.

Reviewed by:    gnn
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
Differential Revision: https://reviews.freebsd.org/D2609

9 years agoNeed to handle the !FDT case still too... I thought in r270025 we
Warner Losh [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
Oleksandr Tymoshenko [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.
Oleksandr Tymoshenko [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.
David C Somayajulu [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
Rick Macklem [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.
Glen Barber [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,
Glen Barber [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...
David C Somayajulu [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
Glen Barber [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.
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