tjr [Tue, 4 Nov 2003 11:05:55 +0000 (11:05 +0000)]
Pass mbrtowc() and wcrtomb() NULL instead of a pointer to a freshly zeroed
mbstate_t object that they ignore. The zeroing is fairly expensive, and it
will never be necessary in these functions; when we support state-dependent
encodings, we will pass in a pointer to the file's mbstate_t object, and
only zero it at the time the file gets opened.
mckusick [Tue, 4 Nov 2003 07:34:32 +0000 (07:34 +0000)]
Create a .snap directory mode 770 group operator in the root of
a new filesystem. Dump and fsck will create snapshots in this
directory rather than in the root for two reasons:
1) For terabyte-sized filesystems, the snapshot may require many
minutes to build. Although the filesystem will not be suspended
during most of the snapshot build, the snapshot file itself is
locked during the entire snapshot build period. Thus, if it is
accessed during the period that it is being built, the process
trying to access it will block holding its containing directory
locked. If the snapshot is in the root, the root will lock and
the system will come to a halt until the snapshot finishes. By
putting the snapshot in a subdirectory, it is out of the likely
path of any process traversing through the root and hence much
less likely to cause a lock race to the root.
2) The dump program is usually run by a non-root user running with
operator group privilege. Such a user is typically not permitted
to create files in the root of a filesystem. By having a directory
in group operator with group write access available, such a user
will be able to create a snapshot there. Having the dump program
create its snapshot in a subdirectory below the root will benefit
from point (1) as well.
jeff [Tue, 4 Nov 2003 07:18:18 +0000 (07:18 +0000)]
- Clean up comments to reflect the KSE pushout.
- Add the following functions to the api: sched_bind(), sched_unbind(),
sched_pin(), and sched_unpin(). Bind/unbind are used for traditional
cpu binding. Pin and unpin are meant to allow the kernel to hold a thread
on a particular cpu so that it may cache per-cpu data without fear of
being migrated.
mckusick [Tue, 4 Nov 2003 07:04:01 +0000 (07:04 +0000)]
Check that the user running mksnap_ffs has permission to create and
remove a snapshot file from the directory in which they have requested
to have it made. If they do not have write permission in the directory
or the directory is sticky and not owned by the user, then they
will not be able to remove the snapshot when they are done with it.
green [Tue, 4 Nov 2003 06:38:37 +0000 (06:38 +0000)]
Add a "-f" flag for asf(8) which performs a search to find the each module
no matter where in the directory structure it may be. Use this and the "-k"
flag in the generated gdbinit files so that the "getsyms" function in gdb
requires no user intervention to run and will find every module if they're
in the kernel build's module directory. This is still quite useful for
cases where gdb knows that the path for some modules is /boot/kernel and
others are in the object directory for /usr/src/sys/$ARCH/compile/kernel.
mckusick [Tue, 4 Nov 2003 06:30:00 +0000 (06:30 +0000)]
Allow the bufdaemon and update daemon processes to skip the
waitrunningbufspace() calls so that they are always able to
proceed and clean up buffer space.
Submitted by: Brian Fundakowski Feldman <green@freebsd.org>
green [Tue, 4 Nov 2003 06:12:21 +0000 (06:12 +0000)]
* Modify libpcap to work a bit better with our 802.11 code. This means
tcpdump -y ieee802_11 will work in the basic senses, including the
code compilation for filters (where you may specify "link[]" to refer
to parts of the 802.11 header, as well as treat it like a normal
Ethernet header). Previously, it was just too far off to do anything
useful for us.
* While I'm here, fix some compile problems that will result from lex
and yacc namespace polution when linking with -lpcap. The namespace
is now "pcapyy*" instead of "yy*", and it tests fine with world and
some external applications that may or may not use "yy*".
marcel [Tue, 4 Nov 2003 03:49:01 +0000 (03:49 +0000)]
o Save a copy of the GPT entries for which there's a chunk with an
index referencing it. We need to know the original type and name
so that we know what to put in the table when we reconstruct it.
o Clear the table entries before we rebuild it to avoid that we
end up with stale data.
o Sequentially populate the table entries from the chunks. For the
chunks that have an index (now referencing the saved copy) we
use the saved type and name. This way we can handle unknown types
better. In all cases we update the start and end LBAs.
imp [Tue, 4 Nov 2003 02:59:57 +0000 (02:59 +0000)]
o Add sysctl to allow ignoring checksum of eeprom.
o Fix minor type problems
o Fix minor problem with a couple debug printfs.
o Default to a sane media type when none is reported.
o Minor style changes
The PR complains this will fix the IBM 300GL cards.
marcel [Tue, 4 Nov 2003 02:04:36 +0000 (02:04 +0000)]
o Don't tell that there's such a thing as a C suffix for specifying
a partition size on ia64. It's not true.
o Ask for a mountpoint for EFI partitions as well and check that it
isn't "/".
o On ia64 we may need to add EFI partitions. Make sure we pass the
right arguments to Create_Chunk_DWIM() in that case.
cognet [Tue, 4 Nov 2003 01:41:47 +0000 (01:41 +0000)]
I believe kbyanc@ really meant this in rev 1.58.
Use zpfind() to see if the process became a zombie if pfind() doesn't find it
and if the caller wants to know about process death, so that the caller knows
the process died even if it happened before the kevent was actually registered.
cognet [Tue, 4 Nov 2003 01:14:58 +0000 (01:14 +0000)]
Do not attempt to report proc event if NOTE_EXIT has already been received.
This fixes a race condition (specifically with signal events) that could
lead to the kn being re-inserted into the list after it has been destroyed,
which is not something we want to happen.
green [Tue, 4 Nov 2003 00:31:58 +0000 (00:31 +0000)]
Fix wi(4)'s WI_RID_SCAN_RES ioctl (wicontrol -L). The wrong length
is computed, so the user thinks that for non-PRISM cards there are
more APs represented than exist.
green [Tue, 4 Nov 2003 00:24:13 +0000 (00:24 +0000)]
On my ZoomAir-branded Intersil PRISM2 cards, if you try to set the
operating mode to HostAP, the card will lock up indefinitely (but
the wi(4) driver can recover if you eject the card). The problem is
that the card needs to be "reset" in a way before you even change the
media to hostap. In practice this isn't as noticeable because you
probably do some operation beforehand which prevents the lock-up
before you enable hostap mode.
e.g.:
"ifconfig wi0 up media autoselect mediaopt hostap" will lock up
(if you just inserted the card).
"ifconfig wi0 up ssid foo media autoselect mediaopt hostap" won't lock up.
davidxu [Mon, 3 Nov 2003 23:54:55 +0000 (23:54 +0000)]
It seems when su executes in a shell scripts, there is a timing race,
sometimes, su will receive a SIGTTOU when parent su tries to set child
su's process group as foreground group, and su will be stopped unexpectly,
ignoring SIGTTOU fixes the problem.
jhb [Mon, 3 Nov 2003 22:48:25 +0000 (22:48 +0000)]
- Enable SMP and 'device apic' by default.
- Compile 'device acpi' into GENERIC by default as well. Note that
the beastie loader menu item to disable ACPI still works if ACPI is
compiled into the kernel.
jhb [Mon, 3 Nov 2003 22:44:09 +0000 (22:44 +0000)]
Temporarily disable the acpi(4) module on i386 until issues revolving
SMP probing and the MADT table can be sorted out. For now, if you want
ACPI, you must compile it into your kernel statically using 'device acpi'.
jhb [Mon, 3 Nov 2003 22:42:58 +0000 (22:42 +0000)]
Don't require INTR_FAST handlers to be exclusive in the MI layer. Instead,
let the MD code choose whether or not to implement such a policy. The new
i386 interrupt code allows multiple FAST handlers for a given source for
example. However, the code does not allow FAST and non-FAST handlers to be
mixed.
jhb [Mon, 3 Nov 2003 22:36:43 +0000 (22:36 +0000)]
- Always allocate the maximum size for the IRQ resource manager. Ideally
we would manage this better by having the interrupt code add each
interrupt vector to the resource map when each source is registered.
- Use the new interrupt code API for registering and tearing down interrupt
handlers.
jhb [Mon, 3 Nov 2003 22:32:04 +0000 (22:32 +0000)]
New i386 SMP code:
- The MP code no longer knows anything specific about an MP Table.
Instead, the local APIC code adds CPUs via the cpu_add() function when
a local APIC is enumerated by an APIC enumerator.
- Don't divide the argument to mp_bootaddress() by 1024 just so that we
can turn around and mulitply it by 1024 again.
- We no longer panic if SMP is enabled but we are booted on a UP machine.
- init_secondary(), the asm code between init_secondary() and ap_init()
in mpboot.s and ap_init() have all been merged together in C into
init_secondary().
- We now use the cpuid feature bits to determine if we should enable
PSE, PGE, or VME on each AP.
- Due to the change in the implementation of critical sections, acquire
the SMP TLB mutex around a slightly larger chunk of code for TLB
shootdowns.
- Remove some of the debug code from the original SMP implementation
that is no longer used or no longer applies to the new APIC code.
- Use a temporary hack to disable the ACPI module until the SMP code has
been further reorganized to allow ACPI to work as a module again.
- Add a DDB command to dump the interesting contents of the IDT.
jhb [Mon, 3 Nov 2003 22:22:04 +0000 (22:22 +0000)]
Don't probe PnP BIOS devices for PICs for now to avoid problems with those
devices claiming resources that they don't actually use. The PIC drivers
only register valid interrupt sources, so we don't need to rely on these
drivers to claim invalid IRQs to prevent their use by other drivers.
jhb [Mon, 3 Nov 2003 22:20:50 +0000 (22:20 +0000)]
- Remove explicit enabling of the BSP's APIC in the APIC_IO case and the
slave pin on the master PIC in the !APIC_IO case. The PIC drivers now
manage these details internally.
- Remove an spl0() that hasn't done anything since SMPng was first
committed.
- Update some comments that have rotted since SMPng.
jhb [Mon, 3 Nov 2003 22:18:57 +0000 (22:18 +0000)]
- Update includes.
- Use intr_suspend/resume() callouts to the interrupt code layer which
suspends and resumes all the known interrupt sources instead of calling
icu_reinit() directly.
jhb [Mon, 3 Nov 2003 22:17:44 +0000 (22:17 +0000)]
Add the ACPI MADT table APIC enumerator. This code uses the ACPI Multiple
APIC Descriptor Table to enumerate both I/O APICs and local APICs. ACPI
does not embed PCI interrupt routing information in the MADT like the MP
Table does. Instead, ACPI stores the PCI interrupt routing information
in the _PRT object under each PCI bus device. The MADT table simply
provides hints about which interrupt vectors map to which I/O APICs. Thus
when using ACPI, the existing ACPI PCI bridge drivers are sufficient to
route PCI interrupts.
jhb [Mon, 3 Nov 2003 22:12:37 +0000 (22:12 +0000)]
Add the MP Table APIC enumerator. This code uses the BIOS MP Table to
enumerate I/O APICs as well as local APICs. It also provides Host-PCI
and PCI-PCI bridge drivers to use the MP Table to route PCI interrupts.
jhb [Mon, 3 Nov 2003 21:53:38 +0000 (21:53 +0000)]
New APIC support code:
- The apic interrupt entry points have been rewritten so that each entry
point can serve 32 different vectors. When the entry is executed, it
uses one of the 32-bit ISR registers to determine which vector in its
assigned range was triggered. Thus, the apic code can support 159
different interrupt vectors with only 5 entry points.
- We now always to disable the local APIC to work around an errata in
certain PPros and then re-enable it again if we decide to use the APICs
to route interrupts.
- We no longer map IO APICs or local APICs using special page table
entries. Instead, we just use pmap_mapdev(). We also no longer
export the virtual address of the local APIC as a global symbol to
the rest of the system, but only in local_apic.c. To aid this, the
APIC ID of each CPU is exported as a per-CPU variable.
- Interrupt sources are provided for each intpin on each IO APIC.
Currently, each source is given a unique interrupt vector meaning that
PCI interrupts are not shared on most machines with an I/O APIC.
That mapping for interrupt sources to interrupt vectors is up to the
APIC enumerator driver however.
- We no longer probe to see if we need to use mixed mode to route IRQ 0,
instead we always use mixed mode to route IRQ 0 for now. This can be
disabled via the 'NO_MIXED_MODE' kernel option.
- The npx(4) driver now always probes to see if a built-in FPU is present
since this test can now be performed with the new APIC code. However,
an SMP kernel will panic if there is more than one CPU and a built-in
FPU is not found.
- PCI interrupts are now properly routed when using APICs to route
interrupts, so remove the hack to psuedo-route interrupts when the
intpin register was read.
- The apic.h header was moved to apicreg.h and a new apicvar.h header
that declares the APIs used by the new APIC code was added.
jhb [Mon, 3 Nov 2003 21:34:45 +0000 (21:34 +0000)]
Add the new atpic(4) driver for the 8259A master and slave PICs. By
default we provide 16 interrupt sources for IRQs 0 through 15. However,
if the I/O APIC driver has already registered sources for any of those IRQs
then we will silently fail to register our own source for that IRQ.
Note that i386/isa/icu.h is now specific to the 8259A and no longer
contains any info relevant to APICs. Also note that fast interrupts no
longer use a separate entry point. Instead, both fast and threaded
interrupts share the same entry point which merely looks up the appropriate
source and passes control to intr_execute_handlers().
jhb [Mon, 3 Nov 2003 21:28:54 +0000 (21:28 +0000)]
Allocate space for the intrcnt array. This array is managed in the
interrupt code layer as interrupt sources are added and handlers added
to those sources.
jhb [Mon, 3 Nov 2003 21:25:52 +0000 (21:25 +0000)]
New device interrupt code. This defines an interrupt source abstraction
that provides methods via a PIC driver to do things like mask a source,
unmask a source, enable it when the first interrupt handler is added, etc.
The interrupt code provides a table of interrupt sources indexed by IRQ
numbers, or vectors. These vectors are what new-bus uses for its IRQ
resources and for bus_setup_intr()/bus_teardown_intr(). The interrupt
code then maps that vector a given interrupt source object. When an
interrupt comes in, the low-level interrupt code looks up the interrupt
source for the source that triggered the interrupt and hands it off to
this code to execute the appropriate handlers.
By having an interrupt source abstraction, this allows us to have different
types of interrupt source providers within the shared IRQ address space.
For example, IRQ 0 may map to pin 0 of the master 8259A PIC, IRQs 1
through 60 may map to pins on various I/O APICs, and IRQs 120 through
128 may map to MSI interrupts for various PCI devices.
jhb [Mon, 3 Nov 2003 21:12:04 +0000 (21:12 +0000)]
- Always use 256 IDT entries since it is now a runtime decison as to how
many entries we use.
- Add a constant IDT_IO_INTS for the first IDT entry used for device
interrupts.
rwatson [Mon, 3 Nov 2003 21:00:16 +0000 (21:00 +0000)]
When printing ACLs, truncate user and group names if they're too long,
rather than generating an error. This is consistent with other tools
printing user and group names, and means you can read the ACL using
our tools rather than being up a creek.
PR: 56991
Submitted by: Michael Bretterklieber <mbretter@a-quadrat.at>
anholt [Mon, 3 Nov 2003 20:44:00 +0000 (20:44 +0000)]
Change the DRM_ERROR about authenticator not found back to DRM_DEBUG. It's
noisier than I expected, and I don't have the time to actually get it fixed.
iedowse [Mon, 3 Nov 2003 19:45:05 +0000 (19:45 +0000)]
Override the root server address if an IP address is specified in
the root path. This is reported to make non-PXE netbooting, such as
is used on sparc64 systems, work correctly when the TFTP server is
not the same as the root server.
PR: kern/57328
Submitted by: Per Kristian Hove <Per.Hove@math.ntnu.no>
imp [Mon, 3 Nov 2003 16:09:17 +0000 (16:09 +0000)]
Add intel EtherExpress PRO PCMCIA card ID. Well, I don't know if it
is really EtherExpress or EEPro or what, but it does appear in a
couple of ethernet cards that have appeared recently on ebay. Silicom
appears to make these cards, and they have the 82595TX chipset in
them, and sometimes uarts. The ex driver needs some work to support
these cards, but I thought I'd get the device into pccarddevs.
harti [Mon, 3 Nov 2003 12:41:27 +0000 (12:41 +0000)]
Terminate the execl() argument list with (char *)NULL instead of 0.
The later is wrong and may fail on sizeof(char *) != sizeof(int)
machines. The patch has already been sent to and accepted by the
diffutils author, but the file is already off the vendor branch, so
correct it here in the meanwhile too.