]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoSmall modification of the sctp_input() cleanup to avoid having
tuexen [Sat, 9 Aug 2014 14:33:44 +0000 (14:33 +0000)]
Small modification of the sctp_input() cleanup to avoid having
code between declariations.

9 years agoIn r268463, I misplaced a return in demangle(), causing the function to
dim [Sat, 9 Aug 2014 12:25:06 +0000 (12:25 +0000)]
In r268463, I misplaced a return in demangle(), causing the function to
erroneously skip symbols that were not mangled at all.  Fix this by
moving the return into the preceding if block.

While here, simplify the code by letting __cxa_demangle() allocate the
needed space for the demangled symbol.  This also fixes a memory leak,
which would occur whenever __cxa_demangle() failed.

Reported by: pgj
MFC after: 3 days

9 years agoAdd two new debug mark entries for chip power configuration.
adrian [Sat, 9 Aug 2014 09:13:10 +0000 (09:13 +0000)]
Add two new debug mark entries for chip power configuration.

9 years agoWork around some rather annoying chip hangs in the AR9331 chip.
adrian [Sat, 9 Aug 2014 09:12:25 +0000 (09:12 +0000)]
Work around some rather annoying chip hangs in the AR9331 chip.

If powersave is enabled and there are any transitions to network
or full sleep - even if they're pretty damned brief - eventually
something messes up somewhere and the bus glue between the AR9331
SoC and the AR9331 wifi stops working.  It shows up as stuck DMA
and LOCAL_TIMEOUT interrupts.

Both ath9k and the reference driver does a full chip reset if things
get stuck.

So:

* teach the AR9330 HAL about the force_full_reset option I added a
  couple of years ago;
* if the chip is currently in full-sleep, do a full-reset;
* if TX DMA and/or RX DMA are still enabled (eg, they did get
  stuck during reset) then do a full-reset.

Tested:

* AR9331 SoC, STA mode

9 years agoAdapt vm_page_aflag_set(PGA_WRITEABLE) to the locking of
kib [Sat, 9 Aug 2014 05:00:34 +0000 (05:00 +0000)]
Adapt vm_page_aflag_set(PGA_WRITEABLE) to the locking of
pmap_enter(PMAP_ENTER_NOSLEEP).  The PGA_WRITEABLE flag can be set
when either the page is busied, or the owner object is locked.

Update comments, move all assertions about page state when
PGA_WRITEABLE flag is set, into new helper
vm_page_assert_pga_writeable().

Reviewed by: alc
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoCreate a redundant grain directory and table. Previously we were
marcel [Sat, 9 Aug 2014 04:47:12 +0000 (04:47 +0000)]
Create a redundant grain directory and table. Previously we were
cheating by assigning the same sector offset to both directories,
but it seems that VirtualBox doesn't like that. Neither does
qemu from the looks of it.  We now actually write the directory
and table twice.

MFC after: 3 days

9 years agoRun dtrace in 32-bit mode when compiling 32-bit libraries.
rpaulo [Fri, 8 Aug 2014 23:55:22 +0000 (23:55 +0000)]
Run dtrace in 32-bit mode when compiling 32-bit libraries.

MFC after: 3 days

9 years agoUpdate the comments in exec.h with help from jilles.
wblock [Fri, 8 Aug 2014 22:30:41 +0000 (22:30 +0000)]
Update the comments in exec.h with help from jilles.

PR: 180970
Submitted by: Carlos Jacobo Puga Medina <cjpugmed@gmail.com>
Reviewed by: jilles
MFC after: 1 week

9 years agoQuiesce warning about discarding a const qualifier in assignement.
sbruno [Fri, 8 Aug 2014 21:47:47 +0000 (21:47 +0000)]
Quiesce warning about discarding a const qualifier in assignement.

Phabric: https://phabric.freebsd.org/D445
Reviewed by: neel

9 years agoPull in r214736 from upstream libc++ trunk (by Marshall Clow):
dim [Fri, 8 Aug 2014 21:27:33 +0000 (21:27 +0000)]
Pull in r214736 from upstream libc++ trunk (by Marshall Clow):

  Fix PR#20520 - predicate called too many times in list::remove_if.
  Add tests for list, forward_list, and the std::remove_if algorithm

This fixes an issue where std::list<>::remove_if() and remove() could
erroneously visit elements twice.

Reported by: Dominic Fandrey <kamikaze@bsdforen.de>
PR: 192303
MFC after: 3 days

9 years agocxgbe(4): Do not poke T4-only registers on a T5 (and vice versa).
np [Fri, 8 Aug 2014 18:36:53 +0000 (18:36 +0000)]
cxgbe(4): Do not poke T4-only registers on a T5 (and vice versa).

Obtained from: Chelsio Communications
MFC after: 1 week

9 years agoQuiesce a printf warning from clang, %ul -> %lu
sbruno [Fri, 8 Aug 2014 18:00:23 +0000 (18:00 +0000)]
Quiesce a printf warning from clang, %ul -> %lu

Phabric: https://phabric.freebsd.org/D472
Reviewed by: mahrens delphij

9 years agosed(1): Don't force a newline on last line, if input stream doesn't have one
dumbbell [Fri, 8 Aug 2014 17:29:01 +0000 (17:29 +0000)]
sed(1): Don't force a newline on last line, if input stream doesn't have one

While here, change how we check if the current line is the last one.
Before, we just checked if there were more files after the current one.
Now, we check the actual content of those files: they files may not have
a line at all. This matches the definition of the "last line" by the
Open Group.

The new behavior is closer to GNU sed.

PR: 160745
Phabric: https://phabric.freebsd.org/D431
Reviewed by: jilles
Approved by: jilles
Exp-run by: antoine

9 years agoChange pmap_enter(9) interface to take flags parameter and superpage
kib [Fri, 8 Aug 2014 17:12:03 +0000 (17:12 +0000)]
Change pmap_enter(9) interface to take flags parameter and superpage
mapping size (currently unused).  The flags includes the fault access
bits, wired flag as PMAP_ENTER_WIRED, and a new flag
PMAP_ENTER_NOSLEEP to indicate that pmap should not sleep.

For powerpc aim both 32 and 64 bit, fix implementation to ensure that
the requested mapping is created when PMAP_ENTER_NOSLEEP is not
specified, in particular, wait for the available memory required to
proceed.

In collaboration with: alc
Tested by: nwhitehorn (ppc aim32 and booke)
Sponsored by: The FreeBSD Foundation and EMC / Isilon Storage Division
MFC after: 2 weeks

9 years agoUpdate vmstat usage for last-argument count/wait parameters
bjk [Fri, 8 Aug 2014 16:32:06 +0000 (16:32 +0000)]
Update vmstat usage for last-argument count/wait parameters

Correct the usage in both the manpage and in usage() to indicate
that the wait interval and repetition count may be given either
with the respective -w/-c arguments, or as the final positional
arguments. [0]

The corresponding code to implement the positional arguments has
been conditional on the (always-enabled) BACKWARD_COMPATIBILITY
macro since the original 4.4-lite import.  It's no longer reasonable
to remove the functionality, so remove the macro and conditional
instead.

Note that multiple disks may be given on the command line.

While here, sort arguments and apply minor mdoc fixes.

PR: 184755 [0]
Approved by: hrs (mentor, src committer)

9 years agoFix one more compiler warning, m is not initialized.
kib [Fri, 8 Aug 2014 15:50:02 +0000 (15:50 +0000)]
Fix one more compiler warning, m is not initialized.

9 years agoan isn't used, so eliminate it.
imp [Fri, 8 Aug 2014 11:47:23 +0000 (11:47 +0000)]
an isn't used, so eliminate it.

9 years agoerr set but not used. Eliminate it.
imp [Fri, 8 Aug 2014 11:47:18 +0000 (11:47 +0000)]
err set but not used. Eliminate it.

9 years agolast is set and not used, most likely a cut and paste error from other
imp [Fri, 8 Aug 2014 11:47:14 +0000 (11:47 +0000)]
last is set and not used, most likely a cut and paste error from other
sysctl setting functions in this module.

9 years agoSet but not used variables eliminated.
imp [Fri, 8 Aug 2014 11:47:09 +0000 (11:47 +0000)]
Set but not used variables eliminated.

9 years agoshared_scb_data set, but never used, remove it.
imp [Fri, 8 Aug 2014 11:47:04 +0000 (11:47 +0000)]
shared_scb_data set, but never used, remove it.

9 years agois_full_id is set to 0 and then not used. remove it.
imp [Fri, 8 Aug 2014 11:46:45 +0000 (11:46 +0000)]
is_full_id is set to 0 and then not used. remove it.

9 years agoVOP_LOOKUP() may relock the directory vnode for some reasons. Since
kib [Fri, 8 Aug 2014 11:39:05 +0000 (11:39 +0000)]
VOP_LOOKUP() may relock the directory vnode for some reasons.  Since
nullfs vnode shares vnode lock with lower vnode, this allows the
reclamation of nullfs directory vnode in null_lookup().  In this
situation, VOP must return ENOENT.

More, since after the reclamation, the locks of nullfs directory vnode
and lower vnode are no longer shared, the relock of the ldvp does not
restore the correct locking state of dvp, and leaks ldvp lock.
Correct this by unlocking ldvp and locking dvp.

Use cached value of dvp->v_mount.

Reported by: bdrewery
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoFix argument to KTR after r269699 to unbreak LINT builds.
bz [Fri, 8 Aug 2014 09:17:02 +0000 (09:17 +0000)]
Fix argument to KTR after r269699 to unbreak LINT builds.

9 years agoRemove unnecessary inclusion of FDT headers.
nwhitehorn [Fri, 8 Aug 2014 06:30:17 +0000 (06:30 +0000)]
Remove unnecessary inclusion of FDT headers.

9 years agoUse OF_getencprop() in preference to OF_getprop() and manual byte-swapping.
nwhitehorn [Fri, 8 Aug 2014 06:29:30 +0000 (06:29 +0000)]
Use OF_getencprop() in preference to OF_getprop() and manual byte-swapping.

9 years agoSet the si_code appropriately for exception-caused signals.
jhibbits [Fri, 8 Aug 2014 06:22:32 +0000 (06:22 +0000)]
Set the si_code appropriately for exception-caused signals.

LLDB checks the si_code, and aborts if a code isn't known.

MFC after: 2 weeks
Relnotes: yes

9 years agoSupport PCI extended config space in bhyve.
neel [Fri, 8 Aug 2014 03:49:01 +0000 (03:49 +0000)]
Support PCI extended config space in bhyve.

Add the ACPI MCFG table to advertise the extended config memory window.

Introduce a new flag MEM_F_IMMUTABLE for memory ranges that cannot be deleted
or moved in the guest's address space. The PCI extended config space is an
example of an immutable memory range.

Add emulation for the "movzw" instruction. This instruction is used by FreeBSD
to read a 16-bit extended config space register.

CR: https://phabric.freebsd.org/D505
Reviewed by: jhb, grehan
Requested by: tychon

9 years agoMerge 'struct ip6protosw' and 'struct protosw' into one. Now we have
kevlo [Fri, 8 Aug 2014 01:57:15 +0000 (01:57 +0000)]
Merge 'struct ip6protosw' and 'struct protosw' into one.  Now we have
only one protocol switch structure that is shared between ipv4 and ipv6.

Phabric: D476
Reviewed by: jhb

9 years agoAdd a missing clock register definition.
ian [Fri, 8 Aug 2014 01:23:43 +0000 (01:23 +0000)]
Add a missing clock register definition.

9 years agoAdd the dts include directory to the -I list when doing arm builds.
ian [Fri, 8 Aug 2014 01:21:52 +0000 (01:21 +0000)]
Add the dts include directory to the -I list when doing arm builds.

9 years agoConst-ify character string
pfg [Thu, 7 Aug 2014 22:14:37 +0000 (22:14 +0000)]
Const-ify character string

Obtained from:  Apple Inc. (Libc 997.90.3)
MFC after: 3 days

9 years agoCast queue length because q_len isn't really an enum in the same sense
imp [Thu, 7 Aug 2014 21:56:46 +0000 (21:56 +0000)]
Cast queue length because q_len isn't really an enum in the same sense
that clang wants it to be (a value that can only have values inside
the enum range), but rather an unsigned count of bytes.

9 years agocswitch is unsigned, so don't compare it < 0. Any negative numbers
imp [Thu, 7 Aug 2014 21:56:42 +0000 (21:56 +0000)]
cswitch is unsigned, so don't compare it < 0. Any negative numbers
will look huge and be caught by > 100.

9 years agoUnsigned values can never be less than 0.
imp [Thu, 7 Aug 2014 21:56:37 +0000 (21:56 +0000)]
Unsigned values can never be less than 0.

9 years agotarget is unsigned, so don't compare it < 0 for range test.
imp [Thu, 7 Aug 2014 21:56:32 +0000 (21:56 +0000)]
target is unsigned, so don't compare it < 0 for range test.

9 years agom4 now requires libohash, ensure it gets built when bootstrapping.
ian [Thu, 7 Aug 2014 21:37:03 +0000 (21:37 +0000)]
m4 now requires libohash, ensure it gets built when bootstrapping.

9 years agoRetire vd_maskbitbltchr. The same functionality can be obtained by testing
nwhitehorn [Thu, 7 Aug 2014 21:00:16 +0000 (21:00 +0000)]
Retire vd_maskbitbltchr. The same functionality can be obtained by testing
for mask != NULL in vd_bitbltchr, which all implementations of vd_bitbltchr()
were doing anyway.

9 years agoMerge OpenSSL 1.0.1i.
jkim [Thu, 7 Aug 2014 18:56:10 +0000 (18:56 +0000)]
Merge OpenSSL 1.0.1i.

9 years agoatpic: make sure atpic_init is called after IO APIC initialization
royger [Thu, 7 Aug 2014 17:00:50 +0000 (17:00 +0000)]
atpic: make sure atpic_init is called after IO APIC initialization

After r269510 the IO APIC and ATPIC initialization is done at the same
order, which means atpic_init can be called before the IO APIC has
been initalized. In that case the ATPIC will take over the interrupt
sources, preventing the IO APIC from registering them.

Reported by: David Wolfskill <david@catwhisker.org>
Tested by: David Wolfskill <david@catwhisker.org>,
           Trond Endrestøl <Trond.Endrestol@fagskolen.gjovik.no>
Sponsored by: Citrix Systems R&D

9 years agoThe SUJ journal is only prepared to handle full-size block numbers, so we
mckusick [Thu, 7 Aug 2014 16:53:07 +0000 (16:53 +0000)]
The SUJ journal is only prepared to handle full-size block numbers, so we
have to adjust freeblk records to reflect the change to a full-size block.
For example, suppose we have a block made up of fragments 8-15 and
want to free its last two fragments. We are given a request that says:
    FREEBLK ino=5, blkno=14, lbn=0, frags=2, oldfrags=0
where frags are the number of fragments to free and oldfrags are the
number of fragments to keep. To block align it, we have to change it to
have a valid full-size blkno, so it becomes:
    FREEBLK ino=5, blkno=8, lbn=0, frags=2, oldfrags=6

Submitted by: Mikihito Takehara
Tested by:    Mikihito Takehara
Reviewed by:  Jeff Roberson
MFC after:    1 week

9 years agoImport OpenSSL 1.0.1i.
jkim [Thu, 7 Aug 2014 16:49:55 +0000 (16:49 +0000)]
Import OpenSSL 1.0.1i.

9 years agoSplit up sys_ktimer_getoverrun() into a sys_ and a kern_ variant
bz [Thu, 7 Aug 2014 16:49:50 +0000 (16:49 +0000)]
Split up sys_ktimer_getoverrun() into a sys_ and a kern_ variant
and export the kern_ version needed by an upcoming linuxolator change.

MFC after: 3 days
Sponsored by: DARPA,AFRL

9 years agoTemporary revert r269661, it looks like the patch isn't complete.
ae [Thu, 7 Aug 2014 14:32:28 +0000 (14:32 +0000)]
Temporary revert r269661, it looks like the patch isn't complete.

9 years agoAvoid name shadowing to fix build under powerpc64.
jmmv [Thu, 7 Aug 2014 14:26:44 +0000 (14:26 +0000)]
Avoid name shadowing to fix build under powerpc64.

Error was:

cc1: warnings being treated as errors
.../usr.bin/m4/misc.c: In function 'm4errx':
.../usr.bin/m4/misc.c:268: warning: declaration of 'eval' shadows a global declaration
.../usr.bin/m4/extern.h:40: warning: shadowed declaration is here

9 years agoMake sure the USB audio level residue is non-zero.
hselasky [Thu, 7 Aug 2014 12:47:25 +0000 (12:47 +0000)]
Make sure the USB audio level residue is non-zero.

9 years ago10 has a new flex (2.5.37) and the config.h for unbound has been updated to
roberto [Thu, 7 Aug 2014 11:44:30 +0000 (11:44 +0000)]
10 has a new flex (2.5.37) and the config.h for unbound has been updated to
take this into account. Alas it breaks source upgrade from any version of
9 because flex is not built as a bootstrap-tools (it would be for older
versions).

That means "libunbound/configlexer.c" is built with the old flex but using
config.h for the new one. Build is thus broken going from 9.* to 10.

Make flex a bootstrap-tools entry if host is less than 1000033 to take into
account the flex update in 10.

Tested on both 9.2-RC3 and 9.3 by myself and dim@. Running buildworld in
head but as both 10 and 11 has the new flex, it will not matter.

Reviewed by: imp
Approved by: des, imp
MFC after: 1 week
Phabric: D554

9 years agoUse cpuset_setithread() to apply cpu mask to taskq threads.
ae [Thu, 7 Aug 2014 10:23:50 +0000 (10:23 +0000)]
Use cpuset_setithread() to apply cpu mask to taskq threads.

Sponsored by: Yandex LLC

9 years agoLower warnings again to 3 the right thing would be to fix the warnings
bapt [Thu, 7 Aug 2014 09:38:27 +0000 (09:38 +0000)]
Lower warnings again to 3 the right thing would be to fix the warnings
which will be done by discussing with upstream I want the m4 code to stay
as close as possible to upstream.

9 years agoCorrect the problems with the ptrace(2) making the debuggee an orphan.
kib [Thu, 7 Aug 2014 05:47:53 +0000 (05:47 +0000)]
Correct the problems with the ptrace(2) making the debuggee an orphan.
One problem is inferior(9) looping due to the process tree becoming a
graph instead of tree if the parent is traced by child. Another issue
is due to the use of p_oppid to restore the original parent/child
relationship, because real parent could already exited and its pid
reused (noted by mjg).

Add the function proc_realparent(9), which calculates the parent for
given process. It uses the flag P_TREE_FIRST_ORPHAN to detect the head
element of the p_orphan list and than stepping back to its container
to find the parent process. If the parent has already exited, the
init(8) is returned.

Move the P_ORPHAN and the new helper flag from the p_flag* to new
p_treeflag field of struct proc, which is protected by proctree lock
instead of proc lock, since the orphans relationship is managed under
the proctree_lock already.

The remaining uses of p_oppid in ptrace(PT_DETACH) and process
reapping are replaced by proc_realparent(9).

Phabric: D417
Reviewed by: jhb
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoGive a brief message as to what error was encountered to help the user along.
thompsa [Thu, 7 Aug 2014 01:51:01 +0000 (01:51 +0000)]
Give a brief message as to what error was encountered to help the user along.

Reviewed by: nwhitehorn
MFC after: 2 weeks

9 years agoAdd more private obsolete files
bapt [Wed, 6 Aug 2014 23:06:09 +0000 (23:06 +0000)]
Add more private obsolete files

9 years agoMake libohash a proper internallib instead of hidding it in m4
bapt [Wed, 6 Aug 2014 22:46:15 +0000 (22:46 +0000)]
Make libohash a proper internallib instead of hidding it in m4

mandoc development seems to be also using ohash so prepare to share the code when
needed

9 years agoRework privatelib/internallib
bapt [Wed, 6 Aug 2014 22:17:26 +0000 (22:17 +0000)]
Rework privatelib/internallib

Make sure everything linking to a privatelib and/or an internallib does it directly
from the OBJDIR rather than DESTDIR.
Add src.libnames.mk so bsd.libnames.mk is not polluted by libraries not existsing
in final installation
Introduce the LD* variable which is what ld(1) is expecting (via LDADD) to link to
internal/privatelib
Directly link to the .so in case of private library to avoid having to complexify
LDFLAGS.

Phabric: https://phabric.freebsd.org/D553
Reviewed by: imp, emaste

9 years agoUse a SYSINIT to init the array of interrupt names on arm. This was
ian [Wed, 6 Aug 2014 21:27:15 +0000 (21:27 +0000)]
Use a SYSINIT to init the array of interrupt names on arm.  This was
called from initarm() in arm/machdep.c, but many legacy arm platforms
have their own private initarm(), so a SYSINIT fixes everyone.

Reported by: jmg

9 years agoput these under bootverbose, they are only needed for debugging, not
jmg [Wed, 6 Aug 2014 21:16:15 +0000 (21:16 +0000)]
put these under bootverbose, they are only needed for debugging, not
useful for the normal user durning normal runtime...

9 years agocxgbe(4): Let caller specify whether it's ok to sleep in
np [Wed, 6 Aug 2014 19:38:03 +0000 (19:38 +0000)]
cxgbe(4):  Let caller specify whether it's ok to sleep in
t4_sched_config and t4_sched_params.

MFC after: 2 weeks

9 years agoThe vm_pager_page_unswapped() pager op is only implemented for the
kib [Wed, 6 Aug 2014 19:34:03 +0000 (19:34 +0000)]
The vm_pager_page_unswapped() pager op is only implemented for the
swap pager.  Swap pager uses a private mutex to protect swap metadata,
and does not rely on the vm object lock to ensure integrity of it.

Weaken the requirement for the vm object lock by only asserting locked
object in vm_pager_page_unswapped(), instead of locked exclusively.

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

9 years agoAdd wrappers to assert that vm object is unlocked and for try upgrade.
kib [Wed, 6 Aug 2014 19:30:35 +0000 (19:30 +0000)]
Add wrappers to assert that vm object is unlocked and for try upgrade.

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

9 years agoComment load_chroot_env() and load_target_env() in
gjb [Wed, 6 Aug 2014 19:06:38 +0000 (19:06 +0000)]
Comment load_chroot_env() and load_target_env() in
the release/release.conf.sample file.  The uncommented
version snuck in during testing.

Sponsored by: The FreeBSD Foundation

9 years agoMerge the following from ^/projects/release-noxdev:
gjb [Wed, 6 Aug 2014 19:04:05 +0000 (19:04 +0000)]
Merge the following from ^/projects/release-noxdev:
r269549, r269551, r269552, r269553, r269554, r269555, r269558, r269559,
r269560, r269561, r269628, r269629, r269630, r269635, r269637:

r269549:
  Create a new project branch, release-noxdev, for
  a sandbox workspace outside of head/ to update the
  release bits for arm builds since the deprecation of
  the XDEV and XDEV_ARCH make(1) variables.

r269551:
  Define load_chroot_env() and load_target_env()
  prototypes.

r269552:
  Call load_chroot_env() and load_target_env() where
  they can be mutually conflicting with regard to
  TARGET, TARGET_ARCH, XDEV, and XDEV_ARCH.

r269553:
  Add shebang line to arm/*.conf files since these
  should be considered to be executable (albeit not
  on their own) shell scripts.

r269554:
  Redefine load_chroot_env() and load_target_env() in
  the arm/*.conf files, and reindent.

r269555:
  Simplify where load_chroot_env() and load_target_env() are
  called.

r269558:
  Provide example in release.conf.sample for overriding the
  load_chroot_env() and load_target_env() prototypes.

r269559:
  Remove a gratuitous newline.

r269560:
  Unset potentially conflicting variables in load_chroot_env()
  and load_target_env().

r269561:
  Make global variables global, and accessible outside of
  the functions within which they were once defined.

r269628:
  Remove XDEV/XDEV_ARCH evaluation if EMBEDDEDBUILD is set.

r269629:
  In arm/release.sh, switch TARGET/TARGET_ARCH back to the
  original XDEV/XDEV_ARCH make(1) variables.

  In theory, this should have been a no-op, but the TARGET and
  TARGET_ARCH are now unset in load_target_env() to avoid
  collision with the chroot userland.

r269630:
  Export variables in the arm/*.conf files because they
  need to be passed through release.sh to arm/release.sh.

  Set MK_TESTS=no for the xdev target.

r269635:
  As part of the XDEV/XDEV_ARCH deprecation, the
  'xdev-links' target was intentionally no longer
  invoked automatically.

  Invoke the xdev-links target after xdev, which
  creates, for example, /usr/bin/armv6-freebsd-cc
  symlink to /usr/armv6-freebsd/usr/bin/cc.

r269637:
  Set TARGET and TARGET_ARCH to the XDEV and XDEV_ARCH
  counterparts for the xdev and xdev-links make(1)
  targets.

Sponsored by: The FreeBSD Foundation

9 years agoFix athdecode to actually work.
adrian [Wed, 6 Aug 2014 18:59:39 +0000 (18:59 +0000)]
Fix athdecode to actually work.

* Add AR9287 and AR9331 chipset support - it just uses the AR5416 support
  for now so some of the register mappings are wrong, but it works well
  enough.

* don't call exit() from opmark().

9 years agoSet fb_pbase properly on PowerPC in the case where we have to guess at
nwhitehorn [Wed, 6 Aug 2014 18:13:09 +0000 (18:13 +0000)]
Set fb_pbase properly on PowerPC in the case where we have to guess at
the right register bank for the framebuffer. Disable the assigned-addresses
path on SPARC since it is just a hack for IBM PPC systems and was neither
relevant for nor worked on SPARC anyway.

9 years agodrm: fix usage of vm_phys_fictitious_to_vm_page
royger [Wed, 6 Aug 2014 17:45:59 +0000 (17:45 +0000)]
drm: fix usage of vm_phys_fictitious_to_vm_page

vm_phys_fictitious_to_vm_page should not be called directly, even when
operating on a range that has been registered using
vm_phys_fictitious_reg_range. PHYS_TO_VM_PAGE should be used instead
because on arches that use VM_PHYSSEG_DENSE the page might come
directly from vm_page_array.

Reported by: nwhitehorn
Tested by: nwhitehorn, David Mackay <davidm.jx8p@gmail.com>
Sponsored by: Citrix Systems R&D

9 years agoReduce reported additional INQUIRY data length.
mav [Wed, 6 Aug 2014 17:02:19 +0000 (17:02 +0000)]
Reduce reported additional INQUIRY data length.

sizeof(struct scsi_inquiry_data) of 256 bytes combined with off-by-one
error in the changed code gave total INQUIRY data length above 255 bytes,
that was maximal INQUIRY length in SPC-2.  While SPC-3 increased the
maximal length to 64K, at least sg3_utils are still confused by that.

MFC after: 1 week

9 years agoMention tmpfs(5)
skreuzer [Wed, 6 Aug 2014 14:38:09 +0000 (14:38 +0000)]
Mention tmpfs(5)

PR: 192389
Submitted by: yaneurabeya@gmail.com
Approved by: hrs (mentor)

9 years agoFix several issues and inconsistencies in UNMAP capabilities reporting.
mav [Wed, 6 Aug 2014 08:54:31 +0000 (08:54 +0000)]
Fix several issues and inconsistencies in UNMAP capabilities reporting.

This makes Windows 2012 to start using UNMAP on our disks.

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

9 years agoOptionally include the install command as found on Juniper products
marcel [Wed, 6 Aug 2014 00:36:04 +0000 (00:36 +0000)]
Optionally include the install command as found on Juniper products
like EX and SRX. The install command uses pkgfs to extract a kernel,
zero or more modules and a root file system from the specified package
and boots the kernel. The name of the kernel, the list of modules and
the name of the root file system can be specified by putting a
file called "metatags in the package.

The package to use is given by an URL. The schemes supported are
tftp and file. For the file scheme, the disk is currently hardcoded
but that should really look for the package on all devices and
partititions.

Obtained from: Juniper Networks, Inc.

9 years agoRetire various intertwined bits of fbd(4) and vt_fb, in particular the
nwhitehorn [Wed, 6 Aug 2014 00:35:48 +0000 (00:35 +0000)]
Retire various intertwined bits of fbd(4) and vt_fb, in particular the
pixel modification indirection. No actual drivers use it and those that
might (e.g. creatorfb) use custom implementations of vd_bitbltchr().

9 years agoRename command_unload() to unload() and re-implement command_unload()
marcel [Wed, 6 Aug 2014 00:06:25 +0000 (00:06 +0000)]
Rename command_unload() to unload() and re-implement command_unload()
in terms of unload() This allows unloading all files by the loader
itself.

Obtained from: Juniper Networks, Inc.

9 years agoVarious fixes to hptmv(4):
jhb [Tue, 5 Aug 2014 23:58:49 +0000 (23:58 +0000)]
Various fixes to hptmv(4):
- Replace the global driver lock with a per-instance device lock.
- Use the per-instance device lock instead of Giant for the CAM sim lock.
- Add global locks to protect the adapter list and DPC queues.
- Use wakeup() and mtx_sleep() to wait for certain events like the
  controller going idle rather than polling via timeouts passed to
  tsleep().
- Use callout(9) instead of timeout(9).
- Mark the interrupt handler MPSAFE.
- Remove compat shims for FreeBSD versions older than 8.0.

Reviewed by: Steve Chang <ychang@highpoint-tech.com>

9 years agoIn command_lsmod() prevent overrunning lbuf due to long path
marcel [Tue, 5 Aug 2014 23:55:23 +0000 (23:55 +0000)]
In command_lsmod() prevent overrunning lbuf due to long path
names. Call pager_output() separately for the module name.

Obtained from: Juniper Networks, Inc.

9 years agoVarious fixes to hptrr(4):
jhb [Tue, 5 Aug 2014 23:47:26 +0000 (23:47 +0000)]
Various fixes to hptrr(4):
- Use the existing vbus locks instead of Giant for the CAM sim lock.
- Use callout(9) instead of timeout(9).
- Mark the interrupt handler MPSAFE.
- Don't attempt to pass data in the softc from probe() to attach().
- Remove compat shims for FreeBSD versions older than 8.0.

Reviewed by: Steve Chang <ychang@highpoint-tech.com>

9 years agoIn file_loadraw() print the name of the file as well as its size
marcel [Tue, 5 Aug 2014 23:41:40 +0000 (23:41 +0000)]
In file_loadraw() print the name of the file as well as its size
so that we know what file is being loaded and how big the file
is once complete. This has ELF modules and disk images emit the
same output.

9 years agoVarious fixes to hptnr(4):
jhb [Tue, 5 Aug 2014 23:39:35 +0000 (23:39 +0000)]
Various fixes to hptnr(4):
- Use the existing vbus locks instead of Giant for the CAM sim lock.
- Use callout(9) instead of timeout(9).
- Mark the interrupt handler MPSAFE.
- Don't attempt to pass data in the softc from probe() to attach().
- Remove compat shims for FreeBSD versions older than 8.0.

Reviewed by: Steve Chang <ychang@highpoint-tech.com>

9 years agoVarious fixes to hptiop(4):
jhb [Tue, 5 Aug 2014 23:35:19 +0000 (23:35 +0000)]
Various fixes to hptiop(4):
- Use callout(9) instead of timeout(9).
- Use the existing hba lock as the CAM sim lock instead of Giant.
- Mark interrupt handler MPSAFE.
- Reorder detach and destroy the hba lock in detach.

Reviewed by: Steve Chang <ychang@highpoint-tech.com>

9 years agoRemove compat shims for FreeBSD versions older than 8.0.
jhb [Tue, 5 Aug 2014 23:32:53 +0000 (23:32 +0000)]
Remove compat shims for FreeBSD versions older than 8.0.

Reviewed by: Steve Chang <ychang@highpoint-tech.com>

9 years agoRevert r269528; this was not the right way to bring these changes in.
ian [Tue, 5 Aug 2014 22:38:49 +0000 (22:38 +0000)]
Revert r269528; this was not the right way to bring these changes in.

9 years agoAdd device ID for the Chicony USB 2.0 HD UVC Webcam
gjb [Tue, 5 Aug 2014 19:43:44 +0000 (19:43 +0000)]
Add device ID for the Chicony USB 2.0 HD UVC Webcam
found on the Asus X550LA.

Reviewed by: sbruno
Sponsored by: The FreeBSD Foundation

9 years agoCache the imx6 SoC type in a static var so that it only has to be figured
ian [Tue, 5 Aug 2014 19:10:53 +0000 (19:10 +0000)]
Cache the imx6 SoC type in a static var so that it only has to be figured
out by sniffing hardware registers once.

9 years agoAdd an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass
ian [Tue, 5 Aug 2014 19:06:45 +0000 (19:06 +0000)]
Add an arm option, ARM_DEVICE_MULTIPASS, used to opt-in to multi-pass
device attachment on arm platforms.  If this is defined, nexus attaches
early in BUS_PASS_BUS, and other busses and devices attach later, in the
pass number they are set up for.  Without it defined, nexus attaches in
BUS_PASS_DEFAULT and thus so does everything else, which is status quo.

Arm platforms which use FDT data to enumerate devices have been relying
on devices being attached in the exact order they're listed in the dts
source file.  That's one of things currently preventing us from using
vendor-supplied fdt data (because then we don't control the order of the
devices in the data).  Multi-pass attachment can go a long way towards
solving that problem by ensuring things like clock and interrupt drivers
are attached before the more mundane devices that need them.

The long-term goal is to have all arm fdt-based platforms using multipass.
This option is a bridge to that, letting us enable it selectively as
platforms are converted and tested (the alternative being to just throw
a big switch and try to fight fires as they're reported).

9 years agoAttach arm generic interrupt and timer drivers in the middle of
ian [Tue, 5 Aug 2014 18:51:51 +0000 (18:51 +0000)]
Attach arm generic interrupt and timer drivers in the middle of
BUS_PASS_INTERRUPT and BUS_PASS_TIMER, respectively.

9 years ago- Implement fast interrupt handler to save CPU usage.
hselasky [Tue, 5 Aug 2014 18:48:12 +0000 (18:48 +0000)]
- Implement fast interrupt handler to save CPU usage.
- Cleanup some register reads and writes to use existing register
  access macros.
- Ensure code which only applies to the control endpoint is not run
  for other endpoints in the data transfer path.

MFC after: 3 days

9 years agoIntegrate lib/libnv into the build/kyua
ngie [Tue, 5 Aug 2014 18:41:27 +0000 (18:41 +0000)]
Integrate lib/libnv into the build/kyua

Rename all of the TAP test applications from <test> to <test>_test
to match the convention described in the TestSuite wiki page

Phabric: D538
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd handler for read-back of USB audio volume levels.
hselasky [Tue, 5 Aug 2014 18:35:34 +0000 (18:35 +0000)]
Add handler for read-back of USB audio volume levels.

9 years agoAdd a simple unaccelerated vt(4) framebuffer driver for Sun framebuffers
nwhitehorn [Tue, 5 Aug 2014 18:19:51 +0000 (18:19 +0000)]
Add a simple unaccelerated vt(4) framebuffer driver for Sun framebuffers
handled by creator(4) (Sun Creator 3D, Elite 3D, etc.). This provides
vt(4) consoles on all devices currently supported by syscons on sparc64.
The driver should also be easily adaptable to support newer Sun framebuffers
such as the XVR-500 and higher.

Many thanks to dumbbell@ (Jean-Sebastien Pedron) for testing this remotely
during development.

9 years agoSimilar to r269506, fix LIBDIR to not duplicate TESTSDIR
ngie [Tue, 5 Aug 2014 18:09:39 +0000 (18:09 +0000)]
Similar to r269506, fix LIBDIR to not duplicate TESTSDIR

Phabric: D536
Reviewed by: jmmv
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division

9 years agoRemove unnecessary .PATH directive
ngie [Tue, 5 Aug 2014 18:05:31 +0000 (18:05 +0000)]
Remove unnecessary .PATH directive

All of the sources for the tests are contained in the
current working directory and the subdirectories

Phabric: D537
Reviewed by: jmmv
Approved by: jmmv (mentor)
Sponsored by: EMC / Isilon Storage Division

9 years agoSet the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU.
ian [Tue, 5 Aug 2014 17:39:58 +0000 (17:39 +0000)]
Set the pl310 L2 cache driver to attach during the middle of BUS_PASS_CPU.
Because that's earlier than interrupts are available, set up deferred
configuration of interrupts (which are used only for debugging).

9 years agoAdjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that
ian [Tue, 5 Aug 2014 17:32:47 +0000 (17:32 +0000)]
Adjust ofwbus and simplebus to attach at BUS_PASS_ORDER_MIDDLE, so that
a platform can attach some other bus first if necessary.

9 years agoDefine names that drivers can use to adjust their position relative to
ian [Tue, 5 Aug 2014 17:22:48 +0000 (17:22 +0000)]
Define names that drivers can use to adjust their position relative to
other drivers within a BUS_PASS.

Reviewed by: imp

9 years agoSet ofwbus and simplebus to attach during BUS_PASS_BUS.
ian [Tue, 5 Aug 2014 16:31:03 +0000 (16:31 +0000)]
Set ofwbus and simplebus to attach during BUS_PASS_BUS.

9 years agoReimplement WRITE USING TOKEN with Block Zero token using WRITE SAME.
mav [Tue, 5 Aug 2014 15:01:30 +0000 (15:01 +0000)]
Reimplement WRITE USING TOKEN with Block Zero token using WRITE SAME.

On my ZVOL of SSDs that increases speed of zero writing in that way from
1 to 2.5GB/s by reducing CPU overhead.
MFC after: 2 weeks

9 years ago- Ensure code which only applies to the control endpoint is not run
hselasky [Tue, 5 Aug 2014 13:36:26 +0000 (13:36 +0000)]
- Ensure code which only applies to the control endpoint is not run
for other endpoints in the data transfer path.
- Ensure all bits of the "EPCON" register is written during
initialisation.

MFC after: 3 days

9 years agoHonour WITH and WITHOUT_INET6_SUPPORT.
cy [Tue, 5 Aug 2014 13:01:21 +0000 (13:01 +0000)]
Honour WITH and WITHOUT_INET6_SUPPORT.

Approved by: glebius (mentor)
MFC after: 3 days

9 years agoAdd support for Huawei E3272 modems which are supported by the CDC
n_hibma [Tue, 5 Aug 2014 12:08:50 +0000 (12:08 +0000)]
Add support for Huawei E3272 modems which are supported by the CDC
ethernet class.

Note: This is untested as I do not have a device like this. That is
reflected in the MFC timeout.

PR: 192345
Submitted by: rozhuk.im gmail.com
MFC after: 4 weeks

9 years agoProvide -o vers= support for mount_nfs.
bz [Tue, 5 Aug 2014 12:04:40 +0000 (12:04 +0000)]
Provide -o vers= support for mount_nfs.

Our mount_nfs does use -o nfsv<2|3|4> or -2 or -3 to specify the version.
OSX (these days), Solaris, and Linux use -o vers=<2,3,4>.

With the upcoming autofs support we can make a lot of (entrerprisy) setups
getting mount options from LDAP just work by providing -o vers= compatibility.

PR: 192379
Reviewed by: wblock, bjk (man page), rmacklem, emaste
MFC after: 3 days
Sponsored by: DARPA,AFRL

9 years agodon't OR integer error values together as this does not make sense.
n_hibma [Tue, 5 Aug 2014 11:50:16 +0000 (11:50 +0000)]
don't OR integer error values together as this does not make sense.
Instead bail on the first failed command.

9 years agoRevert the logic change from r269540. If the opt_inet6.h file is empty
bz [Tue, 5 Aug 2014 10:48:53 +0000 (10:48 +0000)]
Revert the logic change from r269540.  If the opt_inet6.h file is empty
we set MK_INET6_SUPPORT to no, not if we do define INET6.
This way we do not try to build IPv6 parts in if the kernel doesn't support
them.

This unbreaks several kernel configurations building modules but no INET6.

9 years agovm_phys: improve robustness of fictitious ranges
royger [Tue, 5 Aug 2014 10:29:01 +0000 (10:29 +0000)]
vm_phys: improve robustness of fictitious ranges

With the current implementation of managed fictitious ranges when
also using VM_PHYSSEG_DENSE, a user could try to register a
fictitious range that starts inside of vm_page_array, but then
overrruns it (because the end of the fictitious range is greater than
vm_page_array_size + first_page). This would result in PHYS_TO_VM_PAGE
returning unallocated pages from past the end of vm_page_array. The
same could happen if a user tried to register a segment that starts
outside of vm_page_array but ends inside of it.

In order to fix this, allow vm_phys_fictitious_{reg/unreg}_range to
use a set of pages from vm_page_array, and allocate the rest.

Sponsored by: Citrix Systems R&D
Reviewed by: kib, alc

vm/vm_phys.c:
 - Allow registering/unregistering fictitious ranges that overrun
   vm_page_array.