<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/hwspinlock, branch v3.2.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/hwspinlock?h=v3.2.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/hwspinlock?h=v3.2.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2011-11-09T02:34:16Z</updated>
<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.amat.us/linux/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.amat.us/linux/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.amat.us/linux/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.amat.us/linux/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.amat.us/linux/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.amat.us/linux/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.amat.us/linux/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.amat.us/linux/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>
<entry>
<title>hwspinlock/omap: simplify allocation scheme</title>
<updated>2011-09-21T16:45:32Z</updated>
<author>
<name>Ohad Ben-Cohen</name>
<email>ohad@wizery.com</email>
</author>
<published>2011-09-05T14:30:34Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c97f6dd0fe21dfd658c59c144a1b7fd5d8db04ac'/>
<id>urn:sha1:c97f6dd0fe21dfd658c59c144a1b7fd5d8db04ac</id>
<content type='text'>
Instead of allocating every hwspinlock separately, allocate
them all in one shot.

This both simplifies the driver and helps achieving better
slab utilization.

Reported-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
</content>
</entry>
<entry>
<title>hwspinlock/core: simplify 'owner' handling</title>
<updated>2011-09-21T16:45:32Z</updated>
<author>
<name>Ohad Ben-Cohen</name>
<email>ohad@wizery.com</email>
</author>
<published>2011-09-05T13:42:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e467b6421435f467e274d4f25d62900e1e0e4286'/>
<id>urn:sha1:e467b6421435f467e274d4f25d62900e1e0e4286</id>
<content type='text'>
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: Ohad Ben-Cohen &lt;ohad@wizery.com&gt;
</content>
</entry>
</feed>
