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

9 years agox86/madt: make the interrupt override parser a public function
royger [Mon, 4 Aug 2014 08:58:50 +0000 (08:58 +0000)]
x86/madt: make the interrupt override parser a public function

Split a portion of the code in madt_parse_interrupt_override to a
separate function, that is public and can be used from other code.
This will be needed by the Xen port, since FreeBSD needs to parse the
interrupt overrides and notify Xen about them.

This commit should not introduce any functional change.

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

x86/acpica/madt.c:
 - Introduce madt_parse_interrupt_values() that parses the intr
   information from ACPI and returns the triggering and the polarity.
   This is a subset of the functionality that used to be part of
   madt_parse_interrupt_override().
 - Make madt_found_sci_override a global variable that can be used
   from other files.

x86/include/acpica_machdep.h:
 - Prototype of madt_parse_interrupt_values.
 - Extern declaration of madt_found_sci_override.

9 years agoxen: change quality of the MADT ACPI enumerator
royger [Mon, 4 Aug 2014 08:56:20 +0000 (08:56 +0000)]
xen: change quality of the MADT ACPI enumerator

Lower the quality of the MADT ACPI enumerator, so on Xen Dom0 we can
force the usage of the Xen mptable enumerator even when ACPI is
detected.

This is needed because Xen might restrict the number of vCPUs
available to Dom0, but the MADT ACPI table parsed in FreeBSD is the
native one (which enumerates all the CPUs available in the system).

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

x86/acpica/madt.c:
 - Lower MADT enumerator quality to -50.

x86/xen/pvcpu_enum.c:
 - Rise Xen PV enumerator to 0.

9 years agoxen: change order of Xen intr init and IO APIC registration
royger [Mon, 4 Aug 2014 08:54:34 +0000 (08:54 +0000)]
xen: change order of Xen intr init and IO APIC registration

This change inserts the Xen interrupt subsystem (event channels)
initialization between the system interrupt initialization and the IO
APIC source registration.

This is needed when running on Dom0, that routes physical interrupts
on top of event channels, so that the interrupt sources found during
IO APIC initialization can be registered using the Xen interrupt
subsystem.

The resulting order in the SI_SUB_INTR stage is the following:

- System intr initialization
- Xen intr initalization
- IO APIC source registration

Sponsored by: Citrix Systems R&D

x86/x86/local_apic.c:
 - Change order of apic_setup_io to be called after xen interrupt
   subsystem is setup.

x86/xen/xen_intr.c:
 - Init Xen event channels before apic_setup_io.

9 years agoxen: add a DDB command to print event channel information
royger [Mon, 4 Aug 2014 08:52:10 +0000 (08:52 +0000)]
xen: add a DDB command to print event channel information

Add a new DDB command to dump all registered event channels.

Sponsored by: Citrix Systems R&D

x86/xen/xen_intr.c:
 - Add a new xen_evtchn command to DDB in order to dump all
   information related to event channels.

9 years agoxen: mask all event channels on init
royger [Mon, 4 Aug 2014 08:43:27 +0000 (08:43 +0000)]
xen: mask all event channels on init

Mask all event channels during initialization. This is done so that we
don't receive spurious interrupts while dynamically registering new
event channels. There's a small window during registration where an
event channel can fire before we have attached a handler to it.

Sponsored by: Citrix Systems R&D

x86/xen/xen_intr.c:
 - Mask all event channels on init.

9 years agoxen: implement event channel PIRQ support
royger [Mon, 4 Aug 2014 08:42:29 +0000 (08:42 +0000)]
xen: implement event channel PIRQ support

This allows Dom0 to manage physical hardware, redirecting the
physical interrupts to event channels.

Sponsored by: Citrix Systems R&D

x86/xen/xen_intr.c:
 - Expand struct xenisrc to hold the level and triggering of PIRQ
   event channels.
 - Implement missing methods in xen_intr_pirq_pic.
 - Allow xen_intr_alloc_isrc to take a vector parameter that globally
   identifies the interrupt. This is only used for PIRQs that are
   bound to a specific hardware IRQ.
 - Introduce xen_register_pirq used to register IO APIC legacy PIRQ
   interrupts.
 - Add support for the dynamic PIRQ EOI map, this shared memory is
   modified by Xen (if it suppoorts that feature), and notifies the
   guest if an EOI is needed or not. If it's not available fall back
   to the old implementation using PHYSDEVOP_irq_status_query.
 - Rename xen_intr_isrc_count to xen_intr_auto_vector_count and
   replace it's usages.
 - Align static variables by name.

xen/xen_intr.h:
 - Add prototype for xen_register_pirq.

9 years agoFix BINDIR to not duplicate "${TESTSDIR}
ngie [Mon, 4 Aug 2014 05:50:21 +0000 (05:50 +0000)]
Fix BINDIR to not duplicate "${TESTSDIR}

This should fix 'make release' with MK_TESTS != no

Phabric: D525 (part of a larger patch)

Reviewed by: jmmv
Approved by: jmmv (co-mentor)

9 years agoMove a -L argument from LDADD to LDFLAGS
ngie [Mon, 4 Aug 2014 05:49:13 +0000 (05:49 +0000)]
Move a -L argument from LDADD to LDFLAGS

Phabric: D525 (part of a larger patch)

Reviewed by: jmmv
Approved by: jmmv (co-mentor)

9 years agoFix a -Wsecurity warning with clang
ngie [Mon, 4 Aug 2014 05:46:10 +0000 (05:46 +0000)]
Fix a -Wsecurity warning with clang

Phabric: D525 (part of a larger patch)

Reviewed by: jmmv
Approved by: jmmv (co-mentor)

9 years agoRemove hardcoded path to TESTSDIR (Makefile, ld_library_pathfds.c) at
ngie [Mon, 4 Aug 2014 05:45:09 +0000 (05:45 +0000)]
Remove hardcoded path to TESTSDIR (Makefile, ld_library_pathfds.c) at
build time by using atf_tc_get_config_var(tc, "srcdir"))

This will allow end-users to move the binaries to different locations
after they've been built without having to rebuild the binaries with
the new paths

Phabric: D525 (part of a larger patch)

Reviewed by: jmmv
Approved by: jmmv (co-mentor)

9 years agoFix an overflow in getsockopt(). optval isn't big enough to hold
davide [Mon, 4 Aug 2014 05:40:51 +0000 (05:40 +0000)]
Fix an overflow in getsockopt(). optval isn't big enough to hold
sbintime_t.
Re-introduce r255030 behaviour capping socket timeouts to INT_32
if they're too large.

CR: https://phabric.freebsd.org/D433
Reported by: demon
Reviewed by: bde [1], jhb [2]
MFC after: 2 weeks

9 years agoMake igb(4) build outside of the kernel build.
adrian [Mon, 4 Aug 2014 04:23:45 +0000 (04:23 +0000)]
Make igb(4) build outside of the kernel build.

Ths defaults to RSS being disabled.

9 years agoMake the ixgbe(4) module buildable outside of the tree.
adrian [Mon, 4 Aug 2014 04:21:32 +0000 (04:21 +0000)]
Make the ixgbe(4) module buildable outside of the tree.

It defaults to RSS not being enabled.

9 years agoAdd support for Windows dialect of EXTENDED COPY command, aka Microsoft ODX.
mav [Mon, 4 Aug 2014 01:16:20 +0000 (01:16 +0000)]
Add support for Windows dialect of EXTENDED COPY command, aka Microsoft ODX.

This allows to avoid extra network traffic when copying files on NTFS iSCSI
disks within one storage host by drag'n'dropping them in Windows Explorer
of Windows 8/2012.  It should also accelerate Hyper-V VM operations, etc.

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

9 years agoImprove locking of multicast addresses in VLAN and LAGG interfaces.
mav [Mon, 4 Aug 2014 00:58:12 +0000 (00:58 +0000)]
Improve locking of multicast addresses in VLAN and LAGG interfaces.

This fixes several scenarios of reproducible panics, cause by races
between multicast address changes and interface destruction.

MFC after: 2 weeks

9 years agoPartial revert of r262867.
peter [Sun, 3 Aug 2014 22:37:21 +0000 (22:37 +0000)]
Partial revert of r262867.

r262867 was described as fixing socket buffer checks for SOCK_SEQPACKET,
but also changed one of the SOCK_DGRAM code paths to use the new
sbappendaddr_nospacecheck_locked() function.  This lead to SOCK_DGRAM
bypassing socket buffer limits.

9 years agoFor reasons which are not clear, r254263 broke some PCMCIA and CardBus
gavin [Sun, 3 Aug 2014 21:56:53 +0000 (21:56 +0000)]
For reasons which are not clear, r254263 broke some PCMCIA and CardBus
bridges in strange ways, either rendering them unable to detect
insertion and removal events, or possibly unable to read from the
device behind the bridge.

This fixes at least one laptop, a Toshiba Tecra M5 with a Texas
Instruments PCxx12 (d=0x8039 v=0c104c) bridge.  The very similar
Tecra M9 has the same bridge, but worked fine without this change.

The bridge chip has no I/O port BAR, and there is nothing in the spec
to suggest I/O decoding should be enabled; however enabling it fixes
the issue.  Add an XXX comment to this effect.

Discussed with: jhb, imp
MFC after: 2 weeks

9 years agoAdd generic list, status, load and unload docs to gpart(8)
issyl0 [Sun, 3 Aug 2014 21:54:22 +0000 (21:54 +0000)]
Add generic list, status, load and unload docs to gpart(8)

- In the style of gmirror(8).

PR: docs/191534
Reviewed by: gavin

9 years agoRetire pmap_change_wiring(). We have never used it to wire virtual pages.
alc [Sun, 3 Aug 2014 20:40:51 +0000 (20:40 +0000)]
Retire pmap_change_wiring().  We have never used it to wire virtual pages.
We continue to use pmap_enter() for that.  For unwiring virtual pages, we
now use pmap_unwire(), which unwires a range of virtual addresses instead
of a single virtual page.

Sponsored by: EMC / Isilon Storage Division

9 years agoAdd support for the SCTP_PKTDROP_SUPPORTED socket option and
tuexen [Sun, 3 Aug 2014 18:12:55 +0000 (18:12 +0000)]
Add support for the SCTP_PKTDROP_SUPPORTED socket option and
the corresponding sysctl variable.
The default is off, since the specification is not an RFC yet.

MFC after: 1 week

9 years agoFix multicast, broken by the conversion of the nfe(4) driver to the
marcel [Sun, 3 Aug 2014 16:45:07 +0000 (16:45 +0000)]
Fix multicast, broken by the conversion of the nfe(4) driver to the
driver API.

Submitted by: Mikhail <mp@lenta.ru>

9 years agoUse consistent names for SCTP sysctls. Rename
tuexen [Sun, 3 Aug 2014 15:09:13 +0000 (15:09 +0000)]
Use consistent names for SCTP sysctls. Rename
nr_sack_on_off to nrsack_enable.
Please note that this extension is off by default
since it is not specified in an RFC (yet).

9 years agoAdd SCTP socket option SCTP_NRSACK_SUPPORTED to control the
tuexen [Sun, 3 Aug 2014 14:10:10 +0000 (14:10 +0000)]
Add SCTP socket option SCTP_NRSACK_SUPPORTED to control the
NRSACK extension. The default will still be off, since it
it not an RFC (yet).
Changing the sysctl name will be in a separate commit.

MFC after: 1 week

9 years agoAllow to disable some special key combinations handled by vt(4), like debug
ray [Sun, 3 Aug 2014 13:07:25 +0000 (13:07 +0000)]
Allow to disable some special key combinations handled by vt(4), like debug
request, reboot request.

Requested by: Claude Buisson

Sponsored by: The FreeBSD Foundation

9 years agoDo not retry on set of non-transient XCOPY errors.
mav [Sun, 3 Aug 2014 11:43:14 +0000 (11:43 +0000)]
Do not retry on set of non-transient XCOPY errors.

MFC after: 1 week

9 years agoFix vt_vga driver to draw not-8-bit-aligned fonts correctly.
ray [Sun, 3 Aug 2014 11:01:35 +0000 (11:01 +0000)]
Fix vt_vga driver to draw not-8-bit-aligned fonts correctly.
Still one bug here: mouse left some gaps on track when moving left.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 years agoAvoid a divide-by-zero panic when setting the baudrate to 0.
joerg [Sun, 3 Aug 2014 10:47:45 +0000 (10:47 +0000)]
Avoid a divide-by-zero panic when setting the baudrate to 0.

MFC after: 2 weeks

9 years agoDo not retry token errors. They are not going to disappear by themselves.
mav [Sun, 3 Aug 2014 10:02:14 +0000 (10:02 +0000)]
Do not retry token errors. They are not going to disappear by themselves.

MFC after: 1 week

9 years agoRevert r269404 and use cpu_ticks() for dbuf allocation.
delphij [Sun, 3 Aug 2014 09:47:51 +0000 (09:47 +0000)]
Revert r269404 and use cpu_ticks() for dbuf allocation.

Encode CPU's number by XOR'ing the CPU ID against the 64-bit cpu_ticks().

Reviewed by: mav, gibbs
Differential Revision: https://phabric.freebsd.org/D521
MFC after: 2 weeks

9 years agovn_path_to_global_path: update comment.
pluknet [Sun, 3 Aug 2014 07:59:19 +0000 (07:59 +0000)]
vn_path_to_global_path: update comment.

9 years agoAdd required `exec' before Xdialog(1) invocation for the case where we
dteske [Sun, 3 Aug 2014 05:02:00 +0000 (05:02 +0000)]
Add required `exec' before Xdialog(1) invocation for the case where we
expect (require) data on stdin. The effect of this is that, when
backgrounded, $! returns the pid of an Xdialog(1) instance instead of
an sh(1) instance -- the difference being a later kill of $! will reach
the Xdialog(1) instance whereas without the exec the kill succeeds on
the sh(1) instance leaving Xdialog(1) open.

9 years agoMake the witness lock limit an option.
imp [Sun, 3 Aug 2014 05:00:43 +0000 (05:00 +0000)]
Make the witness lock limit an option.

9 years agoDo the iwn(4) panic reinitialisation under IWN_LOCK().
adrian [Sun, 3 Aug 2014 03:51:33 +0000 (03:51 +0000)]
Do the iwn(4) panic reinitialisation under IWN_LOCK().

I've checked each of the functions being called and there's either a
_locked version or it's supposed to be called with IWN_LOCK() held.

9 years agoRemove Giant acquisition from the mount and unmount pathes.
kib [Sun, 3 Aug 2014 03:27:54 +0000 (03:27 +0000)]
Remove Giant acquisition from the mount and unmount pathes.

It could be claimed that two things were reasonable protected by
Giant.  One is vfsconf list links, which is converted to the new
dedicated sx vfsconf_sx.  Another is vfsconf.vfc_refcount, which is
now updated with atomics.

Note that vfc_refcount still has the same races now as it has under
the Giant, the unload of filesystem modules can happen while the
module is still in use.

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

9 years agoAdd myself to committers-src.dot.
hiren [Sun, 3 Aug 2014 00:29:03 +0000 (00:29 +0000)]
Add myself to committers-src.dot.
Better late than never :-)