Skip to contentSkip to conversation

Fix PCIE and SHPC hotplug drivers for ia64

PATCH Applied Andreas Schwab 3 participants 4 messages Mar 4, 2004 – Mar 10, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

This patch fixes the PCIE and SHPC hotplug driver for ia64. The function pcibios_set_irq_routing only exists on x86, and acpi_bridges_head may be NULL, so don't crash.

Andreas.

drivers/pci/hotplug/pciehp_pci.c renamed from drivers/pci/hotplug/pciehp_pci.c.~1~ +1 -1
@@ -103,7 +103,7 @@ int pciehp_unconfigure_device(struct pci
  */
 int pciehp_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num)
 {
-#if !defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_64)
+#if defined(CONFIG_X86) && !defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_64)
 	int rc;
 	u16 temp_word;
 	struct pci_dev fakedev;
drivers/pci/hotplug/pciehprm_acpi.c renamed from drivers/pci/hotplug/pciehprm_acpi.c.~1~ +2 -1
@@ -1265,7 +1265,8 @@ static int print_acpi_resources (struct 
 int pciehprm_print_pirt(void)
 {
 	dbg("PCIEHPRM ACPI Slots\n");
-	print_acpi_resources (acpi_bridges_head);
+	if (acpi_bridges_head)
+		print_acpi_resources (acpi_bridges_head);
 
 	return 0;
 }
drivers/pci/hotplug/shpchp_pci.c renamed from drivers/pci/hotplug/shpchp_pci.c.~1~ +1 -1
@@ -101,7 +101,7 @@ int shpchp_unconfigure_device(struct pci
  */
 int shpchp_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num)
 {
-#if !defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_64)
+#if defined(CONFIG_X86) && !defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_64)
 	int rc;
 	u16 temp_word;
 	struct pci_dev fakedev;
Signature · 4 lines
Andreas Schwab, SuSE Labs, [email protected]
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
#1 lore raw
Quoted 3 lines · Andreas Schwab

This patch fixes the PCIE and SHPC hotplug driver for ia64. The function pcibios_set_irq_routing only exists on x86, and acpi_bridges_head may be NULL, so don't crash.

This looks sane to me, Dely?

thanks,

greg k-h

#2 lore raw
In reply to Andreas Schwab
Quoted 2 lines · Greg KH
Quoted 1 line · Andreas Schwab

This patch fixes the PCIE and SHPC hotplug driver for ia64. The

function

Quoted 1 line
Quoted 1 line

pcibios_set_irq_routing only exists on x86, and acpi_bridges_head

may be

Quoted 3 lines
Quoted 1 line

NULL, so don't crash.

This looks sane to me, Dely?

Thanks for the fix. It looks good to me.

Thanks,
Dely

Applied
#3 lore raw
In reply to Andreas Schwab
Quoted 3 lines · Andreas Schwab

This patch fixes the PCIE and SHPC hotplug driver for ia64. The function pcibios_set_irq_routing only exists on x86, and acpi_bridges_head may be NULL, so don't crash.

Applied, thanks.

greg k-h