mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
Merge branch 'pci/controller/vmd'
- Convert vmd_dev.cfg_lock from spinlock_t to raw_spinlock_t so pci_ops.read() will never sleep, even on PREEMPT_RT where spinlock_t becomes a sleepable lock (Ryo Takakura) * pci/controller/vmd: PCI: vmd: Make vmd_dev::cfg_lock a raw_spinlock_t type
This commit is contained in:
commit
a80b04dffe
|
|
@ -125,7 +125,7 @@ struct vmd_irq_list {
|
|||
struct vmd_dev {
|
||||
struct pci_dev *dev;
|
||||
|
||||
spinlock_t cfg_lock;
|
||||
raw_spinlock_t cfg_lock;
|
||||
void __iomem *cfgbar;
|
||||
|
||||
int msix_count;
|
||||
|
|
@ -391,7 +391,7 @@ static int vmd_pci_read(struct pci_bus *bus, unsigned int devfn, int reg,
|
|||
if (!addr)
|
||||
return -EFAULT;
|
||||
|
||||
spin_lock_irqsave(&vmd->cfg_lock, flags);
|
||||
raw_spin_lock_irqsave(&vmd->cfg_lock, flags);
|
||||
switch (len) {
|
||||
case 1:
|
||||
*value = readb(addr);
|
||||
|
|
@ -406,7 +406,7 @@ static int vmd_pci_read(struct pci_bus *bus, unsigned int devfn, int reg,
|
|||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&vmd->cfg_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&vmd->cfg_lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -426,7 +426,7 @@ static int vmd_pci_write(struct pci_bus *bus, unsigned int devfn, int reg,
|
|||
if (!addr)
|
||||
return -EFAULT;
|
||||
|
||||
spin_lock_irqsave(&vmd->cfg_lock, flags);
|
||||
raw_spin_lock_irqsave(&vmd->cfg_lock, flags);
|
||||
switch (len) {
|
||||
case 1:
|
||||
writeb(value, addr);
|
||||
|
|
@ -444,7 +444,7 @@ static int vmd_pci_write(struct pci_bus *bus, unsigned int devfn, int reg,
|
|||
ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
spin_unlock_irqrestore(&vmd->cfg_lock, flags);
|
||||
raw_spin_unlock_irqrestore(&vmd->cfg_lock, flags);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -1009,7 +1009,7 @@ static int vmd_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
|||
if (features & VMD_FEAT_OFFSET_FIRST_VECTOR)
|
||||
vmd->first_vec = 1;
|
||||
|
||||
spin_lock_init(&vmd->cfg_lock);
|
||||
raw_spin_lock_init(&vmd->cfg_lock);
|
||||
pci_set_drvdata(dev, vmd);
|
||||
err = vmd_enable_domain(vmd, features);
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user