Commit Graph

89887 Commits

Author SHA1 Message Date
mtm
2a9cf55cde Forced commit for previous revision
Correct reversed variable assignments.
Re-enable the call to _mutex_lock_backout(). This might
need revisiting once internal locking of mutex and cv is done.

Approved by:	markm/mentor, re/blanket libthr
Reviewed by:	jeff
2003-05-12 10:50:18 +00:00
mtm
071fc87f0a Forced commit, for previous revision.
Make state transitions of a thread on a mutex queue
atomic (with respect to other threads and signal handlers).
This includes:
	o Introduce two functions to implement atomicity with respect
	  to other threads and signal handlers. Basically,
	  _thread_critical_enter() locks the calling thread and blocks
	  signals. _thread_critical_exit() unblocks signals and unlocks
	  the thread.

	o Introduce two new functions:
	  get_muncontested() locks a mutex that is not owned by
	  another thread.
	  get_mcontested() places a thread on a contested mutex's
	  queue, taking care to use the _thread_critical_enter/exit
	  functions to protect thread state.

	o Modify mutex_unlock_common() to also protect state transitions.
	  In this case it needs the cooperation of mutex_queue_deq(), which
	  must return with the thread locked and signals disabled *before*
	  it takes the thread off the queue.

Combine _pthread_mutex_lock() and _pthread_mutex_trylock()
into one function: mutex_lock_common(), that can handle
both cases. Its behaviour is controlled by an argument,
int nonblock, which if not zero means do not attempt
to acquire a contested mutex if the uncontested case fails.

BTW, when I write about contested and uncontested mutexes, I'm writing
about it from the application's point of view. I'm not writing about
internal locking of pthread_mutex->lock, which is achieved differently.

While internal mutex locking is mostly done, there's still a bit more
work left in this area.

Approved by:	markm/mentor, re/blanket libthr
Reviewed by:	jeff (slightly diff. revision)
2003-05-12 10:48:02 +00:00
mtm
48426a5b69 msg2 2003-05-12 10:40:53 +00:00
mtm
100c8a533a msg1 2003-05-12 10:34:01 +00:00
peter
f6f3e2ff8f Fix lookup of module metadata on amd64 systems. While this is in
common code, the non-trivial part is #ifdef'ed and only executes when
loading amd64 kernels. The rest is trivial but needed for the the amd64
case. (Two variables changed from char ** to Elf_Addr).

Approved by:	re (amd64 "low-risk" stuff)
2003-05-12 05:48:09 +00:00
grog
57b595dfe1 Understand GEOM. This makes growfs work again, but it really needs rewriting.
Submitted by: 	Lukas Ertl <l.ertl@univie.ac.at>
Approved by:	re (scottl)
2003-05-12 05:37:16 +00:00
phk
587d476cf9 Don't pass NULL pointer to memset if we are compiled with DIAGNOSTIC
Approved by:	re/rwatson
2003-05-12 05:09:56 +00:00
phk
154b84916c Don't #define memset() to bzero(), it is far too prone to bite somebody.
Approved by:	re/scottl
2003-05-12 05:08:38 +00:00
peter
25e260ffe6 Revert leftover AMD64 disable-acpi-module stuff. 2003-05-12 04:57:05 +00:00
murray
6dcde98e03 Regen.
Approved by:	re
2003-05-12 04:27:22 +00:00
peter
0cfa424a1b AMD64 physical space is much larger than i386, de-i386 the bus_space and
bus_dma MD code for AMD64.  (And a trivial ifdef update in dev/kbd because
of this).  More updates are needed here to take advantage of the 64 bit
instructions.

Approved by:	re (blanket amd64/*)
2003-05-12 02:44:37 +00:00
scottl
002e3de30f Move the em driver from flopp3 to floppy 2 to make room for the ips driver. 2003-05-12 02:40:24 +00:00
peter
c688fcc3ca Give a %fs and %gs to userland. Use swapgs to obtain the kernel %GS.base
value on entry and exit.  This isn't as easy as it sounds because when
we recursively trap or interrupt, we have to avoid duplicating the
swapgs instruction or we end up back with the userland %gs.  I implemented
this by testing TF_CS to see if we're coming from supervisor mode
already, and check for returning to supervisor. To avoid a race with
interrupts in the brief period after beginning executing the handler and
before the swapgs, convert all trap gates to interrupt gates, and reenable
interrupts immediately after the swapgs.  I am not happy with this.
There are other possible ways to do this that should be investigated.
(eg: storing the GS.base MSR value in the trapframe)

Add some sysarch functions to let the userland code get to this.

Approved by:	re (blanket amd64/*)
2003-05-12 02:37:29 +00:00
simokawa
6d94cd1e18 Make it compiled on 4-stable.
Approved by: re (scottl)
2003-05-12 00:42:28 +00:00
joe
190f2bb71d Extend the digital camera support (umass) to the PENTAX Optio 330GS.
Submitted by:	Jan-Oliver Neumann <neumannj@arcor.de>
By way of:	n_hibma
Approved by:	re (jhb & bmah)
MFC After:	7 days
2003-05-11 23:55:28 +00:00
dougb
e3cf6c3df2 Bring in NetBSD's version 1.11, which includes documenation for the new
inode birthtime display, and quite a bit of mdoc cleanup, which brings
it much more in line with our mdoc style.

Approved by:	re (bmah)
Obtained from:	Andrew Brown <atatat@NetBSD.org> (content), Grant Beattie <grant@NetBSD.org> (mdoc)
2003-05-11 23:07:07 +00:00
dougb
e953f4e12d Import NetBSD's 1.10 version, which includes the ability to display
the new inode birthtime field, a few other small cleanups, and
synchronization with our #include <sys/types.h>.

Approved by:	re (bmah)
Obtained from:	Andrew Brown <atatat@NetBSD.org>
2003-05-11 23:02:09 +00:00
peter
581fa87ddd Call it an AMD64 Processor, not a Hammer. Also, it seems that the cpuid
model numbers are wider than I first thought.

Approved by: re (blanket amd64/*)
2003-05-11 23:01:04 +00:00
peter
756ca1f04c I missed another printf format error while extracting the patch.
Approved by: re (blanket amd64/*)
2003-05-11 22:55:40 +00:00
peter
7ba8edf901 Make atdevbase long for the KERNBASE > 4GB case
Approved by: re (amd64/* blanket)
2003-05-11 22:53:43 +00:00
peter
8920847356 For amd64 kernels, repeat the 1GB mapping over the entire address space
instead of just at 0GB and 1GB marks.  This gives more flexibility for
the choice of KERNBASE.

Approved by:	re (amd64 stuff)
2003-05-11 22:42:29 +00:00
peter
f6ba7180dc Fix printf format errors that were undetected due to using the standard
FSF compiler during early development.
2003-05-11 22:40:25 +00:00
peter
89e93481ff Export PML4SHIFT and PDPSHIFT
Approved by: re (blanket amd64/*)
2003-05-11 22:39:40 +00:00
peter
d8c525a6c6 Since compiling natively, the compile environment has been less forgiving
about silly typos.  Use the correct comment sequences.
2003-05-11 22:38:54 +00:00
gordon
c7b64d9318 Correct a type in the bugs section. Also turn it into a list.
Approved by:	re(murray)
2003-05-11 22:22:10 +00:00
mdodd
232af61924 Provide exec_linux_setregs() to override exec_setregs().
Linux initializes %gs to 0.  Mimic this behavior.

Submitted by:	 Christian Zander <zander@minion.de>
Reviewed by:	 jake
Approved by:	 re
2003-05-11 21:51:11 +00:00
markm
fac5c11855 Remove some KRB4 scraps, and allow NOSHARED make worlds to
complete.

OK'ed by:	re(scottl)
2003-05-11 18:49:29 +00:00
markm
64cd7ea15d Allow a NOPIC "make world" to complete.
OK'ed by:	re(scottl)
2003-05-11 18:48:29 +00:00
markm
fc4822f39a Mrege from crypto telnet with "make unifdef". This gets a bunch of
$FreeBSD$ tags and some debug variable safety belts.
2003-05-11 18:27:49 +00:00
markm
141dcc06d3 Fix up external variables named "debug" that have a horrible habit
of conflicting with other, similarly named functions in static
libraries. This is done mostly by renaming the var if it is shared
amongst modules, or making it static otherwise.

OK'ed by:	re(scottl)
2003-05-11 18:17:00 +00:00
simokawa
2d4780fd3a - Use moderate gap counts listed in IEEE1394a.
- Simplify and correct the bus manager election process.
- Check link_active when choosing cycle master.
- Fix location of the cmr bit.

Approved by: re (scottl)
2003-05-11 10:32:20 +00:00
scottl
d8ecf9f7b2 Teach sysinstall about the ServeRAID disk device. 2003-05-11 07:18:26 +00:00
scottl
08395f99eb The ips ServeRAID driver can go on the driver floppy. 2003-05-11 06:42:09 +00:00
scottl
351c730887 Hook up the ips module 2003-05-11 06:40:09 +00:00
scottl
d65ad6bdb8 Add notes about the 'ips' driver. 2003-05-11 06:39:05 +00:00
scottl
1612fd1559 Add files for the 'ips' driver. 2003-05-11 06:37:52 +00:00
scottl
e51c9992d8 Add the 'ips' driver for the IBM (now Adaptec) ServeRAID controller
series.  This driver was generously developed and released by David
Jeffreys and Adaptec.  I've updated it to work with 5.x and fixed a
few bugs.

MFC After:	1 week
2003-05-11 06:36:49 +00:00
scottl
25a029e229 garbage collect the reserved major for the ips disk device. GEOM makes
it unneeded.
2003-05-11 06:18:33 +00:00
julian
06e78650b9 Make the README reflect reality.
Approved by: re@ (blanket for bluetooth upgrade)
2003-05-11 02:19:10 +00:00
julian
21b8e2eab6 Re-enable the broadcom firmware utility now that the Makefile in that subdir
has been fixed to not need the missing files.
The firmware files themselves still now need to be fetched from the internet.
The README there gives the location.

Approved by: re@ (part of bluetooth upgrade)
2003-05-11 02:11:50 +00:00
julian
b69094d119 Fix (presently unused) Makefile to not need files not yet checked in.
Submitted by: Maksim Yevmenkin <m_evmenkin@yahoo.com>

Approved by: re@ (part of Bluetooth upgrade)
2003-05-11 02:08:10 +00:00
trhodes
401cae2acb Remove remnants of the -p option. While I'm here, remove wording about
-P which could be interpreted as 'this option must be specified'.

PR:		37221 && 51886
Discussed with:	bmah
Approved by:	re (blanket)
2003-05-11 00:38:58 +00:00
julian
e27601698d Last commit of the bluetooth upgrade. (this patch was forgotten in the first
commit)

Submitted by: Maksim Yevmenkin <m_evmenkin@yahoo.com>
Approved by: re@
2003-05-10 22:11:25 +00:00
julian
545724682b Don't compile the broadcom firmware module yet. 2003-05-10 22:05:14 +00:00
julian
290e3f116d Broadcom firmware loading module.. The actual firmware files will follow when
the legal status has been confirmed, in the meanwhile they can be
downloaded from the location in the README file.
2003-05-10 22:03:45 +00:00
julian
3816c42ae4 This file just didn't want to commit in the last batch of bluetooth files.
Approved by: re@
2003-05-10 21:53:43 +00:00
julian
fe2526340b Part 2 of the commit if new bluetooth code.
Submitted by:	Maksim Yevmenkin <m_evmenkin@yahoo.com>
Approved by: re@
2003-05-10 21:50:37 +00:00
julian
dc5734d94b Part one of undating the bluetooth code to the newest version
Submitted by:   Maksim Yevmenkin <m_evmenkin@yahoo.com>
Approved by: re@
2003-05-10 21:44:42 +00:00
iedowse
9e09746efa Put back the error checking in wtfs() that was lost when newfs was
changed to use libufs in revision 1.71. Without this, any write
failures in newfs were silently ignored.

Note that this will display a meaningless errno string in the case
of a short write as opposed to a write error, since bwrite()'s
return value does not allow the caller to determine if errno is
valid.

Reported by:	Lukas Ertl <l.ertl@univie.ac.at>
Reviewed by:	jmallett
Approved by:	re (bmah)
2003-05-10 18:58:17 +00:00
bmilekic
988354fc06 Make m_freem() just use m_free() instead of duplicating the code. The
reason for the duplication was that m_freem() was meant to eventually
be optimized to hold the lock of the cache being freed to as long as
possible across frees but the difficulty of implementing said
optimization right now is too high, given that in some cases (see MAC
and non-cluster external buffers), we need to call into other subsytems,
something not permissible when the cache lock is held.

This change minimizes code duplication while keeping at least the
atomic mbuf+cluster free optimization.

Suggested by: luigi
2003-05-10 18:08:23 +00:00