Commit Graph

135695 Commits

Author SHA1 Message Date
jhb
3c82b6a5c7 Bump up the number of ttys supported by pty(4) to 512 by making use of
[pt]ty[lmnoLMNO][0-9a-v].

MFC after:	3 days
Reviewed by:	rwatson
2007-11-19 20:49:42 +00:00
sos
d1d1db8b70 Try to workaound silicon bugs in Promise gen2 (ie TX4) chips
Initial patch by Alexander Sabourenkov who found it in Promise's own driver.

Further fixes and sanity checks by yours truely.
2007-11-19 20:47:31 +00:00
sos
24ced90f97 Fix the problem with certain ATAPI commands on AHCI devices.
Revert the probe in atapi-cd.c to the old usage now its fixed on AHCI.
THis change also fixes using virtual CD's om fx parallels.

Still leaves the GEOM problem of telling media vs device access apart in the access function.
2007-11-19 18:05:48 +00:00
ru
4833340b9c Re-enable -Werror for modules.
Tested by compiling LINT (amd64 i386 ia64 pc98 powerpc sparc64 sun4v).
2007-11-19 16:24:10 +00:00
rwatson
742eb19799 Remove hacks from the NFSv2/3 client intended to handle a lack of a
server-side RPC retranmission cache for non-idempotent operations: these
hacks substituted 0 (success) for the expected EEXIST in the event that
a target name already existed for LINK, SYMLINK, and MKDIR operations,
under the assumption that EEXIST represented a second application of the
original RPC rather than a true failure.

Background: certain NFS operations (in this case, LINK, SYMLINK, and
MKDIR) are not idempotent, as they leave behind persisting state on the
server that prevents them from being replayed without an error;if an UDP
RPC reply is lost leading to a retransmission by theclient, the second
reply will return EEXIST rather than success, asthe new object has
already been created.  The NFS client previouslysilently mapped the
EEXIST return into success to paper over thisproblem.

However, in all modern NFS server implementations, a reply cache is kept
in order to retransmit the original reply to a retransmitted request,
rather than performing the operation a second time, allowing this hack
to be avoided.  This allows link()-based filelocking over NFS to operate
correctly, as an application requestingthe creation of a new link for a
file to tell if it succeededatomically or not.

Other NFS clients, including Solaris and Linux, generally follow this
behavior for the same reasons.  Most clients also now default to TCP,
which also helps avoid the issue of retransmitted but non-idempotent
requests in most cases.

Reported by:	Adam McDougall <mcdouga9 at egr dot msu dot edu>,
		Timo Sirainen <tss at iki dot fi>
Reviewed by:	mohans
MFC after:	1 week
2007-11-19 16:03:21 +00:00
dumbbell
fff090c011 The kernel uses two ways to write data on a pipe:
o  buffered write, for chunks smaller than PIPE_MINDIRECT bytes
    o  direct write, for everything else

A call to writev(2) may receive struct iov of various size and the
kernel may have to switch from one solution to the other. Before doing
this, it must wake reader processes and any select/poll/kqueue up.

This commit fixes a bug where select/poll/kqueue are not triggered
when switching from buffered write to direct write. It adds calls to
pipeselwakeup().

I give more details on freebsd-arch@:
http://lists.freebsd.org/pipermail/freebsd-arch/2007-September/006790.html

This should fix issues with Erlang (lang/erlang) and kqueue.

Reported by:	Rickard Green (Erlang)
2007-11-19 15:05:20 +00:00
ache
764e9c0b52 Since SAOL 13:th edition "v" and "w" are officially separated (in 2006) 2007-11-19 12:39:02 +00:00
jb
f8ce423552 Re-enable -Werror ins WARNS as it was roughly 6 months ago before
being disabled while gcc 4.2 was bedded in.

Tested with 'make release' (amd64 arm i386 ia64 pc98 powerpc sparc64 sun4v)
2007-11-19 09:09:02 +00:00
jb
624e0ee864 Weed out a warning argument that isn't applicable to C++ code. 2007-11-19 09:01:58 +00:00
jb
1785efbd75 On some arches, openssl is built with OPENSSL_NO_CAMELLIA, so the
code here needs to depend on that too.
2007-11-19 08:59:32 +00:00
jb
ec0f8069c4 Include an extra header to get a function prototype. 2007-11-19 08:58:11 +00:00
jb
cce0b1d52a __builtin_stdarg_start was renamed to __builtin_va_start a long
time ago (2002 according to the gcc log). Using the proper name
fixes a warning in src/lib/libc/gen/ulimit.c about the second
argument of va_start() not being the last named (when it really
was).
2007-11-19 07:34:57 +00:00
sam
6ea4f452e3 o expand usage comments; add cut&paste items for bozo's like me
o add things i want to TODO list
o add Record entry to each event which back-maps to the line # in the ktr file;
  useful for finding local context when the ktr file has lots of items that
  schedgraph doesn't grok
o add missing KTR_SCHED event handlers
o expose Counter max value through a ymax method for widget building
o show timestamps in records rejected 'cuz time goes backwards
2007-11-19 04:46:37 +00:00
jb
c0f07cdcc9 Define atomic_cmpset_acq_long and atomic_cmpset_rel_long so that
they use casts rather than just assuming that the compiler will DTRT
without complaining.
2007-11-19 03:16:16 +00:00
davidxu
4b62b76062 MFlibthr:
In _pthread_key_create() ensure that libkse is initialized.
2007-11-19 02:09:07 +00:00
jb
bdea99cbc2 Reduce the WARNS level across the board due to a warning that occurs
on at least arm and sparc64. i386/pc98, ia64 and amd64 are all OK.
2007-11-19 00:19:01 +00:00
mtm
42050b5500 Capitalization 2007-11-18 18:44:35 +00:00
marius
825e639df6 Let sunkbd(4) emulate an AT keyboard by default.
This has the following benefits:
- allows to use the AT keyboard maps in share/syscons/keymaps with
  sunkbd(4),
- allows to use kbdmux(4) with sunkbd(4),
- allows Sun RS232 keyboards to be configured and used the same
  way as Sun USB keyboards driven by ukbd(4) (which also does AT
  keyboard emulation) with X.Org, putting an end to the problem
  of native support for the former in X.Org being broken over and
  over again.

MFC after:	3 days
2007-11-18 18:11:16 +00:00
sos
0422421099 Add generic support for chipsets that say they support AHCI. This should catch new chipsets that we dont know but that we should support.
Add a few new PCI id's.
Misc cleanups.
2007-11-18 14:44:52 +00:00
attilio
bfc761fdba Expand lock class with the "virtual" function lc_assert which will offer
an unified way for all the lock primitives to express lock assertions.
Currenty, lockmgrs and rmlocks don't have assertions, so just panic in
that case.
This will be a base for more callout improvements.

Ok'ed by: jhb, jeff
2007-11-18 14:43:53 +00:00
rrs
9dbec8e7df - Add in missing event handler invokes for initial proc and thread. 2007-11-18 13:56:51 +00:00
ache
86052f1e7e Use LC_ALL=C before awk generating "optionlist"
(and before two other awk calls, just to be safe)
Without it sorting is broken for locales with ASCII collating equivalence
like (v,w) in sv_SE
2007-11-18 11:59:44 +00:00
maxim
f5a81b2cdb o English lesson from bde@: "iff" is not a typo, it means "if and only if".
Backout previous.
2007-11-18 09:21:30 +00:00
maxim
3525a7ea50 o Fix Dd format.
Pointed out by:	ru
2007-11-18 09:18:20 +00:00
jb
93e35cf0e3 Use an explicit pointer cast since NULL isn't guaranteed to be defined
as a pointer type.

Submitted by: Christoph Mallon - christoph mallon at gmx de
2007-11-18 09:13:08 +00:00
delphij
c5d6580fd4 MFp4: Several fixes to tmpfs which makes it to survive from pho@'s
strees2 suite, to quote his letter, this change:

1. It removes the tn_lookup_dirent stuff. I think this cannot be fixed,
   because nothing protects vnode/tmpfs node between lookup is done, and
   actual operation is performed, in the case the vnode lock is dropped.
   At least, this is the case with the from vnode for rename.

   For now, we do the linear lookup in the parent node. This has its own
   drawbacks. Not mentioning speed (that could be fixed by using hash), the
   real problem is the situation where several hardlinks exist in the dvp.
   But, I think this is fixable.

2. The patch restores the VV_ROOT flag on the root vnode after it became
   reclaimed and allocated again. This fixes MPASS assertion at the start
   of the tmpfs_lookup() reported by many.

Submitted by:	kib
2007-11-18 04:52:40 +00:00
delphij
b0d971c673 MFp4: Fix several style(9) bugs.
Submitted by:	des
2007-11-18 04:40:42 +00:00
jb
aea6b64171 Use a NULL instead of a zero to avoid a compiler warning about a missing sentinel. 2007-11-18 03:45:55 +00:00
jb
1168fa22a7 This makefile builds contrib code, so I won't try to fix all the
casts from pointer to int here.
2007-11-18 03:29:10 +00:00
jb
19119333df Fix signed/unsigned comparison compiler warning. 2007-11-18 03:17:56 +00:00
nyan
3b7cf667ba MFi386: revision 1.18
Add a trailing \0 to the read error string so that read errors don't print
  out two error messages.
2007-11-18 03:14:06 +00:00
jb
1897d44373 Constify the first argument to expand_number() so that it can
be called with a const without the compiler grisling.
2007-11-18 02:20:02 +00:00
jb
e14c498cfa Reduce the WARNS level to avoid a compiler warning about a variable
possibly being clobbered by a longjmp or a fork with gcc4.
2007-11-18 01:53:07 +00:00
jb
b8e21e06c5 Use a cast that doesn't create a compiler warning. 2007-11-18 00:33:23 +00:00
jb
218b125e30 Reduce the WARNS levels in a couple of places so that we can enable
-Werror at higher WARNS levels like we did before gcc4 was imported.
2007-11-18 00:29:36 +00:00
jb
dbe9cce999 Fix a compiler warning. 2007-11-18 00:25:18 +00:00
jb
9bd9c03e92 Add a function to list symbols in a file and their values at the
same time rather than having to list the symbols and then go back
and look each one up by name.
2007-11-18 00:23:31 +00:00
jb
804a2cd238 Use variable types which match the function prototypes. 2007-11-17 23:21:38 +00:00
jb
64d8b73773 Fix a compiler warning by using a printf format matching the variable
type.
2007-11-17 23:17:05 +00:00
jb
30baf38e0e Use uintptr_t to cast a pointer to an integer to avoid compiler warnings
on processors where sizeof(void *) > sizeof(int).
2007-11-17 23:14:06 +00:00
jb
ee4b9334d1 Use printf formats which match the variable types without casts so we
can go back to using -Werror in higher WARNS levels.
2007-11-17 23:09:39 +00:00
alc
d1ab859bdc Prevent the leakage of wired pages in the following circumstances:
First, a file is mmap(2)ed and then mlock(2)ed.  Later, it is truncated.
Under "normal" circumstances, i.e., when the file is not mlock(2)ed, the
pages beyond the EOF are unmapped and freed.  However, when the file is
mlock(2)ed, the pages beyond the EOF are unmapped but not freed because
they have a non-zero wire count.  This can be a mistake.  Specifically,
it is a mistake if the sole reason why the pages are wired is because of
wired, managed mappings.  Previously, unmapping the pages destroys these
wired, managed mappings, but does not reduce the pages' wire count.
Consequently, when the file is unmapped, the pages are not unwired
because the wired mapping has been destroyed.  Moreover, when the vm
object is finally destroyed, the pages are leaked because they are still
wired.  The fix is to reduce the pages' wired count by the number of
wired, managed mappings destroyed.  To do this, I introduce a new pmap
function pmap_page_wired_mappings() that returns the number of managed
mappings to the given physical page that are wired, and I use this
function in vm_object_page_remove().

Reviewed by: tegge
MFC after: 6 weeks
2007-11-17 22:52:29 +00:00
oleg
4e6e975846 - New sysctl variable: net.inet.ip.dummynet.io_fast
If it is set to zero value (default) dummynet module will try to emulate
  real link as close as possible (bandwidth & latency): packet will not leave
  pipe faster than it should be on real link with given bandwidth.
  (This is original behaviour of dummynet which was altered in previous commit)
  If it is set to non-zero value only bandwidth is enforced: packet's latency
  can be lower comparing to real link with given bandwidth.

- Document recently introduced dummynet(4) sysctl variables.

Requested by:	luigi, julian
MFC after:	3 month
2007-11-17 21:54:57 +00:00
cognet
6ebbe5e1f8 Add thread support for arm.
MFC After:	1 week
2007-11-17 21:30:03 +00:00
cognet
13be848a13 Build libthread_db for arm as well.
MFC after: 1 week
2007-11-17 21:29:02 +00:00
cognet
d4045dcd3e Add arm support in libthread_db. 2007-11-17 21:27:53 +00:00
ru
3371e72606 Express in the usage() and SYNOPSIS that -F depends on -s, and
that -f and -i are exclusive.
2007-11-17 21:01:22 +00:00
ru
4a831eed37 Swap "source"/"target" where appropriate, to match documentation. 2007-11-17 20:24:58 +00:00
cognet
26544f3861 There's no reason why we couldn't attach to a live process on arm.
MFC After:	1 week
2007-11-17 18:41:04 +00:00
jhb
9d9f6a7ff7 Add a trailing \0 to the read error string so that read errors don't print
out two error messages.

MFC after:	3 days
2007-11-17 17:32:40 +00:00