Alan Cox [Sun, 7 Mar 2004 21:06:48 +0000 (21:06 +0000)]
Retire pmap_pinit2(). Alpha was the last platform that used it. However,
ever since alpha/alpha/pmap.c revision 1.81 introduced the list allpmaps,
there has been no reason for having this function on Alpha. Briefly,
when pmap_growkernel() relied upon the list of all processes to find and
update the various pmaps to reflect a growth in the kernel's valid
address space, pmap_init2() served to avoid a race between pmap
initialization and pmap_growkernel(). Specifically, pmap_pinit2() was
responsible for initializing the kernel portions of the pmap and
pmap_pinit2() was called after the process structure contained a pointer
to the new pmap for use by pmap_growkernel(). Thus, an update to the
kernel's address space might be applied to the new pmap unnecessarily,
but an update would never be lost.
Use one bus_dma_tag_t for all pSRB instead of creating one for each.
Free what is allocated for pSRBs at unload time or if something bad happens,
thanks to scottl for spotting this out.
Doug Barton [Sun, 7 Mar 2004 10:10:19 +0000 (10:10 +0000)]
In the case where /etc/rc.d/ is empty, do not bogusly ask the user if
they want to delete '*'. It turns out that there is one valid case where
this might happen, installing to an empty DESTDIR.
Bill Paul [Sun, 7 Mar 2004 02:49:06 +0000 (02:49 +0000)]
Add preliminary support for PCMCIA devices in addition to PCI/cardbus.
if_ndis.c has been split into if_ndis_pci.c and if_ndis_pccard.c.
The ndiscvt(8) utility should be able to parse device info for PCMCIA
devices now. The ndis_alloc_amem() has moved from kern_ndis.c to
if_ndis_pccard.c so that kern_ndis.c no longer depends on pccard.
NOTE: this stuff is not guaranteed to work 100% correctly yet. So
far I have been able to load/init my PCMCIA Cisco Aironet 340 card,
but it crashes in the interrupt handler. The existing support for
PCI/cardbus devices should still work as before.
Tim Kientzle [Sun, 7 Mar 2004 00:57:43 +0000 (00:57 +0000)]
Recognize hardlinks when reading cpio files.
This doesn't yet address the issue of selective restore
of hardlinked files. With cpio format, it's possible to correctly
restore any linked file; the API doesn't yet fully support this.
(There's no way for the library to inform a client whether or not
there's a file body associated with this entry. The assumption
right now is that "hardlink" entries have no file body.)
Tim Kientzle [Sat, 6 Mar 2004 05:44:13 +0000 (05:44 +0000)]
Minor API tweak: The format-specific write_header function now sets
the size in the archive_entry object to zero if that format doesn't
store a body for that file type. This allows the client to determine
whether or not it should feed the file body to the archive. In
particular, cpio stores the file body for hardlinks, tar and shar
don't. With this change, bsdtar now correctly archives hardlinks in all
supported formats.
While I'm here, make shar output be more aggressive about creating directories.
Before this, commands such as:
bsdtar -cv -F shar some/explicit/path/to/a/file
wouldn't create the directory. Some simple logic to remember the last
directory creation helps reduce unnecessary mkdirs here.
At this point, I think the only flaw in libarchive's cpio support is
the failure to recognize hardlinks when reading.
Always call vn_finished_write after vn_start_write was called. All
occurences of 'goto done' after vn_start_write invocation were cleaning
up incompletely.
Tim Kientzle [Sat, 6 Mar 2004 00:59:08 +0000 (00:59 +0000)]
Correctly read symlinks from cpio files.
While I'm here, fix a bug in reading filenames from
cpio files. (Copy should count the length of the name,
not the number of bytes available for input.)
Peter Wemm [Sat, 6 Mar 2004 00:44:59 +0000 (00:44 +0000)]
Add a missing part of jhb's previous commit. It looks like he had a
patch chunk rejected that he missed. This would manifest as a lock
assertion panic at boot (Giant not locked in kern_fork.c).
Have these instructions tell users to 'sh installworld_newk' instead
of './installworld_newk', because the scripts might not show up with
the +x bit set.
John Baldwin [Fri, 5 Mar 2004 22:39:53 +0000 (22:39 +0000)]
- Push down Giant in exit() and wait().
- Push Giant down a bit in coredump() and call coredump() with the proc
lock already held rather than unlocking it only to turn around and
relock it.
John Baldwin [Fri, 5 Mar 2004 22:37:32 +0000 (22:37 +0000)]
- Grab a share lock of the proctree lock while looking for a pid due to the
process group and session dereferences. Also, check that p_pgrp and
p_sesssion are NULL before dereferencing them.
- Push down Giant in fork1().
Don Lewis [Fri, 5 Mar 2004 22:03:11 +0000 (22:03 +0000)]
Undo the merger of mlock()/vslock and munlock()/vsunlock() and the
introduction of kern_mlock() and kern_munlock() in
src/sys/kern/kern_sysctl.c 1.150
src/sys/vm/vm_extern.h 1.69
src/sys/vm/vm_glue.c 1.190
src/sys/vm/vm_mmap.c 1.179
because different resource limits are appropriate for transient and
"permanent" page wiring requests.
Retain the kern_mlock() and kern_munlock() API in the revived
vslock() and vsunlock() functions.
Combine the best parts of each of the original sets of implementations
with further code cleanup. Make the mclock() and vslock()
implementations as similar as possible.
Retain the RLIMIT_MEMLOCK check in mlock(). Move the most strigent
test, which can return EAGAIN, last so that requests that have no
hope of ever being satisfied will not be retried unnecessarily.
Disable the test that can return EAGAIN in the vslock() implementation
because it will cause the sysctl code to wedge.
Tested by: Cy Schubert <Cy.Schubert AT komquats.com>
Nate Lawson [Fri, 5 Mar 2004 18:06:31 +0000 (18:06 +0000)]
A user can set tz_requested via the hw.acpi.thermal.tzX.active sysctl.
The previous logic meant that if a user sets it to a minimal cooling value
acpi_thermal will not use higher cooling levels. Reverse the logic so that
the user requesting a level (say, 2) also gets 0 - 1 also.
PR: kern/61592
Submitted by: Andrew Thompson <andy@fud.org.nz>
Robert Watson [Fri, 5 Mar 2004 17:35:28 +0000 (17:35 +0000)]
Put "failed to set signal flags properly for ast()" check under
DIAGNOSTIC instead of INVARIANTS. INVARIANTS is intended for tests
that don't substantially change code flow or behavior (passive), but
this test required locking both the proc lock and scheduler lock
in order to execute. It also appears to be a very advisory diagnostic
as opposed to an invariant violation.
Bruce Evans [Fri, 5 Mar 2004 15:22:05 +0000 (15:22 +0000)]
Removed garbage:
- completely unused things
- all of rev.1.102 (C++ support). <sys/cdefs.h> is included by the
prerequisite <sys/types.h>. __BEGIN_DECLS/__END_DECLS has no effect
(except possibly if undefined behaviour is invoked using a hack like
defining away __inline) since this header doesn't really support any
extern functions.
Mark Murray [Fri, 5 Mar 2004 08:10:19 +0000 (08:10 +0000)]
Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror)
that this provokes. "Wherever possible" means "In the kernel OR NOT
C++" (implying C).
There are places where (void *) pointers are not valid, such as for
function pointers, but in the special case of (void *)0, agreement
settles on it being OK.
Most of the fixes were NULL where an integer zero was needed; many
of the fixes were NULL where ascii <nul> ('\0') was needed, and a
few were just "other".
Mike Makonnen [Fri, 5 Mar 2004 08:03:04 +0000 (08:03 +0000)]
When this script included NetBSD specific logic, the NetBSD branch
included a start_precmd check for gated. The precommand was not
executed in the FreeBSD branch. When I did a mass removal of
NetBSD specific logic a while back this file apparently got only
a partial treatement. This bug did not have any functional consequences,
however, since the precommand was not declared to the rc.subr routines.
Mike Makonnen [Fri, 5 Mar 2004 07:55:04 +0000 (07:55 +0000)]
The syslogd script should require that /var is cleaned before it runs.
Otherwise it could be in the situation where its log socket is removed
after it has started.
Alan Cox [Fri, 5 Mar 2004 04:46:32 +0000 (04:46 +0000)]
In the last revision, I introduced a physical contiguity check that is both
unnecessary and wrong. While it is necessary to verify that the page is
still free after dropping and reacquiring the free page queue lock, the
physical contiguity of the page can not change, making this check
unnecessary. This check was wrong in that it could cause an out-of-bounds
array access.