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

9 years agoRework r269444 to work also for lists without IDs.
mav [Sat, 2 Aug 2014 23:20:43 +0000 (23:20 +0000)]
Rework r269444 to work also for lists without IDs.

MFC after: 3 days

9 years agoAdd support for the SCTP_PR_SUPPORTED socket option as specified in
tuexen [Sat, 2 Aug 2014 21:36:40 +0000 (21:36 +0000)]
Add support for the SCTP_PR_SUPPORTED socket option as specified in
http://tools.ietf.org/html/draft-ietf-tsvwg-sctp-prpolicies
Add also a sysctl controlling the default of the end-points.

MFC after: 1 week

9 years agoFix a copy and paste error.
tuexen [Sat, 2 Aug 2014 20:37:02 +0000 (20:37 +0000)]
Fix a copy and paste error.

X-MFC with: 269436

9 years agoPlug EXTENDED COPY request data memory leak.
mav [Sat, 2 Aug 2014 20:15:00 +0000 (20:15 +0000)]
Plug EXTENDED COPY request data memory leak.

MFC after: 3 days

9 years agoFix some bugs in RECEIVE COPY STATUS data.
mav [Sat, 2 Aug 2014 19:59:19 +0000 (19:59 +0000)]
Fix some bugs in RECEIVE COPY STATUS data.

MFC after: 3 days

9 years agoAdd missing comparisons to make list IDs in EXTENDED COPY per-initiator,
mav [Sat, 2 Aug 2014 19:51:10 +0000 (19:51 +0000)]
Add missing comparisons to make list IDs in EXTENDED COPY per-initiator,
as they should be.  Wrap it into a function to not duplicate the code.

MFC after: 3 days

9 years agocxgbe(4): Remove an unused version of t4_enable_vi.
np [Sat, 2 Aug 2014 18:37:22 +0000 (18:37 +0000)]
cxgbe(4): Remove an unused version of t4_enable_vi.

MFC after: 2 weeks

9 years ago- Spelling corrections
hselasky [Sat, 2 Aug 2014 18:37:08 +0000 (18:37 +0000)]
- Spelling corrections

Suggested by: Garrett Cooper <yaneurabeya@gmail.com>
PR: 192101

9 years agoRewrite a loop in vm_map_wire() so that gcc doesn't think that the variable
alc [Sat, 2 Aug 2014 17:58:20 +0000 (17:58 +0000)]
Rewrite a loop in vm_map_wire() so that gcc doesn't think that the variable
"rv" is uninitialized.

Reported by: bz

9 years agoDon't assume that the framebuffer driver is using vt_fb_blank() when blanking
nwhitehorn [Sat, 2 Aug 2014 17:45:08 +0000 (17:45 +0000)]
Don't assume that the framebuffer driver is using vt_fb_blank() when blanking
the screen during init.

MFC after: 1 week

9 years agoCleanup the ECN configuration handling and provide an SCTP socket
tuexen [Sat, 2 Aug 2014 17:35:13 +0000 (17:35 +0000)]
Cleanup the ECN configuration handling and provide an SCTP socket
option for controlling ECN on future associations and get the
status on current associations.
A simialar pattern will be used for controlling SCTP extensions in
upcoming commits.

9 years agoAdd myself to calendar.freebsd and committers-src.dot
ngie [Sat, 2 Aug 2014 16:45:55 +0000 (16:45 +0000)]
Add myself to calendar.freebsd and committers-src.dot

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

9 years agoHandle wiring failures in vm_map_wire() with the new functions
alc [Sat, 2 Aug 2014 16:10:24 +0000 (16:10 +0000)]
Handle wiring failures in vm_map_wire() with the new functions
pmap_unwire() and vm_object_unwire().

Retire vm_fault_{un,}wire(), since they are no longer used.

(See r268327 and r269134 for the motivation behind this change.)

Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

9 years agoMFV r269427:
delphij [Sat, 2 Aug 2014 08:34:22 +0000 (08:34 +0000)]
MFV r269427:

In dnode_children_t, use C99's "[]" idiom for declaring the variable
sized array dnc_children at the end of the structure.

This prevents the compiler from mistakenly optimizing away accesses
beyond the array's defined size.

Illumos issue:
    5038 Remove "old-style" flexible array usage in ZFS.
    Author: Justin T. Gibbs <justing@spectralogic.com>

MFC after: 2 weeks

9 years agoMFV r269426:
delphij [Sat, 2 Aug 2014 07:47:52 +0000 (07:47 +0000)]
MFV r269426:

Double test device size for ztest(1).

Illumos issue:
    5039 ztest should default to larger device sizes
    Author: Matthew Ahrens <mahrens@delphix.com>

MFC after: 2 weeks

9 years agocxgbe(4): some optimizations in freelist handling.
np [Sat, 2 Aug 2014 06:55:36 +0000 (06:55 +0000)]
cxgbe(4):  some optimizations in freelist handling.

MFC after: 2 weeks.

9 years agoSort switch statements.
imp [Sat, 2 Aug 2014 05:19:33 +0000 (05:19 +0000)]
Sort switch statements.

9 years agoSort usage options.
imp [Sat, 2 Aug 2014 05:17:59 +0000 (05:17 +0000)]
Sort usage options.

9 years agoAdd a new -K to suppress installing the kernel. Useful for creating
imp [Sat, 2 Aug 2014 05:16:20 +0000 (05:16 +0000)]
Add a new -K to suppress installing the kernel. Useful for creating
chroots that may never boot (such as build environments), or for
platforms that don't really need the kernel installed into the
filesystem.

9 years agoSet the erase block size properly in the case the underlying media
imp [Sat, 2 Aug 2014 05:05:16 +0000 (05:05 +0000)]
Set the erase block size properly in the case the underlying media
doesn't advertise an erase block size.

Submitted by: bjg@
Pointy hat to: imp@

9 years agoFollow the ufs practice for disallowing permission changes as well as
imp [Sat, 2 Aug 2014 05:05:10 +0000 (05:05 +0000)]
Follow the ufs practice for disallowing permission changes as well as
writes to files for read-only file systems. Since there are already
checks in nandfs_setattr that return an error, this moves detection of
the error earlier.

9 years agoFix a minor style(9) issue.
imp [Sat, 2 Aug 2014 05:05:05 +0000 (05:05 +0000)]
Fix a minor style(9) issue.

9 years agoAdd vt(4) support to sparc64. The only driver currently present (ofwfb)
nwhitehorn [Sat, 2 Aug 2014 03:48:16 +0000 (03:48 +0000)]
Add vt(4) support to sparc64. The only driver currently present (ofwfb)
provides support for a variety of low-end graphics hardware (SBus adapters,
Mach64, QEMU's framebuffer, XVR-100). A driver for at least the Creator3D
cards will have to be present before this can become the default console
driver.

To test vt(4) on sparc64, set kern.vty=vt at the loader prompt.

9 years agoWhen arm 64-bit atomic ops are available, define ARM_HAVE_ATOMIC64. Use
ian [Sat, 2 Aug 2014 03:44:27 +0000 (03:44 +0000)]
When arm 64-bit atomic ops are available, define ARM_HAVE_ATOMIC64.  Use
that symbol (which will be correct in both kernel and userland contexts)
rather than just __arm__ to decide whether to use a local implementation.

9 years agocxgbe(4): Fix an off by one error when looking for the BAR2 doorbell
np [Sat, 2 Aug 2014 01:48:25 +0000 (01:48 +0000)]
cxgbe(4):  Fix an off by one error when looking for the BAR2 doorbell
address of an egress queue.

MFC after: 2 weeks

9 years agocxgbe(4): minor optimizations in ingress queue processing.
np [Sat, 2 Aug 2014 00:56:34 +0000 (00:56 +0000)]
cxgbe(4): minor optimizations in ingress queue processing.

Reorganize struct sge_iq.  Make the iq entry size a compile time
constant.  While here, eliminate RX_FL_ESIZE and use EQ_ESIZE directly.

MFC after: 2 weeks

9 years agoUse the 64-bit atomics now provided by arm machine/atomic.h instead of
ian [Fri, 1 Aug 2014 23:45:50 +0000 (23:45 +0000)]
Use the 64-bit atomics now provided by arm machine/atomic.h instead of
(conflicting) local versions.

9 years agoIn the shm_open() and shm_unlink() syscalls, export the path to KTR.
rpaulo [Fri, 1 Aug 2014 23:29:04 +0000 (23:29 +0000)]
In the shm_open() and shm_unlink() syscalls, export the path to KTR.

MFC after: 1 week

9 years agoAdd kdump support for shm_open().
rpaulo [Fri, 1 Aug 2014 23:28:21 +0000 (23:28 +0000)]
Add kdump support for shm_open().

MFC after: 1 week

9 years agoDon't return ZIO_PIPELINE_CONTINUE from vdev_op_io_start methods
smh [Fri, 1 Aug 2014 23:16:48 +0000 (23:16 +0000)]
Don't return ZIO_PIPELINE_CONTINUE from vdev_op_io_start methods

This prevents recursion of vdev_queue_io_done as per r265321 but
using a different method as recommended on the openzfs list.

We now use zio_interrupt(zio) and return ZIO_PIPELINE_STOP instead
of returning ZIO_PIPELINE_CONTINUE from vdev_*_io_start methods.

zio_vdev_io_start now ASSERTS the that vdev_op_io_start returns
ZIO_PIPELINE_STOP to ensure future changes don't reintroduce
ZIO_PIPELINE_CONTINUE returns.

Cleanup flow in vdev_geom_io_start while I'm here.

Also fix some cases not using SET_ERROR(..)

MFC after: 2 weeks
X-MFC-With: r265321

9 years agoUse atomic_load/store_64() in the arm implementation of counter(9), and
ian [Fri, 1 Aug 2014 23:06:38 +0000 (23:06 +0000)]
Use atomic_load/store_64() in the arm implementation of counter(9), and
remove the XXX comments about non-atomic access to the counters.

9 years agoAdd 64-bit atomic ops for armv4, only for kernel code, mostly so that we
ian [Fri, 1 Aug 2014 22:56:41 +0000 (22:56 +0000)]
Add 64-bit atomic ops for armv4, only for kernel code, mostly so that we
don't need any #ifdef stuff to use atomic_load/store_64() elsewhere in
the kernel.  For armv4 the atomics are trivial to implement for kernel
code (just disable interrupts), less so for user mode, so this only has
the kernel mode implementations for now.

9 years agoSplit gethrtime() and gethrtime_waitfree() and make the former use
delphij [Fri, 1 Aug 2014 22:33:23 +0000 (22:33 +0000)]
Split gethrtime() and gethrtime_waitfree() and make the former use
nanouptime() instead of getnanouptime().  nanouptime(9) provides more
precise result at expense of being slower.

In r269223, gethrtime() is used as creation time of dbuf, which in turn
acts as portion of lookup key to maintain AVL invariant where there can
not be duplicate items.  Before this change, gethrtime() have preferred
better execution time by sacrificing precision, which may lead to panic
on busy systems with:

panic: avl_find() succeeded inside avl_add()

Reported by: allanjude, mav
PR: kern/192284
MFC after: 11 days
X-MFC-with: r269223

9 years agoAdd 64-bit atomic ops for armv6. The only safe way to access a 64-bit
ian [Fri, 1 Aug 2014 22:28:36 +0000 (22:28 +0000)]
Add 64-bit atomic ops for armv6.  The only safe way to access a 64-bit
value shared across multiple cores is with atomic_load_64() and
atomic_store_64(), because the normal 64-bit load/store instructions
are not atomic on 32-bit arm.  Luckily the ldrexd/strexd instructions
that are atomic are fairly cheap on armv6.  Because it's fairly simple
to do, this implements all the ops for 64-bit, not just load/store.

Reviewed by: andrew, cognet

9 years agoRemove the asconf_auth_nochk sysctl. This was off by default and only
tuexen [Fri, 1 Aug 2014 20:49:27 +0000 (20:49 +0000)]
Remove the asconf_auth_nochk sysctl. This was off by default and only
existed to be able to test with non-compliant peers a long time ago.

9 years agoTell the assembler we're building for armv7a with security extensions,
ian [Fri, 1 Aug 2014 20:32:29 +0000 (20:32 +0000)]
Tell the assembler we're building for armv7a with security extensions,
so that the 'smc' (secure monitor call) opcode is valid.

Submitted by: Stepan Dyatkovskiy <stpworld@narod.ru>

9 years agoTeach as(1) to handle the arm .arch_extension pseudo-op, which accepts
ian [Fri, 1 Aug 2014 20:30:24 +0000 (20:30 +0000)]
Teach as(1) to handle the arm .arch_extension pseudo-op, which accepts
the same values as the -march= command line option.  Add support for the
"sec" extension (security extensions).

We've been getting away without support for the sec extension because
it's bogusly enabled even on arches where its presence is optional.  This
support for .arch_extension is being added mainly so that we can use the
right directives in our source code, and that helps folks using external
toolchains (and will help us when we finally update our toolchain).

9 years agoFix an bug in as(1) parsing of arm -march=arch+ext options. Compare the
ian [Fri, 1 Aug 2014 20:21:41 +0000 (20:21 +0000)]
Fix an bug in as(1) parsing of arm -march=arch+ext options.  Compare the
arch name to just the characters before the '+' in 'arch+ext'.

9 years agoLike with /usr/lib + /usr/lib/compat, add the optional /usr/lib32/compat
peter [Fri, 1 Aug 2014 19:32:20 +0000 (19:32 +0000)]
Like with /usr/lib + /usr/lib/compat, add the optional /usr/lib32/compat
to the ldconfig32 default path.  /usr/lib32 is the 32 bit versions of
*current* libraries, while old versions should be able to be in
/usr/lib32/compat, like with /usr/lib/compat.  The separation is meant to
keep the compile time default search paths cleaner.

9 years agoFix byte ordering in default RSS key.
grehan [Fri, 1 Aug 2014 18:36:40 +0000 (18:36 +0000)]
Fix byte ordering in default RSS key.

The rss_key[] array in netinet/in_rss.c has the bytes in incorrect
order. This results in the RSS test vectors in the Microsft RSS spec
and Intel NIC specs giving incorrect results, and making it difficult
to verify correct hash operation when RSS functionality is added to
new NICs.

CR: https://phabric.freebsd.org/D516
Reviewed by: adrian

9 years agoFix unwind-info errors in our hand-written arm assembler code.
ian [Fri, 1 Aug 2014 18:24:44 +0000 (18:24 +0000)]
Fix unwind-info errors in our hand-written arm assembler code.

We have functions nested within functions, and places where we start a
function then never end it, we just jump to the middle of something else.
We tried to express this with nested ENTRY()/END() macros (which result
in .fnstart and .fnend directives), but it turns out there's no way to
express that nesting in ARM EHABI unwind info, and newer tools treat
multiple .fnstart directives without an intervening .fnend as an error.

These changes introduce two new macros, EENTRY() and EEND().  EENTRY()
creates a global label you can call/jump to just like ENTRY(), but it
doesn't emit a .fnstart.  EEND() is a no-op that just documents the
conceptual endpoint that matches up with the same-named EENTRY().

This is based on patches submitted by Stepan Dyatkovskiy, but I made some
changes and added the EEND() stuff, so blame any problems on me.

Submitted by: Stepan Dyatkovskiy <stpworld@narod.ru>

9 years agoSimplify the selection of the pvo_head and pvo allocation zone in
alc [Fri, 1 Aug 2014 17:09:50 +0000 (17:09 +0000)]
Simplify the selection of the pvo_head and pvo allocation zone in
moea_enter_locked() and moea64_enter().

Eliminate an unused variable from moea64_enter().

9 years agoUpdate the ARMv6 core clang targets to be an arm1176jzf-s. This brings us
andrew [Fri, 1 Aug 2014 16:53:04 +0000 (16:53 +0000)]
Update the ARMv6 core clang targets to be an arm1176jzf-s. This brings us
in line with gcc in base as this makes llvm generate code for the armv6k
variant of the instruction set.

9 years agoRename files: keep codename only to make it shorter.
br [Fri, 1 Aug 2014 15:10:55 +0000 (15:10 +0000)]
Rename files: keep codename only to make it shorter.

9 years agoCleanup sctp_send_initiate() and sctp_send_initiate_ack() to be
tuexen [Fri, 1 Aug 2014 12:42:37 +0000 (12:42 +0000)]
Cleanup sctp_send_initiate() and sctp_send_initiate_ack() to be
in sync as much as possible. This simplifies upcoming changes.

9 years agoAdd support for Chromebook2 -- next-generation 8-core
br [Fri, 1 Aug 2014 06:20:25 +0000 (06:20 +0000)]
Add support for Chromebook2 -- next-generation 8-core
(4 in operation), 4GB ram (3.5 usable) ARM machine.

Support covers device drivers for:
- Serial Peripheral Interface (SPI)
- Chrome Embedded Controller (EC) - SPI-based version
- XHCI and USB 3.0 dual-role device PHY

Also:
- Add support for Exynos5420 in Pad module
- Move power-related functions to separate driver --
  Power Management Unit (PMU)
- Enable XHCI for Chromebook1

Special thanks to grehan@ for hardware, and to
hselasky@ for r269139.

9 years agoRetire PVO_EXECUTABLE. It's neither used nor set correctly.
alc [Fri, 1 Aug 2014 04:53:35 +0000 (04:53 +0000)]
Retire PVO_EXECUTABLE.  It's neither used nor set correctly.