alc [Fri, 28 May 2004 19:42:02 +0000 (19:42 +0000)]
Remove a broken micro-optimization from pmap_enter(). The ill effect
of this micro-optimization occurs when we call pmap_enter() to wire an
already mapped page. Because of the micro-optimization, we fail to
mark the PTE as wired. Later, on teardown of the address space,
pmap_remove_pages() destroys the PTE before vm_fault_unwire() has
unwired the page. (pmap_remove_pages() is not supposed to destroy
wired PTEs. They are destroyed by a later call to pmap_remove().)
Thus, the page becomes lost.
Note: The page is not lost if the application called munlock(2), only
if it relies on teardown of the address space to unwire its pages.
For the historically inclined, this bug was introduced by a
megacommit, revision 1.182, roughly six years ago.
Leak observed by: green@ and dillon independently
Patch submitted by: dillon at backplane dot com
Reviewed by: tegge@
MFC after: 1 week
jhb [Fri, 28 May 2004 17:50:07 +0000 (17:50 +0000)]
Reenable ithread preemption for interrupts that occur while executing in
the kernel. I accidentally broke this with the new interrupt code that
came in prior to 5.2.
jhb [Fri, 28 May 2004 17:31:32 +0000 (17:31 +0000)]
Don't assume that the current setting (_CRS) of a PCI link device is
correct. Instead, check it against the possible settings (_PRS) when
the link is probed. This is important when using APIC mode but link
devices still have PIC mode settings. This is also what Linux does.
Additional prodding by: Len Brown len dot brown at intel dot com
eik [Fri, 28 May 2004 17:17:15 +0000 (17:17 +0000)]
- introduce a new primary `-depth n', which tests whether
the depth of the current file relative to the starting
point of the traversal is n. The usual +/- modifiers
to the argument apply.
- while I'm here, fix -maxdepth in the case of a depth-first
traversal
Print the top ten maintainers of python module ports
(works with p5-* too):
njl [Fri, 28 May 2004 07:25:23 +0000 (07:25 +0000)]
Unify the start/size parameters for the RSDP search area. Don't bother
trying to exclude the top end of the range since it should hurt to overlap
by 4 bytes in the off-chance the RSDP signature appears incorrectly at the
very top of our search space.
njl [Fri, 28 May 2004 07:16:52 +0000 (07:16 +0000)]
Now that we properly disable GPEs before entering a sleep state, including
S5 (soft off), we don't need to disable ACPI when powering off. This may
fix some systems that don't power off correctly.
njl [Fri, 28 May 2004 07:04:09 +0000 (07:04 +0000)]
Update the new suspend/resume GPE methods to properly limit the GPE
based on the destination sleep state. Add a method to restore the old
state on resume. This is needed for the case of suspending to a very low
state disabling a GPE (i.e. S4), resuming, and then suspending to a higher
state (i.e. S3). This case should now keep the proper GPEs enabled.
tackerman [Fri, 28 May 2004 00:23:00 +0000 (00:23 +0000)]
First release of ixgb driver for the Intel(R) PRO/10GbE Family of Adapters. This driver has
been developed for use with FreeBSD, version 4.8 and later.
kientzle [Thu, 27 May 2004 23:57:45 +0000 (23:57 +0000)]
Connect libarchive decompress support to the build.
Also, add it to archive_read_support_compression_all()
so that typical clients get it pulled in by default.
mlaier [Thu, 27 May 2004 23:51:05 +0000 (23:51 +0000)]
FreeBSD-ify the manpage. Our inetd does not support bind-address:port syntax
Christian will follow up with some additional words about how to protect
this from the outside world.
kientzle [Thu, 27 May 2004 21:27:42 +0000 (21:27 +0000)]
'gnutar' is now handled by the 'tar' reader, so
there's no need to enable support for it separately
from 'tar.' (The call to enable gnutar support is
now just an alias for the tar support, left in to
avoid API breakage.)
rwatson [Thu, 27 May 2004 20:34:04 +0000 (20:34 +0000)]
Call nfsm_clget_nolock() instead of nfsm_clget() when holding the NFS
subsystem lock to avoid tripping over an assertion regarding whether
the lock is held or not. This is likely to be the cause of a panic
tripped over by Andrea Campi.
njl [Thu, 27 May 2004 19:23:27 +0000 (19:23 +0000)]
Check for >= 255 since sign extension from byte to u_int sometimes makes
the value for "unknown" 0xffffffff. The underlying kernel drivers should
be updated to only return 255 but the ABI is used by too many userland
utilities.
njl [Thu, 27 May 2004 18:38:45 +0000 (18:38 +0000)]
Restructure the wake GPE API. Now there are three functions:
acpi_wake_init:
Evaluate _PRW and set the GPE type
acpi_wake_set_enable:
Enable or disable a device's GPE.
acpi_wake_sleep_prep:
Perform any last-minute changes to the device to prepare it for
entering the given sleep state.
Also, walk the entire namespace when transitioning to a sleep state,
disabling any GPEs which aren't appropriate for the given state. Transition
acpi_lid and acpi_button to the new API.
This clears the way for non-ACPI-aware devices to wake the system (i.e.
modems) and fixes a problem where systems power up after shutdown when a
GPE is triggered.
brooks [Thu, 27 May 2004 17:23:32 +0000 (17:23 +0000)]
Fix stupid patch(1) tricks. Apparently patch thinks all files match the
empty file so if you accidently apply a patch created with diff -N
twice, you get files with duplicate contents.
Reported by: Antoine Brodin <antoine.brodin at laposte.net>
yar [Thu, 27 May 2004 14:36:58 +0000 (14:36 +0000)]
POLA dictates that VLAN_MTU be enabled by default.
In particular, disabling it was likely to break configurations
involving ng_vlan(4) since the latter couldn't control
the parent's VLAN_MTU in the way vlan(4) did.
tmm [Thu, 27 May 2004 11:34:21 +0000 (11:34 +0000)]
Correct some types in the yp structures; this fixes a number of problems
on sparc64. Obtained from and cross-checked with the NetBSD version
of this file and the rpcgen-generated code.
tjr [Thu, 27 May 2004 10:54:34 +0000 (10:54 +0000)]
Buffer partial wide characters more efficiently: instead of storing the
multibyte representation in conversion state objects, store the
accumulated wide character, set number and number of bytes remaining
to avoid having to derive them every time mbrtowc() is called.
tjr [Thu, 27 May 2004 10:08:44 +0000 (10:08 +0000)]
Bring back the macro versions of getwc(), getwchar(), putwc() and
putwchar(), but this time avoid redundantly declaring __stdinp and
__stdoutp when source files include both <stdio.h> and <wchar.h>.
kientzle [Thu, 27 May 2004 05:02:35 +0000 (05:02 +0000)]
Previously, restoring an archive with hardlinked files that had
certain flags set (e.g., schg or uappend) would fail because the flags
were restored before the hardlink was created.
To address this, I've generalized the existing machinery for deferring
directory timestamp/mode restoration and used it to defer the
restoration of highly-restrictive flags to the end of the extraction,
after any links have been created.
kientzle [Thu, 27 May 2004 04:35:36 +0000 (04:35 +0000)]
Minor corrections to error handling and user notifications:
* Move format/compression reporting to end of output, since
we don't always know the input format until then.
* Set bsdtar exit value to 1 if any file could not be restored.
* Generate gtar-style warning when stripping leading '/' characters.
* Warn when removing symlinks.
tmm [Wed, 26 May 2004 21:59:01 +0000 (21:59 +0000)]
It seems that clearing the MCR_IE bit in the modem control register
does not reliably prevent the triggering of interrupts for all supported
configurations. Thus, the FIFO size probe could cause an interrupt,
which could lead to an interrupt storm in the shared interrupt case.
To prevent this, change ns8250_bus_probe() to use the overflow bit in
the line status register instead of the RX ready bit in the interrupt
identification register to detect whether the FIFO has filled up.
This allows us to clear all bits in the interrupt enable register during
the probe, which should prevent interrupts reliably.
Additionally, the detected FIFO size may be a bit more accurate, because
the overflow bit is only set when the FIFO did actually fill up, while
interrupts would trigger a bit early.
Reviewed and tested on a lot of hardware by: marcel
imp [Wed, 26 May 2004 16:31:41 +0000 (16:31 +0000)]
Add pccarddevs.h and usbdevs.h as depends, ala miidevs.h, in the right
places. This should have been committed last night with the rest of
my changes, but wasn't.
tmm [Wed, 26 May 2004 12:06:52 +0000 (12:06 +0000)]
Move the per-CPU vmspace pointer fixup that is required before a
struct vmspace is freed from cpu_sched_exit() to pmap_release().
This has the advantage of being able to rely on MI code to decide
when a free should occur, instead of having to inspect the reference
count ourselves.
At the same time, turn the per-CPU vmspace pointer into a pmap pointer,
so that pmap_release() can deal with pmaps exclusively.
bde [Wed, 26 May 2004 09:43:38 +0000 (09:43 +0000)]
Quick fix for overflow when tsc_freq >= 2^31. "int profrate" in struct
gmon and struct gmonhdr was originally just to represent the kernel
(profiling) clock frequency and it remains poorly suited to representing
the frequencies of fast counters like the TSC. It broke a year or two
ago. This quick fix keeps it working for another year or month or two
until TSC frequencies can exceed 2^32, by dividing the frequency by 2.
Dividing the frequency by 4 would work for a little longer but would
lose a little too much precision.
bde [Wed, 26 May 2004 07:43:41 +0000 (07:43 +0000)]
MFamd64:
Fixed profiling of trap, syscall and interrupt handlers and some
ordinary functions, essentially by backing out half of rev.1.106 of
i386/exception.s. The handlers must be between certain labels for
the purposes of profiling, and this was broken by scattering them in
separately compiled .s files, especially for ordinary functions that
ended up between the labels. Merge the files by #including them as
before, except with different pathnames and better comments and
organization. Changes to the scattered files are minimal -- just
move the labels to the file that does the #includes.
This also partly fixes profiling of IPIs -- all IPI handlers are now
correctly classified as interrupt handlers, but many are still missing
mcount calls.
vm86bios.s is included as before, but it is now between the labels for
interrupt handlers again, which seems to be wrong since half of it is
for a non-interrupt handler.
njl [Tue, 25 May 2004 16:17:39 +0000 (16:17 +0000)]
Enable GPE at runtime rather than suspend time. This is to match the
new behavior in ACPI-CA that defers GPE configuration. This is a temporary
measure while reworking the GPE interface.
csjp [Tue, 25 May 2004 15:02:12 +0000 (15:02 +0000)]
Add a super-user check to ipfw_ctl() to make sure that the calling
process is a non-prison root. The security.jail.allow_raw_sockets
sysctl variable is disabled by default, however if the user enables
raw sockets in prisons, prison-root should not be able to interact
with firewall rule sets.
des [Tue, 25 May 2004 12:06:26 +0000 (12:06 +0000)]
As previously threatened, give each device its own sysctl context and
subtree (under the new dev top-level node). This should greatly simplify
drivers which need per-device sysctl variables (such as ndis).
joerg [Tue, 25 May 2004 07:42:45 +0000 (07:42 +0000)]
Round #1 of improving pcf(4).
This splits the driver into a bus-independant backend, plus bus-specific
frontends. The old pcf(4) (i386/ISA) frontend is now in pcf_isa.c, the
frontend in envctrl.c is for sparc64/Ebus2 (Sun device name: SUNW,envctrl
from Sun E450 machines). More frontends are expected to appear in future.
This is not yet ready for public consumption, but it basically works.
Nicolas will bring over his ISA-specific fixes soon.