<div dir="ltr"><div><div><div>Hi,<br></div>   Acked-by: Steve zhan <a href="mailto:zhanzhenbo@gmail.com">zhanzhenbo@gmail.com</a><br> <br>   "I'd rather not test the spinlocks after they are registering as they<br>


might already be in use by then."<br><br></div>    Why? I think user must use it after hwspin_lock_register have retured sucess.<br><br><br></div>Steve<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">

2012/12/30 Ido Yariv <span dir="ltr"><<a href="mailto:ido@wizery.com" target="_blank">ido@wizery.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Steve,<br>
<div class="im"><br>
On Sat, Dec 29, 2012 at 05:19:08PM +0800, steve.zhan wrote:<br>
> Hi,<br>
><br>
>     It is good idea add this feature.<br>
><br>
> 1: Can we let the "ret = hwspin_lock_tests(ops, hwlock);" add after<br>
> hwspin_lock_register_single have return<br>
> succeed, that can avoid test duplicated Or error lockid. Of course, If<br>
> this interface is intend to test soc hardware capability only, we can<br>
> put it in the arch module not this core framework. For driver hardware<br>
> sanity check, i would add it after software have register it.<br>
<br>
</div>I'd rather not test the spinlocks after they are registering as they<br>
might already be in use by then.<br>
<br>
While this feature only verifies the underlying platform implementation,<br>
I think it's best to avoid code duplication and keep it in one place<br>
that will always get called.<br>
<div class="im"><br>
> 2:Is it possible that interface add configs that choose which locks<br>
> will be test? Because the hwspinlock module is init late in<br>
> postcore_initcall phase, Maybe MACH/ARCH code(for example: code in<br>
> early_initcall) need use private other interfaces to lock some<br>
> hwspinlocks and then register hw locks to hwspinlock framework, Maybe<br>
> some hw locks is in lock status but which test failed.<br>
<br>
</div>It was assumed that up to the point where the hw spinlocks are<br>
registered they will not be used, regardless of when this module is<br>
initialized.<br>
If this assumption does not hold for your platform, the simplest<br>
solution would be to set this config option to 'N', as there is no safe<br>
way of verifying spinlocks that are actively being used.<br>
<br>
Thanks for reviewing this,<br>
Ido.<br>
</blockquote></div><br><br clear="all"><br>-- <br>Steve Zhan
</div>