diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-02-17 09:35:25 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-05-11 15:01:09 -0400 |
commit | d19f61f098ae9315b76a97962007f687683916d4 (patch) | |
tree | cc8c1d72932ea9883b1ef2cd315a41a08e765a9c /arch/x86 | |
parent | 511dd98ce8cf6dc4f8f2cb32a8af31ce9f4ba4a1 (diff) |
x86/PCI: Convert pci_config_lock to raw_spinlock
pci_config_lock must be a real spinlock in preempt-rt. Convert it to
raw_spinlock. No change for !RT kernels.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/pci_x86.h | 2 | ||||
-rw-r--r-- | arch/x86/pci/common.c | 2 | ||||
-rw-r--r-- | arch/x86/pci/direct.c | 16 | ||||
-rw-r--r-- | arch/x86/pci/mmconfig_32.c | 8 | ||||
-rw-r--r-- | arch/x86/pci/numaq_32.c | 8 | ||||
-rw-r--r-- | arch/x86/pci/pcbios.c | 8 |
6 files changed, 22 insertions, 22 deletions
diff --git a/arch/x86/include/asm/pci_x86.h b/arch/x86/include/asm/pci_x86.h index 1a0422348d6d..8d8797eae5d7 100644 --- a/arch/x86/include/asm/pci_x86.h +++ b/arch/x86/include/asm/pci_x86.h | |||
@@ -83,7 +83,7 @@ struct irq_routing_table { | |||
83 | 83 | ||
84 | extern unsigned int pcibios_irq_mask; | 84 | extern unsigned int pcibios_irq_mask; |
85 | 85 | ||
86 | extern spinlock_t pci_config_lock; | 86 | extern raw_spinlock_t pci_config_lock; |
87 | 87 | ||
88 | extern int (*pcibios_enable_irq)(struct pci_dev *dev); | 88 | extern int (*pcibios_enable_irq)(struct pci_dev *dev); |
89 | extern void (*pcibios_disable_irq)(struct pci_dev *dev); | 89 | extern void (*pcibios_disable_irq)(struct pci_dev *dev); |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index cf2e93869c48..215a27ae050d 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -76,7 +76,7 @@ struct pci_ops pci_root_ops = { | |||
76 | * This interrupt-safe spinlock protects all accesses to PCI | 76 | * This interrupt-safe spinlock protects all accesses to PCI |
77 | * configuration space. | 77 | * configuration space. |
78 | */ | 78 | */ |
79 | DEFINE_SPINLOCK(pci_config_lock); | 79 | DEFINE_RAW_SPINLOCK(pci_config_lock); |
80 | 80 | ||
81 | static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) | 81 | static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) |
82 | { | 82 | { |
diff --git a/arch/x86/pci/direct.c b/arch/x86/pci/direct.c index 347d882b3bb3..bd33620b0071 100644 --- a/arch/x86/pci/direct.c +++ b/arch/x86/pci/direct.c | |||
@@ -27,7 +27,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus, | |||
27 | return -EINVAL; | 27 | return -EINVAL; |
28 | } | 28 | } |
29 | 29 | ||
30 | spin_lock_irqsave(&pci_config_lock, flags); | 30 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
31 | 31 | ||
32 | outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); | 32 | outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); |
33 | 33 | ||
@@ -43,7 +43,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus, | |||
43 | break; | 43 | break; |
44 | } | 44 | } |
45 | 45 | ||
46 | spin_unlock_irqrestore(&pci_config_lock, flags); | 46 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
47 | 47 | ||
48 | return 0; | 48 | return 0; |
49 | } | 49 | } |
@@ -56,7 +56,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus, | |||
56 | if ((bus > 255) || (devfn > 255) || (reg > 4095)) | 56 | if ((bus > 255) || (devfn > 255) || (reg > 4095)) |
57 | return -EINVAL; | 57 | return -EINVAL; |
58 | 58 | ||
59 | spin_lock_irqsave(&pci_config_lock, flags); | 59 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
60 | 60 | ||
61 | outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); | 61 | outl(PCI_CONF1_ADDRESS(bus, devfn, reg), 0xCF8); |
62 | 62 | ||
@@ -72,7 +72,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus, | |||
72 | break; | 72 | break; |
73 | } | 73 | } |
74 | 74 | ||
75 | spin_unlock_irqrestore(&pci_config_lock, flags); | 75 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
76 | 76 | ||
77 | return 0; | 77 | return 0; |
78 | } | 78 | } |
@@ -108,7 +108,7 @@ static int pci_conf2_read(unsigned int seg, unsigned int bus, | |||
108 | if (dev & 0x10) | 108 | if (dev & 0x10) |
109 | return PCIBIOS_DEVICE_NOT_FOUND; | 109 | return PCIBIOS_DEVICE_NOT_FOUND; |
110 | 110 | ||
111 | spin_lock_irqsave(&pci_config_lock, flags); | 111 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
112 | 112 | ||
113 | outb((u8)(0xF0 | (fn << 1)), 0xCF8); | 113 | outb((u8)(0xF0 | (fn << 1)), 0xCF8); |
114 | outb((u8)bus, 0xCFA); | 114 | outb((u8)bus, 0xCFA); |
@@ -127,7 +127,7 @@ static int pci_conf2_read(unsigned int seg, unsigned int bus, | |||
127 | 127 | ||
128 | outb(0, 0xCF8); | 128 | outb(0, 0xCF8); |
129 | 129 | ||
130 | spin_unlock_irqrestore(&pci_config_lock, flags); | 130 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
131 | 131 | ||
132 | return 0; | 132 | return 0; |
133 | } | 133 | } |
@@ -147,7 +147,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus, | |||
147 | if (dev & 0x10) | 147 | if (dev & 0x10) |
148 | return PCIBIOS_DEVICE_NOT_FOUND; | 148 | return PCIBIOS_DEVICE_NOT_FOUND; |
149 | 149 | ||
150 | spin_lock_irqsave(&pci_config_lock, flags); | 150 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
151 | 151 | ||
152 | outb((u8)(0xF0 | (fn << 1)), 0xCF8); | 152 | outb((u8)(0xF0 | (fn << 1)), 0xCF8); |
153 | outb((u8)bus, 0xCFA); | 153 | outb((u8)bus, 0xCFA); |
@@ -166,7 +166,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus, | |||
166 | 166 | ||
167 | outb(0, 0xCF8); | 167 | outb(0, 0xCF8); |
168 | 168 | ||
169 | spin_unlock_irqrestore(&pci_config_lock, flags); | 169 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
170 | 170 | ||
171 | return 0; | 171 | return 0; |
172 | } | 172 | } |
diff --git a/arch/x86/pci/mmconfig_32.c b/arch/x86/pci/mmconfig_32.c index 90d5fd476ed4..a3d9c54792ae 100644 --- a/arch/x86/pci/mmconfig_32.c +++ b/arch/x86/pci/mmconfig_32.c | |||
@@ -64,7 +64,7 @@ err: *value = -1; | |||
64 | if (!base) | 64 | if (!base) |
65 | goto err; | 65 | goto err; |
66 | 66 | ||
67 | spin_lock_irqsave(&pci_config_lock, flags); | 67 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
68 | 68 | ||
69 | pci_exp_set_dev_base(base, bus, devfn); | 69 | pci_exp_set_dev_base(base, bus, devfn); |
70 | 70 | ||
@@ -79,7 +79,7 @@ err: *value = -1; | |||
79 | *value = mmio_config_readl(mmcfg_virt_addr + reg); | 79 | *value = mmio_config_readl(mmcfg_virt_addr + reg); |
80 | break; | 80 | break; |
81 | } | 81 | } |
82 | spin_unlock_irqrestore(&pci_config_lock, flags); | 82 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
83 | 83 | ||
84 | return 0; | 84 | return 0; |
85 | } | 85 | } |
@@ -97,7 +97,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus, | |||
97 | if (!base) | 97 | if (!base) |
98 | return -EINVAL; | 98 | return -EINVAL; |
99 | 99 | ||
100 | spin_lock_irqsave(&pci_config_lock, flags); | 100 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
101 | 101 | ||
102 | pci_exp_set_dev_base(base, bus, devfn); | 102 | pci_exp_set_dev_base(base, bus, devfn); |
103 | 103 | ||
@@ -112,7 +112,7 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus, | |||
112 | mmio_config_writel(mmcfg_virt_addr + reg, value); | 112 | mmio_config_writel(mmcfg_virt_addr + reg, value); |
113 | break; | 113 | break; |
114 | } | 114 | } |
115 | spin_unlock_irqrestore(&pci_config_lock, flags); | 115 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
116 | 116 | ||
117 | return 0; | 117 | return 0; |
118 | } | 118 | } |
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c index 8223738ad806..5c9e2458df4e 100644 --- a/arch/x86/pci/numaq_32.c +++ b/arch/x86/pci/numaq_32.c | |||
@@ -37,7 +37,7 @@ static int pci_conf1_mq_read(unsigned int seg, unsigned int bus, | |||
37 | if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) | 37 | if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) |
38 | return -EINVAL; | 38 | return -EINVAL; |
39 | 39 | ||
40 | spin_lock_irqsave(&pci_config_lock, flags); | 40 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
41 | 41 | ||
42 | write_cf8(bus, devfn, reg); | 42 | write_cf8(bus, devfn, reg); |
43 | 43 | ||
@@ -62,7 +62,7 @@ static int pci_conf1_mq_read(unsigned int seg, unsigned int bus, | |||
62 | break; | 62 | break; |
63 | } | 63 | } |
64 | 64 | ||
65 | spin_unlock_irqrestore(&pci_config_lock, flags); | 65 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
66 | 66 | ||
67 | return 0; | 67 | return 0; |
68 | } | 68 | } |
@@ -76,7 +76,7 @@ static int pci_conf1_mq_write(unsigned int seg, unsigned int bus, | |||
76 | if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) | 76 | if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) |
77 | return -EINVAL; | 77 | return -EINVAL; |
78 | 78 | ||
79 | spin_lock_irqsave(&pci_config_lock, flags); | 79 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
80 | 80 | ||
81 | write_cf8(bus, devfn, reg); | 81 | write_cf8(bus, devfn, reg); |
82 | 82 | ||
@@ -101,7 +101,7 @@ static int pci_conf1_mq_write(unsigned int seg, unsigned int bus, | |||
101 | break; | 101 | break; |
102 | } | 102 | } |
103 | 103 | ||
104 | spin_unlock_irqrestore(&pci_config_lock, flags); | 104 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
105 | 105 | ||
106 | return 0; | 106 | return 0; |
107 | } | 107 | } |
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c index 59a225c17b84..2492d165096a 100644 --- a/arch/x86/pci/pcbios.c +++ b/arch/x86/pci/pcbios.c | |||
@@ -162,7 +162,7 @@ static int pci_bios_read(unsigned int seg, unsigned int bus, | |||
162 | if (!value || (bus > 255) || (devfn > 255) || (reg > 255)) | 162 | if (!value || (bus > 255) || (devfn > 255) || (reg > 255)) |
163 | return -EINVAL; | 163 | return -EINVAL; |
164 | 164 | ||
165 | spin_lock_irqsave(&pci_config_lock, flags); | 165 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
166 | 166 | ||
167 | switch (len) { | 167 | switch (len) { |
168 | case 1: | 168 | case 1: |
@@ -213,7 +213,7 @@ static int pci_bios_read(unsigned int seg, unsigned int bus, | |||
213 | break; | 213 | break; |
214 | } | 214 | } |
215 | 215 | ||
216 | spin_unlock_irqrestore(&pci_config_lock, flags); | 216 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
217 | 217 | ||
218 | return (int)((result & 0xff00) >> 8); | 218 | return (int)((result & 0xff00) >> 8); |
219 | } | 219 | } |
@@ -228,7 +228,7 @@ static int pci_bios_write(unsigned int seg, unsigned int bus, | |||
228 | if ((bus > 255) || (devfn > 255) || (reg > 255)) | 228 | if ((bus > 255) || (devfn > 255) || (reg > 255)) |
229 | return -EINVAL; | 229 | return -EINVAL; |
230 | 230 | ||
231 | spin_lock_irqsave(&pci_config_lock, flags); | 231 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
232 | 232 | ||
233 | switch (len) { | 233 | switch (len) { |
234 | case 1: | 234 | case 1: |
@@ -269,7 +269,7 @@ static int pci_bios_write(unsigned int seg, unsigned int bus, | |||
269 | break; | 269 | break; |
270 | } | 270 | } |
271 | 271 | ||
272 | spin_unlock_irqrestore(&pci_config_lock, flags); | 272 | raw_spin_unlock_irqrestore(&pci_config_lock, flags); |
273 | 273 | ||
274 | return (int)((result & 0xff00) >> 8); | 274 | return (int)((result & 0xff00) >> 8); |
275 | } | 275 | } |