[PATCH RFC v2 0/2] hwspinlock: Introduce raw capability for hwspinlock_device

Lina Iyer
2015-06-09T16:25:40Z

This patch follows the discussion based on the first RFC series posted on the
mailing list [1]. The discussion resulted in a couple of directives for
hwspinlocks that do not want the framework imposing a s/w spinlock around the
hwspinlock.

i. The default should only be a s/w spinlock around the hwspinlock to ensure
correctness of locking.

ii. Existing users may not use raw capability, unless the platform registers
support for it.

iii. Platform driver for hwspinlock should dictate which locks can be operated
in raw mode.

iv. Platform driver and the hw holds the responsibility to ensure the
correctness of acquiring the hwspinlock.

This patchset implements these directives.

Changes since RFC v1:
- Introduce 'raw' capability for hwspinlocks.
- Platform code now has to explicitly specify the raw capability of a lock.
- Check to ensure that only those locks explicitly marked as raw capable can be
locked/unlocked through the _raw api
- QCOM patch for making lock #7 raw capable added.
- Add documentation

Thanks,
Lina

[1]. https://patches.linaro.org/47895/

Lina Iyer (2):
hwspinlock: Introduce raw capability for hwspinlocks
hwspinlock: qcom: Lock #7 is special lock, uses dynamic proc_id

Documentation/hwspinlock.txt | 16 +++++++
drivers/hwspinlock/hwspinlock_core.c | 75 +++++++++++++++++++-------------
drivers/hwspinlock/hwspinlock_internal.h | 6 +++
drivers/hwspinlock/qcom_hwspinlock.c | 22 +++++++---
include/linux/hwspinlock.h | 41 +++++++++++++++++
5 files changed, 125 insertions(+), 35 deletions(-)

--
2.1.4