John Baldwin [Tue, 13 May 2003 20:36:02 +0000 (20:36 +0000)]
- Merge struct procsig with struct sigacts.
- Move struct sigacts out of the u-area and malloc() it using the
M_SUBPROC malloc bucket.
- Add a small sigacts_*() API for managing sigacts structures: sigacts_alloc(),
sigacts_free(), sigacts_copy(), sigacts_share(), and sigacts_shared().
- Remove the p_sigignore, p_sigacts, and p_sigcatch macros.
- Add a mutex to struct sigacts that protects all the members of the struct.
- Add sigacts locking.
- Remove Giant from nosys(), kill(), killpg(), and kern_sigaction() now
that sigacts is locked.
- Several in-kernel functions such as psignal(), tdsignal(), trapsignal(),
and thread_stopped() are now MP safe.
John Baldwin [Tue, 13 May 2003 19:21:46 +0000 (19:21 +0000)]
In setitimer(2), if the it_value of the new itimer value is clear, then
don't add the current time to it, but leave it as clear so that when the
timer is disabled, the it_value is always clear.
Alan Cox [Tue, 13 May 2003 04:36:02 +0000 (04:36 +0000)]
Optimize the use of splay in gbincore(). During a "make buildworld" the
desired buffer is found at one of the roots more than 60% of the time.
Thus, checking both roots before performing either splay eliminates
unnecessary splays on the first tree splayed.
Hiten Pandya [Mon, 12 May 2003 21:34:29 +0000 (21:34 +0000)]
Document ioctl(2) operations of the agp(4) subsystem. The original patch
was obtained from [1], with heavy editing, and ammending text for some of
the ioctls.
All ioctls (in sys/agpio.h) are now documented.
PR: docs/50503
Original patch by: Alex Semenyaka <alexs@snark.ratmir.ru> [1]
Content approved by:
- Eric Anholt <anholt@FreeBSD.ORG>
- Matthew N. Dodd <mdodd@FreeBSD.ORG> (cursory review)
Approved and Reviewed by: des (mentor), re (scottl)
Rename a few functions to avoid stealing common words (error, log, debug
etc.) from the application namespace for programs that use pam_ssh(8).
Use #defines to avoid changing the actual source code.
Peter Wemm [Mon, 12 May 2003 18:33:19 +0000 (18:33 +0000)]
For the page fault handler, save %cr2 in the outer trap handler so that
we do not have to run so long with interrupts disabled. This involved
creating tf_addr in the trapframe. Reorganize the trap stubs so that
they consistently reserve the stack space and initialize any missing
bits.
Maxime Henrion [Mon, 12 May 2003 18:15:33 +0000 (18:15 +0000)]
Fix the unaligned access problems that some people saw on alpha
by using a __packed keyword for the fxp_rfa structure. The Intel
guys who designed this structure with unaligned fields deserve
to be shot.
Robert Watson [Mon, 12 May 2003 14:37:47 +0000 (14:37 +0000)]
Remove bogus locking from DDB's "show lockedvnods" command: using
synchronization primitives from inside DDB is generally a bad idea,
and in this case it frequently results in panics due to DDB commands
being executed from the sio fast interrupt context on a serial
console. Replace the locking with a note that a lack of locking
means that DDB may get see inconsistent views of the mount and vnode
lists, which could also result in a panic. More frequently,
though, this avoids a panic than causes it.
Discussed with ages ago: bde
Approved by: re (scottl)
Mike Makonnen [Mon, 12 May 2003 10:50:18 +0000 (10:50 +0000)]
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
Mike Makonnen [Mon, 12 May 2003 10:48:02 +0000 (10:48 +0000)]
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.
Peter Wemm [Mon, 12 May 2003 05:48:09 +0000 (05:48 +0000)]
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).
Peter Wemm [Mon, 12 May 2003 02:44:37 +0000 (02:44 +0000)]
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.
Peter Wemm [Mon, 12 May 2003 02:37:29 +0000 (02:37 +0000)]
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.
Doug Barton [Sun, 11 May 2003 23:07:07 +0000 (23:07 +0000)]
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)
Doug Barton [Sun, 11 May 2003 23:02:09 +0000 (23:02 +0000)]
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>
Peter Wemm [Sun, 11 May 2003 22:42:29 +0000 (22:42 +0000)]
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.
Mark Murray [Sun, 11 May 2003 18:17:00 +0000 (18:17 +0000)]
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.
- 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.
Scott Long [Sun, 11 May 2003 06:36:49 +0000 (06:36 +0000)]
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.
Julian Elischer [Sun, 11 May 2003 02:11:50 +0000 (02:11 +0000)]
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.
Julian Elischer [Sat, 10 May 2003 22:03:45 +0000 (22:03 +0000)]
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.
Ian Dowse [Sat, 10 May 2003 18:58:17 +0000 (18:58 +0000)]
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.
Bosko Milekic [Sat, 10 May 2003 18:08:23 +0000 (18:08 +0000)]
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.
Peter Wemm [Sat, 10 May 2003 00:53:34 +0000 (00:53 +0000)]
Remove _ARCH_INDIRECT ifdefs. They existed for lib/msun/* on i386, which
could use different versions of the math code depending on whether there
was real floating point hardware or math emulation. Since the fpu is
part of the core specification on amd64, there is no need for this here.
Bruce A. Mah [Fri, 9 May 2003 23:14:02 +0000 (23:14 +0000)]
Flesh out information on pointing devices and add some manpage
cross-references for keyboards. Add a mention of VGA video cards, and
pointers to XFree86 where appropriate.
Sigh, this shows just how much one can be conditioned my the environment:
Just because we for the last ten years have fought for every byte
in the boot code on i386, doesn't mean that other architectures could
not actually have space to spare there.
Peter Wemm [Fri, 9 May 2003 18:28:05 +0000 (18:28 +0000)]
Include the MXCSR initial values, based on the AMD docs. This file
should really be renamed to fpu.h and npx.c to fpu.c since its part of
the core architecture on amd64 systems, not an isa 'numeric processor
extension'.
Peter Wemm [Fri, 9 May 2003 18:26:06 +0000 (18:26 +0000)]
Turn syscons on now that it works, so that anybody trying to run this
can see something. Probing for keyboard still works for auto serial
console mode.
Scott Long [Fri, 9 May 2003 09:41:18 +0000 (09:41 +0000)]
The disc1 package set has overfilled the disc. Axe linux-netscape-navigator-4.8
to free up space. linux-netscape-communicator-4.8 remains and is a superset of
the former for those who are stuck are the 1990's =-)
Hiten Pandya [Fri, 9 May 2003 09:20:26 +0000 (09:20 +0000)]
Document the last field of the procfs 'status' node, which either
displays the 'hostname' of the jail, or a hyphen '-' to indicate
that the process is not jailed.
PR: docs/37470
Submitted by: Adrian Filipi-Martin <adrian@ubergeeks.com>
Approved and Reviewed by: des (mentor), re (bmah)