alfred [Thu, 30 Nov 2000 20:04:44 +0000 (20:04 +0000)]
This is a fix for a problem described in PR kern/19572. It was
recently discussed at -hackers. The problem is a null-pointer
dereference that happens in kern/vfs_lookup.c when accessing ".."
with a v_mount entry for the current directory vnode of NULL. This
happens when a volume is forcibly unmounted, and the vnode for a
working directory in the mounted volume is cleared.
PR: 23191
Submitted by: Thomas Moestl <tmoestl@gmx.net>
marcel [Thu, 30 Nov 2000 05:23:49 +0000 (05:23 +0000)]
Don't use p->p_sigstk.ss_flags to keep state of whether the
process is on the alternate stack or not. For compatibility
with sigstack(2) state is being updated if such is needed.
We now determine whether the process is on the alternate
stack by looking at its stack pointer. This allows a process
to siglongjmp from a signal handler on the alternate stack
to the place of the sigsetjmp on the normal stack. When
maintaining state, this would have invalidated the state
information and causing a subsequent signal to be delivered
on the normal stack instead of the alternate stack.
peter [Thu, 30 Nov 2000 01:53:02 +0000 (01:53 +0000)]
Increase NKPT from 17 to 30. This fixes the 4GB ram boot panic on both
-current and RELENG_4 with GENERIC.
NKPT is the number of initial bootstrap page table pages we create for
the kernel during startup. Once VM is up, we resize it as needed, but
with 4G ram, the size of the vm_page_t structures was pushing it over
the limit. The fact that trimmed down kernels boot on 4G ram machines
suggests that we were pretty close to the edge.
The "30" is arbitary, but smaller than the 'nkpt' variable on all
machines that I checked.
jhb [Thu, 30 Nov 2000 00:51:16 +0000 (00:51 +0000)]
Fix up priority propagation:
- Use a better test for determining when a process is running.
- Convert some checks to assertions.
- Remove unnecessary tests.
- Save the priority before acquiring a mutex rather than in msleep(9).
jhb [Wed, 29 Nov 2000 20:22:34 +0000 (20:22 +0000)]
Display the name of the mutex we are blocked on in the state field. To
differentiate mutex names from wait channel names, prefix mutex names with
an asterisk.
jhb [Wed, 29 Nov 2000 20:10:54 +0000 (20:10 +0000)]
- Add a p_mtxname field to proc which points to the description of the
mutex a process is blocked on or NULL.
- Add a corresponding field e_mtxname to eproc.
- Fix a spelling nit in a comment.
jon [Wed, 29 Nov 2000 19:38:25 +0000 (19:38 +0000)]
This fixes several problems with CIS as suggested by Justin Gibbs:
4) The cardbus CIS code treats the CIS_PTR as a mapping register if
it is mentioned in the CIS. I don't have a spec handy to understand
why the CIS_PTR is mentioned in the CIS, but allocating a memory range
for it is certainly bogus. My patch ignores bar #6 to prevent the
mapping.
[The pccard spec says that BAR 0 and 7 (-1 and 6 in thic case since we
did a minus one) is "reserved". The off by 1 error has been fixed.
also bar=5 is invalid for IO maps, so we check it.]
5) The CIS code allocated duplicate resources to those already found
by cardbus_add_resources(). The fix is to pass in the bar computed
from the CIS instead of the particular resource ID for that bar,
so bus_generic_alloc_resource succeeds in finding the old resource.
[fixed, also removed superfluous (and incorrect) writing back to the
PCI config space.]
7) The CIS code seems to use the wrong bit to determine rather a particular
register mapping is for I/O or memory space. From looking at the
two cards I have, it seems TPL_BAR_REG_AS should be 0x10 instead
of 0x08. Otherwise, all registers that should be I/O mapped gain
a second mapping in memory space.
[Oops, the spec does say 0x10..., fixed]
rwatson [Wed, 29 Nov 2000 19:19:06 +0000 (19:19 +0000)]
o Add a PATH statement to the beginning of make-localhost, making it
work right when the administrator has modified their runtime environment
in a manner not anticipated by our script.
jhb [Wed, 29 Nov 2000 18:41:19 +0000 (18:41 +0000)]
Use an atomic operation with an appropriate memory barrier when releasing
a contested sleep mutex in the case that at least two processes are blocked
on the contested mutex.
jhb [Wed, 29 Nov 2000 18:38:14 +0000 (18:38 +0000)]
The sched_lock mutex goes after the sio mutex in the locking order since
a software interrupt can be scheduled in the sio interrupt handler while
the sio mutex is held.
jhb [Tue, 28 Nov 2000 23:52:36 +0000 (23:52 +0000)]
Don't wait forever for CPUs to stop or restart. Instead, give up after a
timeout. If DIAGNOSTIC is turned on, then display a message to the console
with a map of which CPUs failed to stop or restart. This gives an SMP box
at least a fighting chance of getting into DDB if one of the other CPUs has
interrupts disabled.
msmith [Tue, 28 Nov 2000 19:28:22 +0000 (19:28 +0000)]
MFS:
Fix amr_map_command so that 40LD-specific commands get the scatter-gather
list count in the right place. I don't understand why AMI did it like
this, but now the AMI MegaManager can talk to the newer (1600 and later)
controllers.
Remove an unused variable.
Include <machine/clock.h> when necessary.
Tweak some debugging levels to make things more intelligible.
charnier [Tue, 28 Nov 2000 18:17:15 +0000 (18:17 +0000)]
Remove .Op when arg is required (special | filesystem). Document that at
least one flag is required and check this in the code. Make use of getopt(3).
Generalyze printing `... remains unchanged ...'.
mdodd [Tue, 28 Nov 2000 06:49:15 +0000 (06:49 +0000)]
Alter the return value and arguments of the GET_RESOURCE_LIST bus method.
Alter consumers of this method to conform to the new convention.
Minor cosmetic adjustments to bus.h.
This isn't of concern as this interface isn't in use yet.
jon [Tue, 28 Nov 2000 00:52:40 +0000 (00:52 +0000)]
1) When mucking with mapping registers, it is best to *not* have
io or memory space access enabled. This patch defers the setting
of these bits until after all of the mapping registers are probed.
It might be even better to defer this until a particular mapping
is activated and to disable that type of access when a new
register is activated.
2) The PCI spec is very explicit about how mapping registers and
the expansion ROM mapping register should be probed. This patch
makes cardbus_add_map() follow the spec.
3) The PCI spec allows a device to use the same address decoder for
expansion ROM access as is used for memory mapped register access.
This patch carefully enables and disables ROM access along with
resource (de)activiation.
This doesn't include the prefetching detection stuff (maybe later when code is written to actually turn on prefetching). It also does not use the PCI definitions (yet, I'll try to put this in all at once later)
jon [Tue, 28 Nov 2000 00:05:20 +0000 (00:05 +0000)]
A bunch of newcard/cardbus changes that's been sitting in my tree for a while:
- Make pccbb/cardbus kld loadable and unloadable.
- Make pccbb/cardbus use the power interface from pccard instead of inventing its own.
- some other minor fixes