]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
11 years agoDtrace: enablings on defunct providers prevent providers from unregistering
pfg [Mon, 1 Apr 2013 19:13:46 +0000 (19:13 +0000)]
Dtrace: enablings on defunct providers prevent providers from unregistering

Merge change from illumos:

1368 enablings on defunct providers prevent providers from unregistering

We try to address some underlying differences between the Solaris
and FreeBSD implementations: dtrace_attach() / dtrace_detach() are
currently unimplemented in FreeBSD but the new code from illumos
makes use of taskq so some adaptations were made to dtrace_open()
and dtrace_close() to handle them appropriately.

Illumos Revision: r13430:8e6add739e38

Reference:
https://www.illumos.org/issues/1368

Reviewed by: gnn
Tested by: Fabian Keil
Obtained from: Illumos
MFC after: 3 weeks

11 years agosh: Fix various compiler warnings.
jilles [Mon, 1 Apr 2013 17:18:22 +0000 (17:18 +0000)]
sh: Fix various compiler warnings.

It now passes WARNS=7 with clang on i386.

GCC 4.2.1 does not understand setjmp() properly so will always trigger
-Wuninitialized. I will not add the volatile keywords to suppress this.

11 years agoFormat per etc/mtree/README
emaste [Mon, 1 Apr 2013 17:15:04 +0000 (17:15 +0000)]
Format per etc/mtree/README

- Spaces instead of tabs
- Sort some i18n entries

11 years agoAdd unmapped bio support to nvme(4) and nvd(4).
jimharris [Mon, 1 Apr 2013 16:23:34 +0000 (16:23 +0000)]
Add unmapped bio support to nvme(4) and nvd(4).

Sponsored by: Intel

11 years agoCall dmu_snapshot_list_next() in zvol.c with dsl_pool_config lock held
mm [Mon, 1 Apr 2013 16:14:57 +0000 (16:14 +0000)]
Call dmu_snapshot_list_next() in zvol.c with dsl_pool_config lock held

Submitted by: Andriy Gapon <avg@FreeBSD.org>
MFC after: 17 days

11 years agoSilence warnings about redefined macros.
des [Mon, 1 Apr 2013 13:48:30 +0000 (13:48 +0000)]
Silence warnings about redefined macros.

11 years agoSlightly tune locking to not call xpt_alloc_ccb() that is allowed to sleep
mav [Mon, 1 Apr 2013 13:18:34 +0000 (13:18 +0000)]
Slightly tune locking to not call xpt_alloc_ccb() that is allowed to sleep
while holding the SIM mutex.

11 years agoMention that read_attributes, write_attributes, read_acl and write_acl
trasz [Mon, 1 Apr 2013 13:17:28 +0000 (13:17 +0000)]
Mention that read_attributes, write_attributes, read_acl and write_acl
are always permitted for the file owner.

PR: kern/174948
MFC after: 1 week

11 years agoFix ipfw rule validation partially broken by r248552.
melifaro [Mon, 1 Apr 2013 11:28:52 +0000 (11:28 +0000)]
Fix ipfw rule validation partially broken by r248552.

Pointed by: avg
MFC with: r248552

11 years agoDo not call the VOP_LOOKUP() for the doomed directory vnode. The
kib [Mon, 1 Apr 2013 09:59:38 +0000 (09:59 +0000)]
Do not call the VOP_LOOKUP() for the doomed directory vnode.  The
vnode could be reclaimed while lock upgrade was performed.

Sponsored by: The FreeBSD Foundation
Reported and tested by: pho
Diagnosed and reviewed by: rmacklem
MFC after: 1 week

11 years agoRecord the correct error in the trace.
kib [Mon, 1 Apr 2013 09:57:46 +0000 (09:57 +0000)]
Record the correct error in the trace.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

11 years agoStrip the unnneeded spaces, mostly at the end of lines.
kib [Mon, 1 Apr 2013 09:56:48 +0000 (09:56 +0000)]
Strip the unnneeded spaces, mostly at the end of lines.

MFC after: 3 days

11 years agoFix low-level uart drivers that set their fifo sizes in the softc too late.
ian [Mon, 1 Apr 2013 00:44:20 +0000 (00:44 +0000)]
Fix low-level uart drivers that set their fifo sizes in the softc too late.

uart(4) allocates send and receiver buffers in attach() before it calls
the low-level driver's attach routine.  Many low-level drivers set the
fifo sizes in their attach routine, which is too late.  Other drivers set
them in the probe() routine, so that they're available when uart(4)
allocates buffers.  This fixes the ones that were setting the values too
late by moving the code to probe().

11 years agoEnable hardware flow control and high speed bulk data transfer in at91 uarts.
ian [Mon, 1 Apr 2013 00:00:10 +0000 (00:00 +0000)]
Enable hardware flow control and high speed bulk data transfer in at91 uarts.

Changes to make rtc/cts flow control work...

This does not turn on the builtin hardware flow control on the SoC's usart
device, because that doesn't work on uart1 due to a chip erratum (they
forgot to wire up pin PA21 to RTS0 internally).  Instead it uses the
hardware flow control logic where the tty layer calls the driver to assert
and de-assert the flow control lines as needed.  This prevents overruns at
the tty layer (app doesn't read fast enough), but does nothing for overruns
at the driver layer (interrupts not serviced fast enough).

To work around the wiring problem with RTS0, the driver reassigns that pin
as a GPIO and controls it manually.  It only does so if given permission via
hint.uart.1.use_rts0_workaround=1, to prevent accidentally driving the pin
if uart1 is used without flow control (because something not related to
serial IO could be wired to that pin).

In addition to the RTS0 workaround, driver changes were needed in the area
of reading the current set of DCE signals.  A priming read is now done at
attach() time, and the interrupt routine now sets SER_INT_SIGCHG when any
of the DCE signals change.  Without these changes, nothing could ever be
transmitted, because the tty layer thought CTS was de-asserted (when in fact
we had just never read the status register, and the hwsig variable was
init'd to CTS de-asserted).

Changes to support bulk high-speed (230kbps and higher) data reception...

Allow the receive fifo size to be tuned with hint.uart.<dev>.fifo_bytes.
For high speed receive, a fifo size of 1024 works well.  The default is
still 128 bytes if no hint is provided.  Using a value larger than 384
requires a change in dev/uart/uart_core.c to size the intermediate
buffer as MAX(384, 3*sc->sc_rxfifosize).

Recalculate the receive timeout whenever the baud rate changes.  At low
baud rates (19.2kbps and below) the timeout is the number of bits in 2
characters.  At higher speed it's calculated to be 500 microseconds
worth of bits.  The idea is to compromise between being responsive in
interactive situations and not timing out prematurely during a brief
pause in bulk data flow.  The old fixed timeout of 1.5 characters was
just 32 microseconds at 460kbps.

At interrupt time, check for receiver holding register overrun status
and set the corresponding status bit in the return value.

When handling a buffer overrun, get a single buffer emptied and handed
back to the hardware as quickly as possible, then deal with the second
buffer.  This at least minimizes data loss compared to the old logic
that fully processed both buffers before restarting the hardware.

Rewrite the logic for handling buffers after a receive timeout.  The
original author speculated in a comment that there may be a race with
high speed data.  There was, although it was rare.  The code now handles
all three possible scenarios on receive timeout: two empty buffers, one
empty and one partial buffer, or one full and one partial buffer.

Reviewed by: imp

11 years agoAccommodate uart devices with large FIFOs (or DMA buffers which amount
ian [Sun, 31 Mar 2013 23:24:04 +0000 (23:24 +0000)]
Accommodate uart devices with large FIFOs (or DMA buffers which amount
to the same thing) by allocating the uart(4) rx buffer based on the
device's rxfifosz rather than using a hard-coded size of 384 bytes.

The  historical 384 byte size is 3 times the largest hard-coded fifo
size in the tree, so use that ratio as a guide and allocate the buffer
as three times rxfifosz, but never smaller than the historical size.

11 years agoWhen running on armv6, set alignment checking to modulo-4 mode rather
ian [Sun, 31 Mar 2013 22:43:16 +0000 (22:43 +0000)]
When running on armv6, set alignment checking to modulo-4 mode rather
than modulo-8, because clang emits ldrd and strd instructions for
addresses that are only 4-byte aligned

11 years agoWhen running on armv6, set alignment checking to modulo-4 mode rather
ian [Sun, 31 Mar 2013 22:42:25 +0000 (22:42 +0000)]
When running on armv6, set alignment checking to modulo-4 mode rather
than modulo-8, because clang emits ldrd and strd instructions for
addresses that are only 4-byte aligned.

11 years agoAdd a macro for checking for IPv4 link local addresses.
tuexen [Sun, 31 Mar 2013 18:27:46 +0000 (18:27 +0000)]
Add a macro for checking for IPv4 link local addresses.

MFC after: 1 week

11 years agoRename do_pipe() to kern_pipe2() and declare it properly.
jilles [Sun, 31 Mar 2013 17:42:54 +0000 (17:42 +0000)]
Rename do_pipe() to kern_pipe2() and declare it properly.

11 years agoFix a typo in the CF device driver name that prevented instantiation.
ian [Sun, 31 Mar 2013 12:51:56 +0000 (12:51 +0000)]
Fix a typo in the CF device driver name that prevented instantiation.

11 years agoFix xdev-install when installing to a location other than /
andrew [Sun, 31 Mar 2013 08:54:04 +0000 (08:54 +0000)]
Fix xdev-install when installing to a location other than /

11 years agoFix xdev. Clang and libc were not building correctly on older worlds, for
andrew [Sun, 31 Mar 2013 08:31:06 +0000 (08:31 +0000)]
Fix xdev. Clang and libc were not building correctly on older worlds, for
example, on 9.1.
 * To fix clang add an _xb-bootstrap-tools target that mirrors the existing
   bootstrap-tools target in the full world.
 * For libc have the compiler use the newly installed includes, and, while
   here, tell the compiler about the xdev library path as some other
   libraries will link against the installed libraries.

11 years agoAdd counter to keep track of the number of timer interrupts generated by
neel [Sun, 31 Mar 2013 03:56:48 +0000 (03:56 +0000)]
Add counter to keep track of the number of timer interrupts generated by
the local apic for each virtual cpu.

11 years agoWhen building universe ensure the required worlds are finished before
andrew [Sun, 31 Mar 2013 02:03:34 +0000 (02:03 +0000)]
When building universe ensure the required worlds are finished before
starting the kernels. Before this the kernels would be built as part of the
last architecture universe target. There can cause problems when this world
finishes before the other worlds as the host compiler may be picked up
rather than the target compiler.

The solution is to add a target to build the universe kernels that depends
on all the world targets finishing. As we may not be building a world only
depend on it when MAKE_JUST_KERNELS is undefined.

11 years agoAdd some more stats to keep track of all the reasons that a vcpu is exiting.
neel [Sat, 30 Mar 2013 17:46:03 +0000 (17:46 +0000)]
Add some more stats to keep track of all the reasons that a vcpu is exiting.

11 years agoInitialize sym_count to 0.
kientzle [Sat, 30 Mar 2013 16:33:16 +0000 (16:33 +0000)]
Initialize sym_count to 0.

This fixes a compiler warning introduced in r248121.

11 years agoUse a shared lock for VOP_GETEXTATTR, as it is a read-like operation.
mdf [Sat, 30 Mar 2013 15:09:04 +0000 (15:09 +0000)]
Use a shared lock for VOP_GETEXTATTR, as it is a read-like operation.

MFC after: 1 week

11 years agoImprove namespacing in <sys/socket.h>:
jilles [Sat, 30 Mar 2013 13:30:27 +0000 (13:30 +0000)]
Improve namespacing in <sys/socket.h>:

 * MSG_NOSIGNAL is in POSIX.1-2008.
 * MSG_NOTIFICATION (SCTP) is not in POSIX.
 * PRU_FLUSH_* (SCTP) are not in POSIX.
 * bindat()/connectat() are not in POSIX.

Discussed with: rrs (PRU_FLUSH_*)

11 years agoAR933x CPU device improvements:
adrian [Sat, 30 Mar 2013 04:31:29 +0000 (04:31 +0000)]
AR933x CPU device improvements:

* Add baud rate and divisor programming code. See below for more
  information.

* Flesh out ar933x_init() to disable interrupts and program the initial
  console setup.

* Remove #if 0'ed code from ar933x_term().

* Explain what these functions do.

Now, the baud rate and divisor code comes from Linux, as a submission
to the OpenWRT project and Linux kernel from
Gabor Juhos <juhosg@openwrt.org>.

The original ticket for this code is https://dev.openwrt.org/ticket/12031 .

I've contacted Gabor and asked for his permission to also licence the patch
in question (which covers this code) to BSD lience and he's agreed.
Hence why I'm including it here in FreeBSD.

Tested:

* AP121 (AR9330)

11 years agoAR933x UART updates:
adrian [Sat, 30 Mar 2013 04:13:47 +0000 (04:13 +0000)]
AR933x UART updates:

* Default clock is 25MHz;
* Remove the UART register macro here - it's not needed as we don't need
  to "adjust" the register offset / spacing at all;
* Remove unused fields in the softc.

Tested:

* AP121

11 years agocxgbe(4): Add support for Chelsio's Terminator 5 (aka T5) ASIC. This
np [Sat, 30 Mar 2013 02:26:20 +0000 (02:26 +0000)]
cxgbe(4):  Add support for Chelsio's Terminator 5 (aka T5) ASIC.  This
includes support for the NIC and TOE features of the 40G, 10G, and
1G/100M cards based on the T5.

The ASIC is mostly backward compatible with the Terminator 4 so cxgbe(4)
has been updated instead of writing a brand new driver.  T5 cards will
show up as cxl (short for cxlgb) ports attached to the t5nex bus driver.

Sponsored by: Chelsio

11 years agoAdds the ability to enable / disable sorting of BIO requests queued within
smh [Fri, 29 Mar 2013 22:58:15 +0000 (22:58 +0000)]
Adds the ability to enable / disable sorting of BIO requests queued within
CAM. This can significantly improve performance particularly for SSDs
which don't suffer from seek latencies.

The sysctl / tunable kern.cam.sort_io_queues provides the systems default
setting where:-
0 = queued BIOs are NOT sorted
1 = queued BIOs are sorted (default)

Each device gets its own sysctl kern.cam.<type>.<id>.sort_io_queue
Valid values are:-
-1 = use system default (default)
0 = queued BIOs are NOT sorted
1 = queued BIOs are sorted

Note: Additional patch will look to add automatic use of none sorted queues
for none rotating media e.g. SSD's

Reviewed by: scottl
Approved by: pjd (mentor)
MFC after: 2 weeks

11 years agoKeep fwd_tag around for subsequent pcb lookups
emaste [Fri, 29 Mar 2013 20:51:44 +0000 (20:51 +0000)]
Keep fwd_tag around for subsequent pcb lookups

For TIMEWAIT handling tcp_input may have to jump back for an additional
pass through pcblookup.  Prior to this change the fwd_tag had been
discarded after the first lookup, so a new connection attempt delivered
locally via 'ipfw fwd' would fail to find a match.

As of r248886 the tag will be detached and freed when passed to the
socket buffer.

11 years agoAdd "type" to nvme_request, signifying if its payload is a VADDR, UIO, or
jimharris [Fri, 29 Mar 2013 20:34:28 +0000 (20:34 +0000)]
Add "type" to nvme_request, signifying if its payload is a VADDR, UIO, or
NULL. This simplifies decisions around if/how requests are routed through
busdma.  It also paves the way for supporting unmapped bios.

Sponsored by: Intel

11 years agoDisable this; it's a local option that I haven't yet committed to -HEAD.
adrian [Fri, 29 Mar 2013 20:07:51 +0000 (20:07 +0000)]
Disable this; it's a local option that I haven't yet committed to -HEAD.

11 years agoAdd userland access to at91 gpio functionality via ioctl calls. Also,
ian [Fri, 29 Mar 2013 19:52:57 +0000 (19:52 +0000)]
Add userland access to at91 gpio functionality via ioctl calls.  Also,
add the ability for userland to be notified of changes on gpio pins via
a select(2)/read(2) interface.

Change the interrupt handler from filtered to threaded.

Because of the uiomove() calls in the new interface, change locking from
standard mutex to sx.

Add / restore the at91_gpio_high_z() function.

Reviewed by: imp (long ago)

11 years agoChange the API for at91_pio_gpio_get() to return the entire masked set
ian [Fri, 29 Mar 2013 19:04:18 +0000 (19:04 +0000)]
Change the API for at91_pio_gpio_get() to return the entire masked set
of bits, not just a 0/1 indicating whether any of the masked bits are on.
This is compatible with the single in-tree caller of this function right now
(at91_vbus_poll() in dev/usb/controller/at91dci_atemelarm.c).

11 years agoCall soc_info.soc_data->soc_clock_init() before at91_pmc_init_clock(), so
ian [Fri, 29 Mar 2013 18:47:08 +0000 (18:47 +0000)]
Call soc_info.soc_data->soc_clock_init() before at91_pmc_init_clock(), so
that the latter correctly fills in the clock data structures based on
proper hardware-specific shift and mask values from the soc_data structure.

11 years agoChange the define in the header to eliminate unnecessary data
jfv [Fri, 29 Mar 2013 18:46:13 +0000 (18:46 +0000)]
Change the define in the header to eliminate unnecessary data
when using LEGACY TX.

11 years agoAdd a couple forward declarations, so that board support routines don't have
ian [Fri, 29 Mar 2013 18:43:10 +0000 (18:43 +0000)]
Add a couple forward declarations, so that board support routines don't have
to pre-include a bunch of header files they don't need just to use this one.

11 years agoChange defines in the igb driver to allow an easier selection of
jfv [Fri, 29 Mar 2013 18:25:45 +0000 (18:25 +0000)]
Change defines in the igb driver to allow an easier selection of
the older if_start/non-multiqueue interface from the stack. This
is not the default, but can be turned on in the Makefile now regardless
of the OS level to allow either testing or use of ALTQ.

MFC after: one week

11 years agoRedo the workaround for at91rm9200 erratum #26 in a way that doesn't
ian [Fri, 29 Mar 2013 18:17:51 +0000 (18:17 +0000)]
Redo the workaround for at91rm9200 erratum #26 in a way that doesn't
cause a lockup on some rm92 hardware.

11 years agoFix a typo: the RXD0 pin is PA18, not PA19.
ian [Fri, 29 Mar 2013 18:06:54 +0000 (18:06 +0000)]
Fix a typo: the RXD0 pin is PA18, not PA19.

11 years agoTwo small fixes:
jfv [Fri, 29 Mar 2013 18:03:00 +0000 (18:03 +0000)]
Two small fixes:
  Set promiscuous code was unconditionally turning off multicast when
  turning off promiscuous mode, this should only be done when there are
  less than MAX groups. Thanks to Mike Karels for this correction.

  Second, the overtmp interrupt setup/detection was wrong, correcting it.

MFC after: one week

11 years agoRemove a really noisy printf left over from debugging hardware errata.
ian [Fri, 29 Mar 2013 17:57:24 +0000 (17:57 +0000)]
Remove a really noisy printf left over from debugging hardware errata.

11 years agoAdd bus_dmamap_load_bio for non-CAM disk drivers that wish to enable
jimharris [Fri, 29 Mar 2013 16:26:25 +0000 (16:26 +0000)]
Add bus_dmamap_load_bio for non-CAM disk drivers that wish to enable
unmapped I/O.

Sponsored by: Intel
Reviewed by: kib

11 years agoAdd CTR5() to bus_dmamap_load_ccb, similar to other bus_dmamap_load_*
jimharris [Fri, 29 Mar 2013 16:00:16 +0000 (16:00 +0000)]
Add CTR5() to bus_dmamap_load_ccb, similar to other bus_dmamap_load_*
functions.

Sponsored by: Intel

11 years agoDo not add 1 to nsegs before passing to CTR5(), since nsegs
jimharris [Fri, 29 Mar 2013 15:54:12 +0000 (15:54 +0000)]
Do not add 1 to nsegs before passing to CTR5(), since nsegs
has already been incremented before these calls.

Sponsored by: Intel

11 years agoPass correct parameter to CTR5() in bus_dmamap_load_uio.
jimharris [Fri, 29 Mar 2013 15:51:45 +0000 (15:51 +0000)]
Pass correct parameter to CTR5() in bus_dmamap_load_uio.

Sponsored by: Intel

11 years agoFix bug in m_split() in a case when split len matches len of the
glebius [Fri, 29 Mar 2013 14:10:40 +0000 (14:10 +0000)]
Fix bug in m_split() in a case when split len matches len of the
first mbuf, and the first mbuf is M_PKTHDR.

PR: kern/176144
Submitted by: Jacques Fourie <jacques.fourie gmail.com>

11 years agoOnce ng_ksocket(4) is fixed, re-apply r194662. See this revision for
glebius [Fri, 29 Mar 2013 14:06:04 +0000 (14:06 +0000)]
Once ng_ksocket(4) is fixed, re-apply r194662. See this revision for
longer description.

Discussed with: andre, rwatson
Sponsored by: Nginx, Inc.

11 years agoRevamp mbuf handling in ng_ksocket_incoming2():
glebius [Fri, 29 Mar 2013 14:04:26 +0000 (14:04 +0000)]
Revamp mbuf handling in ng_ksocket_incoming2():

- Clear code that workarounded a bug in FreeBSD 3,
  and even predated import of netgraph(4).
- Clear workaround for m_nextpkt pointing into
  next record in buffer (fixed in r248884).
  Assert that m_nextpkt is clear.
- Do not rely on SOCK_STREAM sockets containing
  M_PKTHDR mbufs. Create a header ourselves and
  attach chain to it. This is correct fix for
  kern/154676.

PR: kern/154676
Sponsored by: Nginx, Inc

11 years agoWhen soreceive_generic() hands off an mbuf from buffer,
glebius [Fri, 29 Mar 2013 13:57:55 +0000 (13:57 +0000)]
When soreceive_generic() hands off an mbuf from buffer,
clear its pointer to next record, since next record
belongs to the buffer, and shouldn't be leaked.

The ng_ksocket(4) used to clear this pointer itself,
but the correct place is here.

Sponsored by: Nginx, Inc

11 years agoWhitespace.
glebius [Fri, 29 Mar 2013 13:53:14 +0000 (13:53 +0000)]
Whitespace.

11 years agoNon-functional cleanup of ng_ksocket_incoming2().
glebius [Fri, 29 Mar 2013 13:51:01 +0000 (13:51 +0000)]
Non-functional cleanup of ng_ksocket_incoming2().

11 years agoUnbreak compilation after r248868.
marius [Fri, 29 Mar 2013 11:53:20 +0000 (11:53 +0000)]
Unbreak compilation after r248868.

11 years agoMake pre-shutdown flush and spindown routines to not use xpt_polled_action(),
mav [Fri, 29 Mar 2013 08:33:18 +0000 (08:33 +0000)]
Make pre-shutdown flush and spindown routines to not use xpt_polled_action(),
but execute the commands in regular way.  There is no any reason to cook CPU
while the system is still fully operational.  After this change polling in
CAM is used only for kernel dumping.

11 years agoRemove EOL whitespace.
joel [Fri, 29 Mar 2013 08:32:49 +0000 (08:32 +0000)]
Remove EOL whitespace.

11 years agoMinor mdoc fix.
joel [Fri, 29 Mar 2013 08:12:09 +0000 (08:12 +0000)]
Minor mdoc fix.

11 years agoImplement CAM_PERIPH_FOREACH() macro, safely iterating over the list of
mav [Fri, 29 Mar 2013 07:50:47 +0000 (07:50 +0000)]
Implement CAM_PERIPH_FOREACH() macro, safely iterating over the list of
driver's periphs, acquiring and releaseing periph references while doing it.

Use it to iterate over the lists of ada and da periphs when flushing caches
and putting devices to sleep on shutdown and suspend.  Previous code could
panic in theory if some device disappear in the middle of the process.

11 years agoFor the AR933x UART, the serial clock is not the AHB clock, it's the
adrian [Fri, 29 Mar 2013 06:32:39 +0000 (06:32 +0000)]
For the AR933x UART, the serial clock is not the AHB clock, it's the
reference clock.  So use that instead.

11 years ago* Fix clock register definitions
adrian [Fri, 29 Mar 2013 06:32:02 +0000 (06:32 +0000)]
* Fix clock register definitions
* Add maximum clock register values

11 years agoPrint out the platform reference frequency.
adrian [Fri, 29 Mar 2013 06:31:31 +0000 (06:31 +0000)]
Print out the platform reference frequency.

This is useful for AR933x platforms where that matters.

11 years ago - Update hardware notes to reflect that amd64 is no longer "young"[1]
gjb [Thu, 28 Mar 2013 22:52:42 +0000 (22:52 +0000)]
 - Update hardware notes to reflect that amd64 is no longer "young"[1]
 - Bump copyright year

Patched by: skreuzer

11 years agoWelcome clang as the default compiler on ARM.
andrew [Thu, 28 Mar 2013 22:49:49 +0000 (22:49 +0000)]
Welcome clang as the default compiler on ARM.

Change the default compiler for little-endian ARM to clang to allow for more
testing before 10.0 is released. As LLVM and clang currnetly lack support
for big-endian ARM leave gcc as the default there.

This will also allow us to investigate moving to use the hard floating-point
version of the ARM EABI on SoCs that include the Vector Floating Point unit.
A version of this is included in all ARMv6 and ARMv7 SoCs we currently, and
are likely to support.

Both the current ABI and the new EABI are supported by clang and it will be
built correctly depending on which is selected by the user.

11 years agoAllow caller to skip 'guest linear address' validation when doing instruction
neel [Thu, 28 Mar 2013 21:26:19 +0000 (21:26 +0000)]
Allow caller to skip 'guest linear address' validation when doing instruction
decode. This is to accomodate hardware assist implementations that do not
provide the 'guest linear address' as part of nested page fault collateral.

Submitted by: Anish Gupta (akgupt3 at gmail dot com)

11 years agoReverse the order of some implicit commands (FS mounts and ifconfigs)
jamie [Thu, 28 Mar 2013 21:02:49 +0000 (21:02 +0000)]
Reverse the order of some implicit commands (FS mounts and ifconfigs)
when stopping jails.  This matters particularly for nested filesystem
mounts.

PR: kern/177325
Submitted by: Harald Schmalzbauer
MFC after: 3 days

11 years agoInitial (unfinished!) AR933x support.
adrian [Thu, 28 Mar 2013 20:48:58 +0000 (20:48 +0000)]
Initial (unfinished!) AR933x support.

11 years agoIgnore interface renames instead of removing the interface from the bridge
markj [Thu, 28 Mar 2013 20:37:07 +0000 (20:37 +0000)]
Ignore interface renames instead of removing the interface from the bridge
group.

Reviewed by: rstone
Approved by: rstone (co-mentor)
Sponsored by: Sandvine Incorporated
MFC after: 1 week

11 years agoUpdate to upstream version 2.7
fanf [Thu, 28 Mar 2013 20:33:07 +0000 (20:33 +0000)]
Update to upstream version 2.7

The most notable new feature is support for processing multiple
files in one invocation. There is also support for more make-friendly
exit statuses.

The most notable bug fix is #line directives now include the input
file name.

Obtained from: http://dotat.at/prog/unifdef

11 years agoCommit a patch that fixes a problem in the #pragma statement when searching
gnn [Thu, 28 Mar 2013 20:31:03 +0000 (20:31 +0000)]
Commit a patch that fixes a problem in the #pragma statement when searching
for and loading dependent modules.  This addresses a bug seen with
io.d where it was being doubly included.

PR: 171678
Submitted by:  Mark Johnston
MFC after: 2 weeks

11 years agoRevert previous change in favor of a fix to the actual dtrace
gnn [Thu, 28 Mar 2013 20:22:43 +0000 (20:22 +0000)]
Revert previous change in favor of a fix to the actual dtrace
libraries that addresses a #pragma issue.

11 years agoRemove dependency code that caused a double inclusion.
gnn [Thu, 28 Mar 2013 20:12:46 +0000 (20:12 +0000)]
Remove dependency code that caused a double inclusion.

Pointed out by: rpaulo and others

11 years agoTie in the AR933x support into -HEAD.
adrian [Thu, 28 Mar 2013 19:30:56 +0000 (19:30 +0000)]
Tie in the AR933x support into -HEAD.

11 years agoBring over the initial, CPU-only UART support for the AR933x SoC.
adrian [Thu, 28 Mar 2013 19:27:06 +0000 (19:27 +0000)]
Bring over the initial, CPU-only UART support for the AR933x SoC.

This implements the kernel glue needed (getc, putc, rxready).

This isn't a 16550 UART, even if the datasheet overview claims so.

The Linux ar933x support was used as a reference, however the uart code
is a reimplementation.

Attentive viewers will note that the uart code is based off of the ns8250
code and the UART bus code is a stubbed-out version of this.  I'll be
replacing it with non-stubbed versions soon, making this a fully featured
driver.

Tested:

* AP121 reference board (AR933x), booting through the mountroot> prompt;
  then doing some basic interactive tests in ddb.

11 years agoUpdate hwpmc to support Haswell class processors.
sbruno [Thu, 28 Mar 2013 19:15:54 +0000 (19:15 +0000)]
Update hwpmc to support Haswell class processors.
0x3C:      /* Per Intel document 325462-045US 01/2013. */

Add manpage to document all the goodness that is available in this
processor model.

Submitted by: hiren panchasara <hiren.panchasara@gmail.com>
Reviewed by: jimharris, sbruno
Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoAdd the "-g <gdport>" option to the vmrun.sh script that enables remote
neel [Thu, 28 Mar 2013 18:03:39 +0000 (18:03 +0000)]
Add the "-g <gdport>" option to the vmrun.sh script that enables remote
debugging of the guest via kgdb.

See also: https://wiki.freebsd.org/BHyVe/gdb

Obtained from: NetApp

11 years agoKGDB: Accept KLD symbol files with the ".symbols" extension.
will [Thu, 28 Mar 2013 17:07:02 +0000 (17:07 +0000)]
KGDB: Accept KLD symbol files with the ".symbols" extension.

Submitted by: gibbs
Approved by: ken (mentor)
Sponsored by: Spectra Logic
MFC after: 1 month

11 years agoKGDB: Allow modules to be loaded from the specified kernel's directory.
will [Thu, 28 Mar 2013 17:04:59 +0000 (17:04 +0000)]
KGDB: Allow modules to be loaded from the specified kernel's directory.

When looking up the absolute path for a kld, call find_kld_path() first.
This enables locating the module in a different directory than the one
stored in kernel memory.

With this change, kgdb can now be run on a kernel & vmcore whose associated
modules are located in the same directory as the kernel.  This makes
independent triaging of problems much easier.

This change also does not break the normal kgdb use case where no arguments
are specified; in that case kgdb loads the running kernel and its modules.

Reviewed by: adrian
Approved by: ken (mentor)
Sponsored by: Spectra Logic
MFC after: 1 month

11 years agoRemove obsolete comment. This code has now been tested with the QEMU
jimharris [Thu, 28 Mar 2013 16:57:48 +0000 (16:57 +0000)]
Remove obsolete comment.  This code has now been tested with the QEMU
NVMe device emulator.

11 years agoDelete extra IO qpairs allocated based on number of MSI-X vectors, but
jimharris [Thu, 28 Mar 2013 16:54:19 +0000 (16:54 +0000)]
Delete extra IO qpairs allocated based on number of MSI-X vectors, but
later found to not be usable because the controller doesn't support the
same number of queues.

This is not the normal case, but does occur with the Chatham prototype
board.

Sponsored by: Intel

11 years agoSeveral fixes and improvements to sendfile()
scottl [Thu, 28 Mar 2013 14:14:28 +0000 (14:14 +0000)]
Several fixes and improvements to sendfile()

1.  If we wanted to send exactly as many bytes as the socket buffer is
    sized for, the inner loop of kern_sendfile() would see that the
    socket is full before seeing that it had no more bytes left to send.
    This would cause it to return EAGAIN to the caller instead of
    success.  Fix by changing the order that these conditions are tested.
2.  Simplify the calculation for the bytes to send in each iteration of
    the inner loop of kern_sendfile()
3.  Fix some calls with bogus arguments to sf_buf_ext().  These would
    only trigger on mbuf allocation failure, but would be hilariously
    bad if they did trigger.

Submitted by: gibbs(3), andre(2)
Reviewed by: emax, andre
Obtained from: Netflix
MFC after: 1 week

11 years agoAdd myself as ports committer.
tijl [Thu, 28 Mar 2013 12:46:04 +0000 (12:46 +0000)]
Add myself as ports committer.

Approved by: crees (mentor)

11 years agoRestore DB_COMMAND capabilities of ciss(4) for debugging and diagnostics
sbruno [Thu, 28 Mar 2013 12:44:43 +0000 (12:44 +0000)]
Restore DB_COMMAND capabilities of ciss(4) for debugging and diagnostics

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agoExcept one case mps(4) driver does not touch the data and works well with
mav [Thu, 28 Mar 2013 11:24:30 +0000 (11:24 +0000)]
Except one case mps(4) driver does not touch the data and works well with
unmapped I/O.  That one exception is access to INQUIRY VPD request result.
Those requests are never unmapped now, but to be safe add respective check
there and allow unmapped I/O for the SIM by setting PIM_UNMAPPED flag.

11 years agoFix compile of ciss(4) with CISS_DEBUG defined
sbruno [Thu, 28 Mar 2013 11:00:41 +0000 (11:00 +0000)]
Fix compile of ciss(4) with CISS_DEBUG defined

Obtained from: Yahoo! Inc.
MFC after: 2 weeks

11 years agorc.subr: disabling globbing while processing devfs rules
avg [Thu, 28 Mar 2013 08:13:52 +0000 (08:13 +0000)]
rc.subr: disabling globbing while processing devfs rules

The rules themselves typically have shell-like patterns and it is
incorrect when they get replaced with matching filesystem entries.

Shell magic by: jilles
MFC after: 2 weeks

11 years agoRelease the v_writecount reference on the vnode in case of error,
kib [Thu, 28 Mar 2013 06:39:27 +0000 (06:39 +0000)]
Release the v_writecount reference on the vnode in case of error,
before the vnode is vput() in vm_mmap_vnode().  Error return means
that there is no use reference on the vnode from the vm object
reference, and failing to restore v_writecount breaks the invariant
that v_writecount is less or equal to the usecount.

The situation observed when nfs client returns ESTALE for
VOP_GETATTR() after the open.

In collaboration with: pho
MFC after: 1 week

11 years agoFix the AR933x platform device start/stop code.
adrian [Thu, 28 Mar 2013 05:43:03 +0000 (05:43 +0000)]
Fix the AR933x platform device start/stop code.

This was ported from the AR724x code and I think that also doesn't
quite work.  I'll investigate that soon.

With this in place the system reset path works, so 'reset' from kdb
actually resets the SoC.

Tested:

* AP121 test board

11 years agoMake sure that ${SHLIB_NAME}.debug and ${SHLIB_NAME}.symbols are always
markj [Thu, 28 Mar 2013 04:13:52 +0000 (04:13 +0000)]
Make sure that ${SHLIB_NAME}.debug and ${SHLIB_NAME}.symbols are always
deleted by a "make clean" when DEBUG_FLAGS is set.

Reported by: gleb
Approved by: emaste (co-mentor)

11 years agoUpdate wiht the times.
imp [Thu, 28 Mar 2013 02:44:15 +0000 (02:44 +0000)]
Update wiht the times.

11 years agodeferal -> deferral
jimharris [Wed, 27 Mar 2013 23:07:43 +0000 (23:07 +0000)]
deferal -> deferral

11 years agobtowc(3), isblank(3): Correct prototypes for _l variants.
jilles [Wed, 27 Mar 2013 21:31:40 +0000 (21:31 +0000)]
btowc(3), isblank(3): Correct prototypes for _l variants.

MFC after: 1 week

11 years agoSimilar to r239870 and r239872, teach the other binutils tools about the
dim [Wed, 27 Mar 2013 19:21:36 +0000 (19:21 +0000)]
Similar to r239870 and r239872, teach the other binutils tools about the
DW_FORM_flag_present dwarf attribute, so they do not print errors or
warnings on files that contain it.  (This attribute can be emitted by
newer versions of clang and gcc.)

MFC after: 1 week

11 years agoOn SIM destruction free associated CCBs, preallocated inside xpt_get_ccb().
mav [Wed, 27 Mar 2013 18:55:01 +0000 (18:55 +0000)]
On SIM destruction free associated CCBs, preallocated inside xpt_get_ccb().
Before this change they were just leaked.  Fortunately USB sticks now use
only one CCB, and so leak was only 2KB per detach, while other bigger SIMs
with much more allocated CCBs are rarely detached.

MFC after: 2 weeks

11 years agoLimit the amount of video memory we map for the driver to the maximum value.
jkim [Wed, 27 Mar 2013 18:06:28 +0000 (18:06 +0000)]
Limit the amount of video memory we map for the driver to the maximum value.
This basically restores the spirit of r203535, which was partially reverted
in r205557, while we still map fixed amount to work around transient issues
we experienced with r203535.

Prodded by: avg
Tested by: avg
MFC after: 1 week

11 years agoProperly spell "Class Based Queueing"
rene [Wed, 27 Mar 2013 15:10:40 +0000 (15:10 +0000)]
Properly spell "Class Based Queueing"

PR: www/177412
Submitted by: Oliver Loch <grimeton@gmx.net>
Approved by: cognet

11 years agoFix a typo, 'xdev-build' should be spelled with a 'd' at the end.
rene [Wed, 27 Mar 2013 15:03:18 +0000 (15:03 +0000)]
Fix a typo, 'xdev-build' should be spelled with a 'd' at the end.

Approved by: cognet

11 years agoFix a race with the vnode reclamation in the aio_qphysio(). Obtain
kib [Wed, 27 Mar 2013 11:47:52 +0000 (11:47 +0000)]
Fix a race with the vnode reclamation in the aio_qphysio().  Obtain
the thread reference on the vp->v_rdev and use the returned struct
cdev *dev instead of using vp->v_rdev.  Call dev_strategy_csw()
instead of dev_strategy(), since we now own the reference.

Since the csw was already calculated, test d_flags to avoid mapping
the buffer if the driver supports unmapped requests [*].

Suggested by: kan [*]
Reviewed by: kan (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

11 years agoAdd dev_strategy_csw() function, which is similar to dev_strategy()
kib [Wed, 27 Mar 2013 11:34:27 +0000 (11:34 +0000)]
Add dev_strategy_csw() function, which is similar to dev_strategy()
but assumes that a thread reference was already obtained on the passed
device.  Use the function from physio(), to avoid two extra dev_mtx
lock and unlock.  Note that physio() is always used as the cdevsw
method, or is called from a cdevsw method, and the caller already owns
the reference.

dev_strategy() is left to keep KPI intact, but now it is implemented
as a wrapper around dev_strategy_csw().

Do some style cleanup in physio().

Requested and reviewed by: kan (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks