Commit Graph

155886 Commits

Author SHA1 Message Date
Roman Divacky
2dd5cc396f Add WITHOUT_CLANG file with a description.
Approved by:	ed (mentor)
2010-06-09 20:11:35 +00:00
Roman Divacky
6513cfc82f Hook clang into the build on i386/amd64/powerpc.
Approved by:	ed (mentor)
2010-06-09 19:57:20 +00:00
Roman Divacky
47c832c3dd Import the build makefiles for clang/LLVM.
Approved by:	ed (mentor)
2010-06-09 19:32:20 +00:00
Roman Divacky
e8e8a542a3 Remove the commented out piece that slipped as a mismerge.
Approved by:	ed (mentor)
2010-06-09 19:15:58 +00:00
Roman Divacky
35adf9fc8d Adjust include paths to FreeBSD. Remove /usr/local/include and
add /usr/include/clang/$VERSION (currently VERSION is 2.0).

Approved by:	ed (mentor)
2010-06-09 19:12:25 +00:00
Roman Divacky
ba34dbfff9 Change the default CPU to i486 on i386 (architecture).
Approved by:	ed (mentor)
2010-06-09 19:09:49 +00:00
Roman Divacky
29b430e5da Comment out piece of code using __clear_cache() which FreeBSD
does not have. This is only used for JIT on ARM so it's harmless.

Approved by:	ed (mentor)
2010-06-09 19:08:17 +00:00
Xin LI
d994242647 Check return value from archive_read_new().
Found with:	Coverity Prevent(tm)
CID:		8462
Reviewed by:	des
MFC after:	1 week
2010-06-09 18:59:07 +00:00
Ed Schouten
bff23f82e5 Remove unneeded directories.
Even though Roman removed these directories in his working copy, they
weren't removed from the actual repository, also causing his working
copy to be corrupted.
2010-06-09 18:11:12 +00:00
Roman Divacky
f22ef01c33 Import LLVM/clang from vendor stripped of docs/ test/ website/ www/ examples/
in llvm/ and/or llvm/contrib/clang/ respectively.

Approved by:	ed (mentor)
Approved by:	core
2010-06-09 17:59:52 +00:00
Randall Stewart
b3a44e469d Fix serveral bugs all having to do with freeing an
sctp_inpcb:
1) Make sure not to remove the flag on the PCB until
   after the close() caller is back in control with the
   lock. Otherwise a quickly freeing assoc could kill the
   inpcb and cause a panic.

2) Make sure all calls to log_closing have not released
   the locks before calling the log function, we don't
   want the logging function to crash us due to a freed
   inpcb.

3) Make sure that when we get to the end, we release all
   locks (after removing them from view) and as long as
   we are NOT the inp-kill timer removing the inp, call
   the callout_drain() function so a racing timer won't
   later call in and cause a racing crash.
MFC after:	1 week
2010-06-09 16:42:42 +00:00
Randall Stewart
8dcde5165e BUG:Turns out we need to use both bit maps
to calculate the cum-ack (we were not doing
it for the NR-Sack case). With this fix
NR-sack should now work correctly.
MFC after:	1 week
2010-06-09 16:39:18 +00:00
Jaakko Heinonen
f40645c83d Add a new function devfs_parent_dirent() for resolving devfs parent
directory entry. Use the new function in devfs_fqpn(), devfs_lookupx()
and devfs_vptocnp() instead of manually resolving the parent entry.

Reviewed by:	kib
2010-06-09 15:29:12 +00:00
Andrey V. Elsukov
d05181f902 Fix typo.
Approved by:	mav (mentor)
MFC after:	1 month
2010-06-09 12:30:40 +00:00
Andrey V. Elsukov
d359a62d44 New netgraph node ng_patch(4). It performs data modification of packets
passing through. Modifications are restricted to a subset of C language
operations on unsigned integers of 8, 16, 32 or 64 bit size.
These are: set to new value (=), addition (+=), subtraction (-=),
multiplication (*=), division (/=), negation (= -), bitwise AND (&=),
bitwise OR (|=), bitwise eXclusive OR (^=), shift left (<<=),
shift right (>>=). Several operations are all applied to a packet
sequentially in order they were specified by user.

Submitted by:	Maxim Ignatenko <gelraen.ua at gmail.com>
		Vadim Goncharov <vadimnuclight at tpu.ru>
Discussed with:	net@
Approved by:	mav (mentor)
MFC after:	1 month
2010-06-09 12:25:57 +00:00
Edwin Groothuis
0a76c6484c fix memset() calls.
Found with:   Coverity Prevent(tm)
CID:          8531
2010-06-09 10:36:25 +00:00
Ulrich Spörlein
aa64588d28 Remove -mdoc macros from -man page
Neither groff nor mandoc render these when in -man mode.
This was introduced in r38083 as a local change, therefore no commit to
the vendor branch.
2010-06-09 08:53:50 +00:00
Ulrich Spörlein
df26753b39 mdoc: spell out theta, the Unicode glyph is hard to read for terminal fonts
It is referred to as "theta" later in the document anyway,
so stop being fancy.
2010-06-09 07:31:32 +00:00
Alexander Motin
c4219fc1b0 Add set of codec IDs.
PR:		kern/147466
2010-06-09 05:49:02 +00:00
Matt Jacob
63ebd216e7 Rearrange how things are done to avoid dereferencing stale pointers in
the case of immediate unconfigure after configure. Hold the periph an
extra count while we have the task to create sysctl context outstanding
so that the periph doesn't go away unexpectedly.

Sponsored by:	Panasas
Reviewed by:	scsi@
MFC after:	1 month
2010-06-08 22:46:44 +00:00
Matt Jacob
59ccfe8176 Try and narrow the gap in which you act on an event that has been canceled.
Obtained from:	Jaako Heinonen
MFC after:	1 month
2010-06-08 22:40:02 +00:00
Matt Jacob
8d7b838eee Add the VHBA package. It is here in tools because it's really a testbed.
Sponsored by:	Panasas
MFC after:	1 month
2010-06-08 22:26:47 +00:00
John Baldwin
374d9c4d18 The lock associated with the /dev/apm knote is already held, so use
KNOTE_LOCKED() instead of KNOTE_UNLOCKED().

Reported by:	mav
MFC after:	3 days
2010-06-08 21:27:05 +00:00
John Baldwin
b9cd2f771a Move the MD support for PCI message signalled interrupts to the x86 tree
as it is identical for i386 and amd64.
2010-06-08 18:36:03 +00:00
John Baldwin
2465e30f0c Move the machine check support code to the x86 tree since it is identical
on i386 and amd64.

Requested by:	alc
2010-06-08 18:04:07 +00:00
Konstantin Belousov
8d4a7be84d Reorganize the code in bdwrite() which handles move of dirtiness
from the buffer pages to buffer. Combine the code to set buffer
dirty range (previously in vfs_setdirty()) and to clean the pages
(vfs_clean_pages()) into new function vfs_clean_pages_dirty_buf(). Now
the vm object lock is acquired only once.

Drain the VPO_BUSY bit of the buffer pages before setting valid
and clean bits in vfs_clean_pages_dirty_buf() with new helper
vfs_drain_busy_pages(). pmap_clear_modify() asserts that page is not
busy.

In vfs_busy_pages(), move the wait for draining of VPO_BUSY before
the dirtyness handling, to follow the structure of
vfs_clean_pages_dirty_buf().

Reported and tested by:	pho
Suggested and reviewed by:	alc
MFC after:	2 weeks
2010-06-08 17:54:28 +00:00
John Baldwin
53a908cb07 Move the I/O APIC code to the x86 tree since it is identical on i386 and
amd64.
2010-06-08 17:51:21 +00:00
Matt Jacob
8c52d7f70c One byte off for scsi_target_group cdb.
MFC after:	2 weeks
2010-06-08 17:44:49 +00:00
Pyun YongHyeon
77982948d1 Remove unused macros.
Reviewed by:	bde
2010-06-08 17:28:28 +00:00
John Baldwin
bfc7a4fc48 - Use a bit more care when moving I/O APIC interrupts between CPUs. Mask
the interrupt followed by a brief delay if it is not currently masked
  before moving the interrupt.
- Move the icu_lock out of ioapic_program_intpin() and into callers.  This
  closes a race where ioapic_program_intpin() could use a stale value of
  the masked state to compute the masked bit in the register.

Reviewed by:	mav
MFC after:	2 weeks
2010-06-08 17:08:13 +00:00
Ulrich Spörlein
ef8a3e5cf2 mdoc: remove literal tabs where they don't belong 2010-06-08 16:48:59 +00:00
Ulrich Spörlein
c71e97c47e mdoc: replace troff macros with -mdoc equivalents 2010-06-08 16:48:49 +00:00
John Baldwin
8545538b6a Fix a sign bug that caused adaptive spinning in sx_xlock() to not work
properly.  Among other things it did not drop Giant while spinning
leading to livelocks.

Reviewed by:	rookie, kib, jmallett
MFC after:	3 days
2010-06-08 16:17:47 +00:00
Matt Jacob
82b361b11b Implement the usage of Report Luns as part of SCSI probing for SCP3 or
better devices. This can be disabled on a per-device basis using quirks as
well.

This also handles the case where there is actually no connected LUN 0
(which can definitely be the case for storage arrays).

Reviewed by:	scsi@
MFC after:	1 month
2010-06-08 16:17:25 +00:00
Alexander Motin
a47eae85b4 Disable NCQ and PMP support for VIA VT8251 AHCI. It was reported to be
unreliable under load. Linux does the same.
2010-06-08 10:03:08 +00:00
Matt Jacob
36af9f04a3 Make additional definitions up to and including SPC-4. Add in definitions
for REPORT and SET TARGET PORT GROUP commands (foundations for future work).

Regularize opcodes to be upper case hex.

Pick *one* of tab or space after #define (tab) and stick with that.

MFC after:	2 weeks
2010-06-08 05:14:18 +00:00
Randall Stewart
9b2e0767e2 2 Bugs:
1) Only use both mapping arrays when NR sack is off. This
   way we can hold off moving the cumack (not the best but
   workable) when NR-sack is on.

2) We must make sure to just return on the move of the
   bit to the NR array if the cum-ack as already went
   past the TSN. This prevents marking a bit behind the
   array and hitting the invariant code that panic's us.

MFC after:	1 week
2010-06-08 03:39:31 +00:00
Kenneth D. Merry
931eeffaa2 A number of netfront fixes and stability improvements:
- Re-enable TSO.  This was broken previously due to CSUM_TSO clearing the
   CSUM_TCP flag, so our checksum flags were incorrectly set going to the
   netback driver.  That was fixed in r206844 in tcp_output.c, so we can
   turn TSO back on here.

 - Fix the way transmit slots are calculated, so that we can't overfill
   the ring.

 - Avoid sending packets with more fragments/segments than netback can
   handle.  The Linux netback code can only handle packets of
   MAX_SKB_FRAGS, which turns out to be 18 on machines with 4K pages.  We
   can easily generate packets with 32 or so fragments with TSO turned on.
   Right now the solution is just to drop the packets (since netback
   doesn't seem to handle it gracefully), but we should come up with a way
   to allow a driver to tell the TCP stack the maximum number of fragments
   it can handle in a single packet.

 - Fix the way the consumer is tracked in the receive path.  It could get
   out of sync fairly easily.

 - Use standard Xen ring macros to make it clearer how netfront is using
   the rings.

 - Get rid of Linux-ish negative errno return values.

 - Added more documentation to the driver.

 - Refactored code to make it easier to read.

 - Some other minor fixes.

Reviewed by:	gibbs

Reviewed by:	gibbs
Sponsored by:	Spectra Logic
MFC after:	7 days
2010-06-08 03:13:26 +00:00
Matt Jacob
c8381fba8c redfacedly noting a missing part of a patch.
Pointy Hat To:	Me
MFC after:	2 Week
X-MFC:		208896
2010-06-07 22:43:37 +00:00
Alexander Motin
e7d83347c0 Call BUS_PROBE_NOMATCH() when device detached due to driver unload.
This allows bus to power-down device when driver unloaded on-flight.
2010-06-07 18:47:53 +00:00
Randall Stewart
66bd30bd4f This fixes a BUG in the handling of the cum-ack calculation.
We were only paying attention to the nr-mapping-array. Which
seems to make sense on the surface, by definition things
up to the cum-ack should be deliverable thus in the nr-mapping-array.
However (there is always a gotcha) thats not true when it
comes to large messages. The stack may hold the message
while re-assembling it not not deliver it based on several
thresholds. If that happens (which it would for smaller
large messages) then the cum-ack is figured wrong. We
now properly use both arrays in the cum-ack calculation.

MFC after:	1 week.
2010-06-07 18:29:10 +00:00
Matt Jacob
9d8284a1aa Do a minor amount of stylifying. Also, get a Fibre Channel WWPN if one exists
for a da unit and create a sysctl OID for it.
2010-06-07 17:41:34 +00:00
Matt Jacob
95f7dfb2fa Fix XPT_GET_TRAN_SETTING for FC which has been broken for while so that
it will figure out the correct target to handle index and be able to find
things like WWPN, etc.

MFC after:	2 weeks
2010-06-07 17:39:36 +00:00
Randall Stewart
b9771f0404 Opps... my bad.. we don't need a SOCK_UNLOCK() after
calling socantrcvmore_locked() since it will unlock
the lock for you.

MFC after:	1 week
2010-06-07 11:33:20 +00:00
Xin LI
1371ad1594 Follow up revision 208888 with purely ident changes.
MFC after:	1 week
2010-06-07 10:10:44 +00:00
Xin LI
09e979e915 Correct a bug in gzip(1): make sure that initialize isb with fstat() on
input file before using it.

PR:		bin/147275
Submitted by:	thomas
MFC after:	1 week
2010-06-07 10:09:40 +00:00
Navdeep Parhar
3a2c6562f3 cxgb(4): add an 'nfilters' tunable that lets the user place an upper
limit on the number of hardware filters (and thus the amount of TCAM
reserved for filtering).
2010-06-07 08:23:16 +00:00
Andrey V. Elsukov
24609c49ca bgeom(3) does strdup of param name.
Don't leak memory when deleting param from gctl_req.

Reviewed by:	marcel
Approved by:	mav (mentor)
MFC after:	2 weeks
2010-06-07 07:41:41 +00:00
Martin Matuska
5995fb97d9 Document ZFS upgrade to version 14, support for NFSv4 ACLs,
changes in L2ARC and zfs send.

Approved by:	delphij (mentor)
2010-06-07 06:38:12 +00:00
Randall Stewart
9ed1e280f6 Fix so we call socantrcvmore_locked so we
don't see a race where we unlock to call
the non-locked version and have the socket
go away.

MFC after:	1 week
2010-06-07 04:01:38 +00:00