freebsd-src/sys/ia64
Marcel Moolenaar d87d5bbf82 The ptc.g operation for the Mckinley and Madison processors has the
side-effect of purging more than the requested translation. While
this is not a problem in general, it invalidates the assumption made
during constructing the trapframe on entry into the kernel in SMP
configurations. The assumption is that only the first store to the
stack will possibly cause a TLB miss. Since the ptc.g purges the
translation caches of all CPUs in the coherency domain, a ptc.g
executed on one CPU can cause a purge on another CPU that is
currently running the critical code that saves the state to the
trapframe. This can cause an unexpected TLB miss and with interrupt
collection disabled this means an unexpected data nested TLB fault.

A data nested TLB fault will not save any context, nor provide a
way for software to determine what caused the TLB miss nor where
it occured. Careful construction of the kernel entry and exit code
allows us to handle a TLB miss in precisely orchastrated points
and thereby avoiding the need to wire the kernel stack, but the
unexpected TLB miss caused by the ptc.g instructution resulted in
an unrecoverable condition and resulting in machine checks.

The solution to this problem is to synchronize the kernel entry
on all CPUs with the use of the ptc.g instruction on a single CPU
by implementing a bare-bones readers-writer lock that allows N
readers (= N CPUs entering the kernel) and 1 writer (= execution
of the ptc.g instruction on some CPU). This solution wins over
a rendez-vous approach by not interrupting CPUs with an IPI.

This problem has not been observed on the Montecito.

PR:		ia64/147772
MFC after:	6 days
2010-06-12 01:45:29 +00:00
..
acpica Some code churn: 2010-02-14 16:56:24 +00:00
compile
conf Change USB_DEBUG to #ifdef and allow it to be turned off. Previously this had 2010-04-22 21:31:34 +00:00
disasm Fix disassembly of the invala, itc, itr and hint instructions 2007-10-16 02:49:40 +00:00
ia32 Change ia64' struct syscall_args definition so that args is a pointer to 2010-05-24 17:24:14 +00:00
ia64 The ptc.g operation for the Mckinley and Madison processors has the 2010-06-12 01:45:29 +00:00
include Bump MAX_BPAGES from 256 to 1024. It seems that a few drivers, bge(4) 2010-06-11 03:00:32 +00:00
isa Remove isa_irq_pending(). It's not used. 2009-04-24 03:43:20 +00:00
pci Disable interrupts when calling into SAL for PCI configuration 2010-03-22 03:06:11 +00:00