freebsd-dev/sys/ia64
Marcel Moolenaar fb4aa34f3b Unconditionally restore ar.k7 (memory stack) and ar.k6 (register stack)
when returning from an interrupt. Both registers are used on interrupt
to switch to the right kernel stack, but other than that they are not
used. This means we only have to make sure they contain proper values
while in user mode. As such, we conditionally restored these registers
based on whether we returned to userland or not. A nice property of
conditionally restoring ar.k6 and ar.k7 is that it introduces two
invariants: ar.k6 always points to the bottom of the kernel stack and
ar.k7 always points to the top of the kernel stack (immediately below
the PCB we have there).

However, the EPC syscall path introduces an irregularity: there's no
"thin red line" between user and kernel. There's a grey area that's a
couple of instructions wide. Any interruption in that grey area is
bound to see an inconsistent state. One such state is that we're in
kernel space for all practical purposes, but we still need to have
ar.k6 and ar.k7 restored as if we're in userland.

Thus: restore ar.k6 and ar.k7 unconditionally at the cost of losing
a valuable invariant. Both registers now hold the extend of the
usable portion of the kernel stack at any interrupt nesting, which
when in userland mean the bottom and the top of the kstack.
2003-05-24 20:51:55 +00:00
..
acpica Don't hardcode the address of the local (S)APIC (aka processor 2003-01-05 22:14:30 +00:00
compile Don't need the .keep_me files. Obrien and I committed past each other. 2001-07-01 23:35:44 +00:00
conf Add FireWire drivers to GENERIC. 2003-04-21 16:44:05 +00:00
ia32 Revamp of the syscall path, exception and context handling. The 2003-05-16 21:26:42 +00:00
ia64 Unconditionally restore ar.k7 (memory stack) and ar.k6 (register stack) 2003-05-24 20:51:55 +00:00
include Fix an alpha inheritance bug: 2003-05-24 00:17:34 +00:00
isa Tidy up some loose ends. 2002-04-29 07:43:16 +00:00
pci Delete legacy pcib code - we can't possibly work without acpi on ia64. 2001-10-06 10:09:57 +00:00