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
8888 * @mem: address space of the endpoint controller
8989 * @max_functions: max number of functions that can be configured in this EPC
9090 * @group: configfs group representing the PCI EPC device
91− * @lock: spinlock to protect pci_epc ops
91+ * @lock: mutex to protect pci_epc ops
9292 * @notifier: used to notify EPF of any EPC events (like linkup)
9393 */
9494 struct pci_epc {
@@ -98,8 +98,8 @@ struct pci_epc { · 3 unmodified lines
9898 struct pci_epc_mem *mem;
9999 u8 max_functions;
100100 struct config_group *group;
101− /* spinlock to protect against concurrent access of EP controller */
102− spinlock_t lock;
101+ /* mutex to protect against concurrent access of EP controller */
102+ struct mutex lock;
103103 struct atomic_notifier_head notifier;
104104 };
105105