History

PCI: endpoint: Replace spinlock with mutex

The pci_epc_ops is not intended to be invoked from interrupt context. Hence replace spin_lock_irqsave and spin_unlock_irqrestore with mutex_lock and mutex_unlock respectively.

Kishon Vijay Abraham I committed 6 years ago

Commit 3d3248d1 parent 5779dd02 files · +34 −54Browse files

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

Unified · Split

include/linux/pci-epc.h+3−3
@@ -88,7 +88,7 @@ struct pci_epc_mem { · 87 unmodified lines
88 * @mem: address space of the endpoint controller88 * @mem: address space of the endpoint controller
89 * @max_functions: max number of functions that can be configured in this EPC89 * @max_functions: max number of functions that can be configured in this EPC
90 * @group: configfs group representing the PCI EPC device90 * @group: configfs group representing the PCI EPC device
91 * @lock: spinlock to protect pci_epc ops91 * @lock: mutex to protect pci_epc ops
92 * @notifier: used to notify EPF of any EPC events (like linkup)92 * @notifier: used to notify EPF of any EPC events (like linkup)
93 */93 */
94struct pci_epc {94struct pci_epc {
@@ -98,8 +98,8 @@ struct pci_epc { · 3 unmodified lines
98 struct pci_epc_mem *mem;98 struct pci_epc_mem *mem;
99 u8 max_functions;99 u8 max_functions;
100 struct config_group *group;100 struct config_group *group;
101 /* spinlock to protect against concurrent access of EP controller */101 /* mutex to protect against concurrent access of EP controller */
102 spinlock_t lock;102 struct mutex lock;
103 struct atomic_notifier_head notifier;103 struct atomic_notifier_head notifier;
104};104};
105 105