Commit Graph

120996 Commits

Author SHA1 Message Date
John Baldwin
6bed9d9e73 Note shrinkage of lock_object and the subsequent widespread kernel ABI
breakage.
2006-01-06 19:04:39 +00:00
John Baldwin
3c6decc327 Trim another pointer from struct lock_object (and thus from struct mtx and
struct sx).  Instead of storing a direct pointer to a our lock_class
struct in lock_object, reserve 4 bits in the lo_flags field to serve as an
index into a global lock_classes array that contains pointers to the lock
classes.  Only debugging code such as WITNESS or INVARIANTS checks and KTR
logging need to access the lock_class member, so this shouldn't add any
overhead to production kernels.  It might add some slight overhead to
kernels using those debug options however.

As with the previous set of changes to lock_object, this is going to
completely obliterate the kernel ABI, so be sure to recompile all your
modules.
2006-01-06 18:07:32 +00:00
John Baldwin
ca49f12fdb Reduce the scope of one #ifdef to avoid duplicating a SYSCTL_INT() macro
and trim another unneeded #ifdef (it was just around a macro that is
already conditionally defined).
2006-01-06 18:03:45 +00:00
Lukas Ertl
d5817a5009 Get rid of the gv_bioq hack in most parts of the I/O path and
use the standard bioq structures.
2006-01-06 18:03:17 +00:00
John Baldwin
360c3c2d1a Fix various places that were testing td_critnest to see if interrupts
should remain disabled during a trap or not to check
td_md.md_spinlock_count instead.
2006-01-06 18:02:12 +00:00
John Baldwin
af56abaab5 Return error from fget_write() rather than hardcoding EBADF now that
fget_write() DTRT.

Requested by:	bde
2006-01-06 16:34:22 +00:00
John Baldwin
38f63f7e47 Return EBADF rather than EINVAL for FWRITE failure as per POSIX.
MFC after:	1 week
2006-01-06 16:30:30 +00:00
John Baldwin
8dc0e02023 Be a little more forgiving of lame BIOS writers. If a link device that
doesn't have any actual interrupts is listed in a _PRT entry, only print
a warning rather than panic'ing when we walk the _PRT's to build up count
of entries that reference a given link (the counts are used as weights so
that we can attempt to balance the load across IRQs used by link devices).
Instead, only panic if we attempt to use the _PRT entry to route an
interrupt for a device.

PR:		i386/89545
Tested by:	anders
2006-01-06 16:14:32 +00:00
Poul-Henning Kamp
1152ba39fe Add missing ' and '
Submitted by: simon
2006-01-06 11:31:59 +00:00
Poul-Henning Kamp
c9dae3c0cc Make this more readable and add more devices.
Partially from:	mich@FreeBSD.org
2006-01-06 11:11:03 +00:00
Ariff Abdullah
1332ddcb64 Fix locking violation, causing frantic diagnostic messages during boot.
Reported by:	[1] julian
MFC after:	3 days

[1] http://lists.freebsd.org/pipermail/freebsd-multimedia/2006-January/003408.html
2006-01-06 10:36:55 +00:00
Ariff Abdullah
8b6d3fe1b6 Another major fixes and enhancements:
- MPSAFE
    - Fix / reorganize attach routine. Device specific initialization must
      be done after generic bus / DMA setup. At last, Virtual Channels
      (vchan) works as expected.

Note: Recent commit / fix against this driver proves that major enhancements
      on the generic sound layer does indeed help to expose flaw within
      device specific code. There are probably other drivers that need to
      be addressed as well.

Tested by:	barner
MFC after:	1 week
2006-01-06 05:04:18 +00:00
Warner Losh
5c65ae3a88 New option: NO_FFS_SNAPSHOT. I did this in p4 about the same time
that NetBSD implemented it independently of them (don't know which one
was actually first).  This saves about 24k for those times you don't
need snapshot support (like when running off a ram disk, or in an
embedded environment where size matters).
2006-01-06 04:44:09 +00:00
John Baldwin
e730167f16 Remove XXX comments complaining that write(2) on a read-only descriptor
returns EBADF.  That errno is correct and is mandated by POSIX.  It also
goes back to revision 1.1 of our CVS history (i.e. 4.4BSD).

The _fget() function should probably also be upated as it currently returns
EINVAL in that case rather than EBADF.  (It does return EBADF for reads
on a write-only descriptor without any XXX comments oddly enough.)

Discussed with:	scottl, grog, mjacob, bde
2006-01-05 22:20:31 +00:00
Søren Schmidt
e2bf77c5c2 Get rid of the advertising clause in the copyright. 2006-01-05 21:27:19 +00:00
Jean-Sébastien Pédron
566abf420d Don't hold a reference to the disk vnode for each inode. 2006-01-05 19:27:07 +00:00
Jean-Sébastien Pédron
dcde7cd573 Fix a bug in Synaptics Touchapd support where psm(4) will enter an infinite
loop if it receives an out of sync packet.

Reviewed by:	mux (mentor)
MFC after:	4 days
2006-01-05 19:24:01 +00:00
David Xu
bc414752d3 Refine thread suspension code, now thread suspension is a blockable
operation, the caller is blocked util target threads are really
suspended, also avoid suspending a thread when it is holding a
critical lock.
Fix a bug in _thr_ref_delete which tests a never set flag.
2006-01-05 13:51:22 +00:00
Maxim Konovalov
98a95f61fa o Typo in the debug message: s/skiped/skipped.
PR:		kern/91346
Submitted by:	Gavin Atkinson
2006-01-05 13:39:23 +00:00
Maxim Konovalov
4c2f782357 o Typo in the error message: s/invald/invalid.
PR:		misc/91341
Submitted by:	Guy Harris
2006-01-05 13:37:07 +00:00
Diomidis Spinellis
f0982ce212 Document the TMPDIR environment variable.
MFC after:	1 week
2006-01-05 10:19:42 +00:00
Bruce Evans
fd2891004d Oops, on amd64 (and probably on all non-i386 systems), the previous
commit broke the 2**24 cases where |x| > DBL_MAX/2.  There are exponent
range problems not just for denormals (underflow) but for large values
(overflow).  Doubles have more than enough exponent range to avoid the
problems, but I forgot to convert enough terms to double, so there was
an x+x term which was sometimes evaluated in float precision.

Unfortunately, this is a pessimization with some combinations of systems
and compilers (it makes no difference on Athlon XP's, but on Athlon64's
it gives a 5% pessimization with gcc-3.4 but not with gcc-3.3).

Exlain the problem better in comments.
2006-01-05 09:18:48 +00:00
Diomidis Spinellis
79a7950c48 Document the recently-added EINVAL behavior.
MFC after:	1 week
2006-01-05 08:55:56 +00:00
Bruce Evans
4bb9780353 Use double precision internally to optimize cbrtf(), and change the
algorithm for the second step significantly to also get a perfectly
rounded result in round-to-nearest mode.  The resulting optimization
is about 25% on Athlon64's and 30% on Athlon XP's (about 25 cycles
out of 100 on the former).

Using extra precision, we don't need to do anything special to avoid
large rounding errors in the third step (Newton's method), so we can
regroup terms to avoid a division, increase clarity, and increase
opportunities for parallelism.  Rearrangement for parallelism loses
the increase in clarity.  We end up with the same number of operations
but with a division reduced to a multiplication.

Using specifically double precision, there is enough extra precision
for the third step to give enough precision for perfect rounding to
float precision provided the previous steps are accurate to 16 bits.
(They were accurate to 12 bits, which was almost minimal for imperfect
rounding in the old version but would be more than enough for imperfect
rounding in this version (9 bits would be enough now).)  I couldn't
find any significant time optimizations from optimizing the previous
steps, so I decided to optimize for accuracy instead.  The second step
needed a division although a previous commit optimized it to use a
polynomial approximation for its main detail, and this division dominated
the time for the second step.  Use the same Newton's method for the
second step as for the third step since this is insignificantly slower
than the division plus the polynomial (now that Newton's method only
needs 1 division), significantly more accurate, and simpler.  Single
precision would be precise enough for the second step, but doesn't
have enough exponent range to handle denormals without the special
grouping of terms (as in previous versions) that requires another
division, so we use double precision for both the second and third
steps.
2006-01-05 07:57:31 +00:00
Peter Grehan
5aedf535d3 Enable truss for powerpc 2006-01-05 05:58:16 +00:00
Peter Grehan
7fa9dc1c36 Add powerpc support for truss.
Initial work by:  Orlando Bassotto  < orlando at break net >
Modified by:	  grehan
2006-01-05 05:57:47 +00:00
Alexander Kabaev
daefc6601d Add -w parameter which tells kgdb to open kmem-based targets in read-write
mode. This allows one to use kgdb on /dev/mem and be able to patch memory
on a live system. This is identical to what -wcore used to do in previous
gdb versions for FreeBSD.

Requested by:	wpaul
2006-01-04 23:17:52 +00:00
Warner Losh
2b6fb51f02 Check for 10BaseT media correctly. Before we were confusing
ifm_status and ifm_active.  IFM_10_T gets set in the ifm_active field,
not in the ifm_status field, as far as I can tell.

Note: this was to enable a workaround that's rarely enabled.  I don't know
how to corrupt my eeprom to test it, and would rather not know...
2006-01-04 23:00:01 +00:00
Søren Schmidt
49824061be Return the proper rmi field in DVDIOCREADSTRUCTURE.
PR:	89650
2006-01-04 21:35:57 +00:00
Alexander Leidinger
e21a562e99 We don't support I386_CPU in 6.0 and later. This file can be cleaned
up some to assume that '#if defined(I486_CPU) || defined(I586_CPU) ||
defined(I686_CPU)' is true.

Suggested by:	jhb
Reviewed by:	jhb
2006-01-04 20:11:04 +00:00
Alexander Leidinger
924771865a Convert the PAGE_SIZE check into a CTASSERT.
Suggested by:	jhb
2006-01-04 19:19:42 +00:00
Doug Barton
5a15ecd550 This commit was generated by cvs2svn to compensate for changes in r154032,
which included commits to RCS files with non-trunk default branches.
2006-01-04 19:18:43 +00:00
Doug Barton
b824835191 After some discussion with the folks at ISC, it turns out that the _ai_pad
part of the structure was a hack to maintain binary compatibility with
Sun binaries, and my understanding is that it's not needed generally
on sparc systems running other operating systems. Therefore, hide this
code behind the same set of tests as in lib/bind/include/netdb.h.

This file is being imported on the vendor branch because a similar change
(or change with similar effect) will be in the next version of BIND 9.

This change will not affect other platforms in any way.
2006-01-04 19:18:43 +00:00
Alexander Leidinger
1442a4476a Prevent divide by zero, use default values in case one of the divisor's
is zero.

Tested by:	Randy Bush <randy@psg.com>
2006-01-04 18:26:54 +00:00
John Baldwin
c5245e57e6 Enable boot floppies for amd64. I just copied the needed variables over
from i386.

Tested by:	Markus Trippelsdorf markus at trippelsdorf dot de
Approved by:	scottl
MFC after:	1 week
2006-01-04 18:02:56 +00:00
Bjoern A. Zeeb
ba0b6851b4 Minor whitespace cleanup. 2006-01-04 17:40:54 +00:00
Joel Dahl
c3a730df5f Fix minor sorting issue. 2006-01-04 17:19:28 +00:00
Joel Dahl
838036242a Remove references to snd_vortex1(4).
Approved by:	tanimura, ariff
2006-01-04 17:05:19 +00:00
Alexander Leidinger
10794becea dd some old gssapi libs.
Requested by:	bz
2006-01-04 15:54:02 +00:00
Ariff Abdullah
1333b4a431 Fix broken capabilities, causing failure during channel reset.
Its min/max speed were off by -/+ 1000.

Reported by:	[1] Ion-Mihai Tetcu <itetcu@people.tecnik93.com>
            	[2] barner
MFC after:	1 day

[1] http://lists.freebsd.org/mailman/htdig/freebsd-multimedia/2005-December/003189.html
[2] http://lists.freebsd.org/mailman/htdig/freebsd-multimedia/2006-January/003422.html
2006-01-04 15:35:55 +00:00
Hartmut Brandt
154508976b Add a new leaf to the net.link.generic.ifdata.%d sysctl to retrieve
the name and unit number assigned by the driver. This is needed by
SNMP to find interfaces after they have been renamed.

MFC after:	4 weeks
2006-01-04 12:57:09 +00:00
Alexander Leidinger
d5231b4a7f - Make sure the cpu_exthigh variable is initialized (page coloring case). [1]
- Remove a conditional in the AMD cache detection, it's always false. [2]
- Don't try to detect a cache if only compiled for i386.

Analyzed by:	Antoine Brodin <antoine.brodin@laposte.net> [1]
Submitted by:	Antoine Brodin <antoine.brodin@laposte.net> [2]
2006-01-04 12:57:02 +00:00
David Xu
5131df80a5 1. Add SIGEV_THREAD notification for mq_notify.
2. Reuse current timer code and abstract some common code to
   to support both timer and mqueue.
2006-01-04 11:48:02 +00:00
Søren Schmidt
93b2c0cf02 Fix the promise modesetting for old chips.
Pointy hat to:	sos
2006-01-04 10:23:47 +00:00
Poul-Henning Kamp
d5f1e0d1ef Deorbit ttymalloc() in preference for ttyalloc() 2006-01-04 09:59:07 +00:00
Poul-Henning Kamp
8c92c2096d Use ttyalloc() instead of ttymalloc() 2006-01-04 09:46:20 +00:00
Poul-Henning Kamp
8a7f77816e Use ttyalloc() instead of ttymalloc() 2006-01-04 09:20:41 +00:00
Poul-Henning Kamp
8607f52b66 Use ttyalloc() instead of ttymalloc() 2006-01-04 09:09:46 +00:00
Poul-Henning Kamp
4c29738452 Use ttyalloc() instead of ttymalloc() 2006-01-04 08:34:23 +00:00
Poul-Henning Kamp
246b8d448a Use MTX_SYSINIT to set up the tty list mutex. 2006-01-04 08:22:39 +00:00