aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/pci_irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/pci_irq.c')
-rw-r--r--drivers/acpi/pci_irq.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 2faa9e2ac893..b794eb88ab90 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -182,7 +182,7 @@ static void do_prt_fixups(struct acpi_prt_entry *entry,
182 } 182 }
183} 183}
184 184
185static int acpi_pci_irq_add_entry(acpi_handle handle, int segment, int bus, 185static int acpi_pci_irq_add_entry(acpi_handle handle, struct pci_bus *bus,
186 struct acpi_pci_routing_table *prt) 186 struct acpi_pci_routing_table *prt)
187{ 187{
188 struct acpi_prt_entry *entry; 188 struct acpi_prt_entry *entry;
@@ -196,8 +196,8 @@ static int acpi_pci_irq_add_entry(acpi_handle handle, int segment, int bus,
196 * 1=INTA, 2=INTB. We use the PCI encoding throughout, so convert 196 * 1=INTA, 2=INTB. We use the PCI encoding throughout, so convert
197 * it here. 197 * it here.
198 */ 198 */
199 entry->id.segment = segment; 199 entry->id.segment = pci_domain_nr(bus);
200 entry->id.bus = bus; 200 entry->id.bus = bus->number;
201 entry->id.device = (prt->address >> 16) & 0xFFFF; 201 entry->id.device = (prt->address >> 16) & 0xFFFF;
202 entry->pin = prt->pin + 1; 202 entry->pin = prt->pin + 1;
203 203
@@ -242,7 +242,7 @@ static int acpi_pci_irq_add_entry(acpi_handle handle, int segment, int bus,
242 return 0; 242 return 0;
243} 243}
244 244
245int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus) 245int acpi_pci_irq_add_prt(acpi_handle handle, struct pci_bus *bus)
246{ 246{
247 acpi_status status; 247 acpi_status status;
248 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 248 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
@@ -271,7 +271,7 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
271 271
272 entry = buffer.pointer; 272 entry = buffer.pointer;
273 while (entry && (entry->length > 0)) { 273 while (entry && (entry->length > 0)) {
274 acpi_pci_irq_add_entry(handle, segment, bus, entry); 274 acpi_pci_irq_add_entry(handle, bus, entry);
275 entry = (struct acpi_pci_routing_table *) 275 entry = (struct acpi_pci_routing_table *)
276 ((unsigned long)entry + entry->length); 276 ((unsigned long)entry + entry->length);
277 } 277 }
@@ -280,16 +280,17 @@ int acpi_pci_irq_add_prt(acpi_handle handle, int segment, int bus)
280 return 0; 280 return 0;
281} 281}
282 282
283void acpi_pci_irq_del_prt(int segment, int bus) 283void acpi_pci_irq_del_prt(struct pci_bus *bus)
284{ 284{
285 struct acpi_prt_entry *entry, *tmp; 285 struct acpi_prt_entry *entry, *tmp;
286 286
287 printk(KERN_DEBUG 287 printk(KERN_DEBUG
288 "ACPI: Delete PCI Interrupt Routing Table for %04x:%02x\n", 288 "ACPI: Delete PCI Interrupt Routing Table for %04x:%02x\n",
289 segment, bus); 289 pci_domain_nr(bus), bus->number);
290 spin_lock(&acpi_prt_lock); 290 spin_lock(&acpi_prt_lock);
291 list_for_each_entry_safe(entry, tmp, &acpi_prt_list, list) { 291 list_for_each_entry_safe(entry, tmp, &acpi_prt_list, list) {
292 if (segment == entry->id.segment && bus == entry->id.bus) { 292 if (pci_domain_nr(bus) == entry->id.segment
293 && bus->number == entry->id.bus) {
293 list_del(&entry->list); 294 list_del(&entry->list);
294 kfree(entry); 295 kfree(entry);
295 } 296 }