]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoDisable TX IP/TCP/UDP checksum offloading for RTL8168C/RTL8168CP.
yongari [Tue, 13 May 2014 05:19:29 +0000 (05:19 +0000)]
Disable TX IP/TCP/UDP checksum offloading for RTL8168C/RTL8168CP.
Previously only TX IP checksum offloading was disabled but it's
reported that TX checksum offloading for UDP datagrams with IP
options also generates corrupted frames.  Reporter's controller is
RTL8168CP but I guess RTL8168C also have the same issue since it
shall share the same core.

Reported and tested by: tuexen

10 years agoFix checksum computation. Previously it didn't include carry.
yongari [Tue, 13 May 2014 05:07:03 +0000 (05:07 +0000)]
Fix checksum computation.  Previously it didn't include carry.

Reviewed by: tuexen

10 years agoabort(3) the process in response to a VMEXIT_ABORT. This usually happens in
neel [Mon, 12 May 2014 23:35:10 +0000 (23:35 +0000)]
abort(3) the process in response to a VMEXIT_ABORT. This usually happens in
response to an unhandled VM exit or an unexpected error so a core is useful.

Remove unused macro VMEXIT_SWITCH.

Reviewed by: grehan

10 years agoFix delete-old when WITH_TESTS is set.
jmmv [Mon, 12 May 2014 21:21:32 +0000 (21:21 +0000)]
Fix delete-old when WITH_TESTS is set.

r265423 removed the WITHOUT_BMAKE option, which in turn broke a conditional
in OptionalObsoleteFiles.inc that inspected MK_BMAKE.

10 years agoBe even more paranoid about overflow.
truckman [Mon, 12 May 2014 20:22:42 +0000 (20:22 +0000)]
Be even more paranoid about overflow.

Requested by: ache

10 years agoUpdate terminal sizes in any case when new vt(4) driver arrive.
ray [Mon, 12 May 2014 19:29:38 +0000 (19:29 +0000)]
Update terminal sizes in any case when new vt(4) driver arrive.
(Plus remove one unused newline)

Sponsored by: The FreeBSD Foundation

10 years ago(NANO_CONFIG): New variable containing path of config file, so that
thomas [Mon, 12 May 2014 19:11:39 +0000 (19:11 +0000)]
(NANO_CONFIG): New variable containing path of config file, so that
the configuration can reference additional files relative to its own
location.

(NANO_MODULES): If set to "default", install all built modules.

Reviewed by: imp
MFC after: 1 week

10 years agoUpgrade our copy of llvm/clang to 3.4.1 release. This release contains
dim [Mon, 12 May 2014 18:45:56 +0000 (18:45 +0000)]
Upgrade our copy of llvm/clang to 3.4.1 release.  This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326

MFC after: 2 weeks

10 years agoBump copyright date
skreuzer [Mon, 12 May 2014 17:58:17 +0000 (17:58 +0000)]
Bump copyright date

Approved by: hrs@ (mentor)

10 years agoNuke a couple of unnecessary assigments. Nothing uses the values of rstart
truckman [Mon, 12 May 2014 17:56:52 +0000 (17:56 +0000)]
Nuke a couple of unnecessary assigments.  Nothing uses the values of rstart
and rend after this point.

MFC after: 1 week

10 years agoBuild modules in parallel. This has been tested by several people at
ian [Mon, 12 May 2014 13:33:12 +0000 (13:33 +0000)]
Build modules in parallel.  This has been tested by several people at
various -j levels from 6 to 48 without problems.

10 years agoCleanup some style nits.
ian [Mon, 12 May 2014 13:08:37 +0000 (13:08 +0000)]
Cleanup some style nits.

10 years agoInterrupts need to be disabled on entry to cpu_sleep() for ARM. Given
ian [Mon, 12 May 2014 13:05:03 +0000 (13:05 +0000)]
Interrupts need to be disabled on entry to cpu_sleep() for ARM.  Given
that and the need to be in a critical section when switching to idleclock
mode for event timers, use spinlock_enter()/exit() to achieve both needs.

The ARM WFI (wait for interrupt) instruction blocks until an interrupt is
asserted, and it will unblock even if interrupts are masked, and it will
unblock immediately if an interrupt is already pending.  It is necessary
to execute it with interrupts disabled, otherwise the interrupt that
should unblock it may occur and be serviced just prior to executing the
instruction.  At that point the system is inappropriately asleep until
the next timer tick or some other random interrupt happens.

In general, interrupts need to be disabled continuously from the time the
decision is made that there is no work to be done and sleeping is needed
until actually going to sleep, to avoid a race where handling a new
interrupt changes the basis for deciding there is no work to be done.

Submitted by: hps@ (in slightly different form)

10 years agoDisable TX checksum offload for UDP-Lite completely. It wasn't used for
tuexen [Mon, 12 May 2014 09:46:48 +0000 (09:46 +0000)]
Disable TX checksum offload for UDP-Lite completely. It wasn't used for
partial checksum coverage, but even for full checksum coverage it doesn't
work.
This was discussed with Kevin Lo (kevlo@).

10 years agoCreate driver file templates, kernel module Makefile and add initial
hselasky [Mon, 12 May 2014 09:05:07 +0000 (09:05 +0000)]
Create driver file templates, kernel module Makefile and add initial
version of register definitions for ISP1761 and SAF1761 compatible
chips.

Sponsored by: DARPA, AFRL

10 years agounits(1): call el_end()
eadler [Mon, 12 May 2014 07:14:09 +0000 (07:14 +0000)]
units(1): call el_end()

Add missing el_end() call

10 years agounits(1): unbreak -f option, fix some style, increase compatibility.
eadler [Mon, 12 May 2014 06:14:14 +0000 (06:14 +0000)]
units(1): unbreak -f option, fix some style, increase compatibility.

- Unbreak the -f option: it was missing a ':'
- gunits -V spits out more information than just its version: attempt to do so
  as well.

10 years agounits(1): use common functions
eadler [Mon, 12 May 2014 05:44:55 +0000 (05:44 +0000)]
units(1): use common functions

No need to replicate strdup

10 years agoRepair some races in IPI handling:
nwhitehorn [Mon, 12 May 2014 02:56:27 +0000 (02:56 +0000)]
Repair some races in IPI handling:
1. Make sure IPI mask is set before sending the IPI
2. Operate atomically on PS3 PIC outstanding interrupt list
3. Make sure IPIs are EOI'ed before, not after, processing. Without this,
   a second IPI could be sent partway through processing the first one,
   get erroneously acknowledge by the EOI to the first, and be lost. In
   particular in the case of smp_rendezvous(), this can be fatal.

In combination, this makes the PS3 boot SMP again. It probably also fixes
some latent bugs elsewhere.

MFC after: 2 weeks

10 years agos/JIRA/Jenkins/g in comments. I was confused.
imp [Mon, 12 May 2014 01:47:45 +0000 (01:47 +0000)]
s/JIRA/Jenkins/g in comments. I was confused.

10 years agoAttempt to walk a fine line between current usage (/usr/ports which
imp [Sun, 11 May 2014 23:22:32 +0000 (23:22 +0000)]
Attempt to walk a fine line between current usage (/usr/ports which
does an out-of-tree build without setting MAKESYSPATH) and recently
added requirements (JIRA's building the modules in a non-standard
layout). So, when MAKESYSPATH is defined, trust that it will do the
right thing (to catch the JIRA use case). When it isn't defined,
assume a standard FreeBSD tree and reach over to grab bsd.mkopt.mk (to
fix the /usr/ports use case). Both camps cannot be appeased otherwise,
so we have this kludge until it can be sorted out.

10 years agoaccept(),accept4(): Don't set *addrlen = 0 on [ECONNABORTED].
jilles [Sun, 11 May 2014 21:21:14 +0000 (21:21 +0000)]
accept(),accept4(): Don't set *addrlen = 0 on [ECONNABORTED].

If the underlying protocol reported an error (e.g. because a connection was
closed while waiting in the queue), this error was also indicated by
returning a zero-length address. For all other kinds of errors (e.g.
[EAGAIN], [ENFILE], [EMFILE]), *addrlen is unmodified and there are
successful cases where a zero-length address is returned (e.g. a connection
from an unbound Unix-domain socket), so this error indication is not
reliable.

As reported in Austin Group bug #836, modifying *addrlen on error may cause
subtle bugs if applications retry the call without resetting *addrlen.

10 years agoAllow libstdc++ and libsupc++ to compile with clang again, after the
dim [Sun, 11 May 2014 21:07:00 +0000 (21:07 +0000)]
Allow libstdc++ and libsupc++ to compile with clang again, after the
bsd.*.mk infrastructure changes.  Apparently, you must now modify
CXXFLAGS *before* including bsd.lib.mk, or your changes will be lost.

10 years agoMinor fixes to previous change introducing switch -H, as per comments
thomas [Sun, 11 May 2014 18:49:18 +0000 (18:49 +0000)]
Minor fixes to previous change introducing switch -H, as per comments
on -arch.

Reviewed by: gleb

10 years agoOF_peer() in IEEE 1275 returns 0 if no peer exists, not -1.
nwhitehorn [Sun, 11 May 2014 18:22:05 +0000 (18:22 +0000)]
OF_peer() in IEEE 1275 returns 0 if no peer exists, not -1.

10 years agoFix locking. The dst_object must remain locked on the retry of the
kib [Sun, 11 May 2014 18:07:07 +0000 (18:07 +0000)]
Fix locking.  The dst_object must remain locked on the retry of the
loop iteration.

Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 6 days

10 years agoWith the new-and-improved vm_fault_copy_entry() (r265843), we can always
alc [Sun, 11 May 2014 17:41:29 +0000 (17:41 +0000)]
With the new-and-improved vm_fault_copy_entry() (r265843), we can always
avoid soft page faults when adding write access to user wired entries in
vm_map_protect().  Previously, we only avoided the soft page fault when
the underlying pages were copy-on-write.  In other words, we avoided the
pages faults that might sleep on page allocation, but not the trivial
page faults to update the physical map.

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

10 years agoprintf: fix regression after illumos merges.
pfg [Sun, 11 May 2014 17:28:57 +0000 (17:28 +0000)]
printf: fix regression after illumos merges.

The "bltin/bltin.h" wrappers do not support exit() and attempting
to call it will exit sh completely.

Note that errx() is acceptable but will always return with status 2.

Reported by: jilles (and the testing framework)
Fix by: jilles
Pointyhat: pfg

10 years agoFix interrupt allocation after changes to nexus. This makes PS3 boot
nwhitehorn [Sun, 11 May 2014 16:49:31 +0000 (16:49 +0000)]
Fix interrupt allocation after changes to nexus. This makes PS3 boot
multiuser again (this commit comes from the PS3 itself). Some problems
still exist with SMP, apparently, as I had to boot a non-SMP kernel to
get here.

10 years agoinclude: Don't expose L_cuserid in strict C standard compliance mode.
jilles [Sun, 11 May 2014 16:34:17 +0000 (16:34 +0000)]
include: Don't expose L_cuserid in strict C standard compliance mode.

L_cuserid is supposed to be exposed only for old POSIX, or in the default
(expose everything) environment.

10 years agoinclude: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE
jilles [Sun, 11 May 2014 13:48:21 +0000 (13:48 +0000)]
include: Remove checks for __BSD_VISIBLE where redundant with __XSI_VISIBLE
or __POSIX_VISIBLE.

Whenever <sys/cdefs.h> sets __BSD_VISIBLE to non-zero, it also sets
__POSIX_VISIBLE and __XSI_VISIBLE to the newest version supported.

No functional change is intended.

10 years agoRevert accidental commit of SUBDIR_PARALLEL for sys/modules. (It hasn't
ian [Sun, 11 May 2014 12:55:31 +0000 (12:55 +0000)]
Revert accidental commit of SUBDIR_PARALLEL for sys/modules.  (It hasn't
been tested sufficiently).

10 years agoIn cf_get_method, when we don't already know what clock speed the CPU is
cperciva [Sun, 11 May 2014 10:32:58 +0000 (10:32 +0000)]
In cf_get_method, when we don't already know what clock speed the CPU is
running at, guess the nearest value instead of looking for a value within
25 MHz of the observed frequency.

Prior to this change, if a system booted with Intel Turbo Boost enabled,
the dev.cpu.0.freq sysctl is nonfunctional, since the ACPI-reported
frequency for Turbo Boost states does not match the actual clock frequency
(and thus no levels are within 25 MHz of the observed frequency) and the
current performance level is read before a new level is set.

MFC after: 3 days
Relnotes: Bug fix in power management on CPUs with Intel Turbo Boost

10 years agoTypo fixes and some language/punctuation improvements.
brueffer [Sun, 11 May 2014 10:06:27 +0000 (10:06 +0000)]
Typo fixes and some language/punctuation improvements.

10 years agoOptimise host mode data roundtrip time. When BULK data is submitted to
hselasky [Sun, 11 May 2014 08:17:46 +0000 (08:17 +0000)]
Optimise host mode data roundtrip time. When BULK data is submitted to
the main processing queue, clear the NAK counter for any associated
BULK or CONTROL transfers and poll the endpoint(s) for 1 millisecond
at 125us rate interval, before going into slow, 10ms, NAK polling mode
again.  This has the effect that typical ping-ping protocols respond
quicker when initiated from the USB host.

MFC after: 2 weeks

10 years agoMove the PS3 framebuffer console to use vt instead of syscons and adjust
nwhitehorn [Sun, 11 May 2014 05:49:35 +0000 (05:49 +0000)]
Move the PS3 framebuffer console to use vt instead of syscons and adjust
GENERIC64 for PowerPC to use vt with it.

Much to my chagrin, PS3 support seems to have bitrotted somewhat since the
last time I tried it. ehci panics on attach and interrupt handling seems
to be faulty. This should be fixed soon...

10 years agoAdd cpu_l2cache_drain_writebuf(), use it to implement generic_bs_barrier().
ian [Sun, 11 May 2014 04:24:57 +0000 (04:24 +0000)]
Add cpu_l2cache_drain_writebuf(), use it to implement generic_bs_barrier().

On modern ARM SoCs the L2 cache controller sits between the CPU and the
AXI bus, and most on-chip memory-mapped devices are on the AXI bus.  We
map the device registers using the 'Device' memory attribute, which means
the memory is not cached, but writes to it are buffered.  Ensuring that a
write has made it all the way to a device may require that the L2
controller take some action.

There is currently only one implementation of the new function, for the
PL310 cache controller.  It invokes a function that the controller
manual calls "cache sync" but it actually has nothing to do with cache at
all, it triggers a drain of all pending store buffer writes and it blocks
until they complete.

The sheeva and xscale L2 controllers (which predate the concept of Device
memory) don't seem to have a corresponding function.  It appears that the
standard armv5 drain_writebuf function includes draining all the way
through the L2 controller.

10 years agoEnable SMP for Exynos-based platforms (i.e. Chromebook)
grehan [Sun, 11 May 2014 04:18:51 +0000 (04:18 +0000)]
Enable SMP for Exynos-based platforms (i.e. Chromebook)

Reviewed by: br

10 years agoUse vt(4) by default on 32-bit PowerPC now that it is fully functional and
nwhitehorn [Sun, 11 May 2014 02:18:17 +0000 (02:18 +0000)]
Use vt(4) by default on 32-bit PowerPC now that it is fully functional and
fast. 64-bit PowerPC will follow along once the PS3 framebuffer driver is
adapted.

10 years agoPort over mmap routine from syscons. This lets X11 work on PowerPC with vt.
nwhitehorn [Sun, 11 May 2014 02:16:08 +0000 (02:16 +0000)]
Port over mmap routine from syscons. This lets X11 work on PowerPC with vt.
The last obstacle to switching PowerPC entirely to vt is that the Playstation 3
framebuffer driver needs to be ported over. This only applies for powerpc64,
however.

10 years agomesg: remove advertising clause
eadler [Sun, 11 May 2014 02:04:40 +0000 (02:04 +0000)]
mesg: remove advertising clause

The University of California board of trustees has given permission to remove
the advertising clause of all software attributed to it.

10 years agolook(1): add compability with other implementations.
eadler [Sun, 11 May 2014 02:00:48 +0000 (02:00 +0000)]
look(1): add compability with other implementations.

On other implementations 'look -a' uses an alternate dictionary.  Since we don't
have one, just ignore it.

10 years agoMake ofwfb not be painfully slow. This reduces the time for a verbose boot
nwhitehorn [Sun, 11 May 2014 01:58:56 +0000 (01:58 +0000)]
Make ofwfb not be painfully slow. This reduces the time for a verbose boot
on my G4 iBook by more than half. Still 10% slower than syscons, but that's
much better than a factor of 2.

The slowness had to do with pathological write performance on 8-bit
framebuffers, which are almost universally used on Open Firmware systems.
Writing 1 byte at a time, potentially nonconsecutively, resulted in many
extra PCI write cycles. This patch, in the common case where it's writing
one or several characters in an 8x8 font, gangs the writes together into
a set of 32-bit writes. This is a port of r143830 to vt(4).

The EFI framebuffer is also extremely slow, probably for the same reason,
and the same patch will likely help there.

10 years agolibedit: add H_SAVE_FP which saves history to a file pointer.
eadler [Sun, 11 May 2014 01:44:11 +0000 (01:44 +0000)]
libedit: add H_SAVE_FP which saves history to a file pointer.

H_SAVE_FP is similar to H_SAVE but operates on a FILE* instead of a filename.
This is useful when operating in capability mode.

Reviewed by: christos@NetBSD.org, pfg

10 years agoMake ofwfb actually work again. Apparently the API it was written against
nwhitehorn [Sun, 11 May 2014 01:19:55 +0000 (01:19 +0000)]
Make ofwfb actually work again. Apparently the API it was written against
still exists but is now silently ignored by the VT core. At least xboxfb
needs similar changes.

10 years agoMake the hardware memory and instruction barrier functions work on armv4
ian [Sun, 11 May 2014 00:43:06 +0000 (00:43 +0000)]
Make the hardware memory and instruction barrier functions work on armv4
and armv5 as well.

10 years agoprinf: replace use of alloca with variable length array.
pfg [Sat, 10 May 2014 22:27:01 +0000 (22:27 +0000)]
prinf: replace use of alloca with variable length array.

Use of alloca(3) is discouraged in FreeBSD. Using a VLA
is simple and should be more portable.

Requested by: jilles

10 years agoRename platform_gpio_init to be SoC specific
andrew [Sat, 10 May 2014 21:30:19 +0000 (21:30 +0000)]
Rename platform_gpio_init to be SoC specific

10 years agoReally, I don't want to install src.opts.mk at all.
imp [Sat, 10 May 2014 21:27:47 +0000 (21:27 +0000)]
Really, I don't want to install src.opts.mk at all.

10 years agoRename platform_gpio_init to be platform specific, and make it static as
andrew [Sat, 10 May 2014 20:31:05 +0000 (20:31 +0000)]
Rename platform_gpio_init to be platform specific, and make it static as
it's only used from this file.

10 years agoRename platform_gpio_init to be SoC specific, and make it static as it's
andrew [Sat, 10 May 2014 20:26:49 +0000 (20:26 +0000)]
Rename platform_gpio_init to be SoC specific, and make it static as it's
only called from this file.

10 years agoWhen mapping device memory, use PTE_DEVICE rather than PTE_NOCACHE.
ian [Sat, 10 May 2014 20:03:03 +0000 (20:03 +0000)]
When mapping device memory, use PTE_DEVICE rather than PTE_NOCACHE.
On armv4 these are defined as synonyms right now, but it's a bit ambiguous
what NOCACHE means (is buffering/write-combining also enabled or not?); this
is a first step towards replacing PTE_NOCACHE with a less ambiguous name.

10 years agoAbout 9% of the pmap_protect() calls being performed by vm_map_copy_entry()
alc [Sat, 10 May 2014 19:47:00 +0000 (19:47 +0000)]
About 9% of the pmap_protect() calls being performed by vm_map_copy_entry()
are unnecessary.  Eliminate the unnecessary calls.

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

10 years agosh: In getopts, unset OPTARG where POSIX says we should.
jilles [Sat, 10 May 2014 19:18:49 +0000 (19:18 +0000)]
sh: In getopts, unset OPTARG where POSIX says we should.

10 years agoInvalidate the cache for the named posix semaphore when opened and
kib [Sat, 10 May 2014 19:08:07 +0000 (19:08 +0000)]
Invalidate the cache for the named posix semaphore when opened and
actual file storing the semaphore object is different from the file
created on the first open.  Store the file st_dev and st_ino members
of the struct stat in the semaphore structure on open, and compare
them with the attributes of the opened file to detect unlink and
re-creation.

This fixes an issue of sem_unlink(3) failing to flush the named entry
in the semaphore list for the current or remote process, making
sem_unlink(3) not correctly operating if the unlinked semaphore is
still opened.

Reported by: Joris Giovannangeli <joris@giovannangeli.fr>
PR: standards/189353
Reviewed by: jilles (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agosh: Add new tests to the Makefile.
jilles [Sat, 10 May 2014 19:06:36 +0000 (19:06 +0000)]
sh: Add new tests to the Makefile.

10 years agoStyle.
kib [Sat, 10 May 2014 18:59:09 +0000 (18:59 +0000)]
Style.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agosh: Don't discard getopts state on unknown option or missing argument.
jilles [Sat, 10 May 2014 17:42:21 +0000 (17:42 +0000)]
sh: Don't discard getopts state on unknown option or missing argument.

When getopts finds an invalid option or a missing option-argument, it should
not reset its state and should set OPTIND as normal. This is an old ash bug
that was fixed long ago in dash. Our behaviour now matches most other
shells.

10 years agoFor the upgrade case in vm_fault_copy_entry(), when the entry does not
kib [Sat, 10 May 2014 17:03:33 +0000 (17:03 +0000)]
For the upgrade case in vm_fault_copy_entry(), when the entry does not
need COW and is writeable (i.e. becoming writeable due to the
mprotect(2) operation), do not create a new backing object for the
entry.  The caller of the function is vm_map_protect(), the call is
made to ensure that wired entry has all pages resident and wired in
the top level object and to enable the write.  We might need to copy
read-only page from some backing objects into the top object or remap
the page with the write allowed.

This fixes the issue with mishandling of the swap accounting when
read-only wired mapping is upgraded to write-enabled after fork.  The
previous code path did not accounted the new object, but it creation
is redundand anyway and the change provides an optimization for the
non-common situation.

Reported by: markj
Suggested and reviewed by: alc (previous version)
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

10 years agoarcconfig: add one
eadler [Sat, 10 May 2014 16:59:15 +0000 (16:59 +0000)]
arcconfig: add one

Add a .arcconfig to allow arc to work in its usual way.

10 years agobitrotted compat cruft removal:
imp [Sat, 10 May 2014 16:39:15 +0000 (16:39 +0000)]
bitrotted compat cruft removal:
o KMODDEPS warning is 15 years stale. Remove it.
o MK_CTF will always be defined now, so no need to test to see if it
  is defined.
o no need to define MK_FORMAT_EXTENTIONS if undefined anymore.

10 years agogrep -L returns non-zero status if none of the files had the pattern
imp [Sat, 10 May 2014 16:39:08 +0000 (16:39 +0000)]
grep -L returns non-zero status if none of the files had the pattern
in them. This is often the case, so just ignore the return
code. Actual errors that are found will also be detected downstream in
the rare cases where the return code is 2 instead of 1.

10 years agoSprinkle a few more .WAITs into the mix after csu, libc, msun and the
imp [Sat, 10 May 2014 16:39:00 +0000 (16:39 +0000)]
Sprinkle a few more .WAITs into the mix after csu, libc, msun and the
early built libraries. This should be sufficient for most cases and
has eliminated the issues I've seen with high -j builds. Races likely
still remain, but this knocks the problem down a notch.

10 years agoMove DOCCOMPRESS to MK variable.
imp [Sat, 10 May 2014 16:38:54 +0000 (16:38 +0000)]
Move DOCCOMPRESS to MK variable.

10 years agoWe haven't done anything with _UPGRADING in ~forever (was present, but
imp [Sat, 10 May 2014 16:38:45 +0000 (16:38 +0000)]
We haven't done anything with _UPGRADING in ~forever (was present, but
not needed, in FreeBSD 6.x, and has been absent in newer versions).
This was needed to upgrade from 3.x -> 4.x, once upon a time.

10 years agoRemove last two NO_MAN= in the tree. In both of these cases, MAN= is
imp [Sat, 10 May 2014 16:38:37 +0000 (16:38 +0000)]
Remove last two NO_MAN= in the tree. In both of these cases, MAN= is
what is needed.

10 years agoRemove some useless, commented out code. Remove name space polution in
imp [Sat, 10 May 2014 16:38:32 +0000 (16:38 +0000)]
Remove some useless, commented out code. Remove name space polution in
the POSIX case by moving more things under !Posix part of an if.

10 years agog/c unmaintained, uninstalled bsd.pkg.mk. It tied into the ports
imp [Sat, 10 May 2014 16:38:27 +0000 (16:38 +0000)]
g/c unmaintained, uninstalled bsd.pkg.mk. It tied into the ports
system, as it existed 9 years ago, and has been obsolete for a long
time.

10 years agoRemove the compatibility hack for FreeBSD 7 systems for
imp [Sat, 10 May 2014 16:38:18 +0000 (16:38 +0000)]
Remove the compatibility hack for FreeBSD 7 systems for
MACHINE_CPUARCH. Fewer places to have to hack each time a new one is
added.

10 years agoSimplify clang ifdefs in the kernel a bit. Introduce
imp [Sat, 10 May 2014 16:38:09 +0000 (16:38 +0000)]
Simplify clang ifdefs in the kernel a bit. Introduce
CFLAGS.${COMPILER_TYPE} to mirror userland. Be explicit about which
compiler needs something (not clang isn't necessarily gcc in the
future).

10 years agoEliminate EARLY_BUILD flag. It is redundant and means MK_CLANG_FULL=no
imp [Sat, 10 May 2014 16:38:03 +0000 (16:38 +0000)]
Eliminate EARLY_BUILD flag. It is redundant and means MK_CLANG_FULL=no
and MK_LLDB=no, so set those explicitly (now that we can do
that). Simplify tests for these variables as well, since we know they
will always be defined regardless of the phase of the build.

10 years agoMigrate NO_WARN to MK_WARN. Support legacy NO_WARN usage. Remove a
imp [Sat, 10 May 2014 16:37:53 +0000 (16:37 +0000)]
Migrate NO_WARN to MK_WARN. Support legacy NO_WARN usage. Remove a
check for EARLY_BUILD because it isn't necessary (MK_WARN=no will
always be defined for that).

10 years agoSupport, to the extent we generate proper command lines, compiling
imp [Sat, 10 May 2014 16:37:44 +0000 (16:37 +0000)]
Support, to the extent we generate proper command lines, compiling
with clang 3.3. Useful for test building -current on a -stable system
in individual directories. Potentially useful if we ever want to
support, say, gcc 4.8 or 4.9's new warnings when building with an
external toolchain (but such support not yet committed). Document
the bsd.compiler.mk interface.

10 years agoOptionally allow building the historical FreeBSD make program and
imp [Sat, 10 May 2014 16:37:39 +0000 (16:37 +0000)]
Optionally allow building the historical FreeBSD make program and
install it as fmake. This defaults to no. This should be viewed as the
first step towards evental migration of this historic code to ports
and removal from the tree.

10 years agoRemove a few more vestiges of allowing WITHOUT_BMAKE to imply you want
imp [Sat, 10 May 2014 16:37:33 +0000 (16:37 +0000)]
Remove a few more vestiges of allowing WITHOUT_BMAKE to imply you want
to buid with fmake.

10 years agoDocument WITHOUT_SYSCALL_COMPAT and WITHOUT_GNU_GREP_COMPAT.
imp [Sat, 10 May 2014 16:37:28 +0000 (16:37 +0000)]
Document WITHOUT_SYSCALL_COMPAT and WITHOUT_GNU_GREP_COMPAT.

10 years agoWhen printing the map with the ddb 'show procvm' command, do not dump
kib [Sat, 10 May 2014 16:36:13 +0000 (16:36 +0000)]
When printing the map with the ddb 'show procvm' command, do not dump
page queues for the backing objects.  The queues are huge and clutter
the display, when mostly the map entries and its backing storage is
interesting.

The page queues can be seen with ddb 'show object' command.

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

10 years agoPrint the entry address in addition to the object. The variable is
kib [Sat, 10 May 2014 16:30:48 +0000 (16:30 +0000)]
Print the entry address in addition to the object.  The variable is
typically optimized out and debuggers cannot find its value.

Sponsored by:     The FreeBSD Foundation
MFC after: 1 week

10 years agoSimplify code slightly. Passing an array by &array[0] does work, but is
nwhitehorn [Sat, 10 May 2014 15:38:26 +0000 (15:38 +0000)]
Simplify code slightly. Passing an array by &array[0] does work, but is
silly.

10 years agoFix -width argument to Bl -tag.
kevlo [Sat, 10 May 2014 15:34:32 +0000 (15:34 +0000)]
Fix -width argument to Bl -tag.

10 years agoComment out some pointless device open/close around reading device IDs.
mav [Sat, 10 May 2014 15:21:37 +0000 (15:21 +0000)]
Comment out some pointless device open/close around reading device IDs.

FreeBSD ZFS port unlike OpenSolaris does not use device IDs, and does not
implement respective devid_*() fuctions.  It is pointless to open devices
just to close them back immediately.

MFC after: 2 weeks
Sponsored by: iXsystems, Inc.

10 years agoUDP-Lite uses SOCK_DGRAM, not SOCK_STREAM.
tuexen [Sat, 10 May 2014 13:18:20 +0000 (13:18 +0000)]
UDP-Lite uses SOCK_DGRAM, not SOCK_STREAM.

10 years agoDo not configure all pins as outputs as this can lead to short circuits when
loos [Sat, 10 May 2014 13:16:04 +0000 (13:16 +0000)]
Do not configure all pins as outputs as this can lead to short circuits when
the GPIO pin is connected to a push button (or other devices).

Instead keep the boot loader settings.

Calling ar71xx_gpio_pin_configure() with DEFAULT_CAPS was probably a
mistake and was causing all the pins to be set as outputs.

10 years agoFix document title.
wblock [Sat, 10 May 2014 13:10:42 +0000 (13:10 +0000)]
Fix document title.

Submitted by: pluknet

10 years agoRemove an old mistake of mine. This has sneak in the code i sent to gonzo
loos [Sat, 10 May 2014 12:58:18 +0000 (12:58 +0000)]
Remove an old mistake of mine.  This has sneak in the code i sent to gonzo
at that time, but AFAIK it is only used on routerboards.

Enabling GPIO_FUNC_SPI_CS[1|2]_EN will claim the use of gpio pins 0 and 1
respectivelly for use as SPI CS pins.

When really needed, this can still be enabled on kernel hints using the
function_set and function_clear knobs.

10 years agoAdd the lm75 i2c digital temperature sensor driver.
loos [Sat, 10 May 2014 12:19:02 +0000 (12:19 +0000)]
Add the lm75 i2c digital temperature sensor driver.

This driver supports the low and high precision models (9 and 11 bits) and
it will auto-detect the both variants.

The driver expose the temperature registers (actual temperature, shutdown
and hysteresys temperature) and also the configuration register.

It was tested on FDT systems: RPi, BBB and on non-FDT systems: AR71xx, with
both, hardware i2c controllers (when available) and gpioiic(4).

This provides a simple and cheap way for verifying the i2c bus on embedded
systems.

10 years agoWhitespace change.
tuexen [Sat, 10 May 2014 08:48:04 +0000 (08:48 +0000)]
Whitespace change.

10 years agoOptimise host channel disabling:
hselasky [Sat, 10 May 2014 07:37:32 +0000 (07:37 +0000)]
Optimise host channel disabling:
- For non-periodic traffic we only need to wait two SOFs before
disabling the channel.
- Make sure we release the TX FIFO tracking level after the host
channel is disabled.
- Make sure the host channel state gets reset/disabled initially.
- Two minor code style changes.

MFC after: 2 weeks

10 years agoFix the required calibration flags for the Centrino 1000 NIC.
adrian [Sat, 10 May 2014 05:56:10 +0000 (05:56 +0000)]
Fix the required calibration flags for the Centrino 1000 NIC.

10 years agoAdd a man page for the new vt.4 device.
wblock [Sat, 10 May 2014 03:24:45 +0000 (03:24 +0000)]
Add a man page for the new vt.4 device.

Reviewed by: ray, emaste (slightly earlier version)

10 years agoAdd in support to optionally pin the swi threads.
adrian [Sat, 10 May 2014 00:53:36 +0000 (00:53 +0000)]
Add in support to optionally pin the swi threads.

Under enough load, the swi's can actually be preempted and migrated
to other currently free cores.  When doing RSS experiments, this lead
to the per-CPU TCP timers not lining up any more with the RX CPU said
flows were ending up on, leading to increased lock contention.

Since there was a little pushback on flipping them on by default,
I've left the default at "don't pin."

The other less obvious problem here is that the default swi
is also the same as the destination swi for CPU #0.  So if one
pins the swi on CPU #0, there's no default floating swi.

A nice future project would be to create a separate swi for
the "default" floating swi, as well as per-CPU swis that are
(optionally) pinned.

Tested:

* parallel TCP tests (2 x 1g unfortunately for now);
  CPU: Intel(R) Xeon(R) CPU E5-2650

Note:

This is based on some initial investigation into RSS/TCP stack lock
contention on FreeBSD-HEAD whilst at Netflix in January 2014.

10 years agoFix typo in FORMAT_EXTENSIONS which breaks universe.
imp [Sat, 10 May 2014 00:42:43 +0000 (00:42 +0000)]
Fix typo in FORMAT_EXTENSIONS which breaks universe.

10 years agoIntroduce kern.opts.mk to hold all the options for kernel module
imp [Fri, 9 May 2014 21:11:27 +0000 (21:11 +0000)]
Introduce kern.opts.mk to hold all the options for kernel module
builds. Include this in the right places. Make src.opts.mk optional so
that modules can be built outside of the tree in the ports system.

PR: 189520

10 years agoCall idcache_inv_all from the AP core entry code before turning on the MMU.
ian [Fri, 9 May 2014 19:14:34 +0000 (19:14 +0000)]
Call idcache_inv_all from the AP core entry code before turning on the MMU.
Also, enable instruction and branch caches, which should be safe now that
they're properly initialized/invalidated first.

10 years agoFix a regression issue:
hselasky [Fri, 9 May 2014 16:40:41 +0000 (16:40 +0000)]
Fix a regression issue:
- ACK can be received before data arrives in RX FIFO. Handle this.
- Remove obsolete comment.
- Some minor code styling.

MFC after: 2 weeks

10 years agoAllow systat(1) interactive dispay-specific commands to
melifaro [Fri, 9 May 2014 16:20:55 +0000 (16:20 +0000)]
Allow systat(1) interactive dispay-specific commands to
be specified via command line.

Submitted by: vsevolod
MFC after: 2 weeks

10 years agoInvert platform check.
hselasky [Fri, 9 May 2014 14:35:07 +0000 (14:35 +0000)]
Invert platform check.

Suggested by: imp @
MFC after: 2 weeks

10 years agoFix for NULL pointer.
hselasky [Fri, 9 May 2014 14:28:11 +0000 (14:28 +0000)]
Fix for NULL pointer.

MFC after: 1 week

10 years agoFix ndp(8) -f flag parsing
melifaro [Fri, 9 May 2014 14:24:02 +0000 (14:24 +0000)]
Fix ndp(8) -f flag parsing

PR: bin/136661
Reminded by: Vinicius Zavam
MFC after: 2 weeks

10 years agoMultiple DWC OTG host mode related fixes and improvements:
hselasky [Fri, 9 May 2014 14:23:06 +0000 (14:23 +0000)]
Multiple DWC OTG host mode related fixes and improvements:

- Rework how we allocate and free USB host channels, so that we only
allocate a channel if there is a real packet going out on the USB
cable.

- Use BULK type for control data and status, due to instabilities in
the HW it appears.

- Split FIFO TX levels into one for the periodic FIFO and one for the
non-periodic FIFO.

- Use correct HFNUM mask when scheduling host transactions. The HFNUM
register does not count the full 16-bit range.

- Correct START/COMPLETION slot for TT transactions. For INTERRUPT and
ISOCHRONOUS type transactions the hardware always respects the ODDFRM
bit, which means we need to allocate multiple host channels when
processing such endpoints, to not miss any so-called complete split
opportunities.

- When doing ISOCHRONOUS OUT transfers through a TT send all data
payload in a single ALL-burst. This deacreases the likelyhood for
isochronous data underruns.

- Fixed unbalanced unlock in case of "dwc_otg_init_fifo()" failure.

- Increase interrupt priority.

MFC after: 2 weeks