Messages in this thread | | | From | Ohad Ben-Cohen <> | Date | Fri, 5 Jun 2015 04:09:54 +0300 | Subject | Re: [PATCH RFC] hwspinlock: Don't take software spinlock before hwspinlock |
| |
On Tue, May 26, 2015 at 11:36 PM, Lina Iyer <lina.iyer@linaro.org> wrote: >> Just to make sure I understand, is this how your scenario is solved? >> >> - c1 goes down >> - c0 goes down, carries information about shared resources >> - c1 takes HWLOCK and calls into SCM, stuck handling FIQs >> - c0 wants to call into SCM but is waiting spinning on HWLOCK >> - c1 completes handling FIQs, goes idle, HWLOCK is released by secure monitor >> - c0 takes HWLOCK, calls into SCM, shared resources handled correctly, >> >> HWLOCK in this example is a single shared hwspinlock accessible by c0, >> c1 and secure monitor. >> > That is correct.
Ok, thanks.
If we adopt the proposed approach in your patch, I'm thinking maybe we should restrict it only to hardware implementations that explicitly allow it, using some hardware capability flag published by the hwspinlock driver.
In OMAP, e.g., it is prohibited to spin on this hwlock for a long period of time, so such a hw cap flag would allow you guys to enable this behaviour specifically for your driver.
What do you think?
Thanks, Ohad.
| |