opnsense-src/sys/powerpc
Nathan Whitehorn e69dff491d Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64)
instead of a PCPU field for curthread. This averts a race on SMP systems
with a high interrupt rate where the thread looking up the value of
curthread could be preempted and migrated between obtaining the PCPU
pointer and reading the value of pc_curthread, resulting in curthread being
observed to be the current thread on the thread's original CPU. This played
merry havoc with the system, in particular with mutexes. Many thanks to
jhb for helping me work this one out.

Note that Book-E is in principle susceptible to the same problem, but has
not been modified yet due to lack of Book-E hardware.

MFC after:	2 weeks
2011-06-23 22:21:28 +00:00
..
aim Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64) 2011-06-23 22:21:28 +00:00
booke Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64) 2011-06-23 22:21:28 +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 Follow up r222980 on PowerPC: add sound(4) and common device drivers 2011-06-11 12:34:08 +00:00
cpufreq Remove unused variables. Spotted by a cppcheck 2011-01-06 20:19:01 +00:00
fpu The NetBSD Foundation has granted permission to remove clause 3 and 4 from 2010-03-03 17:07:02 +00:00
include Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64) 2011-06-23 22:21:28 +00:00
mambo Fix the interrupt code, broken 7 months ago. The interrupt framework 2011-01-29 20:58:38 +00:00
mpc85xx MFC 2011-05-29 00:59:38 +00:00
ofw Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64) 2011-06-23 22:21:28 +00:00
powermac Add new fan controller driver for the G4 MDD PowerMac. Submitted and tested 2011-06-04 15:17:35 +00:00
powerpc Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64) 2011-06-23 22:21:28 +00:00
ps3 Use atomic operations to mask and unmask IRQs. This prevents a problem 2011-06-23 04:35:45 +00:00
psim Fix the interrupt code, broken 7 months ago. The interrupt framework 2011-01-29 20:58:38 +00:00