John Baldwin [Sat, 20 Oct 2001 03:32:33 +0000 (03:32 +0000)]
- Make the sio_inited handling more properly MP safe.
- If we are booting with a serial console, then pass the MTX_QUIET flag to
mtx_init of the sio lock as otherwise KTR_VERBOSE simply doesn't work.
John Baldwin [Sat, 20 Oct 2001 03:22:23 +0000 (03:22 +0000)]
Make the flag field in the ps output one char wider to account for recent
growth in the number of flags used. Also, if a thread is blocked on a
mutex, print the mutex name in the wait channel column.
John Baldwin [Sat, 20 Oct 2001 01:22:42 +0000 (01:22 +0000)]
The mtx_init() and sx_init() functions bzero'd locks before handing them
off to witness_init() making the check for double intializating a lock by
testing the LO_INITIALIZED flag moot. Workaround this by checking the
LO_INITIALIZED flag ourself before we bzero the lock structure.
Tweak the way we determine if an interface needs to have its name translated.
Add some missing break statements in the socket ioctl switch.
Check the return value from copyin() / copyout().
Fix some disorderings and misindentations.
Support a couple more socket ioctls.
Add missing break statements.
Peter Wemm [Fri, 19 Oct 2001 23:32:03 +0000 (23:32 +0000)]
Add a sysctl for preventing the sync() in panic() recovery. This can
be so dangerous it isn't funny. eg: if you panic inside NFS or softdep,
and then try and sync you run into held locks and cause either deadlocks,
recursive panics or other interesting chaos. Default is unchanged.
Bruce A. Mah [Fri, 19 Oct 2001 20:41:09 +0000 (20:41 +0000)]
Support a comma-separated list of architectures for the arch=
attribute. This change is necessary in order for the release
documentation to scale to support more than two architectures.
John Baldwin [Fri, 19 Oct 2001 19:28:18 +0000 (19:28 +0000)]
- Move the definition of LOCK_DEBUG back to sys/lock.h from sys/_lock.h.
- Change LOCK_DEBUG so that it is always on if KTR is compiled in
regardless of the state of KTR_COMPILE. This means that we no longer
need to include sys/ktr.h before sys/lock.h to ensure a valid setting
for LOCK_DEBUG.
- Change the use of LOCK_DEBUG so that it is now always defined and its
value is used instead of merely its definition. That is, instead of
#ifdef LOCK_DEBUG, code should now use #if LOCK_DEBUG > 0.
- Use this latest to #error out in sys/mutex.h if sys/lock.h isn't
included before sys/mutex.h to ensure that the proper versions of the
mutex operations are used.
- As a result of (2) sys/mutex.h no longer includes sys/ktr.h in the
KERNEL case.
Properly handle backslash newline within an identifier or keyword.
PR: bin/6015
Submitted by: myself (schweikh)
Patch by: Alexey V.Neyman <alex.neyman@auriga.ru>
Tested by: indenting my chess problem solver and running its test suite
MFC after: 3 weeks
Ruslan Ermilov [Fri, 19 Oct 2001 12:58:22 +0000 (12:58 +0000)]
Respect system ${CFLAGS} when building Perl modules.
bsd.obj.mk -> bsd.prog.mk in modules makefiles, as the
latter automatically includes ../Makefile.inc and adds
-I${DESTDIR}/usr/include to ${CFLAGS} needed for "make
world" which is built with -nostdinc.
Bruce Evans [Fri, 19 Oct 2001 12:45:59 +0000 (12:45 +0000)]
Fixed style bugs in previous commit:
- don't comment out the old version; just modify it.
- don't 2 sets of 3 style bugs that weren't present in the old version.
Doug Rabson [Fri, 19 Oct 2001 09:47:02 +0000 (09:47 +0000)]
Rework pmap so that it separates the PTE structure from the pv_entry
structure. This makes it possible to pre-allocate PTEs for the kernel,
which is necessary for a reliable implementation of pmap_kenter(). This
also avoids wasting space (about 48 bytes per page) for kernel mappings
and user mappings of memory-mapped devices.
This also fixes a bug with the previous version where the implementation
required the pv_entry structure to be physically contiguous but did not
enforce this (the structure size was not a power of two). This meant
that the pv_entry free list was quickly corrupted as soon as the system
was even mildly loaded.
Marcel Moolenaar [Fri, 19 Oct 2001 08:33:56 +0000 (08:33 +0000)]
Build the linux module on Alpha again. Note that the linux module
is not added to the MI list of modules. The current state of
affairs is such that the linux module is the exception, not the
common case.
Marcel Moolenaar [Fri, 19 Oct 2001 08:18:31 +0000 (08:18 +0000)]
Fix Alpha related brokenness. We used to have a MD linux_ioctl.h
that appeared to be very different from the MI version. These
differences were mostly bogus and caused by copying octal
definitions and write them as hexadecimal values without doing
any base conversion (ie 010 was copied to 0x10). After filtering
out these differences, any remaining (real) incompatibilities
have been merged into the MI header file to make them more visible.
While here, fix the termios <-> termio conversion WRT to the c_cc
field for Alpha. The termios values do not match the termio values
and thus prevents us from copying.
By eliminating the Alpha MD copy of linux_ioctl.h we also fixed
the recent build breakage caused by putting new bits in the MI
header and not in the MD header.
Adapt to pseudofs changes (dynamic initialization, not static).
Use the new linux_ifname() function from the linuxulator rather than roll
our own interface name translation.
Switch to dynamic rather than static initialization.
This makes it possible (in theory) for nodes to be added and / or removed
from pseudofs filesystems at runtime.
Add support for the "device private" ioctls soon to be used by the an driver.
Also slightly change the name translation policy - only rename interfaces
that have the IFF_BROADCAST flag set. This is not perfect, but is closer to
how Linux names network interfaces.
Brian Somers [Thu, 18 Oct 2001 08:47:56 +0000 (08:47 +0000)]
When the peer fails to specify an MRU and a 1500 byte MRU is not
allowed either because of the transport or configuration, send a
MRU NAK only once, then allow the negotiations to proceed.
rfc1661 says that 1500 should always be allowed and rfc2516 says
that 1492 is the maximum for PPPoE. This changes ppp so that it
only weakly suggests 1492, then goes with the default (leaving
the problem in the hands of the peer WRT how they set their MTU).
Tons of type, style and warning fixes that have been rotting in my tree for
ages - some of which wouldn't be necessary if gcc wasn't broken or TPTB were
willing to do something (-fno-builtin) about it.
John Baldwin [Wed, 17 Oct 2001 22:04:45 +0000 (22:04 +0000)]
- Small cleanups to the Giant handling in trap().
- Only release Giant in trap() if we locked it, otherwise we could release
Giant in a kernel trap if we didn't get it for a page fault and the
previous frame had grabbed the lock.
- Only get Giant for !MP safe syscalls.