Commit e5067c718b3a6ecc00351861b3655d8cdeb0b6d2
Committed by
Ralf Baechle
1 parent
490a0ece6c
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
MIPS: pci-rt3883: 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. Local PCI read/write functions are never called simultaneously, also they do not require synchronization with the PCI controller ops, since they are used before the controller registration. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Cc: Linux MIPS <linux-mips@linux-mips.org> Cc: Gabor Juhos <juhosg@openwrt.org> Patchwork: https://patchwork.linux-mips.org/patch/7603/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Showing 1 changed file with 0 additions and 9 deletions Side-by-side Diff
arch/mips/pci/pci-rt3883.c
... | ... | @@ -61,7 +61,6 @@ |
61 | 61 | |
62 | 62 | struct rt3883_pci_controller { |
63 | 63 | void __iomem *base; |
64 | - spinlock_t lock; | |
65 | 64 | |
66 | 65 | struct device_node *intc_of_node; |
67 | 66 | struct irq_domain *irq_domain; |
68 | 67 | |
... | ... | @@ -111,10 +110,8 @@ |
111 | 110 | |
112 | 111 | address = rt3883_pci_get_cfgaddr(bus, slot, func, reg); |
113 | 112 | |
114 | - spin_lock_irqsave(&rpc->lock, flags); | |
115 | 113 | rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR); |
116 | 114 | ret = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA); |
117 | - spin_unlock_irqrestore(&rpc->lock, flags); | |
118 | 115 | |
119 | 116 | return ret; |
120 | 117 | } |
121 | 118 | |
... | ... | @@ -128,10 +125,8 @@ |
128 | 125 | |
129 | 126 | address = rt3883_pci_get_cfgaddr(bus, slot, func, reg); |
130 | 127 | |
131 | - spin_lock_irqsave(&rpc->lock, flags); | |
132 | 128 | rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR); |
133 | 129 | rt3883_pci_w32(rpc, val, RT3883_PCI_REG_CFGDATA); |
134 | - spin_unlock_irqrestore(&rpc->lock, flags); | |
135 | 130 | } |
136 | 131 | |
137 | 132 | static void rt3883_pci_irq_handler(unsigned int irq, struct irq_desc *desc) |
138 | 133 | |
... | ... | @@ -252,10 +247,8 @@ |
252 | 247 | address = rt3883_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn), |
253 | 248 | PCI_FUNC(devfn), where); |
254 | 249 | |
255 | - spin_lock_irqsave(&rpc->lock, flags); | |
256 | 250 | rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR); |
257 | 251 | data = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA); |
258 | - spin_unlock_irqrestore(&rpc->lock, flags); | |
259 | 252 | |
260 | 253 | switch (size) { |
261 | 254 | case 1: |
... | ... | @@ -288,7 +281,6 @@ |
288 | 281 | address = rt3883_pci_get_cfgaddr(bus->number, PCI_SLOT(devfn), |
289 | 282 | PCI_FUNC(devfn), where); |
290 | 283 | |
291 | - spin_lock_irqsave(&rpc->lock, flags); | |
292 | 284 | rt3883_pci_w32(rpc, address, RT3883_PCI_REG_CFGADDR); |
293 | 285 | data = rt3883_pci_r32(rpc, RT3883_PCI_REG_CFGDATA); |
294 | 286 | |
... | ... | @@ -307,7 +299,6 @@ |
307 | 299 | } |
308 | 300 | |
309 | 301 | rt3883_pci_w32(rpc, data, RT3883_PCI_REG_CFGDATA); |
310 | - spin_unlock_irqrestore(&rpc->lock, flags); | |
311 | 302 | |
312 | 303 | return PCIBIOS_SUCCESSFUL; |
313 | 304 | } |