X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=kernel%2Fspinlock.c;h=4b082b5cac9eedfd7c31daef7e8dd02974eedbed;hb=0375ec5899a37e80af7be8e813548df3292325ff;hp=5cdd8065a3ce32f6cecadd5a99a59a8ebc937613;hpb=12679a2d7e3bfbdc7586e3e86d1ca90c46659363;p=~andy%2Flinux diff --git a/kernel/spinlock.c b/kernel/spinlock.c index 5cdd8065a3c..4b082b5cac9 100644 --- a/kernel/spinlock.c +++ b/kernel/spinlock.c @@ -34,6 +34,20 @@ #else #define raw_read_can_lock(l) read_can_lock(l) #define raw_write_can_lock(l) write_can_lock(l) + +/* + * Some architectures can relax in favour of the CPU owning the lock. + */ +#ifndef arch_read_relax +# define arch_read_relax(l) cpu_relax() +#endif +#ifndef arch_write_relax +# define arch_write_relax(l) cpu_relax() +#endif +#ifndef arch_spin_relax +# define arch_spin_relax(l) cpu_relax() +#endif + /* * We build the __lock_function inlines here. They are too large for * inlining all over the place, but here is only one user per function