Commit Graph

91599 Commits

Author SHA1 Message Date
Mike Makonnen
2234d5bea2 Locking primitives and operations in libthr should use struct umtx,
not spinlock_t. Spinlock_t and the associated functions and macros may
require blocking signals in order for async-safe libc functions to behave
appropriately in libthr. This is undesriable for libthr internal locking.
So, this is the first step in completely separating libthr from libc's
locking primitives.

Three new macros should be used for internal libthr locking from now on:
THR_LOCK, THR_TRYLOCK, THR_UNLOCK.
2003-06-29 23:49:41 +00:00
Alan Cox
0551c08dee Introduce vm_map_pmap_enter(). Presently, this is a stub calling the MD
pmap_object_init_pt().
2003-06-29 23:32:55 +00:00
Mike Makonnen
c36507007f In a critical section, separate the aquisition of the thread lock
and the disabling of signals. What we are really interested in is
keeping track of recursive disabling of signals. We should not
be recursively acquiring thread locks. Any such situations should
be reorganized to not require a recursive lock.

Separating the two out also allows us to block signals independent of
acquiring thread locks. This will be needed in libthr in the near future when
we put the pieces together to protect libc functions that use pthread mutexes
and low level locks.
2003-06-29 21:21:52 +00:00
Alan Cox
dca96f1adc - Export pmap_enter_quick() to the MI VM. This will permit the
implementation of a largely MI pmap_object_init_pt() for vnode-backed
   objects.  pmap_enter_quick() is implemented via pmap_enter() on sparc64
   and powerpc.
 - Correct a mismatch between pmap_object_init_pt()'s prototype and its
   various implementations.  (I plan to keep pmap_object_init_pt() as
   the MD hook for device-backed objects on i386 and amd64.)
 - Correct an error in ia64's pmap_enter_quick() and adjust its interface
   to match the other versions.  Discussed with: marcel
2003-06-29 21:20:04 +00:00
Christian Brueffer
3db879acd2 Capitalize an occurrence of 'ficl' for consistency.
Submitted by:	Andre Guibert de Bruet <andy@siliconlandmark.com>
MFC after:	3 days
2003-06-29 20:57:55 +00:00
Gordon Tetlow
58824dccdc Fix typo sparc -> sparc64
Submitted by:	tmm@
2003-06-29 20:44:12 +00:00
Sam Leffler
91f243876f catch failure to fetch the card's "own channel"; this should not happen 2003-06-29 20:14:35 +00:00
Sam Leffler
58f40303c4 insure ic_bss always has a "valid" channel; avoids problems where users could
query the state of a card and find a null channel since allocating the node
left ni_chan zero
2003-06-29 20:13:38 +00:00
Sam Leffler
b9ee58c4af use proper length to copy data for WI_RID_DESIRED_SSID (was smashing
ic_des_chan that immediately follows)
2003-06-29 20:12:17 +00:00
Sam Leffler
8be0d57010 add safeguard against (bogus) null channel parameter 2003-06-29 20:10:54 +00:00
Alan Cox
0774dfb376 Add vm object locking to vm_pageout_map_deactivate_pages(). 2003-06-29 19:51:24 +00:00
Gordon Tetlow
3bb374ebb1 Remove pathnames.h.
Pointed out by:	Mathieu Arnold <mat@mat.cc>
2003-06-29 19:03:52 +00:00
Gordon Tetlow
6d1b4a4730 Tweak a couple of utilities so they compile cleanly for /rescue. Mostly
path fixes.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:46:18 +00:00
Gordon Tetlow
884c25d15a Add /rescue bits. This basically encompasses all of bin and sbin along
with a couple of bits from usr.bin in a crunchgen'd binary.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:35:37 +00:00
Gordon Tetlow
3c9b856357 Add ${CRUNCH_CFLAGS} support for adding compile options to crunch
components. This is generally considered a non-optimal solution but
it gets the job done for the /rescue case.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:16:26 +00:00
Gordon Tetlow
1386defade Move path definitions to include/paths.h. This makes it easier to override
these definitions in the /rescue case.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:06:05 +00:00
Mike Makonnen
63e11eb5e3 Ugh. Remove debugging echo. 2003-06-29 17:59:09 +00:00
Gordon Tetlow
a3ba4c65fd Convert fsck and mount to using execvP to find fsck_foo and mount_foo.
This simplifies the code path and makes the default path easy to override
in the /rescue case.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 17:53:48 +00:00
Gordon Tetlow
09f49aab84 Add a libc function execvP that takes the search path as an arguement.
Change execvp to be a wrapper around execvP. This is necessary for some
of the /rescue pieces. It may also be more generally applicable as well.

Submitted by:	Tim Kientzle <kientzle@acm.org>
Approved by:	Silence on arch@
2003-06-29 17:33:34 +00:00
Bill Paul
2e7c2f97aa In order to set the MAC address on RealTek NICs, you must flip WRITECFG
bit in the EEPROM mode register on. Also, the address must be written
in two 32-bit register accesses instead of 6 8-bit accesses.

Tested with my 8139B cardbus NIC.

PR:	kern/35900
Submitted by:	Mark Kettenis <kettenis@chello.nl>
2003-06-29 17:33:33 +00:00
Marcel Moolenaar
25ae78c736 Implement fuword32() and suword32(). These functions are used in
kern_thread.c. This is a best effort implementation.
2003-06-29 17:14:42 +00:00
John Polstra
7c916264aa Make _thread_suspend work with both the old broken sigtimedwait
implementation and the new improved one.  We now precompute the
signal set passed to sigtimedwait, using an inverted set when
necessary for compatibility with older kernels.
2003-06-29 15:55:44 +00:00
John Polstra
602c788942 Bump __FreeBSD_version because the semantics of sigtimedwait and
sigwaitinfo have been corrected.  Some existing code relied on the
original broken semantics.
2003-06-29 15:51:38 +00:00
Ruslan Ermilov
ce17762f4a Unbreak NOCRYPT buildworld.
Reviewed by:	markm
2003-06-29 10:03:35 +00:00
Alan Cox
269acda954 - Remove the calls to pmap_install() from pmap_object_init_pt(); they are
redundant.  Discussed with: marcel
 - MFi386: Add vm object locking to pmap_object_init_pt().
2003-06-29 06:10:32 +00:00
Mike Makonnen
b166db2bfd Implement individual operations on static and dhcp interfaces. Previously
network interfaces could only be turned on and off as a group (all
static interfaces or all dhcp interfaces).

When used to start the interface a 'long form' ifconfig output is
used to show the status of the interface, but when stopping an interface
the script will simply output the name of the interface. This is simply my
personal preference. Hopefully as this functionality matures we can
stabilize on a prefered form of output for these scripts.

A stop command to the dhclient script now explicitly releases the dhcp lease.
Behaviour at system shutdown; however, is unchanged since dhclient is not,
by default, run at that time. The client will not release its lease
at shutdown.
2003-06-29 05:34:41 +00:00
Mike Makonnen
2a7ea7e487 o Hookup rc.d/routing and rc.d/netoptions
o Ensure rc.d/network2 and rc.d/network3 are not automatically run
  during boot
o Modify script headers so rcorder(8) can put the two scripts in the
  correct sequence.
2003-06-29 05:15:57 +00:00
Mike Makonnen
cf6b0ea705 o Repocopied routing and netoptions from network2 and network3, respectively.
o Change the provider names.
o Separate routing into two parts: static routing and routing options. The
  start command will run both parts, but they can be run separately using
  the static and options command, respectively:
  (/etc/rc.d/routing static; /etc/rc.d/routing options)
2003-06-29 05:09:48 +00:00
Tim J. Robbins
ae620d4480 XXX Copy workaround from UFS: open device for write access even if
the user requests a read-only mount. This is necessary because we
don't do the VOP_OPEN again if they upgrade a read-only mount to
read-write.

Fixes lockup when creating files on msdosfs mounts that have been
mounted read-only then upgraded to read-write. The exact cause of
the lockup is not known, but it is likely to be the kernel getting
stuck in an infinite loop trying to write dirty buffers to a device
without write permission.

Reported/tested by andreas, discussed with phk.
2003-06-29 03:05:59 +00:00
Peter Grehan
fd05df3205 Allow the interrupt controller to be probed - this picks up the
Heathrow PIC, while not affecting the OpenPIC.
2003-06-29 02:05:19 +00:00
Bill Paul
ac8824dbea Modify the xl_reset() routine slightly so that, if we're using memory
mapped I/O mode, we pause for .1 seconds after issuing the reset command
before trying to poll the 'command busy' bit in the status register.
With my 3c575C cardbus NIC, my Sony Picturebook locks up when it tries
to read the status register immediately after the reset. This appears
to be a problem only with certain NICs on certain hardware, but the
added delay should not hurt cards that already work.

This bug seems to have been brought to light by the fact that the xl
driver now defaults to memory mapped I/O mode instead of programmed
I/O mode like it used to. With PIO mode, the delay isn't needed and
everything works (which is why this NIC worked with 5.0-RELEASE but
not 5.1). I suspect that what's happening is that when the chip is
reset, it takes a little while for the memory-mapped decoding logic
to recover. Trying to access the chip's registers during this period
causes an error condition of some kind that wedges the system.
2003-06-29 01:38:57 +00:00
Bruce A. Mah
94e7ccd17d Add ath(4) devices. Also try to be more specific with respect to
what variant of 802.11 is supported by some other devices.
2003-06-29 01:12:57 +00:00
David Schultz
ec045e41d9 Teach fmtcheck(3) about the flags a, A, F, G, t, and z. 2003-06-29 01:11:31 +00:00
Bruce A. Mah
b20ea7bdbc Start to fill in amd64 hardware notes based on info from peter.
Translators should be warned that this is somewhat of a moving
target, and so might want to consider holding off working on
this document.
2003-06-29 01:10:45 +00:00
Mike Makonnen
7e2160688c The move to _retire() a thread in the GC instead of in the thread's
exit function has invalidated the need for _spin[un]lock_pthread().
The _spin[un]lock() functions can now dereference curthread without
the danger that the ldtentry containing the pointer to the thread
has been cleared out from under them.
2003-06-29 00:12:40 +00:00
Ruslan Ermilov
b5e7e99950 Hiten's patchset for section four manpages, slightly edited by me. 2003-06-28 23:53:39 +00:00
Juli Mallett
ad46866975 Add code to keep going if you're really intent on fingering someone, but
can't use utmp(5).
2003-06-28 23:11:41 +00:00
Ruslan Ermilov
73e57b801f Synchronize usage() and SYNOPSIS, and fix them (flags are not
optional here).  Sort options.  Print the file name on error.
2003-06-28 22:30:46 +00:00
Ruslan Ermilov
e84d313489 Punctuation. 2003-06-28 22:18:45 +00:00
Ruslan Ermilov
f5913c9736 mdoc(7) fix: Use the normal AT&T macro (.At) rather than its
internal string in the macro context.
2003-06-28 22:12:30 +00:00
Jeff Roberson
ab875ef896 - Construct a cpu topology map for Hyper Threading systems so that ULE may
take advantage of them.
2003-06-28 22:07:42 +00:00
Jeff Roberson
107902b895 - Add structures for defining cpu topologies more complex than SMP.
smp_topology may be left NULL by architectures which have vanilla SMP
   setups.
2003-06-28 22:06:19 +00:00
Alan Cox
8e1e7b93b3 Remove GIANT_REQUIRED from kmem_malloc(). 2003-06-28 22:04:52 +00:00
Thomas Moestl
d462b4f058 Small fixes for the IOMMU code:
1.) Handle maximum segment sizes which are smaller than the IOMMU page
    size by splitting up pages across multiple segments if needed; this case
    was previously unimplemented, and would cause panics.
2.) KASSERT that the physical address is in range; remove a KASSERT that
    has become pointless.
3.) Add a comment describing what remains to be fixed in the IOMMU code;
    I plan to address these issues soon.

Desired by:	dwhite (1)
2003-06-28 21:52:16 +00:00
Alan Cox
4a309ab44c MFi386
Add vm object locking to pmap_object_init_pt().
2003-06-28 21:21:04 +00:00
Alan Cox
5163584c7e - Add vm object locking to vm_pageout_clean(). 2003-06-28 20:07:54 +00:00
Marcel Moolenaar
4e4422d4d4 Don't use fuword() and suword() on struct members of type int. This
happens to work on 32-bit platforms as sizeof(long)=sizeof(int), but
wrecks all kinds of havoc (garbage reads, corrupting writes and
misaligned loads/stores) on 64-bit architectures.
The fix for now is to use fuword32() and suword32() and change the
type of the applicable int fields to int32. This is to make it
explicit that we depend on these fields being 32-bit. We may want
to revisit this later.

Reviewed by: deischen
2003-06-28 19:45:15 +00:00
Marcel Moolenaar
19acf030a2 Don't map LINUX_POSIX_VDISABLE to _POSIX_VDISABLE and vice versa for
the VMIN and VTIME members of the c_cc array. These members are not
special control characters. By not excluding these members we
changed the noncanonical mode input processing when both members
were 0 on entry (=LINUX_POSIX_VDISABLE) as we would remap them to 255
(=_POSIX_VDISABLE). See termios(4) case A for how that screws up
your terminal I/O.

PR: 23173
Originator: Bjarne Blichfeldt <bbl@dk.damgaard.com>
Patch by: Boris Nikolaus <bn@dali.tellique.de> (original submission)
	  Philipp Mergenthaler <philipp.mergenthaler@stud.uni-karlsruhe.de>
Reminders by: Joseph Holland King <gte743n@cad.gatech.edu>
MFC after: 5 days
2003-06-28 19:32:07 +00:00
Peter Wemm
c76b41b7b5 utmp.ut_time is not a time_t, do not pass a pointer to it to pr_attime(). 2003-06-28 19:11:42 +00:00
Sam Leffler
64125f9866 bring in ath-specific test tool; more to follow 2003-06-28 18:26:23 +00:00