diff options
author | Kunihiko Hayashi <[email protected]> | 2021-09-18 09:22:59 +0900 |
---|---|---|
committer | Lorenzo Pieralisi <[email protected]> | 2021-10-15 10:15:53 +0100 |
commit | 4caab28a6215da5f3c1b505ff08810bc6acfe365 (patch) | |
tree | 0ccb48f6c7f7d5d7e88e3fa4590eaa3db861fd29 /lib/test_fortify/write_overflow-memset.c | |
parent | 7e919677bb392c765e0f86fda63191e517c0bd1f (diff) |
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 <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Fixes: 7e6d5cd88a6f ("PCI: uniphier: Add UniPhier PCIe host controller support")
Signed-off-by: Kunihiko Hayashi <[email protected]>
Signed-off-by: Lorenzo Pieralisi <[email protected]>
Acked-by: Pali Rohár <[email protected]>
Acked-by: Marc Zyngier <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-memset.c')
0 files changed, 0 insertions, 0 deletions