diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-03 09:44:46 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-09-13 05:12:14 -0400 |
commit | bd31b85960a7fcb2d7ede216460b8da71a88411c (patch) | |
tree | f2ab1a1105705856c5cdfc71bcf3f7b5f897d30d /arch/arm/mach-ixp4xx | |
parent | a1741e7fcbc19a67520115df480ab17012cc3d0b (diff) |
locking, ARM: Annotate low level hw locks as raw
Annotate the low level hardware locks which must not be preempted.
In mainline this change documents the low level nature of
the lock - otherwise there's no functional difference. Lockdep
and Sparse checking will work as usual.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/arm/mach-ixp4xx')
-rw-r--r-- | arch/arm/mach-ixp4xx/common-pci.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index 2131832ee6ba..1b5fe8705757 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -54,7 +54,7 @@ unsigned long ixp4xx_pci_reg_base = 0; | |||
54 | * these transactions are atomic or we will end up | 54 | * these transactions are atomic or we will end up |
55 | * with corrupt data on the bus or in a driver. | 55 | * with corrupt data on the bus or in a driver. |
56 | */ | 56 | */ |
57 | static DEFINE_SPINLOCK(ixp4xx_pci_lock); | 57 | static DEFINE_RAW_SPINLOCK(ixp4xx_pci_lock); |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * Read from PCI config space | 60 | * Read from PCI config space |
@@ -62,10 +62,10 @@ static DEFINE_SPINLOCK(ixp4xx_pci_lock); | |||
62 | static void crp_read(u32 ad_cbe, u32 *data) | 62 | static void crp_read(u32 ad_cbe, u32 *data) |
63 | { | 63 | { |
64 | unsigned long flags; | 64 | unsigned long flags; |
65 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 65 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
66 | *PCI_CRP_AD_CBE = ad_cbe; | 66 | *PCI_CRP_AD_CBE = ad_cbe; |
67 | *data = *PCI_CRP_RDATA; | 67 | *data = *PCI_CRP_RDATA; |
68 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 68 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
69 | } | 69 | } |
70 | 70 | ||
71 | /* | 71 | /* |
@@ -74,10 +74,10 @@ static void crp_read(u32 ad_cbe, u32 *data) | |||
74 | static void crp_write(u32 ad_cbe, u32 data) | 74 | static void crp_write(u32 ad_cbe, u32 data) |
75 | { | 75 | { |
76 | unsigned long flags; | 76 | unsigned long flags; |
77 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 77 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
78 | *PCI_CRP_AD_CBE = CRP_AD_CBE_WRITE | ad_cbe; | 78 | *PCI_CRP_AD_CBE = CRP_AD_CBE_WRITE | ad_cbe; |
79 | *PCI_CRP_WDATA = data; | 79 | *PCI_CRP_WDATA = data; |
80 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 80 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
81 | } | 81 | } |
82 | 82 | ||
83 | static inline int check_master_abort(void) | 83 | static inline int check_master_abort(void) |
@@ -101,7 +101,7 @@ int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data) | |||
101 | int retval = 0; | 101 | int retval = 0; |
102 | int i; | 102 | int i; |
103 | 103 | ||
104 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 104 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
105 | 105 | ||
106 | *PCI_NP_AD = addr; | 106 | *PCI_NP_AD = addr; |
107 | 107 | ||
@@ -118,7 +118,7 @@ int ixp4xx_pci_read_errata(u32 addr, u32 cmd, u32* data) | |||
118 | if(check_master_abort()) | 118 | if(check_master_abort()) |
119 | retval = 1; | 119 | retval = 1; |
120 | 120 | ||
121 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 121 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
122 | return retval; | 122 | return retval; |
123 | } | 123 | } |
124 | 124 | ||
@@ -127,7 +127,7 @@ int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data) | |||
127 | unsigned long flags; | 127 | unsigned long flags; |
128 | int retval = 0; | 128 | int retval = 0; |
129 | 129 | ||
130 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 130 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
131 | 131 | ||
132 | *PCI_NP_AD = addr; | 132 | *PCI_NP_AD = addr; |
133 | 133 | ||
@@ -140,7 +140,7 @@ int ixp4xx_pci_read_no_errata(u32 addr, u32 cmd, u32* data) | |||
140 | if(check_master_abort()) | 140 | if(check_master_abort()) |
141 | retval = 1; | 141 | retval = 1; |
142 | 142 | ||
143 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 143 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
144 | return retval; | 144 | return retval; |
145 | } | 145 | } |
146 | 146 | ||
@@ -149,7 +149,7 @@ int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data) | |||
149 | unsigned long flags; | 149 | unsigned long flags; |
150 | int retval = 0; | 150 | int retval = 0; |
151 | 151 | ||
152 | spin_lock_irqsave(&ixp4xx_pci_lock, flags); | 152 | raw_spin_lock_irqsave(&ixp4xx_pci_lock, flags); |
153 | 153 | ||
154 | *PCI_NP_AD = addr; | 154 | *PCI_NP_AD = addr; |
155 | 155 | ||
@@ -162,7 +162,7 @@ int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data) | |||
162 | if(check_master_abort()) | 162 | if(check_master_abort()) |
163 | retval = 1; | 163 | retval = 1; |
164 | 164 | ||
165 | spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); | 165 | raw_spin_unlock_irqrestore(&ixp4xx_pci_lock, flags); |
166 | return retval; | 166 | return retval; |
167 | } | 167 | } |
168 | 168 | ||