Skip to content

Commit 30e3b4f

Browse files
author
Russell King
committed
ARM: footbridge: fix PCI interrupt mapping
Since commit 30fdfb9 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()"), the PCI code will call the IRQ mapping function whenever a PCI driver is probed. If these are marked as __init, this causes an oops if a PCI driver is loaded or bound after the kernel has initialised. Fixes: 30fdfb9 ("PCI: Add a call to pci_assign_irq() in pci_device_probe()") Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
1 parent 45c2f70 commit 30e3b4f

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

arch/arm/mach-footbridge/cats-pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
#include <asm/mach-types.h>
1616

1717
/* cats host-specific stuff */
18-
static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
18+
static int irqmap_cats[] = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
1919

2020
static u8 cats_no_swizzle(struct pci_dev *dev, u8 *pin)
2121
{
2222
return 0;
2323
}
2424

25-
static int __init cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
25+
static int cats_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2626
{
2727
if (dev->irq >= 255)
2828
return -1; /* not a valid interrupt. */

arch/arm/mach-footbridge/ebsa285-pci.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#include <asm/mach/pci.h>
1515
#include <asm/mach-types.h>
1616

17-
static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
17+
static int irqmap_ebsa285[] = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
1818

19-
static int __init ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
19+
static int ebsa285_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2020
{
2121
if (dev->vendor == PCI_VENDOR_ID_CONTAQ &&
2222
dev->device == PCI_DEVICE_ID_CONTAQ_82C693)

arch/arm/mach-footbridge/netwinder-pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* We now use the slot ID instead of the device identifiers to select
1919
* which interrupt is routed where.
2020
*/
21-
static int __init netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
21+
static int netwinder_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2222
{
2323
switch (slot) {
2424
case 0: /* host bridge */

arch/arm/mach-footbridge/personal-pci.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
#include <asm/mach/pci.h>
1515
#include <asm/mach-types.h>
1616

17-
static int irqmap_personal_server[] __initdata = {
17+
static int irqmap_personal_server[] = {
1818
IRQ_IN0, IRQ_IN1, IRQ_IN2, IRQ_IN3, 0, 0, 0,
1919
IRQ_DOORBELLHOST, IRQ_DMA1, IRQ_DMA2, IRQ_PCI
2020
};
2121

22-
static int __init personal_server_map_irq(const struct pci_dev *dev, u8 slot,
23-
u8 pin)
22+
static int personal_server_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2423
{
2524
unsigned char line;
2625

0 commit comments

Comments
 (0)