Commit Graph

180228 Commits

Author SHA1 Message Date
Ian Lepore
14146e9a04 Remove a really noisy printf left over from debugging hardware errata. 2013-03-29 17:57:24 +00:00
Jim Harris
10a93479b9 Add bus_dmamap_load_bio for non-CAM disk drivers that wish to enable
unmapped I/O.

Sponsored by:	Intel
Reviewed by:	kib
2013-03-29 16:26:25 +00:00
Jim Harris
86675b5c0d Add CTR5() to bus_dmamap_load_ccb, similar to other bus_dmamap_load_*
functions.

Sponsored by:	Intel
2013-03-29 16:00:16 +00:00
Jim Harris
ab72998ef7 Do not add 1 to nsegs before passing to CTR5(), since nsegs
has already been incremented before these calls.

Sponsored by:	Intel
2013-03-29 15:54:12 +00:00
Jim Harris
b327350604 Pass correct parameter to CTR5() in bus_dmamap_load_uio.
Sponsored by:	Intel
2013-03-29 15:51:45 +00:00
Gleb Smirnoff
21f398487c 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>
2013-03-29 14:10:40 +00:00
Gleb Smirnoff
844cacd17c Once ng_ksocket(4) is fixed, re-apply r194662. See this revision for
longer description.

Discussed with:	andre, rwatson
Sponsored by:	Nginx, Inc.
2013-03-29 14:06:04 +00:00
Gleb Smirnoff
9a4d9e198a 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
2013-03-29 14:04:26 +00:00
Gleb Smirnoff
a307eb26ed 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
2013-03-29 13:57:55 +00:00
Gleb Smirnoff
6b1781e3ea Whitespace. 2013-03-29 13:53:14 +00:00
Gleb Smirnoff
d09c774bb5 Non-functional cleanup of ng_ksocket_incoming2(). 2013-03-29 13:51:01 +00:00
Marius Strobl
03efffd10e Unbreak compilation after r248868. 2013-03-29 11:53:20 +00:00
Alexander Motin
09cfadbe7f 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.
2013-03-29 08:33:18 +00:00
Joel Dahl
4a121e0748 Remove EOL whitespace. 2013-03-29 08:32:49 +00:00
Joel Dahl
5127efa399 Minor mdoc fix. 2013-03-29 08:12:09 +00:00
Alexander Motin
f371c9e260 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.
2013-03-29 07:50:47 +00:00
Adrian Chadd
10e00ec8cc For the AR933x UART, the serial clock is not the AHB clock, it's the
reference clock.  So use that instead.
2013-03-29 06:32:39 +00:00
Adrian Chadd
19f293bd60 * Fix clock register definitions
* Add maximum clock register values
2013-03-29 06:32:02 +00:00
Adrian Chadd
600f8cb57a Print out the platform reference frequency.
This is useful for AR933x platforms where that matters.
2013-03-29 06:31:31 +00:00
Glen Barber
7d09231d37 - Update hardware notes to reflect that amd64 is no longer "young"[1]
- Bump copyright year

Patched by:	skreuzer
2013-03-28 22:52:42 +00:00
Andrew Turner
cfa9e283e0 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.
2013-03-28 22:49:49 +00:00
Neel Natu
66f71b7d24 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)
2013-03-28 21:26:19 +00:00
Jamie Gritton
bea2eefca4 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
2013-03-28 21:02:49 +00:00
Adrian Chadd
43b36ea90a Initial (unfinished!) AR933x support. 2013-03-28 20:48:58 +00:00
Mark Johnston
83a3ff21a8 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
2013-03-28 20:37:07 +00:00
Tony Finch
31f5980bd9 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
2013-03-28 20:33:07 +00:00
George V. Neville-Neil
03a9b7c085 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
2013-03-28 20:31:03 +00:00
George V. Neville-Neil
02b3906712 Revert previous change in favor of a fix to the actual dtrace
libraries that addresses a #pragma issue.
2013-03-28 20:22:43 +00:00
George V. Neville-Neil
3e3d9dcd39 Remove dependency code that caused a double inclusion.
Pointed out by: rpaulo and others
2013-03-28 20:12:46 +00:00
Adrian Chadd
7d52c7525f Tie in the AR933x support into -HEAD. 2013-03-28 19:30:56 +00:00
Adrian Chadd
308a33172f 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.
2013-03-28 19:27:06 +00:00
Sean Bruno
cc0c1555d3 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
2013-03-28 19:15:54 +00:00
Neel Natu
721bee8fcc 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
2013-03-28 18:03:39 +00:00
Will Andrews
5cabf7777e KGDB: Accept KLD symbol files with the ".symbols" extension.
Submitted by:	gibbs
Approved by:	ken (mentor)
Sponsored by:	Spectra Logic
MFC after:	1 month
2013-03-28 17:07:02 +00:00
Will Andrews
c89d0ca50b 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
2013-03-28 17:04:59 +00:00
Jim Harris
64432b473b Remove obsolete comment. This code has now been tested with the QEMU
NVMe device emulator.
2013-03-28 16:57:48 +00:00
Jim Harris
bb852ae89b 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
2013-03-28 16:54:19 +00:00
Scott Long
07dbf2c768 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
2013-03-28 14:14:28 +00:00
Tijl Coosemans
bb44b57367 Add myself as ports committer.
Approved by:	crees (mentor)
2013-03-28 12:46:04 +00:00
Sean Bruno
b27556e012 Restore DB_COMMAND capabilities of ciss(4) for debugging and diagnostics
Obtained from:	Yahoo! Inc.
MFC after:	2 weeks
2013-03-28 12:44:43 +00:00
Alexander Motin
47bf7bcb97 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.
2013-03-28 11:24:30 +00:00
Sean Bruno
3ea59fd3a4 Fix compile of ciss(4) with CISS_DEBUG defined
Obtained from:	Yahoo! Inc.
MFC after:	2 weeks
2013-03-28 11:00:41 +00:00
Andriy Gapon
3ee030e1e9 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
2013-03-28 08:13:52 +00:00
Konstantin Belousov
bafa6cfc93 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
2013-03-28 06:39:27 +00:00
Adrian Chadd
09ac4e68f3 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
2013-03-28 05:43:03 +00:00
Mark Johnston
22f3da672d 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)
2013-03-28 04:13:52 +00:00
Warner Losh
e9d210a5bf Update wiht the times. 2013-03-28 02:44:15 +00:00
Jim Harris
47301c53ed deferal -> deferral 2013-03-27 23:07:43 +00:00
Jilles Tjoelker
86bca8fb51 btowc(3), isblank(3): Correct prototypes for _l variants.
MFC after:	1 week
2013-03-27 21:31:40 +00:00
Dimitry Andric
9333231988 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
2013-03-27 19:21:36 +00:00