]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
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.

9 years agoReturn USB_ERR_INVAL if the eject method is not known.
n_hibma [Tue, 5 Aug 2014 09:59:16 +0000 (09:59 +0000)]
Return USB_ERR_INVAL if the eject method is not known.

PR: 145319
Submitted by: rozhuk.im gmail.com

9 years agoMerge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c
glebius [Tue, 5 Aug 2014 09:44:10 +0000 (09:44 +0000)]
Merge all MD sf_buf allocators into one MI, residing in kern/subr_sfbuf.c
The MD allocators were very common, however there were some minor
differencies. These differencies were all consolidated in the MI allocator,
under ifdefs. The defines from machine/vmparam.h turn on features required
for a particular machine. For details look in the comment in sys/sf_buf.h.

As result no MD code left in sys/*/*/vm_machdep.c. Some arches still have
machine/sf_buf.h, which is usually quite small.

Tested by: glebius (i386), tuexen (arm32), kevlo (arm32)
Reviewed by: kib
Sponsored by: Netflix
Sponsored by: Nginx, Inc.

9 years agoAdd a second Huawei SCSI eject command as USB mode switch config files
n_hibma [Tue, 5 Aug 2014 09:35:25 +0000 (09:35 +0000)]
Add a second Huawei SCSI eject command as USB mode switch config files
sometimes use one or the other. Maybe newer Huawei modems switched.

Add a quirk for it as well.

PR: 145319
Submitted by: rozhuk.im gmail.com

9 years agoReset the error value in the softc before starting a BBB transfer.
n_hibma [Tue, 5 Aug 2014 08:48:24 +0000 (08:48 +0000)]
Reset the error value in the softc before starting a BBB transfer.

PR: 145319
Submitted by: rozhuk.im gmail.com
MFC after: 3 days

9 years agoAdd ID for Novatel MC990D to u3g.
n_hibma [Tue, 5 Aug 2014 08:29:16 +0000 (08:29 +0000)]
Add ID for Novatel MC990D to u3g.

PR: 145319
Submitted by: rozhuk.im gmail.com
MFC after: 3 days

9 years agoRemove unused defines.
n_hibma [Tue, 5 Aug 2014 08:24:41 +0000 (08:24 +0000)]
Remove unused defines.
Fix some device_printf's that were missing '\n' at the end or had
speling errors.

PR: 145319
Submitted by: rozhuk.im gmail.com

9 years agoAdd new USB phone descriptor template for USB device side mode.
hselasky [Tue, 5 Aug 2014 07:03:16 +0000 (07:03 +0000)]
Add new USB phone descriptor template for USB device side mode.

MFC after: 3 days

9 years agoFix for deadlock in USB device side mode.
hselasky [Tue, 5 Aug 2014 06:38:21 +0000 (06:38 +0000)]
Fix for deadlock in USB device side mode.

MFC after: 3 days

9 years agoRename driver name a bit to avoid unit number confusion in dmesg.
hselasky [Tue, 5 Aug 2014 06:37:07 +0000 (06:37 +0000)]
Rename driver name a bit to avoid unit number confusion in dmesg.

MFC after: 3 days

9 years ago- Implement fast interrupt handler to save CPU usage.
hselasky [Tue, 5 Aug 2014 06:33:59 +0000 (06:33 +0000)]
- Implement fast interrupt handler to save CPU usage.
- Add support for striding register offsets.
- Cleanup some register reads and writes to use existing register
access macros.

9 years agoEnsure we catch USB transfers which complete right away.
hselasky [Tue, 5 Aug 2014 06:31:09 +0000 (06:31 +0000)]
Ensure we catch USB transfers which complete right away.

9 years agoCheck gethostname(2) return code - but even if it succeeds it may not
peter [Tue, 5 Aug 2014 01:32:09 +0000 (01:32 +0000)]
Check gethostname(2) return code - but even if it succeeds it may not
null terminate.

Temporarily use "From: $user@$hostname" rather than "From: $user".
The latter exposes incompatible behavior if using dma(8).  sendmail(8)
(and other alternatives) canonify either form on submission (even
if masquerading), but dma will leak a non-compliant address to
the internet.

9 years agoRevert r269523:
pfg [Tue, 5 Aug 2014 01:25:14 +0000 (01:25 +0000)]
Revert r269523:

Providing a higher EXT2_LINK_MAX limit is a bad idea for ext2/3.

Discussed with: bde

9 years agoMFV r269542:
delphij [Tue, 5 Aug 2014 00:07:21 +0000 (00:07 +0000)]
MFV r269542:

In vdev_get_stats, check that the vdev is not a hole before computing the
fragmentation.  This fixes a panic when removing log device.

Illumos issue:
    5049 panic when removing log device

Author: Alex Reece <alex@delphix.com>
MFC after: 2 weeks

9 years agoMerge from CheriBSD:
brooks [Mon, 4 Aug 2014 23:00:13 +0000 (23:00 +0000)]
Merge from CheriBSD:

Make the sysinit tool a build tool rather than building in with
/usr/bin/cc and running it from OBJDIR.  (It will be moved to usr.bin
once a manpage is written and a few style cleanups are done.)

Split the makefile bits for Hans' kernel shim layer into their own
includable kshim.mk.

Move USB support into a .mk file so loaders can include it.

9 years agoMove most of the 15 variations on generating opt_inet.h and
imp [Mon, 4 Aug 2014 22:37:02 +0000 (22:37 +0000)]
Move most of the 15 variations on generating opt_inet.h and
opt_inet6.h into kmod.mk by forcing almost everybody to eat the same
dogfood. While at it, consolidate the opt_bpf.h and opt_mroute.h
targets here too.

9 years agoInclude the kernel options after bsd.init.mk so that when we're
imp [Mon, 4 Aug 2014 22:34:56 +0000 (22:34 +0000)]
Include the kernel options after bsd.init.mk so that when we're
compiling on older systems that define all the MK variables in
bsd.own.mk we don't get the multiply defined error for options that
live in both.

9 years agoRemove unnecessary inclusions of bsd.own.mk.
imp [Mon, 4 Aug 2014 22:34:12 +0000 (22:34 +0000)]
Remove unnecessary inclusions of bsd.own.mk.

9 years agocxgbe(4): Do not run any sleepable code in the SIOCSIFFLAGS handler when
np [Mon, 4 Aug 2014 22:32:16 +0000 (22:32 +0000)]
cxgbe(4): Do not run any sleepable code in the SIOCSIFFLAGS handler when
IFF_PROMISC or IFF_ALLMULTI is being flipped.  bpf(4) holds its global
mutex around ifpromisc in at least the bpf_dtor path.

MFC after: 3 days

9 years agoIntegrate lib/libmp into the build/kyua
ngie [Mon, 4 Aug 2014 22:10:07 +0000 (22:10 +0000)]
Integrate lib/libmp into the build/kyua

- Remove the .t wrapper
- Fix -Wreturn-type warnings with clang

This change has been tested on amd64/i386

Phabric: D530
Reviewed by: jmmv
Approved by: jmmv (co-mentor)
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd support for multi-threading of soft updates.
mckusick [Mon, 4 Aug 2014 22:03:58 +0000 (22:03 +0000)]
Add support for multi-threading of soft updates.

Replace a single soft updates thread with a thread per FFS-filesystem
mount point. The threads are associated with the bufdaemon process.

Reviewed by:  kib
Tested by:    Peter Holm and Scott Long
MFC after:    2 weeks
Sponsored by: Netflix

9 years agofix misordering...
jmg [Mon, 4 Aug 2014 21:12:38 +0000 (21:12 +0000)]
fix misordering...

Obtained from: gjb
MFC after: 1 week

9 years agoadd xrefs for the other functions...
jmg [Mon, 4 Aug 2014 20:58:59 +0000 (20:58 +0000)]
add xrefs for the other functions...

There should be more text in this page talking about each of these links,
but at least people know about them now...

MFC after: 1 week

9 years agoBring in the latest standard defines for imx6 clocks referenced in dts files.
ian [Mon, 4 Aug 2014 20:50:46 +0000 (20:50 +0000)]
Bring in the latest standard defines for imx6 clocks referenced in dts files.

9 years agoAdd support for the SCTP_RECONFIG_SUPPORTED and the corresponding
tuexen [Mon, 4 Aug 2014 20:07:35 +0000 (20:07 +0000)]
Add support for the SCTP_RECONFIG_SUPPORTED and the corresponding
sysctl controlling the negotiation of the RE-CONFIG extension.

MFC after: 3 days

9 years agoAdd a comment for easier code understanding.
hiren [Mon, 4 Aug 2014 19:42:48 +0000 (19:42 +0000)]
Add a comment for easier code understanding.

9 years agoReturn 0 for the PPID of threads in process 0, as process 0 doesn't have a
markj [Mon, 4 Aug 2014 19:02:30 +0000 (19:02 +0000)]
Return 0 for the PPID of threads in process 0, as process 0 doesn't have a
parent process.

MFC after: 2 weeks

9 years agoPreserve the errno value of an ioctl before calling free(3). Previously,
markj [Mon, 4 Aug 2014 18:52:26 +0000 (18:52 +0000)]
Preserve the errno value of an ioctl before calling free(3). Previously,
errno was very occasionally being clobbered, resulting in a bogus error from
dt_consume() and thus an error from dtrace(1).

MFC after: 2 weeks

9 years agoset EXT2_LINK_MAX to LINK_MAX
pfg [Mon, 4 Aug 2014 16:41:06 +0000 (16:41 +0000)]
set EXT2_LINK_MAX to LINK_MAX

In linux EXT4_LINK_MAX is now 64000.  We can't really do that
since i_nlink and va_nlink are signed so setting higher values
is likely to cause trouble.

This is a system limitation so set the EXT_LINK_MAX to
what the system can handle.

MFC after: 3 days

9 years agoAdded support for extra ifconfig args to jail ip4.addr & ip6.addr params
smh [Mon, 4 Aug 2014 16:32:08 +0000 (16:32 +0000)]
Added support for extra ifconfig args to jail ip4.addr & ip6.addr params

This allows for CARP interfaces to be  used in jails e.g.
ip4.addr = "em0|10.10.1.20/32 vhid 1 pass MyPass advskew 100"

Before this change using exec.prestart to configure a CARP address
would result in the wrong MAC being broadcast on startup as jail creates
IP aliases to support ip[4|6].addr before exec.prestart is executed.

PR: 191832
Reviewed by: jamie
MFC after: 1 week
X-MFC-With: r269340
Phabric: D528
Sponsored by: Multiplay

9 years agoxen: add ACPI bus to xen_nexus when running as Dom0
royger [Mon, 4 Aug 2014 09:05:28 +0000 (09:05 +0000)]
xen: add ACPI bus to xen_nexus when running as Dom0

Also disable a couple of ACPI devices that are not usable under Dom0.
To this end a couple of booleans are added that allow disabling ACPI
specific devices.

Sponsored by: Citrix Systems R&D
Reviewed by: jhb

x86/xen/xen_nexus.c:
 - Return BUS_PROBE_SPECIFIC in the Xen Nexus attachement routine to
   force the usage of the Xen Nexus.
 - Attach the ACPI bus when running as Dom0.

dev/acpica/acpi_cpu.c:
dev/acpica/acpi_hpet.c:
dev/acpica/acpi_timer.c
 - Add a variable that gates the addition of the devices.

x86/include/init.h:
 - Declare variables that control the attachment of ACPI cpu, hpet and
   timer devices.

9 years agoxen: Dom0 console fixes
royger [Mon, 4 Aug 2014 09:02:49 +0000 (09:02 +0000)]
xen: Dom0 console fixes

Minor fixes to make the Xen Dom0 console work. This includes always
returning there's pending input in xencons_has_input, because on Dom0
there's no shared ring and we cannot test the indexes. The second
fix is to use the CONSOLEIO_read hypercall in order to read input
data from the Xen console.

Sponsored by: Citrix Systems R&D

dev/xen/console/xencons_ring.c:
 - Always return true in xencons_has_input for Dom0.
 - Implement Dom0 console support for xencons_handle_input.

9 years agoxen: implement support for mapping IO APIC interrupts on Xen
royger [Mon, 4 Aug 2014 09:01:21 +0000 (09:01 +0000)]
xen: implement support for mapping IO APIC interrupts on Xen

Allow a privileged Xen guest (Dom0) to parse the MADT ACPI interrupt
overrides and register them with the interrupt subsystem.

Also add a Xen specific implementation for bus_config_intr that
registers interrupts on demand for all the vectors less than
FIRST_MSI_INT.

Sponsored by: Citrix Systems R&D

x86/xen/pvcpu_enum.c:
 - Use helper functions from x86/acpica/madt.c in order to parse
   interrupt overrides from the MADT.
 - Walk the MADT and register any interrupt override with the
   interrupt subsystem.

x86/xen/xen_nexus.c:
 - Add a custom bus_config_intr method for Xen that intercepts calls
   to configure unset interrupts and registers them on the fly (if the
   vector is < FIRST_MSI_INT).