]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
10 years agoprinf: replace use of alloca with variable length array.
Pedro F. Giffuni [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 Turner [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.
Warner Losh [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 Turner [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 Turner [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 Lepore [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()
Alan Cox [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 Tjoelker [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
Konstantin Belousov [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 Tjoelker [Sat, 10 May 2014 19:06:36 +0000 (19:06 +0000)]
sh: Add new tests to the Makefile.

10 years agoStyle.
Konstantin Belousov [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 Tjoelker [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
Konstantin Belousov [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
Eitan Adler [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:
Warner Losh [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
Warner Losh [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
Warner Losh [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.
Warner Losh [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
Warner Losh [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
Warner Losh [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
Warner Losh [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
Warner Losh [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
Warner Losh [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
Warner Losh [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
Warner Losh [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
Warner Losh [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
Warner Losh [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
Warner Losh [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
Warner Losh [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.
Warner Losh [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
Konstantin Belousov [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
Konstantin Belousov [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
Nathan Whitehorn [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.
Kevin Lo [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.
Alexander Motin [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.
Michael 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
Luiz Otavio O Souza [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.
Warren Block [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
Luiz Otavio O Souza [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.
Luiz Otavio O Souza [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.
Michael Tuexen [Sat, 10 May 2014 08:48:04 +0000 (08:48 +0000)]
Whitespace change.

10 years agoOptimise host channel disabling:
Hans Petter Selasky [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 Chadd [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.
Warren Block [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 Chadd [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.
Warner Losh [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
Warner Losh [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 Lepore [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:
Hans Petter Selasky [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
Alexander V. Chernikov [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.
Hans Petter Selasky [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.
Hans Petter Selasky [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
Alexander V. Chernikov [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:
Hans Petter Selasky [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

10 years agoFix a logic bug which prevented the sending of UDP packet with 0 checksum.
Michael Tuexen [Fri, 9 May 2014 14:15:48 +0000 (14:15 +0000)]
Fix a logic bug which prevented the sending of UDP packet with 0 checksum.
This bug was introduced in r264212 and should be X-MFCed with that
revision, if UDP-Lite support if MFCed.

10 years agoAdd support for reading RouterBoard's memory which is passed by the loader
Luiz Otavio O Souza [Fri, 9 May 2014 14:02:18 +0000 (14:02 +0000)]
Add support for reading RouterBoard's memory which is passed by the loader
(RouterBOOT).

Tested on RouterBoards, various and on RSPRO, TP-Link MR3x20
(for regressions).

10 years agoWhen a GPIO pin is set to be turned on by kernel hints (hint.gpio.X.pinon)
Luiz Otavio O Souza [Fri, 9 May 2014 13:44:42 +0000 (13:44 +0000)]
When a GPIO pin is set to be turned on by kernel hints (hint.gpio.X.pinon)
make sure the GPIO pin is configured as an output as this is not always the
case.

10 years agosh: Send getopts error messages to stderr, not stdout.
Jilles Tjoelker [Fri, 9 May 2014 13:32:36 +0000 (13:32 +0000)]
sh: Send getopts error messages to stderr, not stdout.

Adjust a testcase for this change.

10 years agosh: Add more necessary INTOFF/INTON.
Jilles Tjoelker [Fri, 9 May 2014 13:27:30 +0000 (13:27 +0000)]
sh: Add more necessary INTOFF/INTON.

10 years agoFix the build with debug enabled and remove a variable used only at switch
Luiz Otavio O Souza [Fri, 9 May 2014 13:21:34 +0000 (13:21 +0000)]
Fix the build with debug enabled and remove a variable used only at switch
initialization, it is nonsense keep it around without futher use.

10 years agoFix a bug on ip17x switch initialization which will fail as soon as you
Luiz Otavio O Souza [Fri, 9 May 2014 13:07:39 +0000 (13:07 +0000)]
Fix a bug on ip17x switch initialization which will fail as soon as you
disable the debug and diagnosis options from current.  We must wait 2ms
after the switch reset and not 2us.

Tested on RB433UAH.

10 years agoAdjust the register layout to allow for 64bit registers in the
Bjoern A. Zeeb [Fri, 9 May 2014 12:59:38 +0000 (12:59 +0000)]
Adjust the register layout to allow for 64bit registers in the
future for nf10bmac(4).  Also, add support for and enable RX interrupts.

MFC after: 2 weeks

10 years agoAdd the codes for enabling CPU cores of Rockchip RK3188 SoC.
Ganbold Tsagaankhuu [Fri, 9 May 2014 05:39:57 +0000 (05:39 +0000)]
Add the codes for enabling CPU cores of Rockchip RK3188 SoC.
Enable SMP for Radxa Rock board.

Approved by: stas (mentor)

10 years agoWe have to include bsd.opts.mk (included in bsd.own.mk) after
Warner Losh [Fri, 9 May 2014 04:49:48 +0000 (04:49 +0000)]
We have to include bsd.opts.mk (included in bsd.own.mk) after
/etc/src.conf so that options set there will affect the options
defined in bsd.opts.mk. Fix a few comments while I'm here.

10 years agoSpell always the more traditional way.
Warner Losh [Fri, 9 May 2014 04:49:43 +0000 (04:49 +0000)]
Spell always the more traditional way.

10 years agoAdd 9.3 to mdoc.local.
Glen Barber [Fri, 9 May 2014 04:14:37 +0000 (04:14 +0000)]
Add 9.3 to mdoc.local.

Sponsored by: The FreeBSD Foundation

10 years agoHide debug messages under VT_DEBUG.
Aleksandr Rybalko [Thu, 8 May 2014 22:52:05 +0000 (22:52 +0000)]
Hide debug messages under VT_DEBUG.

Sponsored by: The FreeBSD Foundation

10 years agoFix two more typos.
Christian Brueffer [Thu, 8 May 2014 21:02:23 +0000 (21:02 +0000)]
Fix two more typos.

Submitted by: Trond Endrestol

10 years agoUse KASSERTs as suggested by glebius@
Michael Tuexen [Thu, 8 May 2014 20:47:54 +0000 (20:47 +0000)]
Use KASSERTs as suggested by glebius@

MFC after: 3 days
X-MFC with: 265691

10 years agoAdd #ifdefs in the mpr(4) driver so that versions of stable/9 that
Kenneth D. Merry [Thu, 8 May 2014 20:46:46 +0000 (20:46 +0000)]
Add #ifdefs in the mpr(4) driver so that versions of stable/9 that
have implemented the PIM_NOSCAN rescan functionality will have it
enabled.

This is a no-op for head.

Reviewed by: slm
Sponsored by: Spectra Logic Corporation
MFC after: 3 days

10 years agoFix TLR (Transport Layer Retry) support in the mps(4) and mpr(4) drivers.
Kenneth D. Merry [Thu, 8 May 2014 20:28:22 +0000 (20:28 +0000)]
Fix TLR (Transport Layer Retry) support in the mps(4) and mpr(4) drivers.

TLR is necessary for reliable communication with SAS tape drives.

This was broken by change 246713 in the mps(4) driver.  It changed the
cm_data field for SCSI I/O requests to point to the CCB instead of the data
buffer.  So, instead, look at the CCB's data pointer to determine whether
or not we're talking to a tape drive.

Also, take the residual into account to make sure that we don't go off the
end of the request.

MFC after: 3 days
Sponsored by: Spectra Logic Corporation

10 years agoFix the incorrect handling of %b and \c in printf(1)
Pedro F. Giffuni [Thu, 8 May 2014 20:20:59 +0000 (20:20 +0000)]
Fix the incorrect handling of %b and \c in printf(1)

This is required for POSIX compliance.

Obtained from: Garrett D'Amore (Illumos)
MFC after: 4 days

10 years agoConsolitate all the AP core startup stuff under a single #ifdef SMP block.
Ian Lepore [Thu, 8 May 2014 20:02:38 +0000 (20:02 +0000)]
Consolitate all the AP core startup stuff under a single #ifdef SMP block.
Remove some other ifdefs that came in with a copy/paste that mean basically
"if this processor supports multicore stuff", because if you're starting up
an AP core... it does.

10 years agoModify Copyright information and other strings to reflect Qlogic Corporation's purcha...
David C Somayajulu [Thu, 8 May 2014 19:40:37 +0000 (19:40 +0000)]
Modify Copyright information and other strings to reflect Qlogic Corporation's purchase of Broadcom's NetXtreme business.
Added clean option to Makefile

Submitted by:David C Somayajulu (davidcs@freebsd.org) QLogic Corporation
MFC after:5 days

10 years agoIncorporate feedback from bde and jilles regarding r265472 to dd(1).
Alan Somers [Thu, 8 May 2014 19:10:04 +0000 (19:10 +0000)]
Incorporate feedback from bde and jilles regarding r265472 to dd(1).

* Don't use sysexits.h.  Just exit 1 on error and 0 otherwise.
* Don't sacrifice precision by converting the output of clock_gettime() to a
  double and then comparing the results.  Instead, subtract the values of
  the two clock_gettime() calls, then convert to double.
* Don't use CLOCK_MONOTONIC_PRECISE.  It's an unportable synonym for
  CLOCK_MONOTONIC.
* Use more appropriate names for some local variables.
* In the summary message, round elapsed time to the nearest microsecond.

Reported by: bde, jilles
MFC after: 3 days
X-MFC-With: 265472

10 years agoMove the mptramp code which is specific to the Marvell ArmadaXP SoC out of
Ian Lepore [Thu, 8 May 2014 18:36:42 +0000 (18:36 +0000)]
Move the mptramp code which is specific to the Marvell ArmadaXP SoC out of
the common locore.S file and into the mv/armadaxp directory.

10 years agoFor some UDP packets (for example with 200 byte payload) and IP options,
Michael Tuexen [Thu, 8 May 2014 17:27:46 +0000 (17:27 +0000)]
For some UDP packets (for example with 200 byte payload) and IP options,
the IP header and the UDP header are not in the same mbuf.
Add code to in_delayed_cksum() to deal with this case.

MFC after: 3 days

10 years agoUse edge-triggered interrupts rather than polling loops to avoid missing
Ian Lepore [Thu, 8 May 2014 17:20:45 +0000 (17:20 +0000)]
Use edge-triggered interrupts rather than polling loops to avoid missing
transitions of the INIT_B line.  Also, release the mutex during uiomove().

Submitted by: Thomas Skibo <ThomasSkibo@sbcglobal.net>

10 years agoImport adapted OpenSolaris' thread pool API implementation.
Alexander Motin [Thu, 8 May 2014 16:59:36 +0000 (16:59 +0000)]
Import adapted OpenSolaris' thread pool API implementation.

The thread pool is used by libzfs to implement parallel disk scanning.
Without this change our dummy wrapper made `zpool import ZZZ` command to
scan all disks sequentially from the single thread when searching for pools.
This change makes it use two threads per CPU, same as in OpenSolaris.

On system with 200 HDDs this change reduces ZFS pool import time from 35
to 22 seconds.

10 years agoAdd usr/share/mk/src.opts.mk to obsolete files. It never should have
Warner Losh [Thu, 8 May 2014 15:58:34 +0000 (15:58 +0000)]
Add usr/share/mk/src.opts.mk to obsolete files. It never should have
been installed in the first place, and it must be removed ASAP or
weird build errors may start happening in the future if this file is
ever taken from the installed system. Add note to UPDATING.

10 years agoRename rt_msg1() to more handy rtsock_msg_mbuf().
Alexander V. Chernikov [Thu, 8 May 2014 13:54:57 +0000 (13:54 +0000)]
Rename rt_msg1() to more handy rtsock_msg_mbuf().
(Just for history purposes: rt_msg2() was renamed
 to rtsock_msg_buffer() in r265019).

Sponsored by: Yandex LLC
MFC after: 1 month

10 years agoFix scrollback.
Aleksandr Rybalko [Thu, 8 May 2014 13:46:36 +0000 (13:46 +0000)]
Fix scrollback.

Sponsored by: The FreeBSD Foundation

10 years agoNo need to assign fields required and checked on probe.
Aleksandr Rybalko [Thu, 8 May 2014 13:38:29 +0000 (13:38 +0000)]
No need to assign fields required and checked on probe.

Sponsored by: The FreeBSD Foundation

10 years agoFix incorrect netmasks being passed via rtsock.
Alexander V. Chernikov [Thu, 8 May 2014 11:56:06 +0000 (11:56 +0000)]
Fix incorrect netmasks being passed via rtsock.

Since radix has been ignoring sa_family in passed sockaddrs,
no one ever has bothered filling valid sa_family in netmasks.
Additionally, radix adjusts sa_len field in every netmask not to
compare zero bytes at all.

This leads us to rt_mask with sa_family of AF_UNSPEC (-1) and
arbitrary sa_len field (0 for default route, for example).

However, rtsock have been passing that rt_mask intact for ages,
requiring all rtsock consumers to make ther own local hacks.
We even have unfixed on in base:

do `route -n monitor` in one window and issue `route -n get addr`
for some directly-connected address. You will probably see the following:

got message of size 304 on Thu May  8 15:06:06 2014
RTM_GET: Report Metrics: len 304, pid: 30493, seq 1, errno 0, flags:<UP,DONE,PINNED>
locks:  inits:
sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA>
 10.0.0.0 link#1 (255) ffff ffff ff em0:8.0.27.c5.29.d4 10.0.0.92
_________________^^^^^^^^^^^^^^^^^^

after the change:

got message of size 312 on Thu May  8 15:44:07 2014
RTM_GET: Report Metrics: len 312, pid: 2895, seq 1, errno 0, flags:<UP,DONE,PINNED>
locks:  inits:
sockaddrs: <DST,GATEWAY,NETMASK,IFP,IFA>
 10.0.0.0 link#1 255.255.255.0 em0:8.0.27.c5.29.d4 10.0.0.92
_________________^^^^^^^^^^^^^^^^^^

Sponsored by: Yandex LLC
MFC after: 1 month

10 years agoRe-apply r248644. This fixes an annoying problem which caused dtrace -c to
Mark Johnston [Thu, 8 May 2014 03:43:18 +0000 (03:43 +0000)]
Re-apply r248644. This fixes an annoying problem which caused dtrace -c to
fail to attach to stripped binaries. With the _r_debug_postinit symbol,
dtrace(1) can now set a breakpoint in the victim process after it has
registered its DOF table(s) with the kernel. r_debug_state cannot be used
for this purpose since it is called before DOF is made available, in which
case dtrace(1) cannot create USDT probes before the program begins
execution.

MFC after: 2 weeks

10 years agoFix the rd_event_addr prototype and slightly clarify the use of the "event"
Mark Johnston [Thu, 8 May 2014 03:33:54 +0000 (03:33 +0000)]
Fix the rd_event_addr prototype and slightly clarify the use of the "event"
parameter.

MFC after: 3 days

10 years agoHandle the different event types properly in rd_event_addr(). In particular,
Mark Johnston [Thu, 8 May 2014 03:26:25 +0000 (03:26 +0000)]
Handle the different event types properly in rd_event_addr(). In particular,
with r265456 _r_debug_postinit can be used for RD_POSTINIT events. rtld(1)
uses r_debug_state for dl state transitions, so we use its address for
RD_DLACTIVITY events.

MFC after: 2 weeks

10 years agoPut bsd.own.mk back in the list, and take src.opts.mk out.
Warner Losh [Thu, 8 May 2014 02:24:30 +0000 (02:24 +0000)]
Put bsd.own.mk back in the list, and take src.opts.mk out.
Fix a silly typo.

10 years agoFix a typo make should have complained about.
Warner Losh [Thu, 8 May 2014 02:18:36 +0000 (02:18 +0000)]
Fix a typo make should have complained about.

Submitted by: Mark Johnston

10 years agoSilence no interrupt-parent found message during boot.
Ganbold Tsagaankhuu [Thu, 8 May 2014 00:26:21 +0000 (00:26 +0000)]
Silence no interrupt-parent found message during boot.

Approved by: stas (mentor)

10 years agosh: Add some tests for normal use of getopts.
Jilles Tjoelker [Wed, 7 May 2014 21:45:25 +0000 (21:45 +0000)]
sh: Add some tests for normal use of getopts.

10 years agoHandle ELF files with 65280 or more sections
Ed Maste [Wed, 7 May 2014 21:16:47 +0000 (21:16 +0000)]
Handle ELF files with 65280 or more sections

If e_shnum or e_shstrndx are at least SHN_LORESERVE (0xff00) then an
escape value is used to indicate that the actual value is found in one
of section 0's fields.

Sponsored by: DARPA, AFRL

10 years agoDocument r265555, addition of mrsas(4).
Glen Barber [Wed, 7 May 2014 21:00:09 +0000 (21:00 +0000)]
Document r265555, addition of mrsas(4).

Sponsored by: The FreeBSD Foundation

10 years agoSeparate &darpa; entity and create &darpa_afrl to
Glen Barber [Wed, 7 May 2014 20:31:44 +0000 (20:31 +0000)]
Separate &darpa; entity and create &darpa_afrl to
avoid confusion.

Suggested by: rwatson
Sponsored by: The FreeBSD Foundation

10 years agoCorrect attribution for casperd, co-sponsored by
Glen Barber [Wed, 7 May 2014 20:27:57 +0000 (20:27 +0000)]
Correct attribution for casperd, co-sponsored by
The FreeBSD Foundation and Google, Inc.[1]

Since this was dual-sponsored, the sponsorurl needs
to be empty.

Add Google to the sponsor.ent file.

Reminded by: rwatson [1]
Sponsored by: The FreeBSD Foundation

10 years agoAdd a note to keep the entity lists sorted alphabetically.
Glen Barber [Wed, 7 May 2014 20:18:50 +0000 (20:18 +0000)]
Add a note to keep the entity lists sorted alphabetically.

Sponsored by: The FreeBSD Foundation

10 years agoAdd attribution for r265348.
Glen Barber [Wed, 7 May 2014 20:15:36 +0000 (20:15 +0000)]
Add attribution for r265348.
Add Netgate to sponsor.ent.

Sponsored by: The FreeBSD Foundation

10 years agoAdd attribution for r265236.
Glen Barber [Wed, 7 May 2014 20:15:34 +0000 (20:15 +0000)]
Add attribution for r265236.
Add LSI and Spectra Logic to sponsor.ent.

Sponsored by: The FreeBSD Foundation

10 years agoAdd attribution for r264601.
Glen Barber [Wed, 7 May 2014 20:15:32 +0000 (20:15 +0000)]
Add attribution for r264601.

Sponsored by: The FreeBSD Foundation

10 years agoAdd attribution for r258884.
Glen Barber [Wed, 7 May 2014 20:15:30 +0000 (20:15 +0000)]
Add attribution for r258884.
Add DARPA, AFRL to sponsor.ent.

Sponsored by: The FreeBSD Foundation