aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/frv/mb93090-mb00/pci-irq.c2
-rw-r--r--arch/i386/pci/irq.c16
-rw-r--r--arch/i386/pci/visws.c2
-rw-r--r--drivers/acpi/pci_link.c7
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c4
-rw-r--r--drivers/pnp/pnpbios/rsparser.c2
-rw-r--r--drivers/pnp/resource.c2
-rw-r--r--include/asm-alpha/pci.h2
-rw-r--r--include/asm-arm/pci.h2
-rw-r--r--include/asm-h8300/pci.h2
-rw-r--r--include/asm-i386/pci.h2
-rw-r--r--include/asm-ia64/pci.h2
-rw-r--r--include/asm-m68k/pci.h2
-rw-r--r--include/asm-mips/pci.h2
-rw-r--r--include/asm-ppc/pci.h2
-rw-r--r--include/asm-ppc64/pci.h2
-rw-r--r--include/asm-sh/pci.h2
-rw-r--r--include/asm-sh64/pci.h2
-rw-r--r--include/asm-sparc/pci.h2
-rw-r--r--include/asm-sparc64/pci.h2
-rw-r--r--include/asm-x86_64/pci.h2
-rw-r--r--include/linux/acpi.h2
22 files changed, 36 insertions, 29 deletions
diff --git a/arch/frv/mb93090-mb00/pci-irq.c b/arch/frv/mb93090-mb00/pci-irq.c
index 24622d89b1ca..af981bda015c 100644
--- a/arch/frv/mb93090-mb00/pci-irq.c
+++ b/arch/frv/mb93090-mb00/pci-irq.c
@@ -60,7 +60,7 @@ void __init pcibios_fixup_irqs(void)
60 } 60 }
61} 61}
62 62
63void __init pcibios_penalize_isa_irq(int irq) 63void __init pcibios_penalize_isa_irq(int irq, int active)
64{ 64{
65} 65}
66 66
diff --git a/arch/i386/pci/irq.c b/arch/i386/pci/irq.c
index da21b1d07c15..d21b3a2dc978 100644
--- a/arch/i386/pci/irq.c
+++ b/arch/i386/pci/irq.c
@@ -1006,24 +1006,28 @@ static int __init pcibios_irq_init(void)
1006subsys_initcall(pcibios_irq_init); 1006subsys_initcall(pcibios_irq_init);
1007 1007
1008 1008
1009static void pirq_penalize_isa_irq(int irq) 1009static void pirq_penalize_isa_irq(int irq, int active)
1010{ 1010{
1011 /* 1011 /*
1012 * If any ISAPnP device reports an IRQ in its list of possible 1012 * If any ISAPnP device reports an IRQ in its list of possible
1013 * IRQ's, we try to avoid assigning it to PCI devices. 1013 * IRQ's, we try to avoid assigning it to PCI devices.
1014 */ 1014 */
1015 if (irq < 16) 1015 if (irq < 16) {
1016 pirq_penalty[irq] += 100; 1016 if (active)
1017 pirq_penalty[irq] += 1000;
1018 else
1019 pirq_penalty[irq] += 100;
1020 }
1017} 1021}
1018 1022
1019void pcibios_penalize_isa_irq(int irq) 1023void pcibios_penalize_isa_irq(int irq, int active)
1020{ 1024{
1021#ifdef CONFIG_ACPI_PCI 1025#ifdef CONFIG_ACPI_PCI
1022 if (!acpi_noirq) 1026 if (!acpi_noirq)
1023 acpi_penalize_isa_irq(irq); 1027 acpi_penalize_isa_irq(irq, active);
1024 else 1028 else
1025#endif 1029#endif
1026 pirq_penalize_isa_irq(irq); 1030 pirq_penalize_isa_irq(irq, active);
1027} 1031}
1028 1032
1029static int pirq_enable_irq(struct pci_dev *dev) 1033static int pirq_enable_irq(struct pci_dev *dev)
diff --git a/arch/i386/pci/visws.c b/arch/i386/pci/visws.c
index 6a9248784439..314c933b6b8e 100644
--- a/arch/i386/pci/visws.c
+++ b/arch/i386/pci/visws.c
@@ -21,7 +21,7 @@ static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; }
21 21
22int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq; 22int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq;
23 23
24void __init pcibios_penalize_isa_irq(int irq) {} 24void __init pcibios_penalize_isa_irq(int irq, int active) {}
25 25
26 26
27unsigned int pci_bus0, pci_bus1; 27unsigned int pci_bus0, pci_bus1;
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index f2271173bbd5..6ad0e77df9b3 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -804,9 +804,12 @@ static int __init acpi_irq_penalty_update(char *str, int used)
804 * There is no ISA_POSSIBLE weight, so we simply use 804 * There is no ISA_POSSIBLE weight, so we simply use
805 * the (small) PCI_USING penalty. 805 * the (small) PCI_USING penalty.
806 */ 806 */
807void acpi_penalize_isa_irq(int irq) 807void acpi_penalize_isa_irq(int irq, int active)
808{ 808{
809 acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING; 809 if (active)
810 acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED;
811 else
812 acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
810} 813}
811 814
812/* 815/*
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index ae3819ad7cf4..75575f6c349c 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -160,7 +160,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
160 acpi_register_gsi(res->data.irq.interrupts[0], 160 acpi_register_gsi(res->data.irq.interrupts[0],
161 res->data.irq.edge_level, 161 res->data.irq.edge_level,
162 res->data.irq.active_high_low)); 162 res->data.irq.active_high_low));
163 pcibios_penalize_isa_irq(res->data.irq.interrupts[0]); 163 pcibios_penalize_isa_irq(res->data.irq.interrupts[0], 1);
164 } 164 }
165 break; 165 break;
166 166
@@ -171,7 +171,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
171 acpi_register_gsi(res->data.extended_irq.interrupts[0], 171 acpi_register_gsi(res->data.extended_irq.interrupts[0],
172 res->data.extended_irq.edge_level, 172 res->data.extended_irq.edge_level,
173 res->data.extended_irq.active_high_low)); 173 res->data.extended_irq.active_high_low));
174 pcibios_penalize_isa_irq(res->data.extended_irq.interrupts[0]); 174 pcibios_penalize_isa_irq(res->data.extended_irq.interrupts[0], 1);
175 } 175 }
176 break; 176 break;
177 case ACPI_RSTYPE_DMA: 177 case ACPI_RSTYPE_DMA:
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index 79bce7b75740..9001b6f0204d 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -64,7 +64,7 @@ pnpbios_parse_allocated_irqresource(struct pnp_resource_table * res, int irq)
64 } 64 }
65 res->irq_resource[i].start = 65 res->irq_resource[i].start =
66 res->irq_resource[i].end = (unsigned long) irq; 66 res->irq_resource[i].end = (unsigned long) irq;
67 pcibios_penalize_isa_irq(irq); 67 pcibios_penalize_isa_irq(irq, 1);
68 } 68 }
69} 69}
70 70
diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
index 2d1322dd7e19..887ad8939349 100644
--- a/drivers/pnp/resource.c
+++ b/drivers/pnp/resource.c
@@ -102,7 +102,7 @@ int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data)
102 102
103 for (i = 0; i < 16; i++) 103 for (i = 0; i < 16; i++)
104 if (test_bit(i, data->map)) 104 if (test_bit(i, data->map))
105 pcibios_penalize_isa_irq(i); 105 pcibios_penalize_isa_irq(i, 0);
106 } 106 }
107#endif 107#endif
108 return 0; 108 return 0;
diff --git a/include/asm-alpha/pci.h b/include/asm-alpha/pci.h
index 0c7b57bc043a..7109860f98ec 100644
--- a/include/asm-alpha/pci.h
+++ b/include/asm-alpha/pci.h
@@ -58,7 +58,7 @@ struct pci_controller {
58 58
59extern void pcibios_set_master(struct pci_dev *dev); 59extern void pcibios_set_master(struct pci_dev *dev);
60 60
61extern inline void pcibios_penalize_isa_irq(int irq) 61extern inline void pcibios_penalize_isa_irq(int irq, int active)
62{ 62{
63 /* We don't do dynamic PCI IRQ allocation */ 63 /* We don't do dynamic PCI IRQ allocation */
64} 64}
diff --git a/include/asm-arm/pci.h b/include/asm-arm/pci.h
index 40ffaefbeb1a..0f437e262314 100644
--- a/include/asm-arm/pci.h
+++ b/include/asm-arm/pci.h
@@ -14,7 +14,7 @@ static inline void pcibios_set_master(struct pci_dev *dev)
14 /* No special bus mastering setup handling */ 14 /* No special bus mastering setup handling */
15} 15}
16 16
17static inline void pcibios_penalize_isa_irq(int irq) 17static inline void pcibios_penalize_isa_irq(int irq, int active)
18{ 18{
19 /* We don't do dynamic PCI IRQ allocation */ 19 /* We don't do dynamic PCI IRQ allocation */
20} 20}
diff --git a/include/asm-h8300/pci.h b/include/asm-h8300/pci.h
index d032729b19df..5edad5b70fd5 100644
--- a/include/asm-h8300/pci.h
+++ b/include/asm-h8300/pci.h
@@ -15,7 +15,7 @@ extern inline void pcibios_set_master(struct pci_dev *dev)
15 /* No special bus mastering setup handling */ 15 /* No special bus mastering setup handling */
16} 16}
17 17
18extern inline void pcibios_penalize_isa_irq(int irq) 18extern inline void pcibios_penalize_isa_irq(int irq, int active)
19{ 19{
20 /* We don't do dynamic PCI IRQ allocation */ 20 /* We don't do dynamic PCI IRQ allocation */
21} 21}
diff --git a/include/asm-i386/pci.h b/include/asm-i386/pci.h
index fb749b85a739..e0dc1cea0b7c 100644
--- a/include/asm-i386/pci.h
+++ b/include/asm-i386/pci.h
@@ -27,7 +27,7 @@ void pcibios_config_init(void);
27struct pci_bus * pcibios_scan_root(int bus); 27struct pci_bus * pcibios_scan_root(int bus);
28 28
29void pcibios_set_master(struct pci_dev *dev); 29void pcibios_set_master(struct pci_dev *dev);
30void pcibios_penalize_isa_irq(int irq); 30void pcibios_penalize_isa_irq(int irq, int active);
31struct irq_routing_table *pcibios_get_irq_routing_table(void); 31struct irq_routing_table *pcibios_get_irq_routing_table(void);
32int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq); 32int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
33 33
diff --git a/include/asm-ia64/pci.h b/include/asm-ia64/pci.h
index a8314ee4e7d2..1cbd10b96b3a 100644
--- a/include/asm-ia64/pci.h
+++ b/include/asm-ia64/pci.h
@@ -47,7 +47,7 @@ pcibios_set_master (struct pci_dev *dev)
47} 47}
48 48
49static inline void 49static inline void
50pcibios_penalize_isa_irq (int irq) 50pcibios_penalize_isa_irq (int irq, int active)
51{ 51{
52 /* We don't do dynamic PCI IRQ allocation */ 52 /* We don't do dynamic PCI IRQ allocation */
53} 53}
diff --git a/include/asm-m68k/pci.h b/include/asm-m68k/pci.h
index 9e7d79ab5d13..9d2c07abe44f 100644
--- a/include/asm-m68k/pci.h
+++ b/include/asm-m68k/pci.h
@@ -43,7 +43,7 @@ static inline void pcibios_set_master(struct pci_dev *dev)
43 /* No special bus mastering setup handling */ 43 /* No special bus mastering setup handling */
44} 44}
45 45
46static inline void pcibios_penalize_isa_irq(int irq) 46static inline void pcibios_penalize_isa_irq(int irq, int active)
47{ 47{
48 /* We don't do dynamic PCI IRQ allocation */ 48 /* We don't do dynamic PCI IRQ allocation */
49} 49}
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h
index c9c576b48556..3bf1cb5cd548 100644
--- a/include/asm-mips/pci.h
+++ b/include/asm-mips/pci.h
@@ -69,7 +69,7 @@ extern unsigned long PCIBIOS_MIN_MEM;
69 69
70extern void pcibios_set_master(struct pci_dev *dev); 70extern void pcibios_set_master(struct pci_dev *dev);
71 71
72static inline void pcibios_penalize_isa_irq(int irq) 72static inline void pcibios_penalize_isa_irq(int irq, int active)
73{ 73{
74 /* We don't do dynamic PCI IRQ allocation */ 74 /* We don't do dynamic PCI IRQ allocation */
75} 75}
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h
index ce5ae6d048f5..ebd34fffc730 100644
--- a/include/asm-ppc/pci.h
+++ b/include/asm-ppc/pci.h
@@ -37,7 +37,7 @@ extern inline void pcibios_set_master(struct pci_dev *dev)
37 /* No special bus mastering setup handling */ 37 /* No special bus mastering setup handling */
38} 38}
39 39
40extern inline void pcibios_penalize_isa_irq(int irq) 40extern inline void pcibios_penalize_isa_irq(int irq, int active)
41{ 41{
42 /* We don't do dynamic PCI IRQ allocation */ 42 /* We don't do dynamic PCI IRQ allocation */
43} 43}
diff --git a/include/asm-ppc64/pci.h b/include/asm-ppc64/pci.h
index 6cd593f660a0..7c11687df3bb 100644
--- a/include/asm-ppc64/pci.h
+++ b/include/asm-ppc64/pci.h
@@ -37,7 +37,7 @@ static inline void pcibios_set_master(struct pci_dev *dev)
37 /* No special bus mastering setup handling */ 37 /* No special bus mastering setup handling */
38} 38}
39 39
40static inline void pcibios_penalize_isa_irq(int irq) 40static inline void pcibios_penalize_isa_irq(int irq, int active)
41{ 41{
42 /* We don't do dynamic PCI IRQ allocation */ 42 /* We don't do dynamic PCI IRQ allocation */
43} 43}
diff --git a/include/asm-sh/pci.h b/include/asm-sh/pci.h
index 9c3b63d0105e..92bcb03426fe 100644
--- a/include/asm-sh/pci.h
+++ b/include/asm-sh/pci.h
@@ -36,7 +36,7 @@ struct pci_dev;
36 36
37extern void pcibios_set_master(struct pci_dev *dev); 37extern void pcibios_set_master(struct pci_dev *dev);
38 38
39static inline void pcibios_penalize_isa_irq(int irq) 39static inline void pcibios_penalize_isa_irq(int irq, int active)
40{ 40{
41 /* We don't do dynamic PCI IRQ allocation */ 41 /* We don't do dynamic PCI IRQ allocation */
42} 42}
diff --git a/include/asm-sh64/pci.h b/include/asm-sh64/pci.h
index 8cc14e139750..ea711108f0e7 100644
--- a/include/asm-sh64/pci.h
+++ b/include/asm-sh64/pci.h
@@ -26,7 +26,7 @@ extern void pcibios_set_master(struct pci_dev *dev);
26/* 26/*
27 * Set penalize isa irq function 27 * Set penalize isa irq function
28 */ 28 */
29static inline void pcibios_penalize_isa_irq(int irq) 29static inline void pcibios_penalize_isa_irq(int irq, int active)
30{ 30{
31 /* We don't do dynamic PCI IRQ allocation */ 31 /* We don't do dynamic PCI IRQ allocation */
32} 32}
diff --git a/include/asm-sparc/pci.h b/include/asm-sparc/pci.h
index d200a25a7373..d875d9496a8c 100644
--- a/include/asm-sparc/pci.h
+++ b/include/asm-sparc/pci.h
@@ -20,7 +20,7 @@ extern inline void pcibios_set_master(struct pci_dev *dev)
20 /* No special bus mastering setup handling */ 20 /* No special bus mastering setup handling */
21} 21}
22 22
23extern inline void pcibios_penalize_isa_irq(int irq) 23extern inline void pcibios_penalize_isa_irq(int irq, int active)
24{ 24{
25 /* We don't do dynamic PCI IRQ allocation */ 25 /* We don't do dynamic PCI IRQ allocation */
26} 26}
diff --git a/include/asm-sparc64/pci.h b/include/asm-sparc64/pci.h
index 2a0c85cd1c11..e38d6598d626 100644
--- a/include/asm-sparc64/pci.h
+++ b/include/asm-sparc64/pci.h
@@ -23,7 +23,7 @@ static inline void pcibios_set_master(struct pci_dev *dev)
23 /* No special bus mastering setup handling */ 23 /* No special bus mastering setup handling */
24} 24}
25 25
26static inline void pcibios_penalize_isa_irq(int irq) 26static inline void pcibios_penalize_isa_irq(int irq, int active)
27{ 27{
28 /* We don't do dynamic PCI IRQ allocation */ 28 /* We don't do dynamic PCI IRQ allocation */
29} 29}
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h
index 8712520ca47f..9e8c273b785e 100644
--- a/include/asm-x86_64/pci.h
+++ b/include/asm-x86_64/pci.h
@@ -33,7 +33,7 @@ extern int (*pci_config_read)(int seg, int bus, int dev, int fn, int reg, int le
33extern int (*pci_config_write)(int seg, int bus, int dev, int fn, int reg, int len, u32 value); 33extern int (*pci_config_write)(int seg, int bus, int dev, int fn, int reg, int len, u32 value);
34 34
35void pcibios_set_master(struct pci_dev *dev); 35void pcibios_set_master(struct pci_dev *dev);
36void pcibios_penalize_isa_irq(int irq); 36void pcibios_penalize_isa_irq(int irq, int active);
37struct irq_routing_table *pcibios_get_irq_routing_table(void); 37struct irq_routing_table *pcibios_get_irq_routing_table(void);
38int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq); 38int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
39 39
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 70b3c52b75d7..9c14959bcfa0 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -465,7 +465,7 @@ struct acpi_prt_list {
465struct pci_dev; 465struct pci_dev;
466 466
467int acpi_pci_irq_enable (struct pci_dev *dev); 467int acpi_pci_irq_enable (struct pci_dev *dev);
468void acpi_penalize_isa_irq(int irq); 468void acpi_penalize_isa_irq(int irq, int active);
469 469
470#ifdef CONFIG_ACPI_DEALLOCATE_IRQ 470#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
471void acpi_pci_irq_disable (struct pci_dev *dev); 471void acpi_pci_irq_disable (struct pci_dev *dev);