[PATCH] hwspinlock/core: Add testing capabilities
Ido Yariv
ido at wizery.com
Sun Dec 30 10:17:22 EST 2012
Hi Steve,
On Sun, Dec 30, 2012 at 10:56:53PM +0800, steve.zhan wrote:
> Thanks, Ido.
>
> I think if hwspinlock mudule probe register have not return 0 Or
> executed over, we can assume that system can not do acquire the
>
> lock, that must be later than hardware module register..
That's actually not what I was concerned about. If
hwspin_lock_register_single returns 0, anyone could potentially request
and acquire that lock. If we then call hwspin_lock_tests it could
potentially fail since the lock might already be acquired and the first
call to trylock will not succeed.
Since there's no real advantage in testing the locks after registering
them, I suggest we keep the current implementation.
Thanks,
Ido.
More information about the linux-arm-kernel
mailing list