Commit Graph

90136 Commits

Author SHA1 Message Date
Peter Wemm
5c980babcd Nasty 'make it compile' port to amd64. Note that it needs some other
wire protocol for the extra registers.  I should probably just remove it
from here for now since its quite useless.

Approved by:	re (amd64/* blanket)
2003-05-30 01:02:52 +00:00
Peter Wemm
5feb2148ba Initial port to amd64 after repocopy from i386. Note that the
disassembler has not been updated yet, and will do some very strange
things.  It does tracebacks (without function arguments due to regparm
calling conventions) if -fno-omit-frame-pointer is used (to come later).
This achieves basic functionality.

Approved by:	re (amd64/* blanket)
2003-05-30 01:01:07 +00:00
Peter Wemm
0afbc83dfd Add setjmp/longjmp for ddb 2003-05-30 00:58:48 +00:00
Alexander Kabaev
8c22e2f77b Add an stub for _rtld_thread_init. This is a part I missed in
my last commit.

Approved by:	re (scottl)
2003-05-30 00:58:37 +00:00
Matthew N. Dodd
1340fc1015 Don't post-increment pointers inside a loop conditional.
While I'm here:
- Let lm_add() call strdup() on its own behalf.
- Use a temporary pointer when parsing constraints; only set the
  constraint pointer on a totally successful match.

PR:		 bin/52783
Submitted by:	 David P. Reese Jr. <daver@gomerbud.com>
Approved by:	 re (rwatson)
2003-05-30 00:49:16 +00:00
Alexander Kabaev
84d55c7fad Attempt to eliminate PLT relocations from rwlock aquire/release
path, making them suitable for direct use by the dynamic loader.

Register libpthread-specific locking API with rtld on startup.

This still has some rough edges with signals which should be
addresses later.

Approved by:	re (scottl)
2003-05-30 00:21:52 +00:00
Daniel Eischen
43dd76d242 Call the __sys_sigprocmask(the system call) when sigprocmask()
is called and the application is not threaded.  This works around
a problem when an application that hasn't yet become threaded
tries to jump out of a signal handler.

Reported by:	mbr
Approved by:	re@ (rwatson)
2003-05-30 00:09:22 +00:00
Bernd Walter
6445c6bdf1 Correct the fix in rev 1.70
Some lines were misslocated

Submitted by:	Jay Cornwall <jay@evilrealms.net>
Approved by:	re (rwatson)
2003-05-29 23:47:12 +00:00
Alexander Kabaev
6d5d786f80 Allow threading libraries to register their own locking
implementation in case default one provided by rtld is
not suitable.

Consolidate various identical MD lock implementation into
a single file using appropriate machine/atomic.h.

Approved by:	re (scottl)
2003-05-29 22:58:26 +00:00
Robert Watson
7792fe5719 Use strsep() in preference to manual string parsing for Biba and MLS
label internalization.  Use sensible variable names.  Include comments.
Doesn't fix any known bugs, but may fix unknown ones.

Approved by:	re (scottl)
2003-05-29 22:51:52 +00:00
Martin Blapp
65d06145a2 Don't return -1 and abort if msg.msg_controllen is 0. For
some strange reason recvmsg() never sets errno to EAGAIN
on a non-blocking socket and just returns 0.

Reviewed by:	jhb
Approved by:	re
2003-05-29 22:06:06 +00:00
Ruslan Ermilov
07a38a786a Assorted mdoc(7) fixes. 2003-05-29 21:41:11 +00:00
Ruslan Ermilov
bc9a9cb4d0 Assorted mdoc(7) fixes.
Approved by:	re (blanket)
2003-05-29 21:28:36 +00:00
Maxime Henrion
193f2edbf9 When loading a module that contains a sysctl which is already compiled
in the kernel, the sysctl_register() call would fail, as expected.
However, when unloading this module again, the kernel would then panic
in sysctl_unregister().  Print a message error instead.

Submitted by:	Nicolai Petri <nicolai@catpipe.net>
Reviewed by:	imp
Approved by:	re@ (jhb)
2003-05-29 21:19:18 +00:00
Mike Makonnen
1b2a19ce0e Make the mutex static initializers look more like the one for
condition variables. Cosmetic.

Explicitly compare against PTHREAD_MUTEX_INITIALIZER. We shouldn't
encourage calls to the mutex functions with null pointers to mutexes.

Approved by:	re/jhb
2003-05-29 20:58:31 +00:00
Mike Makonnen
41f2bd859f Use a static lock to ake sure pthread_cond_* functions called
from multiple threads don't initialze the same condition variable
more than once.

Explicitly compare cond pointers with PTHREAD_COND_INITIALIZER instead
of NULL. Just because it happens to be defined as NULL is no reason
to encourage the idea that people can call those functions with
NULL pointers to a condition variable.

Approved by:	re/jhb
2003-05-29 20:54:00 +00:00
Mike Makonnen
0e335eaeb5 Missing unlock.
Approved by:	re/jhb
2003-05-29 20:49:17 +00:00
Mike Makonnen
b3cdf7ae2e Don't hold the active thread list lock when signaling the gc thread.
The dead list thread is sufficient for synchronization.

Retire the arch_id (ldt array slot) in the gc thread instead of the
doing it in the thread itself.

Approved by:	re/jhb
2003-05-29 20:46:53 +00:00
Mike Makonnen
981f4968f0 It's unnecessary to lock the thread during creation. Simply extend
the scope of the active thread list lock.

Approved by:	re/jhb
2003-05-29 20:40:50 +00:00
Martin Blapp
e5cd12556d Fix a problem introduced in the last commit. sa and cm
are not initialized at this place. Move the initializing
before the non-blocking check.

Submitted by:	Marius Strobl <marius@alchemy.franken.de>
Reviewed by:	jhb
Approved by:	re
2003-05-29 19:43:22 +00:00
David Malone
0f7e5f778a Add an INVARIENTS only check to make sure Giant is held if mbuf
allocation is attempted with M_TRYWAIT.

Reviewed by:	bmilekic
Approved by:	re (scottl)
2003-05-29 18:38:24 +00:00
David Malone
de1cab2b60 Grab giant in sendit rather than kern_sendit because sockargs may
allocate mbufs with M_TRYWAIT, which may require Giant.

Reviewed by:	bmilekic
Approved by:	re (scottl)
2003-05-29 18:36:26 +00:00
Thomas Moestl
9078f61c55 Completely disable interrupts (not just raise %pil) when calculating the
value to be written into tick_compare in tick_hardclock(). While
we were taking care that the value to be written was at least TICK_GRACE
ticks in the future, a vector interrupt could happen between calculating
the value and writing it. If it took longer than TICK_GRACE to complete
(which is doubtful for a single device-triggered vector interrupt, but
quite likely for some IPIs), the value written would be in the past
and tick interrupts (which drive hardclock and statclock) would stop
until %tick wraps around, which takes a long time.
Also, increase TICK_GRACE from 1000 to 10000 for good measure.

Reported by:	kris
Reviewed by:	jake
Approved by:	re (scottl)
2003-05-29 17:49:21 +00:00
Daniel Eischen
28362a5c80 Don't really spin on a spinlock; silently convert it to the same
low-level lock used by the libpthread implementation.  In the
future, we'll eliminate spinlocks from libc but that will wait
until after 5.1-release.

Don't call an application signal handler if the handler is
the same as the library-installed handler.  This seems to
be possible after a fork and is the cause of konsole hangs.

Approved by:	re@ (jhb)
2003-05-29 17:10:45 +00:00
Martin Blapp
0022867d24 This commit was generated by cvs2svn to compensate for changes in r115379,
which included commits to RCS files with non-trunk default branches.
2003-05-29 09:18:22 +00:00
Martin Blapp
fe0dbd7088 Use non-blocking mode for amd(8) too. The fix will be part
of the next amd(8) snap.

Reviewed by:	rwatson
Approved by:	re
Obtained from:	NetBSD
2003-05-29 09:18:22 +00:00
Marcel Moolenaar
3a8c4f9f9c Move the sysctls of the misalignment handler to where they belong
and use OID_AUTO instead of fixed IDs.

Approved by: re@ (blanket)
2003-05-29 06:30:36 +00:00
Marcel Moolenaar
12cd60b726 Fix what I think is a cut-n-paste bug: use OID_AUTO for the
print_usertrap sysctl instead of CPU_UNALIGNED_PRINT. The
latter is used already.

Approved by: re@ (blanket)
2003-05-29 05:09:15 +00:00
Hideyuki KURASHINA
21a74957de Merge the following from the English version:
1.155 -> 1.156	hardware/common/dev.sgml
	1.572 -> 1.573	relnotes/common/new.sgml

Approved by:	re (bmah)
2003-05-29 00:10:11 +00:00
Hiroki Sato
3583c2fc5b Merge the following from the English version:
1.36  -> 1.38 	errata/article.sgml
	1.553 -> 1.572	relnotes/common/new.sgml

Approved by:	re (bmah)
2003-05-28 21:01:34 +00:00
Hiroki Sato
1328c5d350 - Fix to use the official vendor name (s/Melco/MELCO/).
hardware/common/dev.sgml

Pointed out by:	rushani
Approved by:	re (bmah)

- Fix a typo.

	relnotes/common/new.sgml

Approved by:	re (bmah)
2003-05-28 21:01:22 +00:00
Dag-Erling Smørgrav
da05574c54 Fix off-by-one and initialization errors which prevented sshd from
restarting when sent a SIGHUP.

Submitted by:	tegge
Approved by:	re (jhb)
2003-05-28 19:39:33 +00:00
Nate Lawson
2ce0a0b9ec This commit was generated by cvs2svn to compensate for changes in r115367,
which included commits to RCS files with non-trunk default branches.
2003-05-28 17:32:31 +00:00
Nate Lawson
d0e9cc3b3a Revert to using TABLE_ID_DSDT as the default. It looks like the dynamic
ID allocation is not there yet.  This fixes a few warnings about \_OS_ not
being found and an S3 freeze for one user.
Re-staticize AcpiNsRemoveReference() since it is not needed elsewhere.

Approved by:	re (scottl)
2003-05-28 17:32:31 +00:00
Ian Dowse
ad6adb4f18 In cluster_wbuild(), initialise b_iocmd to BIO_WRITE before calling
buf_start() to avoid triggering a panic in softdep_disk_io_initiation()
if b_iocmd happened to be BIO_READ. The later initialisation of
b_iocmd in cluster_wbuild() could probably be moved to before the
buf_start() call, but this patch keeps the change as simple as
possible.

This is reported to fix occasional "softdep_disk_io_initiation: read"
panics, especially on NFS servers.

Reported by:	Nick Hilliard <nick@netability.ie>
Tested by:	Nick Hilliard <nick@netability.ie>
Approved by:	re (rwatson)
2003-05-28 13:22:10 +00:00
Martin Blapp
aee2eba2d1 If AF_LOCAL is used, we need to use __msgread_withcred() instead of
just read() in non-blocking mode too. The reason is obvious. NetBSD
uses a complete different way to get the credentials so this patch
only applies to FreeBSD.

Reviewed by:	rwatson
Approved by:	re
2003-05-28 09:16:35 +00:00
Martin Blapp
22e4d31a81 Fix amd(8) clients, if a FreeBSD mountd(8) server is used.
Remove the special treatment of non-blocking mode in
the "look ahead function" xdrrec_eof(). It currently
assumes that the last read() in a row of several reads
does not have zero lenght. If this is the case, svc_vc_stat()
does return XPRT_MOREREQS, and the RPC-request aborts because
there is no data to read anymore.

To fix this, go back to the original version of the code
for non-blocking mode until NetBSD comes up with another
possible fix like this one in xdrrec_eof()

	if (rstrm->last_frag && rstrm->in_finger == rstrm->in_boundry) {
		return TRUE;
	}

Return always FALSE in set_input_fragment() for non-blocking
mode. Since this was not used in FreeBSD, I omitted it at the
first time. Now we use this function and we should always
return FALSE for it.

Reviewed by:	rwatson
Approved by:	re
2003-05-28 09:13:09 +00:00
Max Khon
f4203da86c Fix stripping last path component when only one path component left.
PR:		52686
MFC after:	1 day
2003-05-28 08:23:01 +00:00
David E. O'Brien
34d258e905 From FSF Binutils CVS repo:
2003-04-09  Richard Henderson  <rth@redhat.com>
	* elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
	Ignore relocations against r_symndx == 0.

Requested by:	kris,re(scottl)
2003-05-28 03:32:33 +00:00
Mike Silbersack
17d6531977 Replace a handrolled defrag function with m_defrag. The handrolled
function couldn't handle chains of > MCLBYTES, and it had a bug which
caused corruption and panics in certain low mbuf situations.

Additionally, change the failure case so that looutput returns ENOBUFS
rather than attempting to pass on non-defragmented mbuf chains.

Finally, remove the printf which would happen every time the low memory
situation occured.  It served no useful purpose other than to clue me
in as to what was causing the panic in question. :)

MFC after:	4 days
2003-05-28 02:04:33 +00:00
Peter Wemm
5e1b7df5cf Update AMD Features vector to include NX (page table entry no-execute bit)
and LM (long mode) etc.
2003-05-27 21:59:56 +00:00
Mike Makonnen
a09d02f780 Minimize the potential for deadlocks between an exiting thread and it's
joiner by making sure all locks and unlocks occur in the same order. For
the record the lock order is: DEAD_LIST, THREAD_LIST, exiting thread, joiner
thread.

Approved by: re/rwatson
2003-05-27 21:48:42 +00:00
Mike Makonnen
ee98e9be9f Revert part of the last commit. I don't know what I was smoking.
Approved by: re/rwatson
2003-05-27 21:43:49 +00:00
John Baldwin
4fb8dd97a7 Fix support for 256 MB aperture sizes on chipsets such as the 845 and
865.  The APSIZE register has a variable-sized field of enabled bits.
To figure out how many bits a specific host bridge supports, write the
maximum width and see how many bits are set in the hardware.  We then
use this mask for setting and getting the aperture size.  Prior to this,
the agp(4) driver would treat an aperture size of 256 MB as 128 MB and
would not allocate enough physical memory for the GART as a result.

MFC after:	3 days
Sponsored by:	The Weather Channel
Approved by:	re (rwatson)
2003-05-27 20:13:44 +00:00
John Baldwin
ebca65b627 Grr, fix compile. The bane of trying to split out patches into two
commits.

Reported by:	Lukas Ertl <l.ertl@univie.ac.at>
With hat:	re
Pointy hat to:	jhb
2003-05-27 19:42:18 +00:00
Nate Lawson
006b3ddb51 Fix false AE_NOT_FOUND messages, reported in NetBSD port-i386/20897.
NetBSD dsmethod.c rev 1.7

Fix parent-child loop problem
Fix a reference count problem that may cause unexpected memory free
Intel 20030512 ACPICA drop (nsalloc.c)

Approved by:	re (jhb)
Obtained from:	NetBSD, Intel
Reported by:	mbr, kochi AT netbsd.org
2003-05-27 19:19:05 +00:00
Nate Lawson
480170d0b4 This commit was generated by cvs2svn to compensate for changes in r115351,
which included commits to RCS files with non-trunk default branches.
2003-05-27 19:19:05 +00:00
John Baldwin
6705889407 Fix compile: the type is spelled bus_dmasync_op_t rather than
bus_dmamap_sync_t.

With hat:	re
2003-05-27 18:32:24 +00:00
John Baldwin
e9ff34a5e2 Add support for the Intel 865 chipset.
MFC after:	3 days
Sponsored by:	The Weather Channel
Approved by:	re (murray)
2003-05-27 18:23:56 +00:00
Scott Long
bf423d4637 Remove the redundant declaration of bus_dmasync_op_t. 2003-05-27 16:34:52 +00:00