Messages in this thread | | | From | Ohad Ben-Cohen <> | Date | Sat, 6 Jun 2015 06:28:48 +0300 | Subject | Re: [PATCH RFC] hwspinlock: Don't take software spinlock before hwspinlock |
| |
On Sat, Jun 6, 2015 at 2:50 AM, Jeffrey Hugo <jhugo@codeaurora.org> wrote: > If you still wish to scope out a capability based alternative, would you > please provide some details about how you envision it working? An example > of the API, how it would be used, future usecases that might be covered by > it, etc. That would give us specifics we can discuss and weigh the merits > of.
How about: - add a 'hwcaps' member to hwspinlock_device, and define single cap called HWL_CAP_ALLOW_RAW - add new 'hwcaps' parameter to hwspin_lock_register - omap_hwspinlock.c will pass NULL, qcom_hwspinlock will pass HWL_CAP_ALLOW_RAW - hwspin_lock_register will set hwcaps accordingly - before a lock is taken in RAW mode, the capabilities are checked - document everything nicely
Unless I'm missing something, it should take 5 minutes or less. For reference, feel free to check out mmc_host's caps member and its usage.
Thanks, Ohad.
| |