projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
x86, irq, PCI: Keep IRQ assignment for runtime power management
[cascardo/linux.git]
/
arch
/
x86
/
pci
/
irq.c
diff --git
a/arch/x86/pci/irq.c
b/arch/x86/pci/irq.c
index
84112f5
..
eb500c2
100644
(file)
--- a/
arch/x86/pci/irq.c
+++ b/
arch/x86/pci/irq.c
@@
-26,6
+26,7
@@
static int acer_tm360_irqrouting;
static struct irq_routing_table *pirq_table;
static int pirq_enable_irq(struct pci_dev *dev);
static struct irq_routing_table *pirq_table;
static int pirq_enable_irq(struct pci_dev *dev);
+static void pirq_disable_irq(struct pci_dev *dev);
/*
* Never use: 0, 1, 2 (timer, keyboard, and cascade)
/*
* Never use: 0, 1, 2 (timer, keyboard, and cascade)
@@
-53,7
+54,7
@@
struct irq_router_handler {
};
int (*pcibios_enable_irq)(struct pci_dev *dev) = pirq_enable_irq;
};
int (*pcibios_enable_irq)(struct pci_dev *dev) = pirq_enable_irq;
-void (*pcibios_disable_irq)(struct pci_dev *dev) =
NULL
;
+void (*pcibios_disable_irq)(struct pci_dev *dev) =
pirq_disable_irq
;
/*
* Check passed address for the PCI IRQ Routing Table signature
/*
* Check passed address for the PCI IRQ Routing Table signature
@@
-1186,7
+1187,7
@@
void pcibios_penalize_isa_irq(int irq, int active)
static int pirq_enable_irq(struct pci_dev *dev)
{
static int pirq_enable_irq(struct pci_dev *dev)
{
- u8 pin;
+ u8 pin
= 0
;
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (pin && !pcibios_lookup_irq(dev, 1)) {
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (pin && !pcibios_lookup_irq(dev, 1)) {
@@
-1227,8
+1228,6
@@
static int pirq_enable_irq(struct pci_dev *dev)
}
dev = temp_dev;
if (irq >= 0) {
}
dev = temp_dev;
if (irq >= 0) {
- io_apic_set_pci_routing(&dev->dev, irq,
- &irq_attr);
dev->irq = irq;
dev_info(&dev->dev, "PCI->APIC IRQ transform: "
"INT %c -> IRQ %d\n", 'A' + pin - 1, irq);
dev->irq = irq;
dev_info(&dev->dev, "PCI->APIC IRQ transform: "
"INT %c -> IRQ %d\n", 'A' + pin - 1, irq);
@@
-1254,3
+1253,12
@@
static int pirq_enable_irq(struct pci_dev *dev)
}
return 0;
}
}
return 0;
}
+
+static void pirq_disable_irq(struct pci_dev *dev)
+{
+ if (io_apic_assign_pci_irqs && !mp_should_keep_irq(&dev->dev) &&
+ dev->irq) {
+ mp_unmap_irq(dev->irq);
+ dev->irq = 0;
+ }
+}