summaryrefslogtreecommitdiffstats
path: root/sys/arch/hppa/include/mutex.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Define and use IPL_MPFLOOR in our common mutex implementation.mpi2018-01-131-2/+2
| | | | ok kettenis@, visa@
* Unify <machine/mutex.h> a bit further.mpi2018-01-041-2/+2
| | | | | | | Remove `mtx_lock' from i386, add volatile before `mtx_owner' where it was missing. Inputs from kettenis@, ok visa@
* Hook up mutex(9) to witness(4).visa2017-04-201-6/+20
|
* rework hppa mutexes.dlg2015-05-021-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | this is largely based on src/sys/arch/alpha/alpha/mutex.c r1.14 and src/sys/arch/sgi/sgi/mutex.c r1.15 always and explicitely record which cpu owns the lock (or NULL if noone owns it). improve the mutex diagnostics/asserts so they operate on the mtx_owner field rather than mtx_lock. previously the asserts would assume the lock cpu owns the lock if any of them own the lock, which blows up badly. hppa hasnt got good atomic cpu opcodes, so this still relies on ldcws to serialise access to the lock. while im here i also shuffled the code. on MULTIPROCESSOR systems instead of duplicating code between mtx_enter and mtx_enter_try, mtx_enter simply loops on mtx_enter_try until it succeeds. this also provides an alternative implementation of mutexes on !MULTIPROCESSOR systems that avoids interlocking opcodes. mutexes wont contend on UP boxes, theyre basically wrappers around spls. we can just do the splraise, stash the owner as a guard value for DIAGNOSTIC and return. similarly, mtx_enter_try on UP will never fail, so we can just call mtx_enter and return 1. tested by and ok kettenis@ jsing@
* To prevent lock ordering problems with the kernel lock, we need to make surekettenis2014-01-301-3/+18
| | | | | | | | | | | we block all interrupts that can grab the kernel lock. The simplest way to achieve this is to make sure mutexes always raise the ipl to the highest level that has interrupts that grab the kernel lock. This will allow us to have "mpsafe" interrupt handlers at lower priority levels. No change for non-MULTIPROCESSOR kernels. Tested by juanfra@
* GCC doesn't respect the aligned attribute for automatic variables. Sokettenis2010-01-101-7/+9
| | | | | | | | having mutexes on the stack, like dlg@ added recently to the scsi code, doesn't work on hppa. So instead of relying on mutexes being properly alligned just reserve 4 words and use the one that has the proper alignment. ok miod@
* Implement MP safe mutexes for hppa.jsing2009-12-291-9/+11
| | | | ok kettenis@
* Define MUTEX_OLDIPL where they were missing, will be used (reasonably) shortly.miod2007-05-051-1/+3
|
* Simple single-processor only mutex implementation.miod2007-05-051-0/+59