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. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
This commit is contained in:

committed by
Lorenzo Pieralisi

parent
5779dd0a7d
commit
3d3248dbd0
@@ -88,7 +88,7 @@ struct pci_epc_mem {
|
||||
* @mem: address space of the endpoint controller
|
||||
* @max_functions: max number of functions that can be configured in this EPC
|
||||
* @group: configfs group representing the PCI EPC device
|
||||
* @lock: spinlock to protect pci_epc ops
|
||||
* @lock: mutex to protect pci_epc ops
|
||||
* @notifier: used to notify EPF of any EPC events (like linkup)
|
||||
*/
|
||||
struct pci_epc {
|
||||
@@ -98,8 +98,8 @@ struct pci_epc {
|
||||
struct pci_epc_mem *mem;
|
||||
u8 max_functions;
|
||||
struct config_group *group;
|
||||
/* spinlock to protect against concurrent access of EP controller */
|
||||
spinlock_t lock;
|
||||
/* mutex to protect against concurrent access of EP controller */
|
||||
struct mutex lock;
|
||||
struct atomic_notifier_head notifier;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user