summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/aim/trap_subr32.S
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug where the pmap_cpu_bootstrap() ap argument could be clobbered.nwhitehorn2011-11-091-2/+3
| | | | | | | | Luckily, it mostly wasn't important, so this didn't cause major problems. Also improve register reuse when setting up trap frames very slightly. Submitted by: Justin Hibbits <chmeeedalf at gmail dot com> MFC after: 5 days
* Revert r223479. It is unnecessary and served only to slightly amelioratenwhitehorn2011-06-261-2/+0
| | | | some manifestations of the bug actually fixed in r223485.
* Use the ABI-mandated thread pointer register (r2 for ppc32, r13 for ppc64)nwhitehorn2011-06-231-4/+10
| | | | | | | | | | | | | | | 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
* Clear any outstanding atomic reservations when traps are taken. This fixesnwhitehorn2011-06-231-0/+2
| | | | | | some interesting bugs (mostly on SMP systems) with atomic operations silently failing in interrupt heavy situations, especially when using overflow pages.
* Add support for the IMISS, DLMISS, and DSMISS traps required to runnwhitehorn2010-11-111-0/+201
| | | | | | | FreeBSD on a G2 core. PR: powerpc/111296 Submitted by: Andrew Turner
* Restructure the way the copyin/copyout segment is stored to prevent anwhitehorn2010-10-301-2/+9
| | | | | | | | | | | | | | | | | concurrency bug. Since all SLB/SR entries were invalidated during an exception, a decrementer exception could cause the user segment to be invalidated during a copyin()/copyout() without a thread switch that would cause it to be restored from the PCB, potentially causing the operation to continue on invalid memory. This is now handled by explicit restoration of segment 12 from the PCB on 32-bit systems and a check in the Data Segment Exception handler on 64-bit. While here, cause copyin()/copyout() to check whether the requested user segment is already installed, saving some pipeline flushes, and fix the synchronization primitives around the mtsr and slbmte instructions to prevent accessing stale segments. MFC after: 2 weeks
* MFppc64:nwhitehorn2010-07-131-0/+678
Kernel sources for 64-bit PowerPC, along with build-system changes to keep 32-bit kernels compiling (build system changes for 64-bit kernels are coming later). Existing 32-bit PowerPC kernel configurations must be updated after this change to specify their architecture.
OpenPOWER on IntegriCloud