Repository navigation
Commit 4caab28
PCI: uniphier: Serialize INTx masking/unmasking and fix the bit operation
The condition register PCI_RCV_INTX is used in irq_mask() and irq_unmask()
callbacks. Accesses to register can occur at the same time without a lock.
Add a lock into each callback to prevent the issue.
And INTX mask and unmask fields in PCL_RCV_INTX register should only be
set/reset for each bit. Clearing by PCL_RCV_INTX_ALL_MASK should be
removed.
INTX status fields in PCL_RCV_INTX register only indicates each INTX
interrupt status, so the handler can't clear by writing 1 to the field.
The status is expected to be cleared by the interrupt origin.
The ack function has no meaning, so should remove it.
Suggested-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/1631924579-24567-1-git-send-email-hayashi.kunihiko@socionext.com
Fixes: 7e6d5cd ("PCI: uniphier: Add UniPhier PCIe host controller support")
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Pali Rohár <pali@kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org>1 parent 7e91967 commit 4caab28
1 file changed
Lines changed: 10 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | 171 | | |
185 | 172 | | |
186 | 173 | | |
187 | 174 | | |
188 | 175 | | |
| 176 | + | |
189 | 177 | | |
190 | 178 | | |
| 179 | + | |
| 180 | + | |
191 | 181 | | |
192 | | - | |
193 | 182 | | |
194 | 183 | | |
| 184 | + | |
| 185 | + | |
195 | 186 | | |
196 | 187 | | |
197 | 188 | | |
198 | 189 | | |
199 | 190 | | |
200 | 191 | | |
201 | 192 | | |
| 193 | + | |
202 | 194 | | |
203 | 195 | | |
| 196 | + | |
| 197 | + | |
204 | 198 | | |
205 | | - | |
206 | 199 | | |
207 | 200 | | |
| 201 | + | |
| 202 | + | |
208 | 203 | | |
209 | 204 | | |
210 | 205 | | |
211 | 206 | | |
212 | | - | |
213 | 207 | | |
214 | 208 | | |
215 | 209 | | |
| |||
0 commit comments