forked from luck/tmp_suning_uos_patched
[ACPI] PNPACPI vs sound IRQ
http://bugme.osdl.org/show_bug.cgi?id=4016 Written-by: David Shaohua Li <shaohua.li@intel.com> Acked-by: Adam Belay <abelay@novell.com> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
acf05f4b7f
commit
c9c3e457de
|
@ -60,7 +60,7 @@ void __init pcibios_fixup_irqs(void)
|
|||
}
|
||||
}
|
||||
|
||||
void __init pcibios_penalize_isa_irq(int irq)
|
||||
void __init pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -1006,24 +1006,28 @@ static int __init pcibios_irq_init(void)
|
|||
subsys_initcall(pcibios_irq_init);
|
||||
|
||||
|
||||
static void pirq_penalize_isa_irq(int irq)
|
||||
static void pirq_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/*
|
||||
* If any ISAPnP device reports an IRQ in its list of possible
|
||||
* IRQ's, we try to avoid assigning it to PCI devices.
|
||||
*/
|
||||
if (irq < 16)
|
||||
pirq_penalty[irq] += 100;
|
||||
if (irq < 16) {
|
||||
if (active)
|
||||
pirq_penalty[irq] += 1000;
|
||||
else
|
||||
pirq_penalty[irq] += 100;
|
||||
}
|
||||
}
|
||||
|
||||
void pcibios_penalize_isa_irq(int irq)
|
||||
void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
#ifdef CONFIG_ACPI_PCI
|
||||
if (!acpi_noirq)
|
||||
acpi_penalize_isa_irq(irq);
|
||||
acpi_penalize_isa_irq(irq, active);
|
||||
else
|
||||
#endif
|
||||
pirq_penalize_isa_irq(irq);
|
||||
pirq_penalize_isa_irq(irq, active);
|
||||
}
|
||||
|
||||
static int pirq_enable_irq(struct pci_dev *dev)
|
||||
|
|
|
@ -21,7 +21,7 @@ static int pci_visws_enable_irq(struct pci_dev *dev) { return 0; }
|
|||
|
||||
int (*pcibios_enable_irq)(struct pci_dev *dev) = &pci_visws_enable_irq;
|
||||
|
||||
void __init pcibios_penalize_isa_irq(int irq) {}
|
||||
void __init pcibios_penalize_isa_irq(int irq, int active) {}
|
||||
|
||||
|
||||
unsigned int pci_bus0, pci_bus1;
|
||||
|
|
|
@ -804,9 +804,12 @@ static int __init acpi_irq_penalty_update(char *str, int used)
|
|||
* There is no ISA_POSSIBLE weight, so we simply use
|
||||
* the (small) PCI_USING penalty.
|
||||
*/
|
||||
void acpi_penalize_isa_irq(int irq)
|
||||
void acpi_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
|
||||
if (active)
|
||||
acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED;
|
||||
else
|
||||
acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -160,7 +160,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
|
|||
acpi_register_gsi(res->data.irq.interrupts[0],
|
||||
res->data.irq.edge_level,
|
||||
res->data.irq.active_high_low));
|
||||
pcibios_penalize_isa_irq(res->data.irq.interrupts[0]);
|
||||
pcibios_penalize_isa_irq(res->data.irq.interrupts[0], 1);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -171,7 +171,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
|
|||
acpi_register_gsi(res->data.extended_irq.interrupts[0],
|
||||
res->data.extended_irq.edge_level,
|
||||
res->data.extended_irq.active_high_low));
|
||||
pcibios_penalize_isa_irq(res->data.extended_irq.interrupts[0]);
|
||||
pcibios_penalize_isa_irq(res->data.extended_irq.interrupts[0], 1);
|
||||
}
|
||||
break;
|
||||
case ACPI_RSTYPE_DMA:
|
||||
|
|
|
@ -64,7 +64,7 @@ pnpbios_parse_allocated_irqresource(struct pnp_resource_table * res, int irq)
|
|||
}
|
||||
res->irq_resource[i].start =
|
||||
res->irq_resource[i].end = (unsigned long) irq;
|
||||
pcibios_penalize_isa_irq(irq);
|
||||
pcibios_penalize_isa_irq(irq, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ int pnp_register_irq_resource(struct pnp_option *option, struct pnp_irq *data)
|
|||
|
||||
for (i = 0; i < 16; i++)
|
||||
if (test_bit(i, data->map))
|
||||
pcibios_penalize_isa_irq(i);
|
||||
pcibios_penalize_isa_irq(i, 0);
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
|
|
|
@ -58,7 +58,7 @@ struct pci_controller {
|
|||
|
||||
extern void pcibios_set_master(struct pci_dev *dev);
|
||||
|
||||
extern inline void pcibios_penalize_isa_irq(int irq)
|
||||
extern inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ static inline void pcibios_set_master(struct pci_dev *dev)
|
|||
/* No special bus mastering setup handling */
|
||||
}
|
||||
|
||||
static inline void pcibios_penalize_isa_irq(int irq)
|
||||
static inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ extern inline void pcibios_set_master(struct pci_dev *dev)
|
|||
/* No special bus mastering setup handling */
|
||||
}
|
||||
|
||||
extern inline void pcibios_penalize_isa_irq(int irq)
|
||||
extern inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ void pcibios_config_init(void);
|
|||
struct pci_bus * pcibios_scan_root(int bus);
|
||||
|
||||
void pcibios_set_master(struct pci_dev *dev);
|
||||
void pcibios_penalize_isa_irq(int irq);
|
||||
void pcibios_penalize_isa_irq(int irq, int active);
|
||||
struct irq_routing_table *pcibios_get_irq_routing_table(void);
|
||||
int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ pcibios_set_master (struct pci_dev *dev)
|
|||
}
|
||||
|
||||
static inline void
|
||||
pcibios_penalize_isa_irq (int irq)
|
||||
pcibios_penalize_isa_irq (int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ static inline void pcibios_set_master(struct pci_dev *dev)
|
|||
/* No special bus mastering setup handling */
|
||||
}
|
||||
|
||||
static inline void pcibios_penalize_isa_irq(int irq)
|
||||
static inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ extern unsigned long PCIBIOS_MIN_MEM;
|
|||
|
||||
extern void pcibios_set_master(struct pci_dev *dev);
|
||||
|
||||
static inline void pcibios_penalize_isa_irq(int irq)
|
||||
static inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ extern inline void pcibios_set_master(struct pci_dev *dev)
|
|||
/* No special bus mastering setup handling */
|
||||
}
|
||||
|
||||
extern inline void pcibios_penalize_isa_irq(int irq)
|
||||
extern inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ static inline void pcibios_set_master(struct pci_dev *dev)
|
|||
/* No special bus mastering setup handling */
|
||||
}
|
||||
|
||||
static inline void pcibios_penalize_isa_irq(int irq)
|
||||
static inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ struct pci_dev;
|
|||
|
||||
extern void pcibios_set_master(struct pci_dev *dev);
|
||||
|
||||
static inline void pcibios_penalize_isa_irq(int irq)
|
||||
static inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ extern void pcibios_set_master(struct pci_dev *dev);
|
|||
/*
|
||||
* Set penalize isa irq function
|
||||
*/
|
||||
static inline void pcibios_penalize_isa_irq(int irq)
|
||||
static inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ extern inline void pcibios_set_master(struct pci_dev *dev)
|
|||
/* No special bus mastering setup handling */
|
||||
}
|
||||
|
||||
extern inline void pcibios_penalize_isa_irq(int irq)
|
||||
extern inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ static inline void pcibios_set_master(struct pci_dev *dev)
|
|||
/* No special bus mastering setup handling */
|
||||
}
|
||||
|
||||
static inline void pcibios_penalize_isa_irq(int irq)
|
||||
static inline void pcibios_penalize_isa_irq(int irq, int active)
|
||||
{
|
||||
/* We don't do dynamic PCI IRQ allocation */
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ extern int (*pci_config_read)(int seg, int bus, int dev, int fn, int reg, int le
|
|||
extern int (*pci_config_write)(int seg, int bus, int dev, int fn, int reg, int len, u32 value);
|
||||
|
||||
void pcibios_set_master(struct pci_dev *dev);
|
||||
void pcibios_penalize_isa_irq(int irq);
|
||||
void pcibios_penalize_isa_irq(int irq, int active);
|
||||
struct irq_routing_table *pcibios_get_irq_routing_table(void);
|
||||
int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq);
|
||||
|
||||
|
|
|
@ -465,7 +465,7 @@ struct acpi_prt_list {
|
|||
struct pci_dev;
|
||||
|
||||
int acpi_pci_irq_enable (struct pci_dev *dev);
|
||||
void acpi_penalize_isa_irq(int irq);
|
||||
void acpi_penalize_isa_irq(int irq, int active);
|
||||
|
||||
#ifdef CONFIG_ACPI_DEALLOCATE_IRQ
|
||||
void acpi_pci_irq_disable (struct pci_dev *dev);
|
||||
|
|
Loading…
Reference in New Issue
Block a user