Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: NILE4: Remove odd locking in PCI config space access code

Caller (generic PCI code) already do proper locking so no need to add
another one here.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Cc: Linux MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/7600/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Sergey Ryazanov and committed by
Ralf Baechle
6ff9c2fc 856839b7

+1 -11
+1 -11
arch/mips/pci/ops-nile4.c
··· 13 13 14 14 volatile unsigned long *const vrc_pciregs = (void *) Vrc5074_BASE; 15 15 16 - static DEFINE_SPINLOCK(nile4_pci_lock); 17 - 18 16 static int nile4_pcibios_config_access(unsigned char access_type, 19 17 struct pci_bus *bus, unsigned int devfn, int where, u32 *val) 20 18 { ··· 74 76 static int nile4_pcibios_read(struct pci_bus *bus, unsigned int devfn, 75 77 int where, int size, u32 *val) 76 78 { 77 - unsigned long flags; 78 79 u32 data = 0; 79 80 int err; 80 81 ··· 82 85 else if ((size == 4) && (where & 3)) 83 86 return PCIBIOS_BAD_REGISTER_NUMBER; 84 87 85 - spin_lock_irqsave(&nile4_pci_lock, flags); 86 88 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, 87 - &data); 88 - spin_unlock_irqrestore(&nile4_pci_lock, flags); 89 - 89 + &data); 90 90 if (err) 91 91 return err; 92 92 ··· 100 106 static int nile4_pcibios_write(struct pci_bus *bus, unsigned int devfn, 101 107 int where, int size, u32 val) 102 108 { 103 - unsigned long flags; 104 109 u32 data = 0; 105 110 int err; 106 111 ··· 108 115 else if ((size == 4) && (where & 3)) 109 116 return PCIBIOS_BAD_REGISTER_NUMBER; 110 117 111 - spin_lock_irqsave(&nile4_pci_lock, flags); 112 118 err = nile4_pcibios_config_access(PCI_ACCESS_READ, bus, devfn, where, 113 119 &data); 114 - spin_unlock_irqrestore(&nile4_pci_lock, flags); 115 - 116 120 if (err) 117 121 return err; 118 122