1. 22 9月, 2011 2 次提交
    • J
      hwspinlock/core: use a mutex to protect the radix tree · 93b465c2
      Juan Gutierrez 提交于
      Since we're using non-atomic radix tree allocations, we
      should be protecting the tree using a mutex and not a
      spinlock.
      
      Non-atomic allocations and process context locking is good enough,
      as the tree is manipulated only when locks are registered/
      unregistered/requested/freed.
      
      The locks themselves are still protected by spinlocks of course,
      and mutexes are not involved in the locking/unlocking paths.
      
      Cc: <stable@kernel.org>
      Signed-off-by: NJuan Gutierrez <jgutierrez@ti.com>
      [ohad@wizery.com: rewrite the commit log, #include mutex.h, add minor
      commentary]
      [ohad@wizery.com: update register/unregister parts in hwspinlock.txt]
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      93b465c2
    • O
      hwspinlock/core: simplify 'owner' handling · e467b642
      Ohad Ben-Cohen 提交于
      Use struct device_driver's owner member instead of asking drivers to
      explicitly pass the owner again.
      
      This simplifies drivers and also save some memory, since there's no
      point now in maintaining a separate owner pointer per hwspinlock.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      e467b642
  2. 18 2月, 2011 1 次提交
    • O
      drivers: hwspinlock: add framework · bd9a4c7d
      Ohad Ben-Cohen 提交于
      Add a platform-independent hwspinlock framework.
      
      Hardware spinlock devices are needed, e.g., in order to access data
      that is shared between remote processors, that otherwise have no
      alternative mechanism to accomplish synchronization and mutual exclusion
      operations.
      Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
      Cc: Hari Kanigeri <h-kanigeri2@ti.com>
      Cc: Benoit Cousson <b-cousson@ti.com>
      Cc: Kevin Hilman <khilman@ti.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Paul Walmsley <paul@pwsan.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Acked-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NTony Lindgren <tony@atomide.com>
      bd9a4c7d