Warner Losh [Sat, 25 Aug 2001 06:40:00 +0000 (06:40 +0000)]
First cut at getting the ISA routing working. If we can't route a PCI
interrupt for the CSC interrupt, then we revert to ISA. If we didn't
have an interrupt set up with hw.pcic.irq, then do polling.
Also, don't complain about ignoring function 1 for any devices except
pcic devices. This would normally only show up if someone set
hw.pcic.ignore_function_1=1.
MFC: as soon as I can test it on some troublesome laptops.
Peter Wemm [Sat, 25 Aug 2001 02:20:02 +0000 (02:20 +0000)]
Optionize UPAGES for the i386. As part of this I split some of the low
level implementation stuff out of machine/globaldata.h to avoid exposing
UPAGES to lots more places. The end result is that we can double
the kernel stack size with 'options UPAGES=4' etc.
This is mainly being done for the benefit of a MFC to RELENG_4 at some
point. -current doesn't really need this so much since each interrupt
runs on its own kstack.
Bosko Milekic [Fri, 24 Aug 2001 23:00:59 +0000 (23:00 +0000)]
Force a commit on kern_mutex.c to explain reason for last commit but while
I'm at it also add a comment in mtx_validate() explaining the purpose
of the last change.
Basically, this fixes booting kernels compiled with MUTEX_DEBUG. What used
to happen is before we setidt from init386() [still using BTX idt], we
called mtx_init() on several mutex locks, notably Giant and some others.
This is a problem for MUTEX_DEBUG because it enables mtx_validate() which
calls kernacc(), some of which in turn requires Giant.
Fix by calling kernacc() from mtx_validate() only if (!cold).
Brian Somers [Fri, 24 Aug 2001 21:39:27 +0000 (21:39 +0000)]
Rename the DIAGNOSTICS section to RETURN VALUES and describe the
return values a little more. Specifically, mention that a return
of 0 from NgRecvData() and NgRecvMsg() means the socket has been
closed.
Matthew Dillon [Fri, 24 Aug 2001 19:45:59 +0000 (19:45 +0000)]
Ok, third time is the charm. VM_INHERIT_XXX -> INHERIT_XX (use the same
semantics as PROT_XXX vs VM_PROT_XXX separating user-space defines from
kernel defines).
Matthew Dillon [Fri, 24 Aug 2001 19:28:00 +0000 (19:28 +0000)]
Update the mmap.2 and minherit.2 manual pages. Add a short explanation and
referal from mmap to minherit for MAP_INHERIT. Fully document the
minherit.2 manual page (because frankly, my dear, however you think it
currently works is almost certainly wrong!). I may soon re-implement
MAP_COPY because I believe we can support it properly now, but I will have
to call it something else and that is for a later time.
Matthew Dillon [Fri, 24 Aug 2001 18:22:46 +0000 (18:22 +0000)]
Remove MAP_NOEXTEND. It came from 4.4-lite and not only was never
implemented, but mmap()'s default behavior is *already* to not extend
files. Only write() or ftruncate() can extend a file.
Warner Losh [Fri, 24 Aug 2001 17:29:42 +0000 (17:29 +0000)]
Explain what we're doing in pcic_pci_shutdown a little better. Try to
explain the subtle side effects that are going to happen and why we go
ahead and ack the interrupt source. This stuff is tricky to get
right.
Also, emperical tests have shown that doing a shutdown in attach to be
ineffectual, so remove it from there. Analysis of the code paths
shows that nearly identical writes to these registers happen in later
parts of the code. The hanging problem on thinkpads when we change
the interrupt routing type is something else.
Warner Losh [Fri, 24 Aug 2001 07:43:35 +0000 (07:43 +0000)]
Move code to shutdown the pcic_pci_shutdown. Call it on system
shutdown and also before we get going with the device initialization.
This may fix the hangs some people are seeing on warmboot. It appears
that some machines will reset the cardbus bridge on boot, while others
don't. So we turn off the card, and ack the interrupts (which likely
is a nop in the shutdown case since we're still fielding interrupts).
This should turn off the interrupts.
Since I don't have hardware that hangs on reboot, I'm committing this
without testing that aspect of the patch (it causes no harm on my
Dell).
Warner Losh [Fri, 24 Aug 2001 07:30:18 +0000 (07:30 +0000)]
Two fixes. First, put into place a more generic chipset specific
initialization structure. Warn the user for those chipsets that
aren't yet customized that they might not work. Second, try to power
off the slot on attach and ack the interrupts. I don't know, but this
might solve the hangs that people will see on Thinkpads if they set
hw.pcic.init_routing=1.
Nick Sayer [Fri, 24 Aug 2001 02:14:26 +0000 (02:14 +0000)]
In order for the MA301 to pass interrupts from the PCCard, you must
go into the PLX 9052's interrupt control register and turn on the magic
interrupt enable bit.
Partial thanks are due to OpenBSD for pointing out that the chip is a
PLX 9052 and pointing me to the datasheet PDF.
John Baldwin [Thu, 23 Aug 2001 22:44:47 +0000 (22:44 +0000)]
Convert some KASSERT()'s into if (foo) panic() because they are testing
how locks are managed by the rest of the kernel, not verifying the internal
integrity of witness itself.
John Baldwin [Thu, 23 Aug 2001 20:32:21 +0000 (20:32 +0000)]
Add a new kernel option RESTARTABLE_PANICS. If this option is present,
then one can restart from a panic by resetting the panicstr variable to
NULL. This commit conditionalizes the previously committed functionality
on this variable. It also removes the __dead2 attribute from the panic()
function so that when one continues from a panic() the behavior will
be predictable.
Bill Paul [Thu, 23 Aug 2001 18:22:55 +0000 (18:22 +0000)]
Fix a bug in the ste_setmulti() routine. The NIC has 4 16-bit multicast
hash registers, not 2 32-bit ones. This would prevent the multicasr filter
from being programmed correctly in some cases.
Andrew Gallatin [Thu, 23 Aug 2001 17:08:26 +0000 (17:08 +0000)]
Bail if we go beyond the directory size, not just if we hit it.
Certain ISO fs's (like the one for 4.4-RC1 disc1 on alpha)
trigger this, and we end up opening a null file name. This causes us to get
a false match for "kernel.ko" when it does not exist.