History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock: hwspinlock: add MAINTAINERS entries hwspinlock/omap: omap_hwspinlock_remove should be __devexit hwspinlock/u8500: add hwspinlock driver hwspinlock/core: register a bank of hwspinlocks in a single API call hwspinlock/core: remove stubs for register/unregister hwspinlock/core: use a mutex to protect the radix tree hwspinlock/core/omap: fix id issues on multiple hwspinlock devices hwspinlock/omap: simplify allocation scheme hwspinlock/core: simplify 'owner' handling hwspinlock/core: simplify Kconfig Fix up trivial conflicts (addition of omap_hwspinlock_pdata, removal of omap_spinlock_latency) in arch/arm/mach-omap2/hwspinlock.c Also, do an "evil merge" to fix a compile error in omap_hsmmc.c which for some reason was reported in the same email thread as the "please pull hwspinlock changes".

Linus Torvalds committed 15 years ago

Commit 3f8ddb02 parents 30307c6 8b37fcf11 files · +516 −226Browse files

Showing the changes to include/linux (1 of 11 files). Show all

Unified · Split

include/linux/hwspinlock.h+34−12
@@ -20,17 +20,49 @@ · 19 unmodified lines
20 20
21#include <linux/err.h>21#include <linux/err.h>
22#include <linux/sched.h>22#include <linux/sched.h>
23#include <linux/device.h>
23 24
24/* hwspinlock mode argument */25/* hwspinlock mode argument */
25#define HWLOCK_IRQSTATE 0x01 /* Disable interrupts, save state */26#define HWLOCK_IRQSTATE 0x01 /* Disable interrupts, save state */
26#define HWLOCK_IRQ 0x02 /* Disable interrupts, don't save state */27#define HWLOCK_IRQ 0x02 /* Disable interrupts, don't save state */
27 28
28struct hwspinlock;29struct hwspinlock;
30struct hwspinlock_device;
31struct hwspinlock_ops;
32
33/**
34 * struct hwspinlock_pdata - platform data for hwspinlock drivers
35 * @base_id: base id for this hwspinlock device
36 *
37 * hwspinlock devices provide system-wide hardware locks that are used
38 * by remote processors that have no other way to achieve synchronization.
39 *
40 * To achieve that, each physical lock must have a system-wide id number
41 * that is agreed upon, otherwise remote processors can't possibly assume
42 * they're using the same hardware lock.
43 *
44 * Usually boards have a single hwspinlock device, which provides several
45 * hwspinlocks, and in this case, they can be trivially numbered 0 to
46 * (num-of-locks - 1).
47 *
48 * In case boards have several hwspinlocks devices, a different base id
49 * should be used for each hwspinlock device (they can't all use 0 as
50 * a starting id!).
51 *
52 * This platform data structure should be used to provide the base id
53 * for each device (which is trivially 0 when only a single hwspinlock
54 * device exists). It can be shared between different platforms, hence
55 * its location.
56 */
57struct hwspinlock_pdata {
58 int base_id;
59};
29 60
30#if defined(CONFIG_HWSPINLOCK) || defined(CONFIG_HWSPINLOCK_MODULE)61#if defined(CONFIG_HWSPINLOCK) || defined(CONFIG_HWSPINLOCK_MODULE)
31 62
32int hwspin_lock_register(struct hwspinlock *lock);63int hwspin_lock_register(struct hwspinlock_device *bank, struct device *dev,
33struct hwspinlock *hwspin_lock_unregister(unsigned int id);64 const struct hwspinlock_ops *ops, int base_id, int num_locks);
65int hwspin_lock_unregister(struct hwspinlock_device *bank);
34struct hwspinlock *hwspin_lock_request(void);66struct hwspinlock *hwspin_lock_request(void);
35struct hwspinlock *hwspin_lock_request_specific(unsigned int id);67struct hwspinlock *hwspin_lock_request_specific(unsigned int id);
36int hwspin_lock_free(struct hwspinlock *hwlock);68int hwspin_lock_free(struct hwspinlock *hwlock);
@@ -94,16 +126,6 @@ static inline int hwspin_lock_get_id(struct hwspinlock *hwlock) · 57 unmodified lines
94 return 0;126 return 0;
95}127}
96 128
97static inline int hwspin_lock_register(struct hwspinlock *hwlock)
98{
99 return -ENODEV;
100}
101
102static inline struct hwspinlock *hwspin_lock_unregister(unsigned int id)
103{
104 return NULL;
105}
106
107#endif /* !CONFIG_HWSPINLOCK */129#endif /* !CONFIG_HWSPINLOCK */
108 130
109/**131/**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t