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.
Jonathan Lemon [Wed, 17 Oct 2001 18:47:12 +0000 (18:47 +0000)]
Add dev_named(dev, name), which is similar in spirit to devtoname().
This function returns success if the device is known by either 'name'
or any of its aliases.
Jonathan Lemon [Wed, 17 Oct 2001 18:30:13 +0000 (18:30 +0000)]
When specifying an interface to ifconfig, first look up the interface
index, then retrieve statistics for that index, rather than retrieving
all interfaces and then looking for a matching name. This allows the
user to refer to an interface via an alias name.
While I'm here, also perform a few assorted cleanups.
Ruslan Ermilov [Wed, 17 Oct 2001 18:07:05 +0000 (18:07 +0000)]
Pull post-4.4BSD change to sys/net/route.c from BSD/OS 4.2.
Have sys/net/route.c:rtrequest1(), which takes ``rt_addrinfo *''
as the argument. Pass rt_addrinfo all the way down to rtrequest1
and ifa->ifa_rtrequest. 3rd argument of ifa->ifa_rtrequest is now
``rt_addrinfo *'' instead of ``sockaddr *'' (almost noone is
using it anyways).
Benefit: the following command now works. Previously we needed
two route(8) invocations, "add" then "change".
# route add -inet6 default ::1 -ifp gif0
Remove unsafe typecast in rtrequest(), from ``rtentry *'' to
``sockaddr *''. It was introduced by 4.3BSD-Reno and never
corrected.
Hajimu UMEMOTO [Wed, 17 Oct 2001 13:03:37 +0000 (13:03 +0000)]
Fixed to process a IPv6 packet when ah transport after esp tunnel
should be applied. the SA of AH transport could not be selected
from the SAD because of this bug.
Hajimu UMEMOTO [Wed, 17 Oct 2001 13:01:39 +0000 (13:01 +0000)]
The behavior of SPDUPDATE has been changed.
SPDUPDATE doesn't depend on whether there is a SP or not.
This change makes `generate_policy on' of racoon work.