diff options
120 files changed, 294 insertions, 215 deletions
diff --git a/arch/alpha/kernel/sys_alcor.c b/arch/alpha/kernel/sys_alcor.c index 0e1439904cdb..8606d77e5163 100644 --- a/arch/alpha/kernel/sys_alcor.c +++ b/arch/alpha/kernel/sys_alcor.c | |||
@@ -183,7 +183,7 @@ alcor_init_irq(void) | |||
183 | */ | 183 | */ |
184 | 184 | ||
185 | static int __init | 185 | static int __init |
186 | alcor_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 186 | alcor_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
187 | { | 187 | { |
188 | static char irq_tab[7][5] __initdata = { | 188 | static char irq_tab[7][5] __initdata = { |
189 | /*INT INTA INTB INTC INTD */ | 189 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_cabriolet.c b/arch/alpha/kernel/sys_cabriolet.c index c8c112d51584..1029619fb6c0 100644 --- a/arch/alpha/kernel/sys_cabriolet.c +++ b/arch/alpha/kernel/sys_cabriolet.c | |||
@@ -175,7 +175,7 @@ pc164_init_irq(void) | |||
175 | */ | 175 | */ |
176 | 176 | ||
177 | static inline int __init | 177 | static inline int __init |
178 | eb66p_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 178 | eb66p_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
179 | { | 179 | { |
180 | static char irq_tab[5][5] __initdata = { | 180 | static char irq_tab[5][5] __initdata = { |
181 | /*INT INTA INTB INTC INTD */ | 181 | /*INT INTA INTB INTC INTD */ |
@@ -205,7 +205,7 @@ eb66p_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
205 | */ | 205 | */ |
206 | 206 | ||
207 | static inline int __init | 207 | static inline int __init |
208 | cabriolet_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 208 | cabriolet_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
209 | { | 209 | { |
210 | static char irq_tab[5][5] __initdata = { | 210 | static char irq_tab[5][5] __initdata = { |
211 | /*INT INTA INTB INTC INTD */ | 211 | /*INT INTA INTB INTC INTD */ |
@@ -289,7 +289,7 @@ cia_cab_init_pci(void) | |||
289 | */ | 289 | */ |
290 | 290 | ||
291 | static inline int __init | 291 | static inline int __init |
292 | alphapc164_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 292 | alphapc164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
293 | { | 293 | { |
294 | static char irq_tab[7][5] __initdata = { | 294 | static char irq_tab[7][5] __initdata = { |
295 | /*INT INTA INTB INTC INTD */ | 295 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index f8856829c22a..bb7f0c7cb17a 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c | |||
@@ -382,7 +382,7 @@ isa_irq_fixup(struct pci_dev *dev, int irq) | |||
382 | } | 382 | } |
383 | 383 | ||
384 | static int __init | 384 | static int __init |
385 | dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 385 | dp264_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
386 | { | 386 | { |
387 | static char irq_tab[6][5] __initdata = { | 387 | static char irq_tab[6][5] __initdata = { |
388 | /*INT INTA INTB INTC INTD */ | 388 | /*INT INTA INTB INTC INTD */ |
@@ -404,7 +404,7 @@ dp264_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
404 | } | 404 | } |
405 | 405 | ||
406 | static int __init | 406 | static int __init |
407 | monet_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 407 | monet_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
408 | { | 408 | { |
409 | static char irq_tab[13][5] __initdata = { | 409 | static char irq_tab[13][5] __initdata = { |
410 | /*INT INTA INTB INTC INTD */ | 410 | /*INT INTA INTB INTC INTD */ |
@@ -466,7 +466,7 @@ monet_swizzle(struct pci_dev *dev, u8 *pinp) | |||
466 | } | 466 | } |
467 | 467 | ||
468 | static int __init | 468 | static int __init |
469 | webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 469 | webbrick_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
470 | { | 470 | { |
471 | static char irq_tab[13][5] __initdata = { | 471 | static char irq_tab[13][5] __initdata = { |
472 | /*INT INTA INTB INTC INTD */ | 472 | /*INT INTA INTB INTC INTD */ |
@@ -488,7 +488,7 @@ webbrick_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
488 | } | 488 | } |
489 | 489 | ||
490 | static int __init | 490 | static int __init |
491 | clipper_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 491 | clipper_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
492 | { | 492 | { |
493 | static char irq_tab[7][5] __initdata = { | 493 | static char irq_tab[7][5] __initdata = { |
494 | /*INT INTA INTB INTC INTD */ | 494 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_eb64p.c b/arch/alpha/kernel/sys_eb64p.c index a7a23b40eec5..3c6c13cd8b19 100644 --- a/arch/alpha/kernel/sys_eb64p.c +++ b/arch/alpha/kernel/sys_eb64p.c | |||
@@ -169,7 +169,7 @@ eb64p_init_irq(void) | |||
169 | */ | 169 | */ |
170 | 170 | ||
171 | static int __init | 171 | static int __init |
172 | eb64p_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 172 | eb64p_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
173 | { | 173 | { |
174 | static char irq_tab[5][5] __initdata = { | 174 | static char irq_tab[5][5] __initdata = { |
175 | /*INT INTA INTB INTC INTD */ | 175 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_eiger.c b/arch/alpha/kernel/sys_eiger.c index a60cd5b2621e..35f480db7719 100644 --- a/arch/alpha/kernel/sys_eiger.c +++ b/arch/alpha/kernel/sys_eiger.c | |||
@@ -144,7 +144,7 @@ eiger_init_irq(void) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | static int __init | 146 | static int __init |
147 | eiger_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 147 | eiger_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
148 | { | 148 | { |
149 | u8 irq_orig; | 149 | u8 irq_orig; |
150 | 150 | ||
diff --git a/arch/alpha/kernel/sys_marvel.c b/arch/alpha/kernel/sys_marvel.c index 388b99d1779d..95cfc83ece8f 100644 --- a/arch/alpha/kernel/sys_marvel.c +++ b/arch/alpha/kernel/sys_marvel.c | |||
@@ -318,7 +318,7 @@ marvel_init_irq(void) | |||
318 | } | 318 | } |
319 | 319 | ||
320 | static int | 320 | static int |
321 | marvel_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 321 | marvel_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
322 | { | 322 | { |
323 | struct pci_controller *hose = dev->sysdata; | 323 | struct pci_controller *hose = dev->sysdata; |
324 | struct io7_port *io7_port = hose->sysdata; | 324 | struct io7_port *io7_port = hose->sysdata; |
diff --git a/arch/alpha/kernel/sys_miata.c b/arch/alpha/kernel/sys_miata.c index 61ccd95579ec..258da684670b 100644 --- a/arch/alpha/kernel/sys_miata.c +++ b/arch/alpha/kernel/sys_miata.c | |||
@@ -151,7 +151,7 @@ miata_init_irq(void) | |||
151 | */ | 151 | */ |
152 | 152 | ||
153 | static int __init | 153 | static int __init |
154 | miata_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 154 | miata_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
155 | { | 155 | { |
156 | static char irq_tab[18][5] __initdata = { | 156 | static char irq_tab[18][5] __initdata = { |
157 | /*INT INTA INTB INTC INTD */ | 157 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_mikasa.c b/arch/alpha/kernel/sys_mikasa.c index 0e6e4697a025..c0fd7284dec3 100644 --- a/arch/alpha/kernel/sys_mikasa.c +++ b/arch/alpha/kernel/sys_mikasa.c | |||
@@ -146,7 +146,7 @@ mikasa_init_irq(void) | |||
146 | */ | 146 | */ |
147 | 147 | ||
148 | static int __init | 148 | static int __init |
149 | mikasa_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 149 | mikasa_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
150 | { | 150 | { |
151 | static char irq_tab[8][5] __initdata = { | 151 | static char irq_tab[8][5] __initdata = { |
152 | /*INT INTA INTB INTC INTD */ | 152 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_nautilus.c b/arch/alpha/kernel/sys_nautilus.c index 99c0f46f6b9c..4112200307c7 100644 --- a/arch/alpha/kernel/sys_nautilus.c +++ b/arch/alpha/kernel/sys_nautilus.c | |||
@@ -65,7 +65,7 @@ nautilus_init_irq(void) | |||
65 | } | 65 | } |
66 | 66 | ||
67 | static int __init | 67 | static int __init |
68 | nautilus_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 68 | nautilus_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
69 | { | 69 | { |
70 | /* Preserve the IRQ set up by the console. */ | 70 | /* Preserve the IRQ set up by the console. */ |
71 | 71 | ||
diff --git a/arch/alpha/kernel/sys_noritake.c b/arch/alpha/kernel/sys_noritake.c index a00ac7087167..21725283cdd7 100644 --- a/arch/alpha/kernel/sys_noritake.c +++ b/arch/alpha/kernel/sys_noritake.c | |||
@@ -194,7 +194,7 @@ noritake_init_irq(void) | |||
194 | */ | 194 | */ |
195 | 195 | ||
196 | static int __init | 196 | static int __init |
197 | noritake_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 197 | noritake_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
198 | { | 198 | { |
199 | static char irq_tab[15][5] __initdata = { | 199 | static char irq_tab[15][5] __initdata = { |
200 | /*INT INTA INTB INTC INTD */ | 200 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_rawhide.c b/arch/alpha/kernel/sys_rawhide.c index 7f52161f3d88..a125d6bea7e1 100644 --- a/arch/alpha/kernel/sys_rawhide.c +++ b/arch/alpha/kernel/sys_rawhide.c | |||
@@ -223,7 +223,7 @@ rawhide_init_irq(void) | |||
223 | */ | 223 | */ |
224 | 224 | ||
225 | static int __init | 225 | static int __init |
226 | rawhide_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 226 | rawhide_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
227 | { | 227 | { |
228 | static char irq_tab[5][5] __initdata = { | 228 | static char irq_tab[5][5] __initdata = { |
229 | /*INT INTA INTB INTC INTD */ | 229 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_ruffian.c b/arch/alpha/kernel/sys_ruffian.c index f33648e4e8cf..2581cbec6fc2 100644 --- a/arch/alpha/kernel/sys_ruffian.c +++ b/arch/alpha/kernel/sys_ruffian.c | |||
@@ -119,7 +119,7 @@ ruffian_kill_arch (int mode) | |||
119 | */ | 119 | */ |
120 | 120 | ||
121 | static int __init | 121 | static int __init |
122 | ruffian_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 122 | ruffian_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
123 | { | 123 | { |
124 | static char irq_tab[11][5] __initdata = { | 124 | static char irq_tab[11][5] __initdata = { |
125 | /*INT INTA INTB INTC INTD */ | 125 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_rx164.c b/arch/alpha/kernel/sys_rx164.c index 216d94d9c0c1..b172b27555a7 100644 --- a/arch/alpha/kernel/sys_rx164.c +++ b/arch/alpha/kernel/sys_rx164.c | |||
@@ -144,7 +144,7 @@ rx164_init_irq(void) | |||
144 | */ | 144 | */ |
145 | 145 | ||
146 | static int __init | 146 | static int __init |
147 | rx164_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 147 | rx164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
148 | { | 148 | { |
149 | #if 0 | 149 | #if 0 |
150 | static char irq_tab_pass1[6][5] __initdata = { | 150 | static char irq_tab_pass1[6][5] __initdata = { |
diff --git a/arch/alpha/kernel/sys_sable.c b/arch/alpha/kernel/sys_sable.c index da714e427c5f..98d1dbffe98f 100644 --- a/arch/alpha/kernel/sys_sable.c +++ b/arch/alpha/kernel/sys_sable.c | |||
@@ -194,7 +194,7 @@ sable_init_irq(void) | |||
194 | */ | 194 | */ |
195 | 195 | ||
196 | static int __init | 196 | static int __init |
197 | sable_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 197 | sable_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
198 | { | 198 | { |
199 | static char irq_tab[9][5] __initdata = { | 199 | static char irq_tab[9][5] __initdata = { |
200 | /*INT INTA INTB INTC INTD */ | 200 | /*INT INTA INTB INTC INTD */ |
@@ -376,7 +376,7 @@ lynx_init_irq(void) | |||
376 | */ | 376 | */ |
377 | 377 | ||
378 | static int __init | 378 | static int __init |
379 | lynx_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 379 | lynx_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
380 | { | 380 | { |
381 | static char irq_tab[19][5] __initdata = { | 381 | static char irq_tab[19][5] __initdata = { |
382 | /*INT INTA INTB INTC INTD */ | 382 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_sio.c b/arch/alpha/kernel/sys_sio.c index 85b4aea01ef8..47bec1e97d1c 100644 --- a/arch/alpha/kernel/sys_sio.c +++ b/arch/alpha/kernel/sys_sio.c | |||
@@ -146,7 +146,7 @@ sio_fixup_irq_levels(unsigned int level_bits) | |||
146 | } | 146 | } |
147 | 147 | ||
148 | static inline int __init | 148 | static inline int __init |
149 | noname_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 149 | noname_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
150 | { | 150 | { |
151 | /* | 151 | /* |
152 | * The Noname board has 5 PCI slots with each of the 4 | 152 | * The Noname board has 5 PCI slots with each of the 4 |
@@ -185,7 +185,7 @@ noname_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
185 | } | 185 | } |
186 | 186 | ||
187 | static inline int __init | 187 | static inline int __init |
188 | p2k_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 188 | p2k_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
189 | { | 189 | { |
190 | static char irq_tab[][5] __initdata = { | 190 | static char irq_tab[][5] __initdata = { |
191 | /*INT A B C D */ | 191 | /*INT A B C D */ |
diff --git a/arch/alpha/kernel/sys_sx164.c b/arch/alpha/kernel/sys_sx164.c index 41d4ad4c7c44..73e1c317afcb 100644 --- a/arch/alpha/kernel/sys_sx164.c +++ b/arch/alpha/kernel/sys_sx164.c | |||
@@ -95,7 +95,7 @@ sx164_init_irq(void) | |||
95 | */ | 95 | */ |
96 | 96 | ||
97 | static int __init | 97 | static int __init |
98 | sx164_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 98 | sx164_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
99 | { | 99 | { |
100 | static char irq_tab[5][5] __initdata = { | 100 | static char irq_tab[5][5] __initdata = { |
101 | /*INT INTA INTB INTC INTD */ | 101 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/alpha/kernel/sys_takara.c b/arch/alpha/kernel/sys_takara.c index a31f8cd9bd6b..2ae99ad6975e 100644 --- a/arch/alpha/kernel/sys_takara.c +++ b/arch/alpha/kernel/sys_takara.c | |||
@@ -157,7 +157,7 @@ takara_init_irq(void) | |||
157 | */ | 157 | */ |
158 | 158 | ||
159 | static int __init | 159 | static int __init |
160 | takara_map_irq_srm(struct pci_dev *dev, u8 slot, u8 pin) | 160 | takara_map_irq_srm(const struct pci_dev *dev, u8 slot, u8 pin) |
161 | { | 161 | { |
162 | static char irq_tab[15][5] __initdata = { | 162 | static char irq_tab[15][5] __initdata = { |
163 | { 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */ | 163 | { 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */ |
@@ -188,7 +188,7 @@ takara_map_irq_srm(struct pci_dev *dev, u8 slot, u8 pin) | |||
188 | } | 188 | } |
189 | 189 | ||
190 | static int __init | 190 | static int __init |
191 | takara_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 191 | takara_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
192 | { | 192 | { |
193 | static char irq_tab[15][5] __initdata = { | 193 | static char irq_tab[15][5] __initdata = { |
194 | { 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */ | 194 | { 16+3, 16+3, 16+3, 16+3, 16+3}, /* slot 6 == device 3 */ |
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 6994407e242a..f47b30a2a117 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
@@ -305,7 +305,7 @@ titan_late_init(void) | |||
305 | } | 305 | } |
306 | 306 | ||
307 | static int __devinit | 307 | static int __devinit |
308 | titan_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 308 | titan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
309 | { | 309 | { |
310 | u8 intline; | 310 | u8 intline; |
311 | int irq; | 311 | int irq; |
diff --git a/arch/alpha/kernel/sys_wildfire.c b/arch/alpha/kernel/sys_wildfire.c index d92cdc715c65..17c85a65e7b0 100644 --- a/arch/alpha/kernel/sys_wildfire.c +++ b/arch/alpha/kernel/sys_wildfire.c | |||
@@ -290,7 +290,7 @@ wildfire_device_interrupt(unsigned long vector) | |||
290 | */ | 290 | */ |
291 | 291 | ||
292 | static int __init | 292 | static int __init |
293 | wildfire_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 293 | wildfire_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
294 | { | 294 | { |
295 | static char irq_tab[8][5] __initdata = { | 295 | static char irq_tab[8][5] __initdata = { |
296 | /*INT INTA INTB INTC INTD */ | 296 | /*INT INTA INTB INTC INTD */ |
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index 14ad62e16dd1..a7934ba9e1df 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
@@ -144,7 +144,7 @@ void it8152_irq_demux(unsigned int irq, struct irq_desc *desc) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | /* mapping for on-chip devices */ | 146 | /* mapping for on-chip devices */ |
147 | int __init it8152_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 147 | int __init it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
148 | { | 148 | { |
149 | if ((dev->vendor == PCI_VENDOR_ID_ITE) && | 149 | if ((dev->vendor == PCI_VENDOR_ID_ITE) && |
150 | (dev->device == PCI_DEVICE_ID_ITE_8152)) { | 150 | (dev->device == PCI_DEVICE_ID_ITE_8152)) { |
diff --git a/arch/arm/include/asm/hardware/it8152.h b/arch/arm/include/asm/hardware/it8152.h index b2f95c72287c..b3fea38d55c6 100644 --- a/arch/arm/include/asm/hardware/it8152.h +++ b/arch/arm/include/asm/hardware/it8152.h | |||
@@ -105,7 +105,7 @@ struct pci_sys_data; | |||
105 | 105 | ||
106 | extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc); | 106 | extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc); |
107 | extern void it8152_init_irq(void); | 107 | extern void it8152_init_irq(void); |
108 | extern int it8152_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin); | 108 | extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
109 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); | 109 | extern int it8152_pci_setup(int nr, struct pci_sys_data *sys); |
110 | extern struct pci_bus *it8152_pci_scan_bus(int nr, struct pci_sys_data *sys); | 110 | extern struct pci_bus *it8152_pci_scan_bus(int nr, struct pci_sys_data *sys); |
111 | 111 | ||
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h index 16330bd0657c..186efd4e05c9 100644 --- a/arch/arm/include/asm/mach/pci.h +++ b/arch/arm/include/asm/mach/pci.h | |||
@@ -25,7 +25,7 @@ struct hw_pci { | |||
25 | void (*preinit)(void); | 25 | void (*preinit)(void); |
26 | void (*postinit)(void); | 26 | void (*postinit)(void); |
27 | u8 (*swizzle)(struct pci_dev *dev, u8 *pin); | 27 | u8 (*swizzle)(struct pci_dev *dev, u8 *pin); |
28 | int (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin); | 28 | int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin); |
29 | }; | 29 | }; |
30 | 30 | ||
31 | /* | 31 | /* |
@@ -44,7 +44,7 @@ struct pci_sys_data { | |||
44 | /* Bridge swizzling */ | 44 | /* Bridge swizzling */ |
45 | u8 (*swizzle)(struct pci_dev *, u8 *); | 45 | u8 (*swizzle)(struct pci_dev *, u8 *); |
46 | /* IRQ mapping */ | 46 | /* IRQ mapping */ |
47 | int (*map_irq)(struct pci_dev *, u8, u8); | 47 | int (*map_irq)(const struct pci_dev *, u8, u8); |
48 | struct hw_pci *hw; | 48 | struct hw_pci *hw; |
49 | void *private_data; /* platform controller private data */ | 49 | void *private_data; /* platform controller private data */ |
50 | }; | 50 | }; |
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index e4ee050aad7d..d6df359408f0 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -476,7 +476,7 @@ static u8 __devinit pcibios_swizzle(struct pci_dev *dev, u8 *pin) | |||
476 | /* | 476 | /* |
477 | * Map a slot/pin to an IRQ. | 477 | * Map a slot/pin to an IRQ. |
478 | */ | 478 | */ |
479 | static int pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 479 | static int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
480 | { | 480 | { |
481 | struct pci_sys_data *sys = dev->sysdata; | 481 | struct pci_sys_data *sys = dev->sysdata; |
482 | int irq = -1; | 482 | int irq = -1; |
diff --git a/arch/arm/mach-cns3xxx/pcie.c b/arch/arm/mach-cns3xxx/pcie.c index a4ec080908b8..06fd25d70aec 100644 --- a/arch/arm/mach-cns3xxx/pcie.c +++ b/arch/arm/mach-cns3xxx/pcie.c | |||
@@ -172,7 +172,7 @@ static struct pci_bus *cns3xxx_pci_scan_bus(int nr, struct pci_sys_data *sys) | |||
172 | return pci_scan_bus(sys->busnr, &cns3xxx_pcie_ops, sys); | 172 | return pci_scan_bus(sys->busnr, &cns3xxx_pcie_ops, sys); |
173 | } | 173 | } |
174 | 174 | ||
175 | static int cns3xxx_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 175 | static int cns3xxx_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
176 | { | 176 | { |
177 | struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); | 177 | struct cns3xxx_pcie *cnspci = pdev_to_cnspci(dev); |
178 | int irq = cnspci->irqs[slot]; | 178 | int irq = cnspci->irqs[slot]; |
diff --git a/arch/arm/mach-dove/pcie.c b/arch/arm/mach-dove/pcie.c index c2f1c4767f21..aa2b3a09a51d 100644 --- a/arch/arm/mach-dove/pcie.c +++ b/arch/arm/mach-dove/pcie.c | |||
@@ -193,7 +193,7 @@ dove_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
193 | return bus; | 193 | return bus; |
194 | } | 194 | } |
195 | 195 | ||
196 | static int __init dove_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 196 | static int __init dove_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
197 | { | 197 | { |
198 | struct pcie_port *pp = bus_to_port(dev->bus->number); | 198 | struct pcie_port *pp = bus_to_port(dev->bus->number); |
199 | 199 | ||
diff --git a/arch/arm/mach-footbridge/cats-pci.c b/arch/arm/mach-footbridge/cats-pci.c index ae3e1c8c7583..32321f66dec4 100644 --- a/arch/arm/mach-footbridge/cats-pci.c +++ b/arch/arm/mach-footbridge/cats-pci.c | |||
@@ -16,7 +16,7 @@ | |||
16 | /* cats host-specific stuff */ | 16 | /* cats host-specific stuff */ |
17 | static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; | 17 | static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 }; |
18 | 18 | ||
19 | static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 19 | static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
20 | { | 20 | { |
21 | if (dev->irq >= 255) | 21 | if (dev->irq >= 255) |
22 | return -1; /* not a valid interrupt. */ | 22 | return -1; /* not a valid interrupt. */ |
diff --git a/arch/arm/mach-footbridge/ebsa285-pci.c b/arch/arm/mach-footbridge/ebsa285-pci.c index e5ab5bddbc8c..511c673ffa9d 100644 --- a/arch/arm/mach-footbridge/ebsa285-pci.c +++ b/arch/arm/mach-footbridge/ebsa285-pci.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI }; | 16 | static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI }; |
17 | 17 | ||
18 | static int __init ebsa285_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 18 | static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
19 | { | 19 | { |
20 | if (dev->vendor == PCI_VENDOR_ID_CONTAQ && | 20 | if (dev->vendor == PCI_VENDOR_ID_CONTAQ && |
21 | dev->device == PCI_DEVICE_ID_CONTAQ_82C693) | 21 | dev->device == PCI_DEVICE_ID_CONTAQ_82C693) |
diff --git a/arch/arm/mach-footbridge/netwinder-pci.c b/arch/arm/mach-footbridge/netwinder-pci.c index e263d6d54a0f..62187610e17e 100644 --- a/arch/arm/mach-footbridge/netwinder-pci.c +++ b/arch/arm/mach-footbridge/netwinder-pci.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * We now use the slot ID instead of the device identifiers to select | 17 | * We now use the slot ID instead of the device identifiers to select |
18 | * which interrupt is routed where. | 18 | * which interrupt is routed where. |
19 | */ | 19 | */ |
20 | static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 20 | static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
21 | { | 21 | { |
22 | switch (slot) { | 22 | switch (slot) { |
23 | case 0: /* host bridge */ | 23 | case 0: /* host bridge */ |
diff --git a/arch/arm/mach-footbridge/personal-pci.c b/arch/arm/mach-footbridge/personal-pci.c index d5fca95afdad..aeb651d914a6 100644 --- a/arch/arm/mach-footbridge/personal-pci.c +++ b/arch/arm/mach-footbridge/personal-pci.c | |||
@@ -18,7 +18,8 @@ static int irqmap_personal_server[] __initdata = { | |||
18 | IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI | 18 | IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI |
19 | }; | 19 | }; |
20 | 20 | ||
21 | static int __init personal_server_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 21 | static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot, |
22 | u8 pin) | ||
22 | { | 23 | { |
23 | unsigned char line; | 24 | unsigned char line; |
24 | 25 | ||
diff --git a/arch/arm/mach-integrator/pci.c b/arch/arm/mach-integrator/pci.c index 2fdb95433f0a..520b6bf81bb1 100644 --- a/arch/arm/mach-integrator/pci.c +++ b/arch/arm/mach-integrator/pci.c | |||
@@ -95,7 +95,7 @@ static int irq_tab[4] __initdata = { | |||
95 | * map the specified device/slot/pin to an IRQ. This works out such | 95 | * map the specified device/slot/pin to an IRQ. This works out such |
96 | * that slot 9 pin 1 is INT0, pin 2 is INT1, and slot 10 pin 1 is INT1. | 96 | * that slot 9 pin 1 is INT0, pin 2 is INT1, and slot 10 pin 1 is INT1. |
97 | */ | 97 | */ |
98 | static int __init integrator_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 98 | static int __init integrator_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
99 | { | 99 | { |
100 | int intnr = ((slot - 9) + (pin - 1)) & 3; | 100 | int intnr = ((slot - 9) + (pin - 1)) & 3; |
101 | 101 | ||
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c index 9b5a63f5d07d..23dfaffc586c 100644 --- a/arch/arm/mach-iop13xx/iq81340mc.c +++ b/arch/arm/mach-iop13xx/iq81340mc.c | |||
@@ -30,7 +30,7 @@ | |||
30 | extern int init_atu; /* Flag to select which ATU(s) to initialize / disable */ | 30 | extern int init_atu; /* Flag to select which ATU(s) to initialize / disable */ |
31 | 31 | ||
32 | static int __init | 32 | static int __init |
33 | iq81340mc_pcix_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | 33 | iq81340mc_pcix_map_irq(const struct pci_dev *dev, u8 idsel, u8 pin) |
34 | { | 34 | { |
35 | switch (idsel) { | 35 | switch (idsel) { |
36 | case 1: | 36 | case 1: |
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 0690b1d7fd3e..251c40897dad 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c | |||
@@ -388,7 +388,7 @@ static int iop13xx_atue_pci_status(int clear) | |||
388 | } | 388 | } |
389 | 389 | ||
390 | static int | 390 | static int |
391 | iop13xx_pcie_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | 391 | iop13xx_pcie_map_irq(const struct pci_dev *dev, u8 idsel, u8 pin) |
392 | { | 392 | { |
393 | WARN_ON(idsel != 0); | 393 | WARN_ON(idsel != 0); |
394 | 394 | ||
diff --git a/arch/arm/mach-iop32x/em7210.c b/arch/arm/mach-iop32x/em7210.c index 779f924af302..6cbffbfc2bba 100644 --- a/arch/arm/mach-iop32x/em7210.c +++ b/arch/arm/mach-iop32x/em7210.c | |||
@@ -81,7 +81,7 @@ void __init em7210_map_io(void) | |||
81 | #define INTD IRQ_IOP32X_XINT3 | 81 | #define INTD IRQ_IOP32X_XINT3 |
82 | 82 | ||
83 | static int __init | 83 | static int __init |
84 | em7210_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 84 | em7210_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
85 | { | 85 | { |
86 | static int pci_irq_table[][4] = { | 86 | static int pci_irq_table[][4] = { |
87 | /* | 87 | /* |
diff --git a/arch/arm/mach-iop32x/glantank.c b/arch/arm/mach-iop32x/glantank.c index c6b6f9c5650d..ceef5d4dce1a 100644 --- a/arch/arm/mach-iop32x/glantank.c +++ b/arch/arm/mach-iop32x/glantank.c | |||
@@ -77,7 +77,7 @@ void __init glantank_map_io(void) | |||
77 | #define INTD IRQ_IOP32X_XINT3 | 77 | #define INTD IRQ_IOP32X_XINT3 |
78 | 78 | ||
79 | static int __init | 79 | static int __init |
80 | glantank_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 80 | glantank_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
81 | { | 81 | { |
82 | static int pci_irq_table[][4] = { | 82 | static int pci_irq_table[][4] = { |
83 | /* | 83 | /* |
diff --git a/arch/arm/mach-iop32x/iq31244.c b/arch/arm/mach-iop32x/iq31244.c index fde962c057f0..3a62514dae7c 100644 --- a/arch/arm/mach-iop32x/iq31244.c +++ b/arch/arm/mach-iop32x/iq31244.c | |||
@@ -103,7 +103,7 @@ void __init iq31244_map_io(void) | |||
103 | * EP80219/IQ31244 PCI. | 103 | * EP80219/IQ31244 PCI. |
104 | */ | 104 | */ |
105 | static int __init | 105 | static int __init |
106 | ep80219_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 106 | ep80219_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
107 | { | 107 | { |
108 | int irq; | 108 | int irq; |
109 | 109 | ||
@@ -139,7 +139,7 @@ static struct hw_pci ep80219_pci __initdata = { | |||
139 | }; | 139 | }; |
140 | 140 | ||
141 | static int __init | 141 | static int __init |
142 | iq31244_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 142 | iq31244_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
143 | { | 143 | { |
144 | int irq; | 144 | int irq; |
145 | 145 | ||
diff --git a/arch/arm/mach-iop32x/iq80321.c b/arch/arm/mach-iop32x/iq80321.c index 3a95950e8737..35b7e6914d3b 100644 --- a/arch/arm/mach-iop32x/iq80321.c +++ b/arch/arm/mach-iop32x/iq80321.c | |||
@@ -71,7 +71,7 @@ void __init iq80321_map_io(void) | |||
71 | * IQ80321 PCI. | 71 | * IQ80321 PCI. |
72 | */ | 72 | */ |
73 | static int __init | 73 | static int __init |
74 | iq80321_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 74 | iq80321_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
75 | { | 75 | { |
76 | int irq; | 76 | int irq; |
77 | 77 | ||
diff --git a/arch/arm/mach-iop32x/n2100.c b/arch/arm/mach-iop32x/n2100.c index 626aa375915d..1a374eab6007 100644 --- a/arch/arm/mach-iop32x/n2100.c +++ b/arch/arm/mach-iop32x/n2100.c | |||
@@ -78,7 +78,7 @@ void __init n2100_map_io(void) | |||
78 | * N2100 PCI. | 78 | * N2100 PCI. |
79 | */ | 79 | */ |
80 | static int __init | 80 | static int __init |
81 | n2100_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 81 | n2100_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
82 | { | 82 | { |
83 | int irq; | 83 | int irq; |
84 | 84 | ||
diff --git a/arch/arm/mach-iop33x/iq80331.c b/arch/arm/mach-iop33x/iq80331.c index c565f8d1e3a4..637c0272d5e0 100644 --- a/arch/arm/mach-iop33x/iq80331.c +++ b/arch/arm/mach-iop33x/iq80331.c | |||
@@ -54,7 +54,7 @@ static struct sys_timer iq80331_timer = { | |||
54 | * IQ80331 PCI. | 54 | * IQ80331 PCI. |
55 | */ | 55 | */ |
56 | static int __init | 56 | static int __init |
57 | iq80331_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 57 | iq80331_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
58 | { | 58 | { |
59 | int irq; | 59 | int irq; |
60 | 60 | ||
diff --git a/arch/arm/mach-iop33x/iq80332.c b/arch/arm/mach-iop33x/iq80332.c index 36a9efb254c2..90a0436d7255 100644 --- a/arch/arm/mach-iop33x/iq80332.c +++ b/arch/arm/mach-iop33x/iq80332.c | |||
@@ -54,7 +54,7 @@ static struct sys_timer iq80332_timer = { | |||
54 | * IQ80332 PCI. | 54 | * IQ80332 PCI. |
55 | */ | 55 | */ |
56 | static int __init | 56 | static int __init |
57 | iq80332_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 57 | iq80332_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
58 | { | 58 | { |
59 | int irq; | 59 | int irq; |
60 | 60 | ||
diff --git a/arch/arm/mach-ixp2000/enp2611.c b/arch/arm/mach-ixp2000/enp2611.c index 88663ab1d2ad..62c60ade5274 100644 --- a/arch/arm/mach-ixp2000/enp2611.c +++ b/arch/arm/mach-ixp2000/enp2611.c | |||
@@ -148,7 +148,8 @@ static struct pci_bus * __init enp2611_pci_scan_bus(int nr, | |||
148 | return pci_scan_bus(sys->busnr, &enp2611_pci_ops, sys); | 148 | return pci_scan_bus(sys->busnr, &enp2611_pci_ops, sys); |
149 | } | 149 | } |
150 | 150 | ||
151 | static int __init enp2611_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 151 | static int __init enp2611_pci_map_irq(const struct pci_dev *dev, u8 slot, |
152 | u8 pin) | ||
152 | { | 153 | { |
153 | int irq; | 154 | int irq; |
154 | 155 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2400.c b/arch/arm/mach-ixp2000/ixdp2400.c index dfffc1e817fa..5bad1a8419b7 100644 --- a/arch/arm/mach-ixp2000/ixdp2400.c +++ b/arch/arm/mach-ixp2000/ixdp2400.c | |||
@@ -78,7 +78,8 @@ int ixdp2400_pci_setup(int nr, struct pci_sys_data *sys) | |||
78 | return 1; | 78 | return 1; |
79 | } | 79 | } |
80 | 80 | ||
81 | static int __init ixdp2400_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 81 | static int __init ixdp2400_pci_map_irq(const struct pci_dev *dev, u8 slot, |
82 | u8 pin) | ||
82 | { | 83 | { |
83 | if (ixdp2x00_master_npu()) { | 84 | if (ixdp2x00_master_npu()) { |
84 | 85 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2800.c b/arch/arm/mach-ixp2000/ixdp2800.c index cd4c9bcff2b5..3d3cef876467 100644 --- a/arch/arm/mach-ixp2000/ixdp2800.c +++ b/arch/arm/mach-ixp2000/ixdp2800.c | |||
@@ -161,7 +161,8 @@ static int __init ixdp2800_pci_setup(int nr, struct pci_sys_data *sys) | |||
161 | return 1; | 161 | return 1; |
162 | } | 162 | } |
163 | 163 | ||
164 | static int __init ixdp2800_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 164 | static int __init ixdp2800_pci_map_irq(const struct pci_dev *dev, u8 slot, |
165 | u8 pin) | ||
165 | { | 166 | { |
166 | if (ixdp2x00_master_npu()) { | 167 | if (ixdp2x00_master_npu()) { |
167 | 168 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 84835b209557..be2a254f1374 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -252,7 +252,8 @@ void __init ixdp2x01_pci_preinit(void) | |||
252 | 252 | ||
253 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) | 253 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) |
254 | 254 | ||
255 | static int __init ixdp2x01_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 255 | static int __init ixdp2x01_pci_map_irq(const struct pci_dev *dev, u8 slot, |
256 | u8 pin) | ||
256 | { | 257 | { |
257 | u8 bus = dev->bus->number; | 258 | u8 bus = dev->bus->number; |
258 | u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); | 259 | u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); |
diff --git a/arch/arm/mach-ixp23xx/ixdp2351.c b/arch/arm/mach-ixp23xx/ixdp2351.c index 8dcba17c81e7..ec028e35f401 100644 --- a/arch/arm/mach-ixp23xx/ixdp2351.c +++ b/arch/arm/mach-ixp23xx/ixdp2351.c | |||
@@ -168,7 +168,7 @@ void __init ixdp2351_init_irq(void) | |||
168 | */ | 168 | */ |
169 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) | 169 | #define DEVPIN(dev, pin) ((pin) | ((dev) << 3)) |
170 | 170 | ||
171 | static int __init ixdp2351_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 171 | static int __init ixdp2351_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
172 | { | 172 | { |
173 | u8 bus = dev->bus->number; | 173 | u8 bus = dev->bus->number; |
174 | u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); | 174 | u32 devpin = DEVPIN(PCI_SLOT(dev->devfn), pin); |
diff --git a/arch/arm/mach-ixp23xx/roadrunner.c b/arch/arm/mach-ixp23xx/roadrunner.c index 8fe0c6273262..844551d2368b 100644 --- a/arch/arm/mach-ixp23xx/roadrunner.c +++ b/arch/arm/mach-ixp23xx/roadrunner.c | |||
@@ -56,7 +56,8 @@ | |||
56 | #define INTC_PIN IXP23XX_GPIO_PIN_11 | 56 | #define INTC_PIN IXP23XX_GPIO_PIN_11 |
57 | #define INTD_PIN IXP23XX_GPIO_PIN_12 | 57 | #define INTD_PIN IXP23XX_GPIO_PIN_12 |
58 | 58 | ||
59 | static int __init roadrunner_map_irq(struct pci_dev *dev, u8 idsel, u8 pin) | 59 | static int __init roadrunner_map_irq(const struct pci_dev *dev, u8 idsel, |
60 | u8 pin) | ||
60 | { | 61 | { |
61 | static int pci_card_slot_irq[] = {INTB, INTC, INTD, INTA}; | 62 | static int pci_card_slot_irq[] = {INTB, INTC, INTD, INTA}; |
62 | static int pmc_card_slot_irq[] = {INTA, INTB, INTC, INTD}; | 63 | static int pmc_card_slot_irq[] = {INTA, INTB, INTC, INTD}; |
diff --git a/arch/arm/mach-ixp4xx/avila-pci.c b/arch/arm/mach-ixp4xx/avila-pci.c index 162043ff29ff..8fea0a3c5246 100644 --- a/arch/arm/mach-ixp4xx/avila-pci.c +++ b/arch/arm/mach-ixp4xx/avila-pci.c | |||
@@ -46,7 +46,7 @@ void __init avila_pci_preinit(void) | |||
46 | ixp4xx_pci_preinit(); | 46 | ixp4xx_pci_preinit(); |
47 | } | 47 | } |
48 | 48 | ||
49 | static int __init avila_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 49 | static int __init avila_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
50 | { | 50 | { |
51 | static int pci_irq_table[IRQ_LINES] = { | 51 | static int pci_irq_table[IRQ_LINES] = { |
52 | IXP4XX_GPIO_IRQ(INTA), | 52 | IXP4XX_GPIO_IRQ(INTA), |
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c index 37fda7d6e83d..71f5c9c60fc3 100644 --- a/arch/arm/mach-ixp4xx/coyote-pci.c +++ b/arch/arm/mach-ixp4xx/coyote-pci.c | |||
@@ -37,7 +37,7 @@ void __init coyote_pci_preinit(void) | |||
37 | ixp4xx_pci_preinit(); | 37 | ixp4xx_pci_preinit(); |
38 | } | 38 | } |
39 | 39 | ||
40 | static int __init coyote_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 40 | static int __init coyote_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
41 | { | 41 | { |
42 | if (slot == SLOT0_DEVID) | 42 | if (slot == SLOT0_DEVID) |
43 | return IXP4XX_GPIO_IRQ(SLOT0_INTA); | 43 | return IXP4XX_GPIO_IRQ(SLOT0_INTA); |
diff --git a/arch/arm/mach-ixp4xx/dsmg600-pci.c b/arch/arm/mach-ixp4xx/dsmg600-pci.c index c7612010b3fc..0532510b5e8c 100644 --- a/arch/arm/mach-ixp4xx/dsmg600-pci.c +++ b/arch/arm/mach-ixp4xx/dsmg600-pci.c | |||
@@ -44,7 +44,7 @@ void __init dsmg600_pci_preinit(void) | |||
44 | ixp4xx_pci_preinit(); | 44 | ixp4xx_pci_preinit(); |
45 | } | 45 | } |
46 | 46 | ||
47 | static int __init dsmg600_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 47 | static int __init dsmg600_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
48 | { | 48 | { |
49 | static int pci_irq_table[MAX_DEV][IRQ_LINES] = { | 49 | static int pci_irq_table[MAX_DEV][IRQ_LINES] = { |
50 | { IXP4XX_GPIO_IRQ(INTE), -1, -1 }, | 50 | { IXP4XX_GPIO_IRQ(INTE), -1, -1 }, |
diff --git a/arch/arm/mach-ixp4xx/fsg-pci.c b/arch/arm/mach-ixp4xx/fsg-pci.c index 44ccde9d4879..d2ac803328f7 100644 --- a/arch/arm/mach-ixp4xx/fsg-pci.c +++ b/arch/arm/mach-ixp4xx/fsg-pci.c | |||
@@ -38,7 +38,7 @@ void __init fsg_pci_preinit(void) | |||
38 | ixp4xx_pci_preinit(); | 38 | ixp4xx_pci_preinit(); |
39 | } | 39 | } |
40 | 40 | ||
41 | static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 41 | static int __init fsg_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
42 | { | 42 | { |
43 | static int pci_irq_table[IRQ_LINES] = { | 43 | static int pci_irq_table[IRQ_LINES] = { |
44 | IXP4XX_GPIO_IRQ(INTC), | 44 | IXP4XX_GPIO_IRQ(INTC), |
diff --git a/arch/arm/mach-ixp4xx/gateway7001-pci.c b/arch/arm/mach-ixp4xx/gateway7001-pci.c index fc1124168874..76581fb467c4 100644 --- a/arch/arm/mach-ixp4xx/gateway7001-pci.c +++ b/arch/arm/mach-ixp4xx/gateway7001-pci.c | |||
@@ -35,7 +35,8 @@ void __init gateway7001_pci_preinit(void) | |||
35 | ixp4xx_pci_preinit(); | 35 | ixp4xx_pci_preinit(); |
36 | } | 36 | } |
37 | 37 | ||
38 | static int __init gateway7001_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 38 | static int __init gateway7001_map_irq(const struct pci_dev *dev, u8 slot, |
39 | u8 pin) | ||
39 | { | 40 | { |
40 | if (slot == 1) | 41 | if (slot == 1) |
41 | return IRQ_IXP4XX_GPIO11; | 42 | return IRQ_IXP4XX_GPIO11; |
diff --git a/arch/arm/mach-ixp4xx/goramo_mlr.c b/arch/arm/mach-ixp4xx/goramo_mlr.c index 5f00ad224fe0..7548d9a2efe2 100644 --- a/arch/arm/mach-ixp4xx/goramo_mlr.c +++ b/arch/arm/mach-ixp4xx/goramo_mlr.c | |||
@@ -462,7 +462,7 @@ static void __init gmlr_pci_postinit(void) | |||
462 | } | 462 | } |
463 | } | 463 | } |
464 | 464 | ||
465 | static int __init gmlr_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 465 | static int __init gmlr_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
466 | { | 466 | { |
467 | switch(slot) { | 467 | switch(slot) { |
468 | case SLOT_ETHA: return IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA); | 468 | case SLOT_ETHA: return IXP4XX_GPIO_IRQ(GPIO_IRQ_ETHA); |
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c index 38cc0725dbd8..d68fc068c38d 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c | |||
@@ -49,7 +49,7 @@ void __init gtwx5715_pci_preinit(void) | |||
49 | } | 49 | } |
50 | 50 | ||
51 | 51 | ||
52 | static int __init gtwx5715_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 52 | static int __init gtwx5715_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
53 | { | 53 | { |
54 | int rc = -1; | 54 | int rc = -1; |
55 | 55 | ||
diff --git a/arch/arm/mach-ixp4xx/ixdp425-pci.c b/arch/arm/mach-ixp4xx/ixdp425-pci.c index 58f400417eaf..fffd8c5e40bf 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdp425-pci.c | |||
@@ -43,7 +43,7 @@ void __init ixdp425_pci_preinit(void) | |||
43 | ixp4xx_pci_preinit(); | 43 | ixp4xx_pci_preinit(); |
44 | } | 44 | } |
45 | 45 | ||
46 | static int __init ixdp425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 46 | static int __init ixdp425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
47 | { | 47 | { |
48 | static int pci_irq_table[IRQ_LINES] = { | 48 | static int pci_irq_table[IRQ_LINES] = { |
49 | IXP4XX_GPIO_IRQ(INTA), | 49 | IXP4XX_GPIO_IRQ(INTA), |
diff --git a/arch/arm/mach-ixp4xx/ixdpg425-pci.c b/arch/arm/mach-ixp4xx/ixdpg425-pci.c index e64f6d041488..34efe75015ec 100644 --- a/arch/arm/mach-ixp4xx/ixdpg425-pci.c +++ b/arch/arm/mach-ixp4xx/ixdpg425-pci.c | |||
@@ -31,7 +31,7 @@ void __init ixdpg425_pci_preinit(void) | |||
31 | ixp4xx_pci_preinit(); | 31 | ixp4xx_pci_preinit(); |
32 | } | 32 | } |
33 | 33 | ||
34 | static int __init ixdpg425_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 34 | static int __init ixdpg425_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
35 | { | 35 | { |
36 | if (slot == 12 || slot == 13) | 36 | if (slot == 12 || slot == 13) |
37 | return IRQ_IXP4XX_GPIO7; | 37 | return IRQ_IXP4XX_GPIO7; |
diff --git a/arch/arm/mach-ixp4xx/nas100d-pci.c b/arch/arm/mach-ixp4xx/nas100d-pci.c index 428d1202b799..5434ccf553eb 100644 --- a/arch/arm/mach-ixp4xx/nas100d-pci.c +++ b/arch/arm/mach-ixp4xx/nas100d-pci.c | |||
@@ -41,7 +41,7 @@ void __init nas100d_pci_preinit(void) | |||
41 | ixp4xx_pci_preinit(); | 41 | ixp4xx_pci_preinit(); |
42 | } | 42 | } |
43 | 43 | ||
44 | static int __init nas100d_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 44 | static int __init nas100d_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
45 | { | 45 | { |
46 | static int pci_irq_table[MAX_DEV][IRQ_LINES] = { | 46 | static int pci_irq_table[MAX_DEV][IRQ_LINES] = { |
47 | { IXP4XX_GPIO_IRQ(INTA), -1, -1 }, | 47 | { IXP4XX_GPIO_IRQ(INTA), -1, -1 }, |
diff --git a/arch/arm/mach-ixp4xx/nslu2-pci.c b/arch/arm/mach-ixp4xx/nslu2-pci.c index 2e85f76b950d..b57160535e47 100644 --- a/arch/arm/mach-ixp4xx/nslu2-pci.c +++ b/arch/arm/mach-ixp4xx/nslu2-pci.c | |||
@@ -38,7 +38,7 @@ void __init nslu2_pci_preinit(void) | |||
38 | ixp4xx_pci_preinit(); | 38 | ixp4xx_pci_preinit(); |
39 | } | 39 | } |
40 | 40 | ||
41 | static int __init nslu2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 41 | static int __init nslu2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
42 | { | 42 | { |
43 | static int pci_irq_table[IRQ_LINES] = { | 43 | static int pci_irq_table[IRQ_LINES] = { |
44 | IXP4XX_GPIO_IRQ(INTA), | 44 | IXP4XX_GPIO_IRQ(INTA), |
diff --git a/arch/arm/mach-ixp4xx/vulcan-pci.c b/arch/arm/mach-ixp4xx/vulcan-pci.c index 03bdec5140a7..0bc3f34c282f 100644 --- a/arch/arm/mach-ixp4xx/vulcan-pci.c +++ b/arch/arm/mach-ixp4xx/vulcan-pci.c | |||
@@ -43,7 +43,7 @@ void __init vulcan_pci_preinit(void) | |||
43 | ixp4xx_pci_preinit(); | 43 | ixp4xx_pci_preinit(); |
44 | } | 44 | } |
45 | 45 | ||
46 | static int __init vulcan_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 46 | static int __init vulcan_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
47 | { | 47 | { |
48 | if (slot == 1) | 48 | if (slot == 1) |
49 | return IXP4XX_GPIO_IRQ(INTA); | 49 | return IXP4XX_GPIO_IRQ(INTA); |
diff --git a/arch/arm/mach-ixp4xx/wg302v2-pci.c b/arch/arm/mach-ixp4xx/wg302v2-pci.c index 17f3cf59a31b..f27dfcfe811b 100644 --- a/arch/arm/mach-ixp4xx/wg302v2-pci.c +++ b/arch/arm/mach-ixp4xx/wg302v2-pci.c | |||
@@ -35,7 +35,7 @@ void __init wg302v2_pci_preinit(void) | |||
35 | ixp4xx_pci_preinit(); | 35 | ixp4xx_pci_preinit(); |
36 | } | 36 | } |
37 | 37 | ||
38 | static int __init wg302v2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 38 | static int __init wg302v2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
39 | { | 39 | { |
40 | if (slot == 1) | 40 | if (slot == 1) |
41 | return IRQ_IXP4XX_GPIO8; | 41 | return IRQ_IXP4XX_GPIO8; |
diff --git a/arch/arm/mach-kirkwood/pcie.c b/arch/arm/mach-kirkwood/pcie.c index bfeb9c900cec..74b992d810ea 100644 --- a/arch/arm/mach-kirkwood/pcie.c +++ b/arch/arm/mach-kirkwood/pcie.c | |||
@@ -245,7 +245,8 @@ kirkwood_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
245 | return bus; | 245 | return bus; |
246 | } | 246 | } |
247 | 247 | ||
248 | static int __init kirkwood_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 248 | static int __init kirkwood_pcie_map_irq(const struct pci_dev *dev, u8 slot, |
249 | u8 pin) | ||
249 | { | 250 | { |
250 | struct pcie_port *pp = bus_to_port(dev->bus); | 251 | struct pcie_port *pp = bus_to_port(dev->bus); |
251 | 252 | ||
diff --git a/arch/arm/mach-ks8695/board-dsm320.c b/arch/arm/mach-ks8695/board-dsm320.c index ada92b6bed24..1338cb3e9827 100644 --- a/arch/arm/mach-ks8695/board-dsm320.c +++ b/arch/arm/mach-ks8695/board-dsm320.c | |||
@@ -34,7 +34,7 @@ | |||
34 | #include "generic.h" | 34 | #include "generic.h" |
35 | 35 | ||
36 | #ifdef CONFIG_PCI | 36 | #ifdef CONFIG_PCI |
37 | static int dsm320_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 37 | static int dsm320_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
38 | { | 38 | { |
39 | switch (slot) { | 39 | switch (slot) { |
40 | case 0: | 40 | case 0: |
diff --git a/arch/arm/mach-ks8695/board-micrel.c b/arch/arm/mach-ks8695/board-micrel.c index c7ad09bd6ea2..e2e3cba8dcdb 100644 --- a/arch/arm/mach-ks8695/board-micrel.c +++ b/arch/arm/mach-ks8695/board-micrel.c | |||
@@ -24,7 +24,7 @@ | |||
24 | #include "generic.h" | 24 | #include "generic.h" |
25 | 25 | ||
26 | #ifdef CONFIG_PCI | 26 | #ifdef CONFIG_PCI |
27 | static int micrel_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 27 | static int micrel_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
28 | { | 28 | { |
29 | return KS8695_IRQ_EXTERN0; | 29 | return KS8695_IRQ_EXTERN0; |
30 | } | 30 | } |
diff --git a/arch/arm/mach-ks8695/include/mach/devices.h b/arch/arm/mach-ks8695/include/mach/devices.h index 2744fecb429c..85a3c9aa7d13 100644 --- a/arch/arm/mach-ks8695/include/mach/devices.h +++ b/arch/arm/mach-ks8695/include/mach/devices.h | |||
@@ -30,7 +30,7 @@ extern void __init ks8695_init_leds(u8 cpu_led, u8 timer_led); | |||
30 | 30 | ||
31 | struct ks8695_pci_cfg { | 31 | struct ks8695_pci_cfg { |
32 | short mode; | 32 | short mode; |
33 | int (*map_irq)(struct pci_dev *, u8, u8); | 33 | int (*map_irq)(const struct pci_dev *, u8, u8); |
34 | }; | 34 | }; |
35 | extern __init void ks8695_init_pci(struct ks8695_pci_cfg *); | 35 | extern __init void ks8695_init_pci(struct ks8695_pci_cfg *); |
36 | 36 | ||
diff --git a/arch/arm/mach-mv78xx0/pcie.c b/arch/arm/mach-mv78xx0/pcie.c index d6336afe9948..c51af1cac300 100644 --- a/arch/arm/mach-mv78xx0/pcie.c +++ b/arch/arm/mach-mv78xx0/pcie.c | |||
@@ -260,7 +260,8 @@ mv78xx0_pcie_scan_bus(int nr, struct pci_sys_data *sys) | |||
260 | return bus; | 260 | return bus; |
261 | } | 261 | } |
262 | 262 | ||
263 | static int __init mv78xx0_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 263 | static int __init mv78xx0_pcie_map_irq(const struct pci_dev *dev, u8 slot, |
264 | u8 pin) | ||
264 | { | 265 | { |
265 | struct pcie_port *pp = bus_to_port(dev->bus->number); | 266 | struct pcie_port *pp = bus_to_port(dev->bus->number); |
266 | 267 | ||
diff --git a/arch/arm/mach-orion5x/common.h b/arch/arm/mach-orion5x/common.h index f2b2b35e8646..3e5499dda49a 100644 --- a/arch/arm/mach-orion5x/common.h +++ b/arch/arm/mach-orion5x/common.h | |||
@@ -51,7 +51,7 @@ void orion5x_pci_disable(void); | |||
51 | void orion5x_pci_set_cardbus_mode(void); | 51 | void orion5x_pci_set_cardbus_mode(void); |
52 | int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); | 52 | int orion5x_pci_sys_setup(int nr, struct pci_sys_data *sys); |
53 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); | 53 | struct pci_bus *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys); |
54 | int orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin); | 54 | int orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
55 | 55 | ||
56 | struct machine_desc; | 56 | struct machine_desc; |
57 | struct meminfo; | 57 | struct meminfo; |
diff --git a/arch/arm/mach-orion5x/db88f5281-setup.c b/arch/arm/mach-orion5x/db88f5281-setup.c index f95d3cb01cbf..a3e3e9e5e328 100644 --- a/arch/arm/mach-orion5x/db88f5281-setup.c +++ b/arch/arm/mach-orion5x/db88f5281-setup.c | |||
@@ -237,7 +237,8 @@ void __init db88f5281_pci_preinit(void) | |||
237 | } | 237 | } |
238 | } | 238 | } |
239 | 239 | ||
240 | static int __init db88f5281_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 240 | static int __init db88f5281_pci_map_irq(const struct pci_dev *dev, u8 slot, |
241 | u8 pin) | ||
241 | { | 242 | { |
242 | int irq; | 243 | int irq; |
243 | 244 | ||
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c index 855e0e77d563..a6eddae82a0b 100644 --- a/arch/arm/mach-orion5x/dns323-setup.c +++ b/arch/arm/mach-orion5x/dns323-setup.c | |||
@@ -70,14 +70,14 @@ enum { | |||
70 | * PCI setup | 70 | * PCI setup |
71 | */ | 71 | */ |
72 | 72 | ||
73 | static int __init dns323_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 73 | static int __init dns323_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
74 | { | 74 | { |
75 | int irq; | 75 | int irq; |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * Check for devices with hard-wired IRQs. | 78 | * Check for devices with hard-wired IRQs. |
79 | */ | 79 | */ |
80 | irq = orion5x_pci_map_irq(dev, slot, pin); | 80 | irq = orion5x_pci_map_irq(const dev, slot, pin); |
81 | if (irq != -1) | 81 | if (irq != -1) |
82 | return irq; | 82 | return irq; |
83 | 83 | ||
diff --git a/arch/arm/mach-orion5x/kurobox_pro-setup.c b/arch/arm/mach-orion5x/kurobox_pro-setup.c index c0eb6462633f..00381249d766 100644 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c | |||
@@ -119,7 +119,8 @@ static struct platform_device kurobox_pro_nor_flash = { | |||
119 | * PCI | 119 | * PCI |
120 | ****************************************************************************/ | 120 | ****************************************************************************/ |
121 | 121 | ||
122 | static int __init kurobox_pro_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 122 | static int __init kurobox_pro_pci_map_irq(const struct pci_dev *dev, u8 slot, |
123 | u8 pin) | ||
123 | { | 124 | { |
124 | int irq; | 125 | int irq; |
125 | 126 | ||
diff --git a/arch/arm/mach-orion5x/mss2-setup.c b/arch/arm/mach-orion5x/mss2-setup.c index 59263b73d1e4..ef3bb8e9a4c2 100644 --- a/arch/arm/mach-orion5x/mss2-setup.c +++ b/arch/arm/mach-orion5x/mss2-setup.c | |||
@@ -73,7 +73,7 @@ static struct platform_device mss2_nor_flash = { | |||
73 | /**************************************************************************** | 73 | /**************************************************************************** |
74 | * PCI setup | 74 | * PCI setup |
75 | ****************************************************************************/ | 75 | ****************************************************************************/ |
76 | static int __init mss2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 76 | static int __init mss2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
77 | { | 77 | { |
78 | int irq; | 78 | int irq; |
79 | 79 | ||
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c index f64965d4f8e8..28b8760ab9fa 100644 --- a/arch/arm/mach-orion5x/pci.c +++ b/arch/arm/mach-orion5x/pci.c | |||
@@ -589,7 +589,7 @@ struct pci_bus __init *orion5x_pci_sys_scan_bus(int nr, struct pci_sys_data *sys | |||
589 | return bus; | 589 | return bus; |
590 | } | 590 | } |
591 | 591 | ||
592 | int __init orion5x_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 592 | int __init orion5x_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
593 | { | 593 | { |
594 | int bus = dev->bus->number; | 594 | int bus = dev->bus->number; |
595 | 595 | ||
diff --git a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c index 9eec7c2375e9..291d22bf44c9 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-fxo-setup.c | |||
@@ -131,7 +131,7 @@ static void __init rd88f5181l_fxo_init(void) | |||
131 | } | 131 | } |
132 | 132 | ||
133 | static int __init | 133 | static int __init |
134 | rd88f5181l_fxo_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 134 | rd88f5181l_fxo_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
135 | { | 135 | { |
136 | int irq; | 136 | int irq; |
137 | 137 | ||
diff --git a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c index 0cc90bbfd326..3f02362e1632 100644 --- a/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c +++ b/arch/arm/mach-orion5x/rd88f5181l-ge-setup.c | |||
@@ -140,7 +140,7 @@ static void __init rd88f5181l_ge_init(void) | |||
140 | } | 140 | } |
141 | 141 | ||
142 | static int __init | 142 | static int __init |
143 | rd88f5181l_ge_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 143 | rd88f5181l_ge_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
144 | { | 144 | { |
145 | int irq; | 145 | int irq; |
146 | 146 | ||
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c index 48da39b9bdb0..27fd38e658bd 100644 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c | |||
@@ -172,7 +172,8 @@ void __init rd88f5182_pci_preinit(void) | |||
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | static int __init rd88f5182_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 175 | static int __init rd88f5182_pci_map_irq(const struct pci_dev *dev, u8 slot, |
176 | u8 pin) | ||
176 | { | 177 | { |
177 | int irq; | 178 | int irq; |
178 | 179 | ||
diff --git a/arch/arm/mach-orion5x/terastation_pro2-setup.c b/arch/arm/mach-orion5x/terastation_pro2-setup.c index 29ce826c3c21..a34e4fac72b0 100644 --- a/arch/arm/mach-orion5x/terastation_pro2-setup.c +++ b/arch/arm/mach-orion5x/terastation_pro2-setup.c | |||
@@ -100,7 +100,7 @@ void __init tsp2_pci_preinit(void) | |||
100 | } | 100 | } |
101 | } | 101 | } |
102 | 102 | ||
103 | static int __init tsp2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 103 | static int __init tsp2_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
104 | { | 104 | { |
105 | int irq; | 105 | int irq; |
106 | 106 | ||
diff --git a/arch/arm/mach-orion5x/ts209-setup.c b/arch/arm/mach-orion5x/ts209-setup.c index 47162fd5f044..c9831614e355 100644 --- a/arch/arm/mach-orion5x/ts209-setup.c +++ b/arch/arm/mach-orion5x/ts209-setup.c | |||
@@ -143,7 +143,8 @@ void __init qnap_ts209_pci_preinit(void) | |||
143 | } | 143 | } |
144 | } | 144 | } |
145 | 145 | ||
146 | static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 146 | static int __init qnap_ts209_pci_map_irq(const struct pci_dev *dev, u8 slot, |
147 | u8 pin) | ||
147 | { | 148 | { |
148 | int irq; | 149 | int irq; |
149 | 150 | ||
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c index 5aacc7ac5cf4..cc33b2222bad 100644 --- a/arch/arm/mach-orion5x/ts409-setup.c +++ b/arch/arm/mach-orion5x/ts409-setup.c | |||
@@ -121,7 +121,8 @@ static struct platform_device qnap_ts409_nor_flash = { | |||
121 | * PCI | 121 | * PCI |
122 | ****************************************************************************/ | 122 | ****************************************************************************/ |
123 | 123 | ||
124 | static int __init qnap_ts409_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 124 | static int __init qnap_ts409_pci_map_irq(const struct pci_dev *dev, u8 slot, |
125 | u8 pin) | ||
125 | { | 126 | { |
126 | int irq; | 127 | int irq; |
127 | 128 | ||
diff --git a/arch/arm/mach-orion5x/wnr854t-setup.c b/arch/arm/mach-orion5x/wnr854t-setup.c index 444a1c7fdfd6..2653595f901c 100644 --- a/arch/arm/mach-orion5x/wnr854t-setup.c +++ b/arch/arm/mach-orion5x/wnr854t-setup.c | |||
@@ -133,7 +133,8 @@ static void __init wnr854t_init(void) | |||
133 | platform_device_register(&wnr854t_nor_flash); | 133 | platform_device_register(&wnr854t_nor_flash); |
134 | } | 134 | } |
135 | 135 | ||
136 | static int __init wnr854t_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 136 | static int __init wnr854t_pci_map_irq(const struct pci_dev *dev, u8 slot, |
137 | u8 pin) | ||
137 | { | 138 | { |
138 | int irq; | 139 | int irq; |
139 | 140 | ||
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c index d1952be0ae1c..251ef1543e53 100644 --- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c +++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c | |||
@@ -221,7 +221,8 @@ static void __init wrt350n_v2_init(void) | |||
221 | platform_device_register(&wrt350n_v2_button_device); | 221 | platform_device_register(&wrt350n_v2_button_device); |
222 | } | 222 | } |
223 | 223 | ||
224 | static int __init wrt350n_v2_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 224 | static int __init wrt350n_v2_pci_map_irq(const struct pci_dev *dev, u8 slot, |
225 | u8 pin) | ||
225 | { | 226 | { |
226 | int irq; | 227 | int irq; |
227 | 228 | ||
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c index 4eb7660a279d..6bf479d9b5ac 100644 --- a/arch/arm/mach-pxa/cm-x2xx-pci.c +++ b/arch/arm/mach-pxa/cm-x2xx-pci.c | |||
@@ -77,7 +77,7 @@ void cmx2xx_pci_resume(void) {} | |||
77 | #endif | 77 | #endif |
78 | 78 | ||
79 | /* PCI IRQ mapping*/ | 79 | /* PCI IRQ mapping*/ |
80 | static int __init cmx2xx_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 80 | static int __init cmx2xx_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
81 | { | 81 | { |
82 | int irq; | 82 | int irq; |
83 | 83 | ||
diff --git a/arch/arm/mach-sa1100/pci-nanoengine.c b/arch/arm/mach-sa1100/pci-nanoengine.c index 5fc074fe3eee..964c6c3cd7a6 100644 --- a/arch/arm/mach-sa1100/pci-nanoengine.c +++ b/arch/arm/mach-sa1100/pci-nanoengine.c | |||
@@ -122,7 +122,8 @@ static struct pci_ops pci_nano_ops = { | |||
122 | .write = nanoengine_write_config, | 122 | .write = nanoengine_write_config, |
123 | }; | 123 | }; |
124 | 124 | ||
125 | static int __init pci_nanoengine_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 125 | static int __init pci_nanoengine_map_irq(const struct pci_dev *dev, u8 slot, |
126 | u8 pin) | ||
126 | { | 127 | { |
127 | return NANOENGINE_IRQ_GPIO_PCI; | 128 | return NANOENGINE_IRQ_GPIO_PCI; |
128 | } | 129 | } |
diff --git a/arch/arm/mach-shark/pci.c b/arch/arm/mach-shark/pci.c index 92d7227de0ac..7cb79a092f31 100644 --- a/arch/arm/mach-shark/pci.c +++ b/arch/arm/mach-shark/pci.c | |||
@@ -14,7 +14,7 @@ | |||
14 | #include <asm/mach/pci.h> | 14 | #include <asm/mach/pci.h> |
15 | #include <asm/mach-types.h> | 15 | #include <asm/mach-types.h> |
16 | 16 | ||
17 | static int __init shark_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 17 | static int __init shark_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
18 | { | 18 | { |
19 | if (dev->bus->number == 0) | 19 | if (dev->bus->number == 0) |
20 | if (dev->devfn == 0) | 20 | if (dev->devfn == 0) |
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c index 031cd0a7d71d..f1f699d86c32 100644 --- a/arch/arm/mach-tegra/pcie.c +++ b/arch/arm/mach-tegra/pcie.c | |||
@@ -449,7 +449,7 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) | |||
449 | return 1; | 449 | return 1; |
450 | } | 450 | } |
451 | 451 | ||
452 | static int tegra_pcie_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 452 | static int tegra_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
453 | { | 453 | { |
454 | return INT_PCIE_INTR; | 454 | return INT_PCIE_INTR; |
455 | } | 455 | } |
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index 7848a177b1f0..c898deb3ada0 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -328,7 +328,7 @@ void __init pci_versatile_preinit(void) | |||
328 | /* | 328 | /* |
329 | * map the specified device/slot/pin to an IRQ. Different backplanes may need to modify this. | 329 | * map the specified device/slot/pin to an IRQ. Different backplanes may need to modify this. |
330 | */ | 330 | */ |
331 | static int __init versatile_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 331 | static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
332 | { | 332 | { |
333 | int irq; | 333 | int irq; |
334 | int devslot = PCI_SLOT(dev->devfn); | 334 | int devslot = PCI_SLOT(dev->devfn); |
diff --git a/arch/sh/drivers/pci/fixups-cayman.c b/arch/sh/drivers/pci/fixups-cayman.c index b68b61d22c6c..edc2fb7a5bb2 100644 --- a/arch/sh/drivers/pci/fixups-cayman.c +++ b/arch/sh/drivers/pci/fixups-cayman.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <cpu/irq.h> | 5 | #include <cpu/irq.h> |
6 | #include "pci-sh5.h" | 6 | #include "pci-sh5.h" |
7 | 7 | ||
8 | int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin) | 8 | int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
9 | { | 9 | { |
10 | int result = -1; | 10 | int result = -1; |
11 | 11 | ||
diff --git a/arch/sh/drivers/pci/fixups-dreamcast.c b/arch/sh/drivers/pci/fixups-dreamcast.c index 942ef4f155f5..edeea8960c30 100644 --- a/arch/sh/drivers/pci/fixups-dreamcast.c +++ b/arch/sh/drivers/pci/fixups-dreamcast.c | |||
@@ -64,7 +64,7 @@ static void __init gapspci_fixup_resources(struct pci_dev *dev) | |||
64 | } | 64 | } |
65 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, gapspci_fixup_resources); | 65 | DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, gapspci_fixup_resources); |
66 | 66 | ||
67 | int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin) | 67 | int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
68 | { | 68 | { |
69 | /* | 69 | /* |
70 | * The interrupt routing semantics here are quite trivial. | 70 | * The interrupt routing semantics here are quite trivial. |
diff --git a/arch/sh/drivers/pci/fixups-landisk.c b/arch/sh/drivers/pci/fixups-landisk.c index 95c6e2d94a0a..ecb1d1060638 100644 --- a/arch/sh/drivers/pci/fixups-landisk.c +++ b/arch/sh/drivers/pci/fixups-landisk.c | |||
@@ -19,7 +19,7 @@ | |||
19 | #define PCIMCR_MRSET_OFF 0xBFFFFFFF | 19 | #define PCIMCR_MRSET_OFF 0xBFFFFFFF |
20 | #define PCIMCR_RFSH_OFF 0xFFFFFFFB | 20 | #define PCIMCR_RFSH_OFF 0xFFFFFFFB |
21 | 21 | ||
22 | int pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 22 | int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin) |
23 | { | 23 | { |
24 | /* | 24 | /* |
25 | * slot0: pin1-4 = irq5,6,7,8 | 25 | * slot0: pin1-4 = irq5,6,7,8 |
diff --git a/arch/sh/drivers/pci/fixups-r7780rp.c b/arch/sh/drivers/pci/fixups-r7780rp.c index 08b2d8658a00..f9370dce0b70 100644 --- a/arch/sh/drivers/pci/fixups-r7780rp.c +++ b/arch/sh/drivers/pci/fixups-r7780rp.c | |||
@@ -18,7 +18,7 @@ static char irq_tab[] __initdata = { | |||
18 | 65, 66, 67, 68, | 18 | 65, 66, 67, 68, |
19 | }; | 19 | }; |
20 | 20 | ||
21 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 21 | int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin) |
22 | { | 22 | { |
23 | return irq_tab[slot]; | 23 | return irq_tab[slot]; |
24 | } | 24 | } |
diff --git a/arch/sh/drivers/pci/fixups-rts7751r2d.c b/arch/sh/drivers/pci/fixups-rts7751r2d.c index e248516118a9..eaddb56c45c6 100644 --- a/arch/sh/drivers/pci/fixups-rts7751r2d.c +++ b/arch/sh/drivers/pci/fixups-rts7751r2d.c | |||
@@ -31,7 +31,7 @@ static char lboxre2_irq_tab[] __initdata = { | |||
31 | IRQ_ETH0, IRQ_ETH1, IRQ_INTA, IRQ_INTD, | 31 | IRQ_ETH0, IRQ_ETH1, IRQ_INTA, IRQ_INTD, |
32 | }; | 32 | }; |
33 | 33 | ||
34 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 34 | int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin) |
35 | { | 35 | { |
36 | if (mach_is_lboxre2()) | 36 | if (mach_is_lboxre2()) |
37 | return lboxre2_irq_tab[slot]; | 37 | return lboxre2_irq_tab[slot]; |
diff --git a/arch/sh/drivers/pci/fixups-sdk7780.c b/arch/sh/drivers/pci/fixups-sdk7780.c index 0930f988ac29..0b8472501b88 100644 --- a/arch/sh/drivers/pci/fixups-sdk7780.c +++ b/arch/sh/drivers/pci/fixups-sdk7780.c | |||
@@ -27,7 +27,7 @@ static char sdk7780_irq_tab[4][16] __initdata = { | |||
27 | { 68, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, | 27 | { 68, 67, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 30 | int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin) |
31 | { | 31 | { |
32 | return sdk7780_irq_tab[pin-1][slot]; | 32 | return sdk7780_irq_tab[pin-1][slot]; |
33 | } | 33 | } |
diff --git a/arch/sh/drivers/pci/fixups-se7751.c b/arch/sh/drivers/pci/fixups-se7751.c index fd3e6b02f289..2ec146c3fa44 100644 --- a/arch/sh/drivers/pci/fixups-se7751.c +++ b/arch/sh/drivers/pci/fixups-se7751.c | |||
@@ -6,7 +6,7 @@ | |||
6 | #include <linux/io.h> | 6 | #include <linux/io.h> |
7 | #include "pci-sh4.h" | 7 | #include "pci-sh4.h" |
8 | 8 | ||
9 | int __init pcibios_map_platform_irq(struct pci_dev *, u8 slot, u8 pin) | 9 | int __init pcibios_map_platform_irq(const struct pci_dev *, u8 slot, u8 pin) |
10 | { | 10 | { |
11 | switch (slot) { | 11 | switch (slot) { |
12 | case 0: return 13; | 12 | case 0: return 13; |
diff --git a/arch/sh/drivers/pci/fixups-sh03.c b/arch/sh/drivers/pci/fixups-sh03.c index 2e8a18b7ee53..1615e5906168 100644 --- a/arch/sh/drivers/pci/fixups-sh03.c +++ b/arch/sh/drivers/pci/fixups-sh03.c | |||
@@ -3,7 +3,7 @@ | |||
3 | #include <linux/types.h> | 3 | #include <linux/types.h> |
4 | #include <linux/pci.h> | 4 | #include <linux/pci.h> |
5 | 5 | ||
6 | int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin) | 6 | int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
7 | { | 7 | { |
8 | int irq; | 8 | int irq; |
9 | 9 | ||
diff --git a/arch/sh/drivers/pci/fixups-snapgear.c b/arch/sh/drivers/pci/fixups-snapgear.c index 5a39ecc1adb8..4a093c648d12 100644 --- a/arch/sh/drivers/pci/fixups-snapgear.c +++ b/arch/sh/drivers/pci/fixups-snapgear.c | |||
@@ -18,7 +18,7 @@ | |||
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | #include "pci-sh4.h" | 19 | #include "pci-sh4.h" |
20 | 20 | ||
21 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 21 | int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin) |
22 | { | 22 | { |
23 | int irq = -1; | 23 | int irq = -1; |
24 | 24 | ||
diff --git a/arch/sh/drivers/pci/fixups-titan.c b/arch/sh/drivers/pci/fixups-titan.c index 3a79fa8254a6..bd1addb1b8be 100644 --- a/arch/sh/drivers/pci/fixups-titan.c +++ b/arch/sh/drivers/pci/fixups-titan.c | |||
@@ -27,7 +27,7 @@ static char titan_irq_tab[] __initdata = { | |||
27 | TITAN_IRQ_USB, | 27 | TITAN_IRQ_USB, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 30 | int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin) |
31 | { | 31 | { |
32 | int irq = titan_irq_tab[slot]; | 32 | int irq = titan_irq_tab[slot]; |
33 | 33 | ||
diff --git a/arch/sh/drivers/pci/pcie-sh7786.c b/arch/sh/drivers/pci/pcie-sh7786.c index 4418f9070ed1..4df27c4fbf99 100644 --- a/arch/sh/drivers/pci/pcie-sh7786.c +++ b/arch/sh/drivers/pci/pcie-sh7786.c | |||
@@ -466,7 +466,7 @@ static int __init pcie_init(struct sh7786_pcie_port *port) | |||
466 | return 0; | 466 | return 0; |
467 | } | 467 | } |
468 | 468 | ||
469 | int __init pcibios_map_platform_irq(struct pci_dev *pdev, u8 slot, u8 pin) | 469 | int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin) |
470 | { | 470 | { |
471 | return 71; | 471 | return 71; |
472 | } | 472 | } |
diff --git a/arch/sh/include/asm/pci.h b/arch/sh/include/asm/pci.h index f0efe97f1750..cb21e2399dc1 100644 --- a/arch/sh/include/asm/pci.h +++ b/arch/sh/include/asm/pci.h | |||
@@ -112,7 +112,7 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
112 | #endif | 112 | #endif |
113 | 113 | ||
114 | /* Board-specific fixup routines. */ | 114 | /* Board-specific fixup routines. */ |
115 | int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin); | 115 | int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin); |
116 | 116 | ||
117 | extern void pcibios_resource_to_bus(struct pci_dev *dev, | 117 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
118 | struct pci_bus_region *region, struct resource *res); | 118 | struct pci_bus_region *region, struct resource *res); |
diff --git a/arch/sparc/include/asm/leon_pci.h b/arch/sparc/include/asm/leon_pci.h index 42b4b31a82fe..f48527ebdd8f 100644 --- a/arch/sparc/include/asm/leon_pci.h +++ b/arch/sparc/include/asm/leon_pci.h | |||
@@ -12,7 +12,7 @@ struct leon_pci_info { | |||
12 | struct pci_ops *ops; | 12 | struct pci_ops *ops; |
13 | struct resource io_space; | 13 | struct resource io_space; |
14 | struct resource mem_space; | 14 | struct resource mem_space; |
15 | int (*map_irq)(struct pci_dev *dev, u8 slot, u8 pin); | 15 | int (*map_irq)(const struct pci_dev *dev, u8 slot, u8 pin); |
16 | }; | 16 | }; |
17 | 17 | ||
18 | extern void leon_pci_init(struct platform_device *ofdev, | 18 | extern void leon_pci_init(struct platform_device *ofdev, |
diff --git a/arch/sparc/kernel/leon_pci_grpci2.c b/arch/sparc/kernel/leon_pci_grpci2.c index 44dc093ee33a..fad1bd07cb56 100644 --- a/arch/sparc/kernel/leon_pci_grpci2.c +++ b/arch/sparc/kernel/leon_pci_grpci2.c | |||
@@ -215,7 +215,7 @@ struct grpci2_priv { | |||
215 | DEFINE_SPINLOCK(grpci2_dev_lock); | 215 | DEFINE_SPINLOCK(grpci2_dev_lock); |
216 | struct grpci2_priv *grpci2priv; | 216 | struct grpci2_priv *grpci2priv; |
217 | 217 | ||
218 | int grpci2_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 218 | int grpci2_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
219 | { | 219 | { |
220 | struct grpci2_priv *priv = dev->bus->sysdata; | 220 | struct grpci2_priv *priv = dev->bus->sysdata; |
221 | int irq_group; | 221 | int irq_group; |
diff --git a/arch/tile/kernel/pci.c b/arch/tile/kernel/pci.c index 6d4cb5d7a9fd..2a8014cb1ff5 100644 --- a/arch/tile/kernel/pci.c +++ b/arch/tile/kernel/pci.c | |||
@@ -228,7 +228,7 @@ err_cont: | |||
228 | * (pin - 1) converts from the PCI standard's [1:4] convention to | 228 | * (pin - 1) converts from the PCI standard's [1:4] convention to |
229 | * a normal [0:3] range. | 229 | * a normal [0:3] range. |
230 | */ | 230 | */ |
231 | static int tile_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 231 | static int tile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
232 | { | 232 | { |
233 | struct pci_controller *controller = | 233 | struct pci_controller *controller = |
234 | (struct pci_controller *)dev->sysdata; | 234 | (struct pci_controller *)dev->sysdata; |
diff --git a/arch/unicore32/kernel/pci.c b/arch/unicore32/kernel/pci.c index 100eab842e66..4892fbb54ebf 100644 --- a/arch/unicore32/kernel/pci.c +++ b/arch/unicore32/kernel/pci.c | |||
@@ -102,7 +102,7 @@ void pci_puv3_preinit(void) | |||
102 | writel(readl(PCIBRI_CMD) | PCIBRI_CMD_IO | PCIBRI_CMD_MEM, PCIBRI_CMD); | 102 | writel(readl(PCIBRI_CMD) | PCIBRI_CMD_IO | PCIBRI_CMD_MEM, PCIBRI_CMD); |
103 | } | 103 | } |
104 | 104 | ||
105 | static int __init pci_puv3_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 105 | static int __init pci_puv3_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
106 | { | 106 | { |
107 | if (dev->bus->number == 0) { | 107 | if (dev->bus->number == 0) { |
108 | #ifdef CONFIG_ARCH_FPGA /* 4 pci slots */ | 108 | #ifdef CONFIG_ARCH_FPGA /* 4 pci slots */ |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 153aa6f78299..7cf916fc1ce7 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -1905,7 +1905,7 @@ config PCI_BIOS | |||
1905 | # x86-64 doesn't support PCI BIOS access from long mode so always go direct. | 1905 | # x86-64 doesn't support PCI BIOS access from long mode so always go direct. |
1906 | config PCI_DIRECT | 1906 | config PCI_DIRECT |
1907 | def_bool y | 1907 | def_bool y |
1908 | depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC)) | 1908 | depends on PCI && (X86_64 || (PCI_GODIRECT || PCI_GOANY || PCI_GOOLPC || PCI_GOMMCONFIG)) |
1909 | 1909 | ||
1910 | config PCI_MMCONFIG | 1910 | config PCI_MMCONFIG |
1911 | def_bool y | 1911 | def_bool y |
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 68c3c1395202..ae3cb23cd89b 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -246,10 +246,9 @@ static void add_resources(struct pci_root_info *info) | |||
246 | 246 | ||
247 | conflict = insert_resource_conflict(root, res); | 247 | conflict = insert_resource_conflict(root, res); |
248 | if (conflict) | 248 | if (conflict) |
249 | dev_err(&info->bridge->dev, | 249 | dev_info(&info->bridge->dev, |
250 | "address space collision: host bridge window %pR " | 250 | "ignoring host bridge window %pR (conflicts with %s %pR)\n", |
251 | "conflicts with %s %pR\n", | 251 | res, conflict->name, conflict); |
252 | res, conflict->name, conflict); | ||
253 | else | 252 | else |
254 | pci_bus_add_resource(info->bus, res, 0); | 253 | pci_bus_add_resource(info->bus, res, 0); |
255 | } | 254 | } |
diff --git a/arch/x86/pci/ce4100.c b/arch/x86/pci/ce4100.c index 67858be4b52b..99176094500b 100644 --- a/arch/x86/pci/ce4100.c +++ b/arch/x86/pci/ce4100.c | |||
@@ -257,6 +257,7 @@ static int ce4100_conf_read(unsigned int seg, unsigned int bus, | |||
257 | { | 257 | { |
258 | int i; | 258 | int i; |
259 | 259 | ||
260 | WARN_ON(seg); | ||
260 | if (bus == 1) { | 261 | if (bus == 1) { |
261 | for (i = 0; i < ARRAY_SIZE(bus1_fixups); i++) { | 262 | for (i = 0; i < ARRAY_SIZE(bus1_fixups); i++) { |
262 | if (bus1_fixups[i].dev_func == devfn && | 263 | if (bus1_fixups[i].dev_func == devfn && |
@@ -282,6 +283,7 @@ static int ce4100_conf_write(unsigned int seg, unsigned int bus, | |||
282 | { | 283 | { |
283 | int i; | 284 | int i; |
284 | 285 | ||
286 | WARN_ON(seg); | ||
285 | if (bus == 1) { | 287 | if (bus == 1) { |
286 | for (i = 0; i < ARRAY_SIZE(bus1_fixups); i++) { | 288 | for (i = 0; i < ARRAY_SIZE(bus1_fixups); i++) { |
287 | if (bus1_fixups[i].dev_func == devfn && | 289 | if (bus1_fixups[i].dev_func == devfn && |
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 5fe75026ecc2..92df322e0b57 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -247,13 +247,6 @@ static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = { | |||
247 | }, | 247 | }, |
248 | #endif /* __i386__ */ | 248 | #endif /* __i386__ */ |
249 | { | 249 | { |
250 | .callback = find_sort_method, | ||
251 | .ident = "Dell System", | ||
252 | .matches = { | ||
253 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), | ||
254 | }, | ||
255 | }, | ||
256 | { | ||
257 | .callback = set_bf_sort, | 250 | .callback = set_bf_sort, |
258 | .ident = "Dell PowerEdge 1950", | 251 | .ident = "Dell PowerEdge 1950", |
259 | .matches = { | 252 | .matches = { |
@@ -294,6 +287,13 @@ static const struct dmi_system_id __devinitconst pciprobe_dmi_table[] = { | |||
294 | }, | 287 | }, |
295 | }, | 288 | }, |
296 | { | 289 | { |
290 | .callback = find_sort_method, | ||
291 | .ident = "Dell System", | ||
292 | .matches = { | ||
293 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), | ||
294 | }, | ||
295 | }, | ||
296 | { | ||
297 | .callback = set_bf_sort, | 297 | .callback = set_bf_sort, |
298 | .ident = "HP ProLiant BL20p G3", | 298 | .ident = "HP ProLiant BL20p G3", |
299 | .matches = { | 299 | .matches = { |
diff --git a/arch/x86/pci/direct.c b/arch/x86/pci/direct.c index e6fd8473fb7b..4f2c70439d7f 100644 --- a/arch/x86/pci/direct.c +++ b/arch/x86/pci/direct.c | |||
@@ -22,7 +22,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus, | |||
22 | { | 22 | { |
23 | unsigned long flags; | 23 | unsigned long flags; |
24 | 24 | ||
25 | if ((bus > 255) || (devfn > 255) || (reg > 4095)) { | 25 | if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) { |
26 | *value = -1; | 26 | *value = -1; |
27 | return -EINVAL; | 27 | return -EINVAL; |
28 | } | 28 | } |
@@ -53,7 +53,7 @@ static int pci_conf1_write(unsigned int seg, unsigned int bus, | |||
53 | { | 53 | { |
54 | unsigned long flags; | 54 | unsigned long flags; |
55 | 55 | ||
56 | if ((bus > 255) || (devfn > 255) || (reg > 4095)) | 56 | if (seg || (bus > 255) || (devfn > 255) || (reg > 4095)) |
57 | return -EINVAL; | 57 | return -EINVAL; |
58 | 58 | ||
59 | raw_spin_lock_irqsave(&pci_config_lock, flags); | 59 | raw_spin_lock_irqsave(&pci_config_lock, flags); |
@@ -97,6 +97,7 @@ static int pci_conf2_read(unsigned int seg, unsigned int bus, | |||
97 | unsigned long flags; | 97 | unsigned long flags; |
98 | int dev, fn; | 98 | int dev, fn; |
99 | 99 | ||
100 | WARN_ON(seg); | ||
100 | if ((bus > 255) || (devfn > 255) || (reg > 255)) { | 101 | if ((bus > 255) || (devfn > 255) || (reg > 255)) { |
101 | *value = -1; | 102 | *value = -1; |
102 | return -EINVAL; | 103 | return -EINVAL; |
@@ -138,6 +139,7 @@ static int pci_conf2_write(unsigned int seg, unsigned int bus, | |||
138 | unsigned long flags; | 139 | unsigned long flags; |
139 | int dev, fn; | 140 | int dev, fn; |
140 | 141 | ||
142 | WARN_ON(seg); | ||
141 | if ((bus > 255) || (devfn > 255) || (reg > 255)) | 143 | if ((bus > 255) || (devfn > 255) || (reg > 255)) |
142 | return -EINVAL; | 144 | return -EINVAL; |
143 | 145 | ||
diff --git a/arch/x86/pci/numaq_32.c b/arch/x86/pci/numaq_32.c index 5c9e2458df4e..512a88c41501 100644 --- a/arch/x86/pci/numaq_32.c +++ b/arch/x86/pci/numaq_32.c | |||
@@ -34,6 +34,7 @@ static int pci_conf1_mq_read(unsigned int seg, unsigned int bus, | |||
34 | unsigned long flags; | 34 | unsigned long flags; |
35 | void *adr __iomem = XQUAD_PORT_ADDR(0xcfc, BUS2QUAD(bus)); | 35 | void *adr __iomem = XQUAD_PORT_ADDR(0xcfc, BUS2QUAD(bus)); |
36 | 36 | ||
37 | WARN_ON(seg); | ||
37 | if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) | 38 | if (!value || (bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) |
38 | return -EINVAL; | 39 | return -EINVAL; |
39 | 40 | ||
@@ -73,6 +74,7 @@ static int pci_conf1_mq_write(unsigned int seg, unsigned int bus, | |||
73 | unsigned long flags; | 74 | unsigned long flags; |
74 | void *adr __iomem = XQUAD_PORT_ADDR(0xcfc, BUS2QUAD(bus)); | 75 | void *adr __iomem = XQUAD_PORT_ADDR(0xcfc, BUS2QUAD(bus)); |
75 | 76 | ||
77 | WARN_ON(seg); | ||
76 | if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) | 78 | if ((bus >= MAX_MP_BUSSES) || (devfn > 255) || (reg > 255)) |
77 | return -EINVAL; | 79 | return -EINVAL; |
78 | 80 | ||
diff --git a/arch/x86/pci/olpc.c b/arch/x86/pci/olpc.c index 13700ec8e2e4..5262603b04d9 100644 --- a/arch/x86/pci/olpc.c +++ b/arch/x86/pci/olpc.c | |||
@@ -206,6 +206,8 @@ static int pci_olpc_read(unsigned int seg, unsigned int bus, | |||
206 | { | 206 | { |
207 | uint32_t *addr; | 207 | uint32_t *addr; |
208 | 208 | ||
209 | WARN_ON(seg); | ||
210 | |||
209 | /* Use the hardware mechanism for non-simulated devices */ | 211 | /* Use the hardware mechanism for non-simulated devices */ |
210 | if (!is_simulated(bus, devfn)) | 212 | if (!is_simulated(bus, devfn)) |
211 | return pci_direct_conf1.read(seg, bus, devfn, reg, len, value); | 213 | return pci_direct_conf1.read(seg, bus, devfn, reg, len, value); |
@@ -264,6 +266,8 @@ static int pci_olpc_read(unsigned int seg, unsigned int bus, | |||
264 | static int pci_olpc_write(unsigned int seg, unsigned int bus, | 266 | static int pci_olpc_write(unsigned int seg, unsigned int bus, |
265 | unsigned int devfn, int reg, int len, uint32_t value) | 267 | unsigned int devfn, int reg, int len, uint32_t value) |
266 | { | 268 | { |
269 | WARN_ON(seg); | ||
270 | |||
267 | /* Use the hardware mechanism for non-simulated devices */ | 271 | /* Use the hardware mechanism for non-simulated devices */ |
268 | if (!is_simulated(bus, devfn)) | 272 | if (!is_simulated(bus, devfn)) |
269 | return pci_direct_conf1.write(seg, bus, devfn, reg, len, value); | 273 | return pci_direct_conf1.write(seg, bus, devfn, reg, len, value); |
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c index a5f7d0d63de0..f68553551467 100644 --- a/arch/x86/pci/pcbios.c +++ b/arch/x86/pci/pcbios.c | |||
@@ -181,6 +181,7 @@ static int pci_bios_read(unsigned int seg, unsigned int bus, | |||
181 | unsigned long flags; | 181 | unsigned long flags; |
182 | unsigned long bx = (bus << 8) | devfn; | 182 | unsigned long bx = (bus << 8) | devfn; |
183 | 183 | ||
184 | WARN_ON(seg); | ||
184 | if (!value || (bus > 255) || (devfn > 255) || (reg > 255)) | 185 | if (!value || (bus > 255) || (devfn > 255) || (reg > 255)) |
185 | return -EINVAL; | 186 | return -EINVAL; |
186 | 187 | ||
@@ -247,6 +248,7 @@ static int pci_bios_write(unsigned int seg, unsigned int bus, | |||
247 | unsigned long flags; | 248 | unsigned long flags; |
248 | unsigned long bx = (bus << 8) | devfn; | 249 | unsigned long bx = (bus << 8) | devfn; |
249 | 250 | ||
251 | WARN_ON(seg); | ||
250 | if ((bus > 255) || (devfn > 255) || (reg > 255)) | 252 | if ((bus > 255) || (devfn > 255) || (reg > 255)) |
251 | return -EINVAL; | 253 | return -EINVAL; |
252 | 254 | ||
diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c index 03008f72eb04..6f2f8eeed171 100644 --- a/arch/x86/pci/visws.c +++ b/arch/x86/pci/visws.c | |||
@@ -24,7 +24,7 @@ static void pci_visws_disable_irq(struct pci_dev *dev) { } | |||
24 | 24 | ||
25 | unsigned int pci_bus0, pci_bus1; | 25 | unsigned int pci_bus0, pci_bus1; |
26 | 26 | ||
27 | static int __init visws_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | 27 | static int __init visws_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) |
28 | { | 28 | { |
29 | int irq, bus = dev->bus->number; | 29 | int irq, bus = dev->bus->number; |
30 | 30 | ||
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 8f3faf343f75..095f29e13734 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c | |||
@@ -408,7 +408,7 @@ got_one: | |||
408 | } | 408 | } |
409 | EXPORT_SYMBOL(acpi_get_hp_hw_control_from_firmware); | 409 | EXPORT_SYMBOL(acpi_get_hp_hw_control_from_firmware); |
410 | 410 | ||
411 | static int is_ejectable(acpi_handle handle) | 411 | static int pcihp_is_ejectable(acpi_handle handle) |
412 | { | 412 | { |
413 | acpi_status status; | 413 | acpi_status status; |
414 | acpi_handle tmp; | 414 | acpi_handle tmp; |
@@ -442,7 +442,7 @@ int acpi_pci_check_ejectable(struct pci_bus *pbus, acpi_handle handle) | |||
442 | return 0; | 442 | return 0; |
443 | if (bridge_handle != parent_handle) | 443 | if (bridge_handle != parent_handle) |
444 | return 0; | 444 | return 0; |
445 | return is_ejectable(handle); | 445 | return pcihp_is_ejectable(handle); |
446 | } | 446 | } |
447 | EXPORT_SYMBOL_GPL(acpi_pci_check_ejectable); | 447 | EXPORT_SYMBOL_GPL(acpi_pci_check_ejectable); |
448 | 448 | ||
@@ -450,7 +450,7 @@ static acpi_status | |||
450 | check_hotplug(acpi_handle handle, u32 lvl, void *context, void **rv) | 450 | check_hotplug(acpi_handle handle, u32 lvl, void *context, void **rv) |
451 | { | 451 | { |
452 | int *found = (int *)context; | 452 | int *found = (int *)context; |
453 | if (is_ejectable(handle)) { | 453 | if (pcihp_is_ejectable(handle)) { |
454 | *found = 1; | 454 | *found = 1; |
455 | return AE_CTRL_TERMINATE; | 455 | return AE_CTRL_TERMINATE; |
456 | } | 456 | } |
diff --git a/drivers/pci/hotplug/cpqphp_core.c b/drivers/pci/hotplug/cpqphp_core.c index 4952c3b9379d..f1ce99cceac6 100644 --- a/drivers/pci/hotplug/cpqphp_core.c +++ b/drivers/pci/hotplug/cpqphp_core.c | |||
@@ -840,8 +840,9 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
840 | /* Need to read VID early b/c it's used to differentiate CPQ and INTC | 840 | /* Need to read VID early b/c it's used to differentiate CPQ and INTC |
841 | * discovery | 841 | * discovery |
842 | */ | 842 | */ |
843 | rc = pci_read_config_word(pdev, PCI_VENDOR_ID, &vendor_id); | 843 | vendor_id = pdev->vendor; |
844 | if (rc || ((vendor_id != PCI_VENDOR_ID_COMPAQ) && (vendor_id != PCI_VENDOR_ID_INTEL))) { | 844 | if ((vendor_id != PCI_VENDOR_ID_COMPAQ) && |
845 | (vendor_id != PCI_VENDOR_ID_INTEL)) { | ||
845 | err(msg_HPC_non_compaq_or_intel); | 846 | err(msg_HPC_non_compaq_or_intel); |
846 | rc = -ENODEV; | 847 | rc = -ENODEV; |
847 | goto err_disable_device; | 848 | goto err_disable_device; |
@@ -868,11 +869,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
868 | /* TODO: This code can be made to support non-Compaq or Intel | 869 | /* TODO: This code can be made to support non-Compaq or Intel |
869 | * subsystem IDs | 870 | * subsystem IDs |
870 | */ | 871 | */ |
871 | rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vid); | 872 | subsystem_vid = pdev->subsystem_vendor; |
872 | if (rc) { | ||
873 | err("%s : pci_read_config_word failed\n", __func__); | ||
874 | goto err_disable_device; | ||
875 | } | ||
876 | dbg("Subsystem Vendor ID: %x\n", subsystem_vid); | 873 | dbg("Subsystem Vendor ID: %x\n", subsystem_vid); |
877 | if ((subsystem_vid != PCI_VENDOR_ID_COMPAQ) && (subsystem_vid != PCI_VENDOR_ID_INTEL)) { | 874 | if ((subsystem_vid != PCI_VENDOR_ID_COMPAQ) && (subsystem_vid != PCI_VENDOR_ID_INTEL)) { |
878 | err(msg_HPC_non_compaq_or_intel); | 875 | err(msg_HPC_non_compaq_or_intel); |
@@ -887,11 +884,7 @@ static int cpqhpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
887 | goto err_disable_device; | 884 | goto err_disable_device; |
888 | } | 885 | } |
889 | 886 | ||
890 | rc = pci_read_config_word(pdev, PCI_SUBSYSTEM_ID, &subsystem_deviceid); | 887 | subsystem_deviceid = pdev->subsystem_device; |
891 | if (rc) { | ||
892 | err("%s : pci_read_config_word failed\n", __func__); | ||
893 | goto err_free_ctrl; | ||
894 | } | ||
895 | 888 | ||
896 | info("Hot Plug Subsystem Device ID: %x\n", subsystem_deviceid); | 889 | info("Hot Plug Subsystem Device ID: %x\n", subsystem_deviceid); |
897 | 890 | ||
diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c index 085dbb5fc168..1e9c9aacc3a6 100644 --- a/drivers/pci/hotplug/pciehp_ctrl.c +++ b/drivers/pci/hotplug/pciehp_ctrl.c | |||
@@ -213,6 +213,9 @@ static int board_added(struct slot *p_slot) | |||
213 | goto err_exit; | 213 | goto err_exit; |
214 | } | 214 | } |
215 | 215 | ||
216 | /* Wait for 1 second after checking link training status */ | ||
217 | msleep(1000); | ||
218 | |||
216 | /* Check for a power fault */ | 219 | /* Check for a power fault */ |
217 | if (ctrl->power_fault_detected || pciehp_query_power_fault(p_slot)) { | 220 | if (ctrl->power_fault_detected || pciehp_query_power_fault(p_slot)) { |
218 | ctrl_err(ctrl, "Power fault on slot %s\n", slot_name(p_slot)); | 221 | ctrl_err(ctrl, "Power fault on slot %s\n", slot_name(p_slot)); |
diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c index 50a23da5d24d..96dc4734e4af 100644 --- a/drivers/pci/hotplug/pciehp_hpc.c +++ b/drivers/pci/hotplug/pciehp_hpc.c | |||
@@ -275,16 +275,9 @@ int pciehp_check_link_status(struct controller *ctrl) | |||
275 | * hot-plug capable downstream port. But old controller might | 275 | * hot-plug capable downstream port. But old controller might |
276 | * not implement it. In this case, we wait for 1000 ms. | 276 | * not implement it. In this case, we wait for 1000 ms. |
277 | */ | 277 | */ |
278 | if (ctrl->link_active_reporting){ | 278 | if (ctrl->link_active_reporting) |
279 | /* Wait for Data Link Layer Link Active bit to be set */ | ||
280 | pcie_wait_link_active(ctrl); | 279 | pcie_wait_link_active(ctrl); |
281 | /* | 280 | else |
282 | * We must wait for 100 ms after the Data Link Layer | ||
283 | * Link Active bit reads 1b before initiating a | ||
284 | * configuration access to the hot added device. | ||
285 | */ | ||
286 | msleep(100); | ||
287 | } else | ||
288 | msleep(1000); | 281 | msleep(1000); |
289 | 282 | ||
290 | retval = pciehp_readw(ctrl, PCI_EXP_LNKSTA, &lnk_status); | 283 | retval = pciehp_readw(ctrl, PCI_EXP_LNKSTA, &lnk_status); |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 692671b11667..08a95b369d85 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -1905,7 +1905,7 @@ void pci_enable_ari(struct pci_dev *dev) | |||
1905 | { | 1905 | { |
1906 | int pos; | 1906 | int pos; |
1907 | u32 cap; | 1907 | u32 cap; |
1908 | u16 ctrl; | 1908 | u16 flags, ctrl; |
1909 | struct pci_dev *bridge; | 1909 | struct pci_dev *bridge; |
1910 | 1910 | ||
1911 | if (!pci_is_pcie(dev) || dev->devfn) | 1911 | if (!pci_is_pcie(dev) || dev->devfn) |
@@ -1923,6 +1923,11 @@ void pci_enable_ari(struct pci_dev *dev) | |||
1923 | if (!pos) | 1923 | if (!pos) |
1924 | return; | 1924 | return; |
1925 | 1925 | ||
1926 | /* ARI is a PCIe v2 feature */ | ||
1927 | pci_read_config_word(bridge, pos + PCI_EXP_FLAGS, &flags); | ||
1928 | if ((flags & PCI_EXP_FLAGS_VERS) < 2) | ||
1929 | return; | ||
1930 | |||
1926 | pci_read_config_dword(bridge, pos + PCI_EXP_DEVCAP2, &cap); | 1931 | pci_read_config_dword(bridge, pos + PCI_EXP_DEVCAP2, &cap); |
1927 | if (!(cap & PCI_EXP_DEVCAP2_ARI)) | 1932 | if (!(cap & PCI_EXP_DEVCAP2_ARI)) |
1928 | return; | 1933 | return; |
@@ -3186,7 +3191,7 @@ EXPORT_SYMBOL(pcie_get_readrq); | |||
3186 | * @rq: maximum memory read count in bytes | 3191 | * @rq: maximum memory read count in bytes |
3187 | * valid values are 128, 256, 512, 1024, 2048, 4096 | 3192 | * valid values are 128, 256, 512, 1024, 2048, 4096 |
3188 | * | 3193 | * |
3189 | * If possible sets maximum read byte count | 3194 | * If possible sets maximum memory read request in bytes |
3190 | */ | 3195 | */ |
3191 | int pcie_set_readrq(struct pci_dev *dev, int rq) | 3196 | int pcie_set_readrq(struct pci_dev *dev, int rq) |
3192 | { | 3197 | { |
@@ -3209,7 +3214,7 @@ int pcie_set_readrq(struct pci_dev *dev, int rq) | |||
3209 | if ((ctl & PCI_EXP_DEVCTL_READRQ) != v) { | 3214 | if ((ctl & PCI_EXP_DEVCTL_READRQ) != v) { |
3210 | ctl &= ~PCI_EXP_DEVCTL_READRQ; | 3215 | ctl &= ~PCI_EXP_DEVCTL_READRQ; |
3211 | ctl |= v; | 3216 | ctl |= v; |
3212 | err = pci_write_config_dword(dev, cap + PCI_EXP_DEVCTL, ctl); | 3217 | err = pci_write_config_word(dev, cap + PCI_EXP_DEVCTL, ctl); |
3213 | } | 3218 | } |
3214 | 3219 | ||
3215 | out: | 3220 | out: |
diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index 43421fbe080a..9674e9f30d49 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/suspend.h> | 24 | #include <linux/suspend.h> |
25 | #include <linux/delay.h> | 25 | #include <linux/delay.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | #include <linux/kfifo.h> | ||
27 | #include "aerdrv.h" | 28 | #include "aerdrv.h" |
28 | 29 | ||
29 | static int forceload; | 30 | static int forceload; |
@@ -445,8 +446,7 @@ static struct pcie_port_service_driver *find_aer_service(struct pci_dev *dev) | |||
445 | return drv; | 446 | return drv; |
446 | } | 447 | } |
447 | 448 | ||
448 | static pci_ers_result_t reset_link(struct pcie_device *aerdev, | 449 | static pci_ers_result_t reset_link(struct pci_dev *dev) |
449 | struct pci_dev *dev) | ||
450 | { | 450 | { |
451 | struct pci_dev *udev; | 451 | struct pci_dev *udev; |
452 | pci_ers_result_t status; | 452 | pci_ers_result_t status; |
@@ -486,7 +486,6 @@ static pci_ers_result_t reset_link(struct pcie_device *aerdev, | |||
486 | 486 | ||
487 | /** | 487 | /** |
488 | * do_recovery - handle nonfatal/fatal error recovery process | 488 | * do_recovery - handle nonfatal/fatal error recovery process |
489 | * @aerdev: pointer to a pcie_device data structure of root port | ||
490 | * @dev: pointer to a pci_dev data structure of agent detecting an error | 489 | * @dev: pointer to a pci_dev data structure of agent detecting an error |
491 | * @severity: error severity type | 490 | * @severity: error severity type |
492 | * | 491 | * |
@@ -494,8 +493,7 @@ static pci_ers_result_t reset_link(struct pcie_device *aerdev, | |||
494 | * error detected message to all downstream drivers within a hierarchy in | 493 | * error detected message to all downstream drivers within a hierarchy in |
495 | * question and return the returned code. | 494 | * question and return the returned code. |
496 | */ | 495 | */ |
497 | static void do_recovery(struct pcie_device *aerdev, struct pci_dev *dev, | 496 | static void do_recovery(struct pci_dev *dev, int severity) |
498 | int severity) | ||
499 | { | 497 | { |
500 | pci_ers_result_t status, result = PCI_ERS_RESULT_RECOVERED; | 498 | pci_ers_result_t status, result = PCI_ERS_RESULT_RECOVERED; |
501 | enum pci_channel_state state; | 499 | enum pci_channel_state state; |
@@ -511,7 +509,7 @@ static void do_recovery(struct pcie_device *aerdev, struct pci_dev *dev, | |||
511 | report_error_detected); | 509 | report_error_detected); |
512 | 510 | ||
513 | if (severity == AER_FATAL) { | 511 | if (severity == AER_FATAL) { |
514 | result = reset_link(aerdev, dev); | 512 | result = reset_link(dev); |
515 | if (result != PCI_ERS_RESULT_RECOVERED) | 513 | if (result != PCI_ERS_RESULT_RECOVERED) |
516 | goto failed; | 514 | goto failed; |
517 | } | 515 | } |
@@ -576,9 +574,73 @@ static void handle_error_source(struct pcie_device *aerdev, | |||
576 | pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS, | 574 | pci_write_config_dword(dev, pos + PCI_ERR_COR_STATUS, |
577 | info->status); | 575 | info->status); |
578 | } else | 576 | } else |
579 | do_recovery(aerdev, dev, info->severity); | 577 | do_recovery(dev, info->severity); |
580 | } | 578 | } |
581 | 579 | ||
580 | #ifdef CONFIG_ACPI_APEI_PCIEAER | ||
581 | static void aer_recover_work_func(struct work_struct *work); | ||
582 | |||
583 | #define AER_RECOVER_RING_ORDER 4 | ||
584 | #define AER_RECOVER_RING_SIZE (1 << AER_RECOVER_RING_ORDER) | ||
585 | |||
586 | struct aer_recover_entry | ||
587 | { | ||
588 | u8 bus; | ||
589 | u8 devfn; | ||
590 | u16 domain; | ||
591 | int severity; | ||
592 | }; | ||
593 | |||
594 | static DEFINE_KFIFO(aer_recover_ring, struct aer_recover_entry, | ||
595 | AER_RECOVER_RING_SIZE); | ||
596 | /* | ||
597 | * Mutual exclusion for writers of aer_recover_ring, reader side don't | ||
598 | * need lock, because there is only one reader and lock is not needed | ||
599 | * between reader and writer. | ||
600 | */ | ||
601 | static DEFINE_SPINLOCK(aer_recover_ring_lock); | ||
602 | static DECLARE_WORK(aer_recover_work, aer_recover_work_func); | ||
603 | |||
604 | void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, | ||
605 | int severity) | ||
606 | { | ||
607 | unsigned long flags; | ||
608 | struct aer_recover_entry entry = { | ||
609 | .bus = bus, | ||
610 | .devfn = devfn, | ||
611 | .domain = domain, | ||
612 | .severity = severity, | ||
613 | }; | ||
614 | |||
615 | spin_lock_irqsave(&aer_recover_ring_lock, flags); | ||
616 | if (kfifo_put(&aer_recover_ring, &entry)) | ||
617 | schedule_work(&aer_recover_work); | ||
618 | else | ||
619 | pr_err("AER recover: Buffer overflow when recovering AER for %04x:%02x:%02x:%x\n", | ||
620 | domain, bus, PCI_SLOT(devfn), PCI_FUNC(devfn)); | ||
621 | spin_unlock_irqrestore(&aer_recover_ring_lock, flags); | ||
622 | } | ||
623 | EXPORT_SYMBOL_GPL(aer_recover_queue); | ||
624 | |||
625 | static void aer_recover_work_func(struct work_struct *work) | ||
626 | { | ||
627 | struct aer_recover_entry entry; | ||
628 | struct pci_dev *pdev; | ||
629 | |||
630 | while (kfifo_get(&aer_recover_ring, &entry)) { | ||
631 | pdev = pci_get_domain_bus_and_slot(entry.domain, entry.bus, | ||
632 | entry.devfn); | ||
633 | if (!pdev) { | ||
634 | pr_err("AER recover: Can not find pci_dev for %04x:%02x:%02x:%x\n", | ||
635 | entry.domain, entry.bus, | ||
636 | PCI_SLOT(entry.devfn), PCI_FUNC(entry.devfn)); | ||
637 | continue; | ||
638 | } | ||
639 | do_recovery(pdev, entry.severity); | ||
640 | } | ||
641 | } | ||
642 | #endif | ||
643 | |||
582 | /** | 644 | /** |
583 | * get_device_error_info - read error status from dev and store it to info | 645 | * get_device_error_info - read error status from dev and store it to info |
584 | * @dev: pointer to the device expected to have a error record | 646 | * @dev: pointer to the device expected to have a error record |
diff --git a/drivers/pci/pcie/aer/aerdrv_errprint.c b/drivers/pci/pcie/aer/aerdrv_errprint.c index b07a42e0b350..3ea51736f18d 100644 --- a/drivers/pci/pcie/aer/aerdrv_errprint.c +++ b/drivers/pci/pcie/aer/aerdrv_errprint.c | |||
@@ -204,7 +204,7 @@ void aer_print_port_info(struct pci_dev *dev, struct aer_err_info *info) | |||
204 | } | 204 | } |
205 | 205 | ||
206 | #ifdef CONFIG_ACPI_APEI_PCIEAER | 206 | #ifdef CONFIG_ACPI_APEI_PCIEAER |
207 | static int cper_severity_to_aer(int cper_severity) | 207 | int cper_severity_to_aer(int cper_severity) |
208 | { | 208 | { |
209 | switch (cper_severity) { | 209 | switch (cper_severity) { |
210 | case CPER_SEV_RECOVERABLE: | 210 | case CPER_SEV_RECOVERABLE: |
@@ -215,6 +215,7 @@ static int cper_severity_to_aer(int cper_severity) | |||
215 | return AER_CORRECTABLE; | 215 | return AER_CORRECTABLE; |
216 | } | 216 | } |
217 | } | 217 | } |
218 | EXPORT_SYMBOL_GPL(cper_severity_to_aer); | ||
218 | 219 | ||
219 | void cper_print_aer(const char *prefix, int cper_severity, | 220 | void cper_print_aer(const char *prefix, int cper_severity, |
220 | struct aer_capability_regs *aer) | 221 | struct aer_capability_regs *aer) |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 9ab492f21f86..795c9026d55f 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -68,21 +68,6 @@ static int __init pcibus_class_init(void) | |||
68 | } | 68 | } |
69 | postcore_initcall(pcibus_class_init); | 69 | postcore_initcall(pcibus_class_init); |
70 | 70 | ||
71 | /* | ||
72 | * Translate the low bits of the PCI base | ||
73 | * to the resource type | ||
74 | */ | ||
75 | static inline unsigned int pci_calc_resource_flags(unsigned int flags) | ||
76 | { | ||
77 | if (flags & PCI_BASE_ADDRESS_SPACE_IO) | ||
78 | return IORESOURCE_IO; | ||
79 | |||
80 | if (flags & PCI_BASE_ADDRESS_MEM_PREFETCH) | ||
81 | return IORESOURCE_MEM | IORESOURCE_PREFETCH; | ||
82 | |||
83 | return IORESOURCE_MEM; | ||
84 | } | ||
85 | |||
86 | static u64 pci_size(u64 base, u64 maxbase, u64 mask) | 71 | static u64 pci_size(u64 base, u64 maxbase, u64 mask) |
87 | { | 72 | { |
88 | u64 size = mask & maxbase; /* Find the significant bits */ | 73 | u64 size = mask & maxbase; /* Find the significant bits */ |
@@ -101,18 +86,39 @@ static u64 pci_size(u64 base, u64 maxbase, u64 mask) | |||
101 | return size; | 86 | return size; |
102 | } | 87 | } |
103 | 88 | ||
104 | static inline enum pci_bar_type decode_bar(struct resource *res, u32 bar) | 89 | static inline unsigned long decode_bar(struct pci_dev *dev, u32 bar) |
105 | { | 90 | { |
91 | u32 mem_type; | ||
92 | unsigned long flags; | ||
93 | |||
106 | if ((bar & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO) { | 94 | if ((bar & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO) { |
107 | res->flags = bar & ~PCI_BASE_ADDRESS_IO_MASK; | 95 | flags = bar & ~PCI_BASE_ADDRESS_IO_MASK; |
108 | return pci_bar_io; | 96 | flags |= IORESOURCE_IO; |
97 | return flags; | ||
109 | } | 98 | } |
110 | 99 | ||
111 | res->flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK; | 100 | flags = bar & ~PCI_BASE_ADDRESS_MEM_MASK; |
101 | flags |= IORESOURCE_MEM; | ||
102 | if (flags & PCI_BASE_ADDRESS_MEM_PREFETCH) | ||
103 | flags |= IORESOURCE_PREFETCH; | ||
112 | 104 | ||
113 | if (res->flags & PCI_BASE_ADDRESS_MEM_TYPE_64) | 105 | mem_type = bar & PCI_BASE_ADDRESS_MEM_TYPE_MASK; |
114 | return pci_bar_mem64; | 106 | switch (mem_type) { |
115 | return pci_bar_mem32; | 107 | case PCI_BASE_ADDRESS_MEM_TYPE_32: |
108 | break; | ||
109 | case PCI_BASE_ADDRESS_MEM_TYPE_1M: | ||
110 | dev_info(&dev->dev, "1M mem BAR treated as 32-bit BAR\n"); | ||
111 | break; | ||
112 | case PCI_BASE_ADDRESS_MEM_TYPE_64: | ||
113 | flags |= IORESOURCE_MEM_64; | ||
114 | break; | ||
115 | default: | ||
116 | dev_warn(&dev->dev, | ||
117 | "mem unknown type %x treated as 32-bit BAR\n", | ||
118 | mem_type); | ||
119 | break; | ||
120 | } | ||
121 | return flags; | ||
116 | } | 122 | } |
117 | 123 | ||
118 | /** | 124 | /** |
@@ -165,9 +171,9 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
165 | l = 0; | 171 | l = 0; |
166 | 172 | ||
167 | if (type == pci_bar_unknown) { | 173 | if (type == pci_bar_unknown) { |
168 | type = decode_bar(res, l); | 174 | res->flags = decode_bar(dev, l); |
169 | res->flags |= pci_calc_resource_flags(l) | IORESOURCE_SIZEALIGN; | 175 | res->flags |= IORESOURCE_SIZEALIGN; |
170 | if (type == pci_bar_io) { | 176 | if (res->flags & IORESOURCE_IO) { |
171 | l &= PCI_BASE_ADDRESS_IO_MASK; | 177 | l &= PCI_BASE_ADDRESS_IO_MASK; |
172 | mask = PCI_BASE_ADDRESS_IO_MASK & (u32) IO_SPACE_LIMIT; | 178 | mask = PCI_BASE_ADDRESS_IO_MASK & (u32) IO_SPACE_LIMIT; |
173 | } else { | 179 | } else { |
@@ -180,7 +186,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
180 | mask = (u32)PCI_ROM_ADDRESS_MASK; | 186 | mask = (u32)PCI_ROM_ADDRESS_MASK; |
181 | } | 187 | } |
182 | 188 | ||
183 | if (type == pci_bar_mem64) { | 189 | if (res->flags & IORESOURCE_MEM_64) { |
184 | u64 l64 = l; | 190 | u64 l64 = l; |
185 | u64 sz64 = sz; | 191 | u64 sz64 = sz; |
186 | u64 mask64 = mask | (u64)~0 << 32; | 192 | u64 mask64 = mask | (u64)~0 << 32; |
@@ -204,7 +210,6 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
204 | goto fail; | 210 | goto fail; |
205 | } | 211 | } |
206 | 212 | ||
207 | res->flags |= IORESOURCE_MEM_64; | ||
208 | if ((sizeof(resource_size_t) < 8) && l) { | 213 | if ((sizeof(resource_size_t) < 8) && l) { |
209 | /* Address above 32-bit boundary; disable the BAR */ | 214 | /* Address above 32-bit boundary; disable the BAR */ |
210 | pci_write_config_dword(dev, pos, 0); | 215 | pci_write_config_dword(dev, pos, 0); |
@@ -230,7 +235,7 @@ int __pci_read_base(struct pci_dev *dev, enum pci_bar_type type, | |||
230 | } | 235 | } |
231 | 236 | ||
232 | out: | 237 | out: |
233 | return (type == pci_bar_mem64) ? 1 : 0; | 238 | return (res->flags & IORESOURCE_MEM_64) ? 1 : 0; |
234 | fail: | 239 | fail: |
235 | res->flags = 0; | 240 | res->flags = 0; |
236 | goto out; | 241 | goto out; |
@@ -284,10 +289,6 @@ static void __devinit pci_read_bridge_io(struct pci_bus *child) | |||
284 | if (!res->end) | 289 | if (!res->end) |
285 | res->end = limit + 0xfff; | 290 | res->end = limit + 0xfff; |
286 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); | 291 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); |
287 | } else { | ||
288 | dev_printk(KERN_DEBUG, &dev->dev, | ||
289 | " bridge window [io %#06lx-%#06lx] (disabled)\n", | ||
290 | base, limit); | ||
291 | } | 292 | } |
292 | } | 293 | } |
293 | 294 | ||
@@ -308,10 +309,6 @@ static void __devinit pci_read_bridge_mmio(struct pci_bus *child) | |||
308 | res->start = base; | 309 | res->start = base; |
309 | res->end = limit + 0xfffff; | 310 | res->end = limit + 0xfffff; |
310 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); | 311 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); |
311 | } else { | ||
312 | dev_printk(KERN_DEBUG, &dev->dev, | ||
313 | " bridge window [mem %#010lx-%#010lx] (disabled)\n", | ||
314 | base, limit + 0xfffff); | ||
315 | } | 312 | } |
316 | } | 313 | } |
317 | 314 | ||
@@ -359,10 +356,6 @@ static void __devinit pci_read_bridge_mmio_pref(struct pci_bus *child) | |||
359 | res->start = base; | 356 | res->start = base; |
360 | res->end = limit + 0xfffff; | 357 | res->end = limit + 0xfffff; |
361 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); | 358 | dev_printk(KERN_DEBUG, &dev->dev, " bridge window %pR\n", res); |
362 | } else { | ||
363 | dev_printk(KERN_DEBUG, &dev->dev, | ||
364 | " bridge window [mem %#010lx-%#010lx pref] (disabled)\n", | ||
365 | base, limit + 0xfffff); | ||
366 | } | 359 | } |
367 | } | 360 | } |
368 | 361 | ||
@@ -725,12 +718,14 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, | |||
725 | pci_write_config_word(dev, PCI_STATUS, 0xffff); | 718 | pci_write_config_word(dev, PCI_STATUS, 0xffff); |
726 | 719 | ||
727 | /* Prevent assigning a bus number that already exists. | 720 | /* Prevent assigning a bus number that already exists. |
728 | * This can happen when a bridge is hot-plugged */ | 721 | * This can happen when a bridge is hot-plugged, so in |
729 | if (pci_find_bus(pci_domain_nr(bus), max+1)) | 722 | * this case we only re-scan this bus. */ |
730 | goto out; | 723 | child = pci_find_bus(pci_domain_nr(bus), max+1); |
731 | child = pci_add_new_bus(bus, dev, ++max); | 724 | if (!child) { |
732 | if (!child) | 725 | child = pci_add_new_bus(bus, dev, ++max); |
733 | goto out; | 726 | if (!child) |
727 | goto out; | ||
728 | } | ||
734 | buses = (buses & 0xff000000) | 729 | buses = (buses & 0xff000000) |
735 | | ((unsigned int)(child->primary) << 0) | 730 | | ((unsigned int)(child->primary) << 0) |
736 | | ((unsigned int)(child->secondary) << 8) | 731 | | ((unsigned int)(child->secondary) << 8) |
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 9995842e45b5..8a1d3c7863a8 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -336,7 +336,6 @@ static void pci_setup_bridge_io(struct pci_bus *bus) | |||
336 | /* Clear upper 16 bits of I/O base/limit. */ | 336 | /* Clear upper 16 bits of I/O base/limit. */ |
337 | io_upper16 = 0; | 337 | io_upper16 = 0; |
338 | l = 0x00f0; | 338 | l = 0x00f0; |
339 | dev_info(&bridge->dev, " bridge window [io disabled]\n"); | ||
340 | } | 339 | } |
341 | /* Temporarily disable the I/O range before updating PCI_IO_BASE. */ | 340 | /* Temporarily disable the I/O range before updating PCI_IO_BASE. */ |
342 | pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, 0x0000ffff); | 341 | pci_write_config_dword(bridge, PCI_IO_BASE_UPPER16, 0x0000ffff); |
@@ -362,7 +361,6 @@ static void pci_setup_bridge_mmio(struct pci_bus *bus) | |||
362 | dev_info(&bridge->dev, " bridge window %pR\n", res); | 361 | dev_info(&bridge->dev, " bridge window %pR\n", res); |
363 | } else { | 362 | } else { |
364 | l = 0x0000fff0; | 363 | l = 0x0000fff0; |
365 | dev_info(&bridge->dev, " bridge window [mem disabled]\n"); | ||
366 | } | 364 | } |
367 | pci_write_config_dword(bridge, PCI_MEMORY_BASE, l); | 365 | pci_write_config_dword(bridge, PCI_MEMORY_BASE, l); |
368 | } | 366 | } |
@@ -393,7 +391,6 @@ static void pci_setup_bridge_mmio_pref(struct pci_bus *bus) | |||
393 | dev_info(&bridge->dev, " bridge window %pR\n", res); | 391 | dev_info(&bridge->dev, " bridge window %pR\n", res); |
394 | } else { | 392 | } else { |
395 | l = 0x0000fff0; | 393 | l = 0x0000fff0; |
396 | dev_info(&bridge->dev, " bridge window [mem pref disabled]\n"); | ||
397 | } | 394 | } |
398 | pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, l); | 395 | pci_write_config_dword(bridge, PCI_PREF_MEMORY_BASE, l); |
399 | 396 | ||
diff --git a/drivers/pci/setup-irq.c b/drivers/pci/setup-irq.c index eec9738f3492..eb219a1d16f7 100644 --- a/drivers/pci/setup-irq.c +++ b/drivers/pci/setup-irq.c | |||
@@ -21,7 +21,7 @@ | |||
21 | static void __init | 21 | static void __init |
22 | pdev_fixup_irq(struct pci_dev *dev, | 22 | pdev_fixup_irq(struct pci_dev *dev, |
23 | u8 (*swizzle)(struct pci_dev *, u8 *), | 23 | u8 (*swizzle)(struct pci_dev *, u8 *), |
24 | int (*map_irq)(struct pci_dev *, u8, u8)) | 24 | int (*map_irq)(const struct pci_dev *, u8, u8)) |
25 | { | 25 | { |
26 | u8 pin, slot; | 26 | u8 pin, slot; |
27 | int irq = 0; | 27 | int irq = 0; |
@@ -56,7 +56,7 @@ pdev_fixup_irq(struct pci_dev *dev, | |||
56 | 56 | ||
57 | void __init | 57 | void __init |
58 | pci_fixup_irqs(u8 (*swizzle)(struct pci_dev *, u8 *), | 58 | pci_fixup_irqs(u8 (*swizzle)(struct pci_dev *, u8 *), |
59 | int (*map_irq)(struct pci_dev *, u8, u8)) | 59 | int (*map_irq)(const struct pci_dev *, u8, u8)) |
60 | { | 60 | { |
61 | struct pci_dev *dev = NULL; | 61 | struct pci_dev *dev = NULL; |
62 | for_each_pci_dev(dev) | 62 | for_each_pci_dev(dev) |
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index bc0e6eea0fff..319f359906e8 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
@@ -74,8 +74,7 @@ void pci_update_resource(struct pci_dev *dev, int resno) | |||
74 | resno, new, check); | 74 | resno, new, check); |
75 | } | 75 | } |
76 | 76 | ||
77 | if ((new & (PCI_BASE_ADDRESS_SPACE|PCI_BASE_ADDRESS_MEM_TYPE_MASK)) == | 77 | if (res->flags & IORESOURCE_MEM_64) { |
78 | (PCI_BASE_ADDRESS_SPACE_MEMORY|PCI_BASE_ADDRESS_MEM_TYPE_64)) { | ||
79 | new = region.start >> 16 >> 16; | 78 | new = region.start >> 16 >> 16; |
80 | pci_write_config_dword(dev, reg + 4, new); | 79 | pci_write_config_dword(dev, reg + 4, new); |
81 | pci_read_config_dword(dev, reg + 4, &check); | 80 | pci_read_config_dword(dev, reg + 4, &check); |
diff --git a/include/linux/aer.h b/include/linux/aer.h index 8414de22a779..544abdb2238c 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h | |||
@@ -51,5 +51,8 @@ static inline int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev) | |||
51 | 51 | ||
52 | extern void cper_print_aer(const char *prefix, int cper_severity, | 52 | extern void cper_print_aer(const char *prefix, int cper_severity, |
53 | struct aer_capability_regs *aer); | 53 | struct aer_capability_regs *aer); |
54 | extern int cper_severity_to_aer(int cper_severity); | ||
55 | extern void aer_recover_queue(int domain, unsigned int bus, unsigned int devfn, | ||
56 | int severity); | ||
54 | #endif //_AER_H_ | 57 | #endif //_AER_H_ |
55 | 58 | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 3a5626df37ce..f27893b3b724 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -843,8 +843,8 @@ void pci_enable_ido(struct pci_dev *dev, unsigned long type); | |||
843 | void pci_disable_ido(struct pci_dev *dev, unsigned long type); | 843 | void pci_disable_ido(struct pci_dev *dev, unsigned long type); |
844 | 844 | ||
845 | enum pci_obff_signal_type { | 845 | enum pci_obff_signal_type { |
846 | PCI_EXP_OBFF_SIGNAL_L0, | 846 | PCI_EXP_OBFF_SIGNAL_L0 = 0, |
847 | PCI_EXP_OBFF_SIGNAL_ALWAYS, | 847 | PCI_EXP_OBFF_SIGNAL_ALWAYS = 1, |
848 | }; | 848 | }; |
849 | int pci_enable_obff(struct pci_dev *dev, enum pci_obff_signal_type); | 849 | int pci_enable_obff(struct pci_dev *dev, enum pci_obff_signal_type); |
850 | void pci_disable_obff(struct pci_dev *dev); | 850 | void pci_disable_obff(struct pci_dev *dev); |
@@ -879,7 +879,7 @@ void pdev_enable_device(struct pci_dev *); | |||
879 | void pdev_sort_resources(struct pci_dev *, struct resource_list *); | 879 | void pdev_sort_resources(struct pci_dev *, struct resource_list *); |
880 | int pci_enable_resources(struct pci_dev *, int mask); | 880 | int pci_enable_resources(struct pci_dev *, int mask); |
881 | void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), | 881 | void pci_fixup_irqs(u8 (*)(struct pci_dev *, u8 *), |
882 | int (*)(struct pci_dev *, u8, u8)); | 882 | int (*)(const struct pci_dev *, u8, u8)); |
883 | #define HAVE_PCI_REQ_REGIONS 2 | 883 | #define HAVE_PCI_REQ_REGIONS 2 |
884 | int __must_check pci_request_regions(struct pci_dev *, const char *); | 884 | int __must_check pci_request_regions(struct pci_dev *, const char *); |
885 | int __must_check pci_request_regions_exclusive(struct pci_dev *, const char *); | 885 | int __must_check pci_request_regions_exclusive(struct pci_dev *, const char *); |