harti [Tue, 3 Aug 2004 19:14:14 +0000 (19:14 +0000)]
Correct the description of the MFLAGS and .MAKEFLAGS variables. Add
the MFLAGS target. Document that variable assignments from the MAKEFLAGS
environment variable and the .MAKEFLAGS and .MFLAGS target have the
same precedence as command line variable assignments.
harti [Tue, 3 Aug 2004 18:56:31 +0000 (18:56 +0000)]
Put variable assignments from the command line into the MAKEFLAGS
variable as required by POSIX. This causes such variables to be
pushed into all sub-makes called by the make (except when the MAKEFLAGS
variable is explicitely changed in the sub-make's environment).
This makes them also mostly un-overrideable in sub-makes except on the
sub-make's command line. Therefor specifying 'make CC=icc' will cause
icc to be used as C compiler in all sub-makes no matter what the Makefiles
itself try to do to the CC variable.
This patch also corrects the handling of the MFLAGS variable. MFLAGS
contains all the command line flags but not the command line variable
assignments. The evaluation of the .MFLAGS or .MAKEFLAGS target now
changes both MFLAGS and MAKEFLAGS (they used to change MAKEFLAGS only).
Makefiles can use MFLAGS for their own purposes given that they do not
except MFLAGS to be undefined at the beginning and that they don't evaluate
.MFLAGS or .MAKEFLAGS. MFLAGS should be removed for POSIX compliance,
but it is unfortunately heavily used by the X makefiles.
This has been extensively tested by port builds (thanks to portmgr), new
worlds and kernels.
PR: standards/57295 (1st part above)
Submitted by: James E. Flemer <jflemer@alum.rpi.edu>
Approved by: portmgr
Obtained from: NetBSD (1st part above)
MFC after: 4 weeks
mux [Tue, 3 Aug 2004 18:44:27 +0000 (18:44 +0000)]
Instead of calling ia32_pause() conditionally on __i386__ or __amd64__
being defined, define and use a new MD macro, cpu_spinwait(). It only
expands to something on i386 and amd64, so the compiled code should be
identical.
andre [Tue, 3 Aug 2004 14:13:36 +0000 (14:13 +0000)]
o Delayed checksums are now calculated in divert_packet() for diverted packets
Remove the XXX-escaped code that did it in ip_output()'s IPHACK section.
andre [Tue, 3 Aug 2004 12:31:38 +0000 (12:31 +0000)]
o Move all parts of the IP reassembly process into the function ip_reass() to
make it fully self-contained.
o ip_reass() now returns a new mbuf with the reassembled packet and ip->ip_len
including the IP header.
o Computation of the delayed checksum is moved into divert_packet().
Correct L2TP header offset handling:
- according to RFC2661 an offset size of 0 is allowed.
- when skipping offset padding do not forget to also skip
the 2 octets of the offset size field.
Do not change link[n].conf.latency for internal usage but have
link[n].latency calculated from user supplied value.
This prevents repeated NGM_PPP_SET_CONFIG/NGM_PPP_GET_CONFIG
from failing because of link[n].conf.latency being out of range.
kientzle [Tue, 3 Aug 2004 06:19:08 +0000 (06:19 +0000)]
GNU and POSIX disagree about -o and -l.
For -l, upset everyone by breaking it. Specifically, -l now produces
a lengthy error message that suggests --check-links (POSIX -l) or
--one-file-system (GNU -l) instead. However, if POSIXLY_CORRECT is set,
use the POSIX interpretation.
For -o, please everyone by making it work both ways:
* -xo uses POSIX behavior
* -co uses "almost GNU" behavior (as close as we can get until
libarchive implements a true V7 tar format)
njl [Tue, 3 Aug 2004 05:15:56 +0000 (05:15 +0000)]
Forced commit to note intended log message for previous revision:
Cleanup to prepare for locking commit. Add comments, clarify printfs,
remove old unused locking macros. Additional changes:
* Remove an old workaround for the bug in AcpiEnterSleepState() that
caused it to return with the hardware mutex still held. It no longer
can fail this way.
* Remove ACPI_DEBUGGER checkpoints in the probe. We have a reasonably
stable probe/attach process now.
* Use an sbuf instead of sprintf/strcat for a sysctl. Also, use strlcpy
instead of a bzero/strncpy.
* Simplify acpi_name, acpi_Enable, and acpi_Disable.
* Don't bzero the softc
grehan [Tue, 3 Aug 2004 04:14:55 +0000 (04:14 +0000)]
Remove race condition between reading of MSR, setting md_savecrit,
and setting MSR. This was most evident with the idle proc running
with interrupts disabled and causing a lockup. Switch over to the
i386 style which does things in the right order.
debug assisted by: gallatin, and the invaluable KTR option.
silby [Tue, 3 Aug 2004 02:59:15 +0000 (02:59 +0000)]
Standardize pipe locking, ensuring that everything is locked via
pipelock(), not via a mixture of mutexes and pipelock(). Additionally,
add a few KASSERTS, and change some statements that should have been
KASSERTS into KASSERTS.
As a result of these cleanups, some segments of code have become
significantly shorter and/or easier to read.
njl [Tue, 3 Aug 2004 00:41:47 +0000 (00:41 +0000)]
Change EISA probing to be less invasive. Instead of probing all slots
unconditionally, stop after the first one (system board) if no EISA hardware
is detected. This fixes a boot hang (i.e. Thinkpad) when ACPI is disabled.
Also, split the probe code into a separate function and do some style cleanup.
Note that the Adaptec 2842 VLB controller probe is broken by this change
and will fail to probe. It should be fixed separately.
marius [Mon, 2 Aug 2004 23:32:23 +0000 (23:32 +0000)]
- Set the CAM status to CAM_SCSI_STATUS_ERROR rather than CAM_REQ_CMP
in case of a CHECK CONDITION.
- Make this driver return SCSI status information.
- While here, factor out the clearing of the CAM status from every
element of the switch statement to only once before the switch.
This fixes burning CDs with recent cdrecord 2.01 alpha versions and
burners attached to asr(4) controllers but there could have been
other applications and da(4) etc. also affected.
marcel [Mon, 2 Aug 2004 23:18:48 +0000 (23:18 +0000)]
Move the inclusion of libdisk.h from sysinstall.h to the source files
that actually need it. This makes it easier for a platform porter to
find the files that may need tweaking to support whatever MD specific
partitioning is needed. It also helps to prevent that the libdisk API
gets exposed and/or used where it's not needed.
marcel [Mon, 2 Aug 2004 19:28:03 +0000 (19:28 +0000)]
Add Linux swap partition and MS reserved partition descriptions.
While here:
o Make the UUIDs static to avoid runtime initialization,
o Rename ext to mslinux,
o Replace the use of memcmp() with uuid_equal(),
o Various style(9) improvements,
o Order the comparisons based on importance,
o Remove the word partition from all the descriptions,
o Other description improvements.
Includes patch from: T. Muthu Mohan < Muthu_T at dell dot com >
wpaul [Mon, 2 Aug 2004 18:54:01 +0000 (18:54 +0000)]
Today, RealTek sent me a driver to test which had been compiled with
some debug support turned on. It turns out the sections in this driver
binary had relative virtual addresses (RVAs) that were different
from the raw addresses, and it had a .data section where the virtual size
was much larger than the raw size. (Most production binaries produced
with the Microsoft DDK have RVA == PA.)
There's code in the ndiscvt(8) utility that's supposed to handle
the vsize != rsize case, but it turns out it was slightly broken,
and it failed to handle the RVA != RA case at all. Hopefully, this
commit will fix all that.
marcel [Mon, 2 Aug 2004 18:46:52 +0000 (18:46 +0000)]
Remove GPT_ENT_TYPE_FREEBSD_UFS2. It was speculatively added before
UFS2 was here. It so happened that UFS2 did not need a seperate
partition type. Keep the definition as a comment for documentation
purposes. If there is a benefit for UFS2 file systems to have a
seperate partition type under GPT, then this definition should be
restored as that was the intention of the definition.
hrs [Mon, 2 Aug 2004 18:24:58 +0000 (18:24 +0000)]
New release notes (changes in the first half of July 2004):
bus_dma(9) alignment and boundary compensation support,
kqueue(2) EVFILT_FS,
KDB framework,
sound and snd_* driver reorganization,
natd(8) globalports option[*],
ppp(8) LQM support[*] and "rad_alive N" option,
GEOM_STRIPE FAST mode support,
MSDOSFS_LARGE[*],
ALTQ framework support added to various network drivers[*],
bsdtar(1) now the default tar(1) utility,
cvs(1) iso8601 option keyword,
multibyte characters support:
fgetwln(3), join(1), nextwctype(3), od(1), regex(3), rev(1),
sed(1) 'y' command, and tr(1),
ftw(3) and nftw(3) implemented,
C99 functions: nearbyint(3),
am-utils 6.0.9->6.0.10p1 import,
GNU grep 2.4d->2.5.1 import, and
tcsh 6.11->6.13.00 import.
obrien [Mon, 2 Aug 2004 18:14:06 +0000 (18:14 +0000)]
Don't build and install a mem.ko module.
Currently one cannot load the mem.ko module without panicing if mem is
compiled into the kernel and one cannot build a kernel w/o "device mem"
right now either. Thus it is too dangerous to install mem.ko right now
because if one puts 'mem_load="YES"' in /etc/loader.conf they cannot
boot an "old" kernel (at the time that a kernel doesn't have to be built
with "device mem).
iedowse [Mon, 2 Aug 2004 15:37:35 +0000 (15:37 +0000)]
Make the USB subsystem unloadable and detachable, though currently
a significant amount of memory may be leaked each time a host
controller is detached.
scottl [Mon, 2 Aug 2004 15:31:10 +0000 (15:31 +0000)]
Optimize intr_execute_handlers() by combining the pic_disable_source() and
pic_eoi_source() into one call. This halves the number of spinlock operations
and indirect function calls in the normal case of handling a normal (ithread)
interrupt. Optimize the atpic and ioapic drivers to use inlines where
appropriate in supporting the intr_execute_handlers() change.
This knocks 900ns, or roughly 1350 cycles, off of the time spent servicing an
interrupt in the common case on my 1.5GHz P4 uniprocessor system. SMP systems
likely won't see as much of a gain due to the ioapic being more efficient than
the atpic. I'll investigate porting this to amd64 soon.
iedowse [Mon, 2 Aug 2004 13:59:02 +0000 (13:59 +0000)]
When searching for a suitable block of memory on the free list,
skip blocks that are too big by a factor of two or greater. This
avoids some cases of extremely inefficient memory use that can occur
when large (e.g. 64k) blocks on the free list get used when allocating
a 4k chunk of 64-byte fragments. Because fragments have their own
free list, the 60k difference got lost forever every time.
iedowse [Mon, 2 Aug 2004 12:56:01 +0000 (12:56 +0000)]
Attempt to follow the correct procedure for synchronising with the
system BIOS to disable legacy device emulation as per the "EHCI
Extended Capability: Pre-OS to OS Handoff Synchronisation" section
of the EHCI spec. BIOSes that implement legacy emulation using SMIs
are supposed to disable the emulation when this procedure is performed.
alc [Mon, 2 Aug 2004 03:31:05 +0000 (03:31 +0000)]
Eliminate the acquisition and release of Giant around the call to
pmap_mincore() in mincore(2). Either pmap locking exists (alpha, amd64,
i386, ia64) or pmap_mincore() is unimplemented (arm, powerpc, sparc64).
pjd [Mon, 2 Aug 2004 00:37:40 +0000 (00:37 +0000)]
- Fix unloading by the same way it is done in my other classes:
set gp->softc to NULL and return ENXIO when it is NULL, so GEOM
will not panic or hang, but unload one device on every 'unload'.
This make 'unload' command usable, but it have to be executed
<number of devices> + 1 times.
- Made use of 'pp' variable.
green [Mon, 2 Aug 2004 00:18:36 +0000 (00:18 +0000)]
* Add a "how" argument to uma_zone constructors and initialization functions
so that they know whether the allocation is supposed to be able to sleep
or not.
* Allow uma_zone constructors and initialation functions to return either
success or error. Almost all of the ones in the tree currently return
success unconditionally, but mbuf is a notable exception: the packet
zone constructor wants to be able to fail if it cannot suballocate an
mbuf cluster, and the mbuf allocators want to be able to fail in general
in a MAC kernel if the MAC mbuf initializer fails. This fixes the
panics people are seeing when they run out of memory for mbuf clusters.
* Allow debug.nosleepwithlocks on WITNESS to be disabled, without changing
the default.
Both bmilekic and jeff have reviewed the changes made to make failable
zone allocations work.