summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_rssadapt.c
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2010-06-12 01:45:29 +0000
committermarcel <marcel@FreeBSD.org>2010-06-12 01:45:29 +0000
commitbd74f111f8552bb14916c8a5094c76e877c6859b (patch)
tree25986d870179efe2c31a082a1c79ecdfb3091138 /sys/net80211/ieee80211_rssadapt.c
parent4c502da7ff2e402a32fac30f893cc0fdbc0219bb (diff)
downloadFreeBSD-src-bd74f111f8552bb14916c8a5094c76e877c6859b.zip
FreeBSD-src-bd74f111f8552bb14916c8a5094c76e877c6859b.tar.gz
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
Diffstat (limited to 'sys/net80211/ieee80211_rssadapt.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud