<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/hwspinlock, branch v3.2.53</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.53</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v3.2.53'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2013-04-25T19:25:32Z</updated>
<entry>
<title>hwspinlock: fix __hwspin_lock_request error path</title>
<updated>2013-04-25T19:25:32Z</updated>
<author>
<name>Li Fei</name>
<email>fei.li@intel.com</email>
</author>
<published>2013-04-05T13:20:36Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f7626edc6a1273ebbeb9cf9ebdf3acfb27246386'/>
<id>urn:sha1:f7626edc6a1273ebbeb9cf9ebdf3acfb27246386</id>
<content type='text'>
commit c10b90d85a5126d25c89cbaa50dc9fdd1c4d001a upstream.

Even in failed case of pm_runtime_get_sync, the usage_count
is incremented. In order to keep the usage_count with correct
value and runtime power management to behave correctly, call
pm_runtime_put_noidle in such case.

In __hwspin_lock_request, module_put is also called before
return in pm_runtime_get_sync failed case.

Signed-off-by Liu Chuansheng &lt;chuansheng.liu@intel.com&gt;
Signed-off-by: Li Fei &lt;fei.li@intel.com&gt;
[edit commit log]
Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>hwspinlock/core: use global ID to register hwspinlocks on multiple devices</title>
<updated>2012-07-25T03:11:12Z</updated>
<author>
<name>Shinya Kuribayashi</name>
<email>shinya.kuribayashi.px@renesas.com</email>
</author>
<published>2012-07-07T10:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=1e1cdddbadc5f3044882127f3931a19f48b1a69b'/>
<id>urn:sha1:1e1cdddbadc5f3044882127f3931a19f48b1a69b</id>
<content type='text'>
commit 476a7eeb60e70ddab138e7cb4bc44ef5ac20782e upstream.

Commit 300bab9770 (hwspinlock/core: register a bank of hwspinlocks in a
single API call, 2011-09-06) introduced 'hwspin_lock_register_single()'
to register numerous (a bank of) hwspinlock instances in a single API,
'hwspin_lock_register()'.

At which time, 'hwspin_lock_register()' accidentally passes 'local IDs'
to 'hwspin_lock_register_single()', despite that ..._single() requires
'global IDs' to register hwspinlocks.

We have to convert into global IDs by supplying the missing 'base_id'.

Signed-off-by: Shinya Kuribayashi &lt;shinya.kuribayashi.px@renesas.com&gt;
[ohad: fix error path of hwspin_lock_register, too]
Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux</title>
<updated>2011-11-09T02:34:16Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-11-09T02:34:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=19e0bafc36abd84a5b4d7c7745b78a6f4626e944'/>
<id>urn:sha1:19e0bafc36abd84a5b4d7c7745b78a6f4626e944</id>
<content type='text'>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
  drivers/media: video/a5k6aa is a module and so needs module.h
  mfd: fix build failures in recently added ab5500 code
  hwspinlock/u8500: include linux/module.h
  MTD: MAPS: bcm963xx-flash.c: explicitly include module.h
</content>
</entry>
<entry>
<title>hwspinlock/u8500: fix build error due to undefined label</title>
<updated>2011-11-08T07:28:41Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2011-11-06T13:14:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=fdcb23634c9b6649bb02c681033d4973491b0e35'/>
<id>urn:sha1:fdcb23634c9b6649bb02c681033d4973491b0e35</id>
<content type='text'>
Fix below build error:

  CC      drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c: In function 'u8500_hsem_probe':
drivers/hwspinlock/u8500_hsem.c:113: error: label 'free_state' used but not defined

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
</content>
</entry>
<entry>
<title>hwspinlock/u8500: include linux/module.h</title>
<updated>2011-11-08T02:45:14Z</updated>
<author>
<name>Axel Lin</name>
<email>axel.lin@gmail.com</email>
</author>
<published>2011-11-06T13:16:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8f7346bdea64f2e3d02b0bcaf456e391c4cba134'/>
<id>urn:sha1:8f7346bdea64f2e3d02b0bcaf456e391c4cba134</id>
<content type='text'>
Include module.h to fix below build error:

  CC      drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c:177: error: 'THIS_MODULE' undeclared here (not in a function)
 [...]
drivers/hwspinlock/u8500_hsem.c:196: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/hwspinlock/u8500_hsem.c:196: warning: function declaration isn't a prototype
make[2]: *** [drivers/hwspinlock/u8500_hsem.o] Error 1
make[1]: *** [drivers/hwspinlock] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin &lt;axel.lin@gmail.com&gt;
Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>hwspinlock/omap: omap_hwspinlock_remove should be __devexit</title>
<updated>2011-09-21T16:57:45Z</updated>
<author>
<name>Ohad Ben-Cohen</name>
<email>ohad@wizery.com</email>
</author>
<published>2011-09-11T15:54:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=9efb4a1bb9e46d26a15116e3c72b1b81c62d8337'/>
<id>urn:sha1:9efb4a1bb9e46d26a15116e3c72b1b81c62d8337</id>
<content type='text'>
Mark omap_hwspinlock_remove with __devexit (and use __devexit_p
appropriately) so the function can be discarded when the conditions are met.

Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
</content>
</entry>
<entry>
<title>hwspinlock/u8500: add hwspinlock driver</title>
<updated>2011-09-21T16:57:45Z</updated>
<author>
<name>Mathieu J. Poirier</name>
<email>mathieu.poirier@linaro.org</email>
</author>
<published>2011-09-08T19:47:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=f84a8ecfca9229e9227c6ec84123b114ee634959'/>
<id>urn:sha1:f84a8ecfca9229e9227c6ec84123b114ee634959</id>
<content type='text'>
Add hwspinlock driver for U8500's Hsem hardware.

At this point only HSem's protocol 1 is used (i.e. no interrupts).

Signed-off-by: Mathieu Poirier &lt;mathieu.poirier@linaro.org&gt;
Acked-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
[ohad@wizery.com: adopt recent hwspin_lock_{un}register API changes]
[ohad@wizery.com: set the owner member of the driver]
[ohad@wizery.com: mark -&gt;remove() function as __devexit]
[ohad@wizery.com: write commit log]
[ohad@wizery.com: small cleanups]
Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
</content>
</entry>
<entry>
<title>hwspinlock/core: register a bank of hwspinlocks in a single API call</title>
<updated>2011-09-21T16:45:34Z</updated>
<author>
<name>Ohad Ben-Cohen</name>
<email>ohad@wizery.com</email>
</author>
<published>2011-09-06T12:39:21Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=300bab9770e2bd10262bcc78e7249fdce2c74b38'/>
<id>urn:sha1:300bab9770e2bd10262bcc78e7249fdce2c74b38</id>
<content type='text'>
Hardware Spinlock devices usually contain numerous locks (known
devices today support between 32 to 256 locks).

Originally hwspinlock core required drivers to register (and later,
when needed, unregister) each lock separately.

That worked, but required hwspinlocks drivers to do a bit extra work
when they were probed/removed.

This patch changes hwspin_lock_{un}register() to allow a bank of
hwspinlocks to be {un}registered in a single invocation.

A new 'struct hwspinlock_device', which contains an array of 'struct
hwspinlock's is now being passed to the core upon registration (so
instead of wrapping each struct hwspinlock, a priv member has been added
to allow drivers to piggyback their private data with each hwspinlock).

While at it, several per-lock members were moved to be per-device:
1. struct device *dev
2. struct hwspinlock_ops *ops

In addition, now that the array of locks is handled by the core,
there's no reason to maintain a per-lock 'int id' member: the id of the
lock anyway equals to its index in the bank's array plus the bank's
base_id.
Remove this per-lock id member too, and instead use a simple pointers
arithmetic to derive it.

As a result of this change, hwspinlocks drivers are now simpler and smaller
(about %20 code reduction) and the memory footprint of the hwspinlock
framework is reduced.

Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
</content>
</entry>
<entry>
<title>hwspinlock/core: use a mutex to protect the radix tree</title>
<updated>2011-09-21T16:45:32Z</updated>
<author>
<name>Juan Gutierrez</name>
<email>jgutierrez@ti.com</email>
</author>
<published>2011-09-06T06:30:16Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=93b465c2e186d96fb90012ba0f9372eb9952e732'/>
<id>urn:sha1:93b465c2e186d96fb90012ba0f9372eb9952e732</id>
<content type='text'>
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: &lt;stable@kernel.org&gt;
Signed-off-by: Juan Gutierrez &lt;jgutierrez@ti.com&gt;
[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: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
</content>
</entry>
<entry>
<title>hwspinlock/core/omap: fix id issues on multiple hwspinlock devices</title>
<updated>2011-09-21T16:45:32Z</updated>
<author>
<name>Ohad Ben-Cohen</name>
<email>ohad@wizery.com</email>
</author>
<published>2011-09-05T20:15:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=c3c1250e93a7ab1327a9fc49d2a22405672f4204'/>
<id>urn:sha1:c3c1250e93a7ab1327a9fc49d2a22405672f4204</id>
<content type='text'>
hwspinlock devices provide system-wide hardware locks that are used
by remote processors that have no other way to achieve synchronization.

To achieve that, each physical lock must have a system-wide id number
that is agreed upon, otherwise remote processors can't possibly assume
they're using the same hardware lock.

Usually boards have a single hwspinlock device, which provides several
hwspinlocks, and in this case, they can be trivially numbered 0 to
(num-of-locks - 1).

In case boards have several hwspinlocks devices, a different base id
should be used for each hwspinlock device (they can't all use 0 as
a starting id!).

While this is certainly not common, it's just plain wrong to just
silently use 0 as a base id whenever the hwspinlock driver is probed.

This patch provides a hwspinlock_pdata structure, that boards can use
to set a different base id for each of the hwspinlock devices they may
have, and demonstrates how to use it with the omap hwspinlock driver.

While we're at it, make sure the hwspinlock core prints an explicit
error message in case an hwspinlock is registered with an id number
that already exists; this will help users catch such base id issues.

Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
Acked-by: Tony Lindgren &lt;tony@atomide.com&gt;
</content>
</entry>
</feed>
