Skip to content

Commit 2b8ff9f

Browse files
Matthew Minterbjorn-helgaas
authored andcommitted
sh/PCI: Remove __init optimisations from IRQ mapping functions/data
Currently many IRQ mapping functions and data structures use the __init and __initdata optimisations. These result in the relevant functions being innaccessible after boot time. However for deferred IRQ assignment it is important to have access to these functions at PCI device enable time. Therefore, remove the optimisation from the relevant data structures and functions to prepare for deferred IRQ assignment. Signed-off-by: Matthew Minter <matt@masarand.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Rich Felker <dalias@libc.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
1 parent 902d886 commit 2b8ff9f

File tree

10 files changed

+14
-14
lines changed

10 files changed

+14
-14
lines changed

arch/sh/drivers/pci/fixups-cayman.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <cpu/irq.h>
66
#include "pci-sh5.h"
77

8-
int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
8+
int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
99
{
1010
int result = -1;
1111

arch/sh/drivers/pci/fixups-dreamcast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ static void gapspci_fixup_resources(struct pci_dev *dev)
7676
}
7777
DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, gapspci_fixup_resources);
7878

79-
int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
79+
int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
8080
{
8181
/*
8282
* The interrupt routing semantics here are quite trivial.

arch/sh/drivers/pci/fixups-r7780rp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <linux/sh_intc.h>
1616
#include "pci-sh4.h"
1717

18-
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
18+
int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
1919
{
2020
return evt2irq(0xa20) + slot;
2121
}

arch/sh/drivers/pci/fixups-rts7751r2d.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@
2020
#define PCIMCR_MRSET_OFF 0xBFFFFFFF
2121
#define PCIMCR_RFSH_OFF 0xFFFFFFFB
2222

23-
static u8 rts7751r2d_irq_tab[] __initdata = {
23+
static u8 rts7751r2d_irq_tab[] = {
2424
IRQ_PCI_INTA,
2525
IRQ_PCI_INTB,
2626
IRQ_PCI_INTC,
2727
IRQ_PCI_INTD,
2828
};
2929

30-
static char lboxre2_irq_tab[] __initdata = {
30+
static char lboxre2_irq_tab[] = {
3131
IRQ_ETH0, IRQ_ETH1, IRQ_INTA, IRQ_INTD,
3232
};
3333

34-
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
34+
int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
3535
{
3636
if (mach_is_lboxre2())
3737
return lboxre2_irq_tab[slot];

arch/sh/drivers/pci/fixups-sdk7780.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define IRQ_INTD evt2irq(0xa80)
2323

2424
/* IDSEL [16][17][18][19][20][21][22][23][24][25][26][27][28][29][30][31] */
25-
static char sdk7780_irq_tab[4][16] __initdata = {
25+
static char sdk7780_irq_tab[4][16] = {
2626
/* INTA */
2727
{ IRQ_INTA, IRQ_INTD, IRQ_INTC, IRQ_INTD, -1, -1, -1, -1, -1, -1,
2828
-1, -1, -1, -1, -1, -1 },
@@ -37,7 +37,7 @@ static char sdk7780_irq_tab[4][16] __initdata = {
3737
-1, -1, -1 },
3838
};
3939

40-
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
40+
int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
4141
{
4242
return sdk7780_irq_tab[pin-1][slot];
4343
}

arch/sh/drivers/pci/fixups-se7751.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <linux/sh_intc.h>
88
#include "pci-sh4.h"
99

10-
int __init pcibios_map_platform_irq(const struct pci_dev *, u8 slot, u8 pin)
10+
int pcibios_map_platform_irq(const struct pci_dev *, u8 slot, u8 pin)
1111
{
1212
switch (slot) {
1313
case 0: return evt2irq(0x3a0);

arch/sh/drivers/pci/fixups-sh03.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <linux/pci.h>
55
#include <linux/sh_intc.h>
66

7-
int __init pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
7+
int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin)
88
{
99
int irq;
1010

arch/sh/drivers/pci/fixups-snapgear.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <linux/sh_intc.h>
2020
#include "pci-sh4.h"
2121

22-
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
22+
int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
2323
{
2424
int irq = -1;
2525

arch/sh/drivers/pci/fixups-titan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
#include <mach/titan.h>
2020
#include "pci-sh4.h"
2121

22-
static char titan_irq_tab[] __initdata = {
22+
static char titan_irq_tab[] = {
2323
TITAN_IRQ_WAN,
2424
TITAN_IRQ_LAN,
2525
TITAN_IRQ_MPCIA,
2626
TITAN_IRQ_MPCIB,
2727
TITAN_IRQ_USB,
2828
};
2929

30-
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
30+
int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
3131
{
3232
int irq = titan_irq_tab[slot];
3333

arch/sh/drivers/pci/pcie-sh7786.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ static int __init pcie_init(struct sh7786_pcie_port *port)
467467
return 0;
468468
}
469469

470-
int __init pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
470+
int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin)
471471
{
472472
return evt2irq(0xae0);
473473
}

0 commit comments

Comments
 (0)