summaryrefslogtreecommitdiff
path: root/include/media/adv7842.h
diff options
context:
space:
mode:
authorNicholas Mc Guire <der.herr@hofr.at>2014-01-02 09:18:42 (GMT)
committerScott Wood <scottwood@freescale.com>2015-02-13 22:20:45 (GMT)
commit937634f2854358d3cf38e95e2fd271cf0c24c7fe (patch)
treea904e05790b9c557c29b96d30b87a27051cb5a1b /include/media/adv7842.h
parent805d5a3b8703a518c76fd7a6b14a46af251de054 (diff)
downloadlinux-fsl-qoriq-937634f2854358d3cf38e95e2fd271cf0c24c7fe.tar.xz
write_lock migrate_disable pushdown to rt_write_lock
pushdown of migrate_disable/enable from write_*lock* to the rt_write_*lock* api level general mapping of write_*lock* to mutexes: write_*lock* `-> rt_write_*lock* `-> __spin_lock (the sleeping __spin_lock) `-> rt_mutex write_*lock*s are non-recursive so we have two lock chains to consider - write_trylock*/write_unlock - write_lock*/wirte_unlock for both paths the migration_disable/enable must be balanced. write_trylock* mapping: write_trylock_irqsave `-> rt_write_trylock_irqsave write_trylock \ `--------> rt_write_trylock ret = rt_mutex_trylock rt_mutex_fasttrylock rt_mutex_cmpxchg if (ret) migrate_disable write_lock* mapping: write_lock_irqsave `-> rt_write_lock_irqsave write_lock_irq -> write_lock ----. \ write_lock_bh -+ \ `-> rt_write_lock __rt_spin_lock() rt_spin_lock_fastlock() rt_mutex_cmpxchg() migrate_disable() write_unlock* mapping: write_unlock_irqrestore. write_unlock_bh -------+ write_unlock_irq -> write_unlock ----------+ `-> rt_write_unlock() __rt_spin_unlock() rt_spin_lock_fastunlock() rt_mutex_cmpxchg() migrate_enable() So calls to migrate_disable/enable() are better placed at the rt_write_* level of lock/trylock/unlock as all of the write_*lock* API has this as a common path. This approach to write_*_bh also eliminates the concerns raised with regards to api inbalances (write_lock_bh -> write_unlock+local_bh_enable) Tested-by: Carsten Emde <C.Emde@osadl.org> Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Diffstat (limited to 'include/media/adv7842.h')
0 files changed, 0 insertions, 0 deletions