]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoam335x_clk_pruss_activate(): use the L3F clock.
rpaulo [Mon, 2 Feb 2015 08:01:10 +0000 (08:01 +0000)]
am335x_clk_pruss_activate(): use the L3F clock.

The DISP DPLL clock is slower and was making the PRU programs slower
on FreeBSD than on Linux.

Submitted by: Manuel Stuehn <freebsdnewbie at freenet.de>
MFC after: 1 week

9 years agoRemove hostapd and wpa_supplicant from FILES so they're installed conditionally
ngie [Mon, 2 Feb 2015 05:41:17 +0000 (05:41 +0000)]
Remove hostapd and wpa_supplicant from FILES so they're installed conditionally
if MK_WIRELESS != no

MFC after: 3 days
X-MFC with: r277740

9 years ago- Remove more files when MK_GPIO == no
amdmi3 [Mon, 2 Feb 2015 02:56:29 +0000 (02:56 +0000)]
- Remove more files when MK_GPIO == no

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years ago- Remove more files when MK_DMAGENT == no and move the chunk into its alphabetical...
amdmi3 [Mon, 2 Feb 2015 02:53:52 +0000 (02:53 +0000)]
- Remove more files when MK_DMAGENT == no and move the chunk into its alphabetical place

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years ago- Remove more files when MK_BSNMP == no
amdmi3 [Mon, 2 Feb 2015 02:51:22 +0000 (02:51 +0000)]
- Remove more files when MK_BSNMP == no

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years ago- Remove more files when MK_BSD_CPIO == no
amdmi3 [Mon, 2 Feb 2015 02:49:54 +0000 (02:49 +0000)]
- Remove more files when MK_BSD_CPIO == no

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years ago- Remove more files when MK_BOOT == no
amdmi3 [Mon, 2 Feb 2015 02:49:01 +0000 (02:49 +0000)]
- Remove more files when MK_BOOT == no

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years ago- Remove more files when MK_BLUETOOTH == no
amdmi3 [Mon, 2 Feb 2015 02:47:37 +0000 (02:47 +0000)]
- Remove more files when MK_BLUETOOTH == no

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years ago- Remove more files when MK_BINUTILS == no
amdmi3 [Mon, 2 Feb 2015 02:44:27 +0000 (02:44 +0000)]
- Remove more files when MK_BINUTILS == no

MFC after: 1 week
Reviewed by: ngie
Approved by: ngie
Differential Revision: D1600

9 years agorpc: Uninitialized pointer read
pfg [Mon, 2 Feb 2015 00:21:34 +0000 (00:21 +0000)]
rpc: Uninitialized pointer read

Initialize *xprt to avoid exposing a random value
in cleanup_svc_vc_create.

CID: 1018723
Phabric: D1749
Reviewed by: alfred

9 years agoPrevent inlining txg_quiesce
smh [Mon, 2 Feb 2015 00:17:36 +0000 (00:17 +0000)]
Prevent inlining txg_quiesce

This allows dtrace to monitor the calls to txg_quiesce which can be really
helpful.

Also standardise __noinline order for arc_kmem_reap_now.

Sponsored by: Multiplay

9 years agoResource leak
pfg [Sun, 1 Feb 2015 23:19:06 +0000 (23:19 +0000)]
Resource leak

CID: 1016703
Reviewed by: alfred

9 years agottyname_r(): Return actual error, not always [ENOTTY].
jilles [Sun, 1 Feb 2015 22:50:33 +0000 (22:50 +0000)]
ttyname_r(): Return actual error, not always [ENOTTY].

Adjust the test that used to fail because of this bug.

PR: 191936
MFC after: 1 week

9 years agoCTL LUN mapping rewrite.
mav [Sun, 1 Feb 2015 21:50:28 +0000 (21:50 +0000)]
CTL LUN mapping rewrite.

Replace iSCSI-specific LUN mapping mechanism with new one, working for any
ports.  By default all ports are created without LUN mapping, exposing all
CTL LUNs as before.  But, if needed, LUN mapping can be manually set on
per-port basis via ctladm.  For its iSCSI ports ctld does it via ioctl(2).
The next step will be to teach ctld to work with FibreChannel ports also.

Respecting additional flexibility of the new mechanism, ctl.conf now allows
alternative syntax for LUN definition.  LUNs can now be defined in global
context, and then referenced from targets by unique name, as needed.  It
allows same LUN to be exposed several times via multiple targets.

While there, increase limit for LUNs per target in ctld from 256 to 1024.
Some initiators do not support LUNs above 255, but that is not our problem.

Discussed with: trasz
MFC after: 2 weeks
Relnotes: yes
Sponsored by: iXsystems, Inc.

9 years agoAdd a quirk to limit AHCI MSI vectors to one
smh [Sun, 1 Feb 2015 20:00:08 +0000 (20:00 +0000)]
Add a quirk to limit AHCI MSI vectors to one

In 10.1-RELEASE the default number of MSI vectors used was changed from one
to as many vectors as the HW supports.

This change resulted in an ahci timeouts regression when running on AMD
SB7x0/SB8x0/SB9x0 hardware, so its now limited to 1 MSI by default using
this new quirk.

MFC after: 2 weeks
Sponsored by: Multiplay

9 years agoDo not skip setting the memory 'reg' property if the fdt data already
ian [Sun, 1 Feb 2015 18:21:16 +0000 (18:21 +0000)]
Do not skip setting the memory 'reg' property if the fdt data already
contains one.  Published dts source often includes a minimal default
memory definition and expects it to be overridden by the bootloader after
determining the actual physical memory in the system.

9 years agoRemove a stale comment. The logic that deleted the map before other
ian [Sun, 1 Feb 2015 17:19:57 +0000 (17:19 +0000)]
Remove a stale comment.  The logic that deleted the map before other
resources was removed long ago, but the comment stuck somehow.

9 years agoFreeBSD expects _Unwind_GetGR, _Unwind_SetGR, and _Unwind_SetIP to be
andrew [Sun, 1 Feb 2015 09:50:33 +0000 (09:50 +0000)]
FreeBSD expects _Unwind_GetGR, _Unwind_SetGR, and _Unwind_SetIP to be
symbols and not macros. Make this so. This fixes a few ports that try to
link against these functions but fail as they previously didn't exist.

9 years agoAllow this to work with disks greater than 4 GB and with names not beginning
nwhitehorn [Sun, 1 Feb 2015 02:02:50 +0000 (02:02 +0000)]
Allow this to work with disks greater than 4 GB and with names not beginning
with "s".

9 years agoImport libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc.
dim [Sat, 31 Jan 2015 23:31:45 +0000 (23:31 +0000)]
Import libcxxrt master 1cb607e89f6135bbc10f3d3b6fba1f983e258dcc.

Interesting fixes:
1cb607e Correct gcc version check for __cxa_begin_catch() declaration
with or without throw()

MFC after: 3 days

9 years agoFix mktemp(1) usage.
markj [Sat, 31 Jan 2015 23:12:29 +0000 (23:12 +0000)]
Fix mktemp(1) usage.

MFC after: 1 week

9 years agoUse syscall::exit instead of the nonexistent syscall::rexit.
markj [Sat, 31 Jan 2015 23:11:57 +0000 (23:11 +0000)]
Use syscall::exit instead of the nonexistent syscall::rexit.

MFC after: 1 week

9 years agoRevert r256642, not only to reduce diffs against upstream libcxxrt, but
dim [Sat, 31 Jan 2015 23:08:29 +0000 (23:08 +0000)]
Revert r256642, not only to reduce diffs against upstream libcxxrt, but
also because it is the wrong approach: comparing typeinfo names deeply
causes trouble if two loaded DSOs use independent types of the same
name.

In addition, this particular change was never merged to FreeBSD 10.x and
9.x, so let's get rid of it before it ends up in an 11.x release.

Discussed with: theraven, joerg@netbsd

9 years agoRemove hard-coded invocations of gcc; use cc(1) instead.
markj [Sat, 31 Jan 2015 23:02:27 +0000 (23:02 +0000)]
Remove hard-coded invocations of gcc; use cc(1) instead.

MFC after: 1 week

9 years agoRemove a makefile that isn't present upstream.
markj [Sat, 31 Jan 2015 22:56:38 +0000 (22:56 +0000)]
Remove a makefile that isn't present upstream.

MFC after: 1 week

9 years agoFix a number of DTrace scripting tests:
markj [Sat, 31 Jan 2015 22:53:18 +0000 (22:53 +0000)]
Fix a number of DTrace scripting tests:
* Avoid hard-coding program paths.
* Use -x when searching for oneself in ps(1) output.
* Use the correct keyword (egid instead of pgid) in tst.egid.ksh.

MFC after: 1 week

9 years agoFix some proc provider tests:
markj [Sat, 31 Jan 2015 22:38:43 +0000 (22:38 +0000)]
Fix some proc provider tests:
* Avoid hard-coding program paths, except when it's necessary in order to
  override the use of a shell builtin.
* Translate struct proc through psinfo_t so that we can access process
  arguments via the pr_psargs field of psinfo_t.
* Replace uses of pstop and prun with kill(1).

MFC after: 1 week

9 years agoConstify a number of accesses in drm2's radeon drivers to avoid
dim [Sat, 31 Jan 2015 22:18:52 +0000 (22:18 +0000)]
Constify a number of accesses in drm2's radeon drivers to avoid
-Wcast-qual warnings.  No functional change.

Reviewed by: dumbbell
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D1727

9 years agoDo not qualify the mcontext_t *mcp argument for set_mcontext(9) as
kib [Sat, 31 Jan 2015 21:43:46 +0000 (21:43 +0000)]
Do not qualify the mcontext_t *mcp argument for set_mcontext(9) as
const.  On x86, even after the machine context is supposedly read into
the struct ucontext, lazy FPU state save code might only mark the FPU
data as hardware-owned.  Later, set_fpcontext() needs to fetch the
state from hardware, modifying the *mcp.

The set_mcontext(9) is called from sigreturn(2) and setcontext(2)
implementations and old create_thread(2) interface, which throw the
*mcp out after the set_mcontext() call.

Reported by: dim
Discussed with: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoUpdate directory times immediately after an entry is created or
kib [Sat, 31 Jan 2015 21:31:53 +0000 (21:31 +0000)]
Update directory times immediately after an entry is created or
removed.  Postponing it until tmpfs_getattr() is called causes
discordant values reported for file times vs. directory times.

Reported and tested by: madpilot
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoStop using load-multiple with lr and pc. This has been deprecated in ARMv7
andrew [Sat, 31 Jan 2015 19:55:12 +0000 (19:55 +0000)]
Stop using load-multiple with lr and pc. This has been deprecated in ARMv7
and clang 3.6 warns about it. As this is used in libc and we build it with
-Werror this warning becomes an error stopping the build.

9 years agoRelocate kernel to high address space (a static + 64 MB for now) to avoid
nwhitehorn [Sat, 31 Jan 2015 19:42:08 +0000 (19:42 +0000)]
Relocate kernel to high address space (a static + 64 MB for now) to avoid
conflicts with the Linux host kernel. This lets you kexec an unmodified
GENERIC64.

9 years agoImplement GPIO_GET_BUS() method for all GPIO drivers.
loos [Sat, 31 Jan 2015 19:32:14 +0000 (19:32 +0000)]
Implement GPIO_GET_BUS() method for all GPIO drivers.

Add helper routines to deal with attach and detach of gpiobus and gpioc
devices that are common to all drivers.

9 years agoAdd FDT reservations for memory areas used by OPAL or RTAS runtime firmware.
nwhitehorn [Sat, 31 Jan 2015 19:18:09 +0000 (19:18 +0000)]
Add FDT reservations for memory areas used by OPAL or RTAS runtime firmware.
This allows a kexec'ed kernel to boot multiuser under PHYP.

9 years agoBuild the powerpc64 kernel as a position-independent executable. At startup,
nwhitehorn [Sat, 31 Jan 2015 19:16:51 +0000 (19:16 +0000)]
Build the powerpc64 kernel as a position-independent executable. At startup,
it processes its own ELF relocations and can be loaded and run in place at
any physical/virtual address.

NB: This requires an updated loader to boot!

Relnotes: yes

9 years agoFix whitespace glitch from prior comit.
ian [Sat, 31 Jan 2015 18:57:45 +0000 (18:57 +0000)]
Fix whitespace glitch from prior comit.

9 years agoAdd code to support loading relocatable kernels at offsets that are not
nwhitehorn [Sat, 31 Jan 2015 18:42:51 +0000 (18:42 +0000)]
Add code to support loading relocatable kernels at offsets that are not
zero.

9 years agoCorrectness improvements for removing FDT excluded memory areas.
nwhitehorn [Sat, 31 Jan 2015 18:39:32 +0000 (18:39 +0000)]
Correctness improvements for removing FDT excluded memory areas.

9 years agoEnsure #include <semaphore.h> is sufficient for using SEM_VALUE_MAX.
jilles [Sat, 31 Jan 2015 16:39:26 +0000 (16:39 +0000)]
Ensure #include <semaphore.h> is sufficient for using SEM_VALUE_MAX.

Discussed with: pluknet

9 years agoMFV r277981:
pfg [Sat, 31 Jan 2015 16:34:39 +0000 (16:34 +0000)]
MFV r277981:
Upstream fixes for issues found with afl (Issue #417).

- Fix length checking.

Check both the captured length and the on-the-wire length (the latter
*should* be greater than or equal to the former, but that's not
guaranteed).

Add some additional length checks, so neither caplen nor length
underflow.

If we stop dissecting because the packet is too short, return 1, not 0,
as we've "dissected" what we can; 0 means "this is LLC+SNAP with an OUI
of 0 and an unknown Ethertype".

commit: 743bcecdc92f88b118ec7aac4f68b606601205cc

- Clean up length checks.

Check only the amount of length that matters at any given point; yes,
this means we do multiple checks, but so it goes.

We don't need to check for LLC+SNAP - llc_print() does that for us.  We
do, however, need to check to make sure we can safely skip the Fore
header.

commit: 5c65e7532fa16308e01299988852b0dc5b027559

9 years agoImplement a new method to retrieve the gpiobus reference from a GPIO
loos [Sat, 31 Jan 2015 15:50:19 +0000 (15:50 +0000)]
Implement a new method to retrieve the gpiobus reference from a GPIO
controller.

The gpiobus is responsible to keep track of the used pins and serialize
the access to pins.

Some of these features are important to devices that do not descend
directly from gpiobus and as such cannot make use of its features (one
classic example is gpioc that is attached to the GPIO controller and could
not, until now, make use of the gpiobus locking).

9 years agoPrevent access to an uninitialized variable
pfg [Sat, 31 Jan 2015 15:41:01 +0000 (15:41 +0000)]
Prevent access to an uninitialized variable

The "-h" option may access an uninitialized value. Prevent it
by properly initializing the value.

CID: 1006559

9 years agoUse proper module name in MODULE_VERSION().
trasz [Sat, 31 Jan 2015 15:22:45 +0000 (15:22 +0000)]
Use proper module name in MODULE_VERSION().

Sponsored by: The FreeBSD Foundation

9 years agoDrop unneeded include.
trasz [Sat, 31 Jan 2015 15:21:54 +0000 (15:21 +0000)]
Drop unneeded include.

Sponsored by: The FreeBSD Foundation

9 years agoFix build with "device iscsi" in kernel config.
trasz [Sat, 31 Jan 2015 15:20:58 +0000 (15:20 +0000)]
Fix build with "device iscsi" in kernel config.

Sponsored by: The FreeBSD Foundation

9 years agoFix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by
dim [Sat, 31 Jan 2015 14:18:46 +0000 (14:18 +0000)]
Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by
using __DECONST.  No functional change.

Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D1743

9 years agosh: Abort a wait builtin on any trapped signal.
jilles [Sat, 31 Jan 2015 13:53:29 +0000 (13:53 +0000)]
sh: Abort a wait builtin on any trapped signal.

This is required by POSIX.

PR: 197210
Reported by: ache
MFC after: 2 weeks

9 years agoRemove single-use boolean.
kib [Sat, 31 Jan 2015 12:58:04 +0000 (12:58 +0000)]
Remove single-use boolean.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoReplace spaces with tabs, this will easier future changes on softc
loos [Sat, 31 Jan 2015 12:43:30 +0000 (12:43 +0000)]
Replace spaces with tabs, this will easier future changes on softc
structure.

No functional changes.

9 years agoThe dependency chain for priority-inheritance mutexes could be
kib [Sat, 31 Jan 2015 12:27:40 +0000 (12:27 +0000)]
The dependency chain for priority-inheritance mutexes could be
subverted by userspace into cycle.  Both umtx_propagate_priority() and
umtx_repropagate_priority() would then loop infinitely, owning the
spinlock.

Check for the cycle using standard Floyd' algorithm before doing the
pass in the affected functions.  Add simple check for condition of
tricking the thread into a wait for itself, which could be easily
simulated by usermode without race.

Found by: Eric van Gyzen <eric@vangyzen.net>
In collaboration with: Eric van Gyzen <eric@vangyzen.net>
Tested by: pho
MFC after: 1 week

9 years agoPOSIX states that write(2) "shall mark for update the last data
kib [Sat, 31 Jan 2015 12:27:18 +0000 (12:27 +0000)]
POSIX states that write(2) "shall mark for update the last data
modification and last file status change timestamps of the file".
Currently, tmpfs only modifies ctime when file was extended.  Since
r277828 followed tmpfs_write(), mmaped writes also do not modify
ctime.

Fix this, by updating both ctime and mtime for writes to tmpfs files.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoClean up and fix the device detach routine and the failure path on GPIO
loos [Sat, 31 Jan 2015 12:17:07 +0000 (12:17 +0000)]
Clean up and fix the device detach routine and the failure path on GPIO
drivers.

This paves the way for upcoming work.

9 years agoAdd two files missed in r277963.
trasz [Sat, 31 Jan 2015 08:03:56 +0000 (08:03 +0000)]
Add two files missed in r277963.

Sponsored by: The FreeBSD Foundation

9 years agoAdd kobj interface between ICL and the rest of the iSCSI stack.
trasz [Sat, 31 Jan 2015 07:49:50 +0000 (07:49 +0000)]
Add kobj interface between ICL and the rest of the iSCSI stack.
Review note - icl.c was moved to icl_soft.c.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

9 years agoAdd support for booting relocatable kernels on PowerPC.
nwhitehorn [Sat, 31 Jan 2015 07:22:29 +0000 (07:22 +0000)]
Add support for booting relocatable kernels on PowerPC.

9 years agoStop iterating and return if the caller-supplied callback function returns
markj [Sat, 31 Jan 2015 03:22:00 +0000 (03:22 +0000)]
Stop iterating and return if the caller-supplied callback function returns
a non-zero value.

MFC after: 1 week

9 years agoAdd a WITNESS_WARN check to STOPEVENT() to match the one in _STOPEVENT().
jhb [Sat, 31 Jan 2015 02:15:16 +0000 (02:15 +0000)]
Add a WITNESS_WARN check to STOPEVENT() to match the one in _STOPEVENT().

9 years agoFix backlight for ivybridge based laptops (and whatever else comes through
adrian [Sat, 31 Jan 2015 02:13:25 +0000 (02:13 +0000)]
Fix backlight for ivybridge based laptops (and whatever else comes through
this codepath.)

(1<<30) is documented as BLM_PCH_OVERRIDE_ENABLE, which the current
i915 driver in Linux only sets for broadwell chips.

This fixes the backlight control on the Lenovo X230.

Approved by: kib
Obtained from: Linux 7aa1e7f06d6ea1bce3b27630d50769d13da28b1a

9 years agoti_pruss: make sure the mmap'ed memory region is uncacheable.
rpaulo [Sat, 31 Jan 2015 02:12:57 +0000 (02:12 +0000)]
ti_pruss: make sure the mmap'ed memory region is uncacheable.

MFC after: 1 week

9 years agoFix order of functions in smbios.c (corrects r277949), since this corrects
grembo [Sat, 31 Jan 2015 00:06:05 +0000 (00:06 +0000)]
Fix order of functions in smbios.c (corrects r277949), since this corrects
a build error I committed this directly, sorry.

9 years agoFix 7-year-old typo: The default directory searched for fortunes is
cperciva [Fri, 30 Jan 2015 23:26:03 +0000 (23:26 +0000)]
Fix 7-year-old typo: The default directory searched for fortunes is
/usr/share/games/fortune, not /usr/games/fortune (which is the path
to the fortune binary itself).

9 years agoFix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST. No
dim [Fri, 30 Jan 2015 22:02:32 +0000 (22:02 +0000)]
Fix a -Wcast-qual warning in smbfs_subr.c, by using __DECONST.  No
functional change.

MFC after: 3 days

9 years agoFix a -Wcast-qual warning in udf_vnops.c, by using __DECONST. No
dim [Fri, 30 Jan 2015 22:01:45 +0000 (22:01 +0000)]
Fix a -Wcast-qual warning in udf_vnops.c, by using __DECONST.  No
functional change.

MFC after: 3 days

9 years agoFix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using
dim [Fri, 30 Jan 2015 21:59:53 +0000 (21:59 +0000)]
Fix a bunch of -Wcast-qual warnings in netgraph's ng_parse.c, by using
__DECONST.  No functional change.

MFC after: 3 days

9 years agoUse MBR by default on BIOS systems. An increasing number of motherboards
nwhitehorn [Fri, 30 Jan 2015 21:22:18 +0000 (21:22 +0000)]
Use MBR by default on BIOS systems. An increasing number of motherboards
assume that GPT means UEFI boot, resulting in the installation of
uninstallable systems. This needs a little more work before MFC, in
particular based on disk size (> 2 TB + BIOS + MBR is not workable). That
will come soon.

9 years agoNew function smbios_match to detect BIOS versions during boot
grembo [Fri, 30 Jan 2015 19:47:25 +0000 (19:47 +0000)]
New function smbios_match to detect BIOS versions during boot

Motivation is to introduce BIOS specific quirks early in the boot
process. smbios_match can be called before malloc is avaible, that's
why parts of smbios_detect have been moved into a separate function
smbios_probe that will be called by smbios_detect as well as
smbios_match.

Reviewed by: jhb
Approved by: jhb
Differential Revision:  https://reviews.freebsd.org/D1679

9 years agomsun: use previously ignored value.
pfg [Fri, 30 Jan 2015 19:19:03 +0000 (19:19 +0000)]
msun: use previously ignored value.

This fixes evaluation of exceptional values in scalblnl().
While here, simplify the code as suggested by Bruce Evans.

Reported by: clang static analyzer
MFC after: 1 week

9 years agoPartially revert r273382, to reduce diffs against upstream. This was a
dim [Fri, 30 Jan 2015 18:26:38 +0000 (18:26 +0000)]
Partially revert r273382, to reduce diffs against upstream.  This was a
temporary fix to solve a conflict with an older version of libc++, and
it is no longer relevant.

MFC after: 3 days

9 years agoFix UEFI PXE boot on a NIC that isn't the first NIC.
ambrisko [Fri, 30 Jan 2015 18:25:53 +0000 (18:25 +0000)]
Fix UEFI PXE boot on a NIC that isn't the first NIC.

In UEFI it appears all available NICS are present to pass network traffic.
This gives the capability to load the loader.efi from disk then set
currdev="net3:" and then all I/O will over over the 2nd NIC.  On this
machine is appears the first handle is the first NIC in IPv4 mode and
then the 2nd handle is the first NIC in IPv6 mode.  The 3rd handle is
the 2nd NIC in IPv4 mode.  The fix is to index into the handle based
on the unit cached from boot device passed into the loader.

Some testing info from a test boot via kenv:
currdev="net3:"
loaddev="net3:"
boot.netif.name="igb1"

9 years agoAdd myself (erj) to committers-src.dot.
erj [Fri, 30 Jan 2015 18:19:22 +0000 (18:19 +0000)]
Add myself (erj) to committers-src.dot.

Approved by: gnn (mentor), jfv (mentor)

9 years agoThe BCM2835 GPIO controller uses has interrupt lines and not only one.
loos [Fri, 30 Jan 2015 18:18:09 +0000 (18:18 +0000)]
The BCM2835 GPIO controller uses has interrupt lines and not only one.
Allocate all four, we will use them soon.

Simplificate the allocation of memory and interrupt resources with a single
bus_alloc_resources() call instead of doing them separately.

Destroy the mutex in case of errors.

9 years agoFor clang, disable -Wcast-qual warnings for specific aesni files, since
dim [Fri, 30 Jan 2015 18:17:17 +0000 (18:17 +0000)]
For clang, disable -Wcast-qual warnings for specific aesni files, since
clang 3.6.0 will emit a number of such warnings for those files, and
they are partially contributed code.

9 years agoCreate MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no
ngie [Fri, 30 Jan 2015 18:07:46 +0000 (18:07 +0000)]
Create MANLINKS for lzgrep, etc when MK_LZMA_SUPPORT != no

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division

9 years agoMake syncookie_mac() use 'tcp_seq irs' in computing hash.
hiren [Fri, 30 Jan 2015 17:29:07 +0000 (17:29 +0000)]
Make syncookie_mac() use 'tcp_seq irs' in computing hash.
This fixes what seems like a simple oversight when the function was added in
r253210.

Reported by:            Daniel Borkmann <dborkman@redhat.com>
                        Florian Westphal <fw@strlen.de>
Differential Revision:  https://reviews.freebsd.org/D1628
Reviewed by:            gnn
MFC after:              1 month
Sponsored by:           Limelight Networks

9 years agoKeep original images, dont compile tests,
mr [Fri, 30 Jan 2015 15:42:52 +0000 (15:42 +0000)]
Keep original images, dont compile tests,
makefs for iso images translates labes to uppercase, so adopt fstab for this case.

9 years agoUse powerof2(). Remove single-use variable.
kib [Fri, 30 Jan 2015 15:32:35 +0000 (15:32 +0000)]
Use powerof2().  Remove single-use variable.

Submitted by: Conrad Meyer
Differential Revision: https://reviews.freebsd.org/D1724
MFC after: 1 week

9 years agoAllow the retrieving of the reserved pins state.
loos [Fri, 30 Jan 2015 14:35:04 +0000 (14:35 +0000)]
Allow the retrieving of the reserved pins state.

With this change, it is now possible to verify the pin function and level
of reserved pins (but not set them).

The use of reserved pins on Raspberry pi can lead to short circuits and
real damage to the SoC.

While here, remove duplicated code, make use of OF_getencprop_alloc()
instead of using fixed sized variables and reduce the dmesg spam by
printing reserved pin ranges (when possible) instead of printing each pin
in the range.

9 years agoDo not leak the OFW memory when the result does not satisfy our alignment
loos [Fri, 30 Jan 2015 14:09:07 +0000 (14:09 +0000)]
Do not leak the OFW memory when the result does not satisfy our alignment
requirement.

While here, fix style(9) issues.

9 years agoMake gcc happy.
pjd [Fri, 30 Jan 2015 13:03:36 +0000 (13:03 +0000)]
Make gcc happy.

Reported by: bz

9 years agoAdd missing nvlist_get_parent(3) link.
pjd [Fri, 30 Jan 2015 12:57:35 +0000 (12:57 +0000)]
Add missing nvlist_get_parent(3) link.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

9 years agoHandle empty nvlists correctly.
pjd [Fri, 30 Jan 2015 12:31:29 +0000 (12:31 +0000)]
Handle empty nvlists correctly.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

9 years agoWhen mounting SU-enabled mount point, wait until the softdep_flush()
kib [Fri, 30 Jan 2015 11:41:46 +0000 (11:41 +0000)]
When mounting SU-enabled mount point, wait until the softdep_flush()
thread started and incremented the stat_flush_threads [1].

Unconditionally wakeup softdep_flush threads when needed, do not try
to check wchan, which is racy and breaks abstraction.

Reported by and discussed with: glebius, neel
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoModify nvlist_get_parent() API to take additional cookie argument.
pjd [Fri, 30 Jan 2015 10:08:38 +0000 (10:08 +0000)]
Modify nvlist_get_parent() API to take additional cookie argument.
This allow for non-recursive iteration over nested nvlists, as in documented
example.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

9 years agoIf moving descriptor or binary data to an nvlist fails, we need to close the
pjd [Fri, 30 Jan 2015 09:44:29 +0000 (09:44 +0000)]
If moving descriptor or binary data to an nvlist fails, we need to close the
descriptor or free the memory before returning.

Submitted by: Mariusz Zaborski <oshogbo@FreeBSD.org>

While here, protect errno, so it won't be overwritted by close(2) or free(3).

9 years agoImprove SCSI Extended Inquiry VPD page (0x86) support.
ken [Fri, 30 Jan 2015 05:23:39 +0000 (05:23 +0000)]
Improve SCSI Extended Inquiry VPD page (0x86) support.

sys/cam/scsi/scsi_all.h:
In struct scsi_extended_inquiry_data:
- Increase the length field to 2 bytes, as it is 2 bytes in SPC-4.
- Add bit definitions for the various Activiate Microcode actions.
- Add the Sequential Access Logical Block Protection support bit,
  since we need that in the sa(4) driver.  (For modifications
  that will come later.)
- Add definitions for the various Multi I_T Nexus Microcode
  Download modes.

sys/cam/ctl/ctl.c:
As of SPC-4, a single report of "REPORTED LUNS DATA HAS CHANGED"
is to be given per I_T nexus.  Once it is reported, the unit
attention condition should be cleared for all LUNS attached to
an I_T nexus.

Previously that only happened when a REPORT LUNS command was
processed.

This behavior may be different (according to SAM-5) when the
UA_INTLCK_CTRL bits are non-zero in the control mode page but
CTL does not currently support that.

So, in view of the spec, whenever we report a LUN inventory
change unit attention, clear it on all LUNs for that
particular I_T nexus.

Add a new function, ctl_clear_ua() that will clear a unit
attention on all LUNs for the given I_T nexus.

One field in the extended inquiry data that we could potentially
report at some point is the maximum supported sense data length.
To do that, we would the SIM to report (via path inquiry
perhaps) how much sense data it is able to send.

Add comments to explain some of the bits that are set in the
Extended Inquiry VPD page.

Add a few comments to make it more clear which functions handle
various VPD pages.

Sponsored by: Spectra Logic
MFC after: 1 week

9 years agopause() isn't a system call on FreeBSD; use sigsuspend(2) instead.
markj [Fri, 30 Jan 2015 05:14:01 +0000 (05:14 +0000)]
pause() isn't a system call on FreeBSD; use sigsuspend(2) instead.

MFC after: 1 week

9 years agoDon't attempt to disable enabled fasttrap probes in an exiting process.
markj [Fri, 30 Jan 2015 05:03:23 +0000 (05:03 +0000)]
Don't attempt to disable enabled fasttrap probes in an exiting process.
There's no need to do so, and we can't hold an exiting process, so this
race can result in panics.

MFC after: 1 week

9 years agoIn fasttrap_sigtrap(), use tdsendsignal() rather than tdksignal() to send
markj [Fri, 30 Jan 2015 04:51:59 +0000 (04:51 +0000)]
In fasttrap_sigtrap(), use tdsendsignal() rather than tdksignal() to send
SIGTRAP. The latter requires that its thread argument be non-NULL, but
fasttrap_sigtrap() does not.

PR: 193593
MFC after: 1 week
Reported by: danilo

9 years agoThe DTrace harness (dtest.pl) executes DTrace scripts with the -C flag,
markj [Fri, 30 Jan 2015 04:41:49 +0000 (04:41 +0000)]
The DTrace harness (dtest.pl) executes DTrace scripts with the -C flag,
which causes dtrace(1) to run the C preprocessor on input scripts before
executing them. Suppress some warnings emitted by the preprocessor which are
confusing the DTrace lexer tests.

MFC after: 1 week

9 years agoInclude required headers in DTrace test programs.
markj [Fri, 30 Jan 2015 04:37:57 +0000 (04:37 +0000)]
Include required headers in DTrace test programs.

MFC after: 1 week

9 years agoReplace Solaris identifiers and types with their FreeBSD equivalents.
markj [Fri, 30 Jan 2015 04:30:18 +0000 (04:30 +0000)]
Replace Solaris identifiers and types with their FreeBSD equivalents.

MFC after: 1 week

9 years agoUse the correct field when reading the PID out of a struct proc.
markj [Fri, 30 Jan 2015 04:14:19 +0000 (04:14 +0000)]
Use the correct field when reading the PID out of a struct proc.

MFC after: 1 week

9 years agoWhen searching for an accompanying test program, look in the directory
markj [Fri, 30 Jan 2015 04:11:30 +0000 (04:11 +0000)]
When searching for an accompanying test program, look in the directory
containing the test script rather than the current directory. This is needed
in order to run the DTrace tests under Kyua.

MFC after: 1 week

9 years agoAdd note that contigfree(9) does not accept NULL
emaste [Fri, 30 Jan 2015 03:17:07 +0000 (03:17 +0000)]
Add note that contigfree(9) does not accept NULL

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

9 years agoCorrect device description message.
yongari [Fri, 30 Jan 2015 01:13:07 +0000 (01:13 +0000)]
Correct device description message.

9 years agoAdd -s option to config.
rodrigc [Thu, 29 Jan 2015 22:49:30 +0000 (22:49 +0000)]
Add -s option to config.

This option allows for specifying the directory to use as the location for
kernel source files. This option was ported from NetBSD.

GitHub Pull Request:   https://github.com/freebsd/freebsd/pull/18
Submitted by:          Steve Kiernan <stevek@juniper.net>, Simon Gerraty <sjg@juniper.net>
Obtained from:         Juniper Networks, Inc.
Reviewed by:           imp
Differential Revision: https://reviews.freebsd.org/D1722
Relnotes:              yes

9 years agoSimilar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(),
dim [Thu, 29 Jan 2015 21:54:01 +0000 (21:54 +0000)]
Similar to r277901, fix more -Wcast-qual warnings in libkern's strtoq(),
strtoul() and strtouq(), by using __DECONST.  No functional change.

MFC after: 3 days

9 years agoFix a -Wcast-qual warning in libkern's strtol(), by using __DECONST. No
dim [Thu, 29 Jan 2015 21:16:45 +0000 (21:16 +0000)]
Fix a -Wcast-qual warning in libkern's strtol(), by using __DECONST.  No
functional change.

MFC after: 3 days

9 years agoOpt for performance over power-saving on Intel CPUs that have a
jhb [Thu, 29 Jan 2015 20:41:42 +0000 (20:41 +0000)]
Opt for performance over power-saving on Intel CPUs that have a
P-state but not C-state invariant TSC by changing the default behavior
to leaving the TSC enabled as the timecounter and disabling C2+ instead
of disabling the TSC by default.

Discussed with: jkim
Tested by: Jan Kokemuller <jan.kokemueller@gmail.com>

9 years agoFix a bunch of -Wcast-qual warnings in cd9660_util.c, by using
dim [Thu, 29 Jan 2015 20:40:25 +0000 (20:40 +0000)]
Fix a bunch of -Wcast-qual warnings in cd9660_util.c, by using
__DECONST.  No functional change.

MFC after: 3 days