Repository navigation
Commit 0b73c02
PCI: uniphier: Serialize INTx masking/unmasking and fix the bit operation
[ Upstream commit 4caab28 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent d2ff7a8 commit 0b73c02
1 file changed
Lines changed: 10 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | 174 | | |
188 | 175 | | |
189 | 176 | | |
190 | 177 | | |
191 | 178 | | |
| 179 | + | |
192 | 180 | | |
193 | 181 | | |
| 182 | + | |
| 183 | + | |
194 | 184 | | |
195 | | - | |
196 | 185 | | |
197 | 186 | | |
| 187 | + | |
| 188 | + | |
198 | 189 | | |
199 | 190 | | |
200 | 191 | | |
201 | 192 | | |
202 | 193 | | |
203 | 194 | | |
204 | 195 | | |
| 196 | + | |
205 | 197 | | |
206 | 198 | | |
| 199 | + | |
| 200 | + | |
207 | 201 | | |
208 | | - | |
209 | 202 | | |
210 | 203 | | |
| 204 | + | |
| 205 | + | |
211 | 206 | | |
212 | 207 | | |
213 | 208 | | |
214 | 209 | | |
215 | | - | |
216 | 210 | | |
217 | 211 | | |
218 | 212 | | |
| |||
0 commit comments