Skip to content

Commit 19a8d6b

Browse files
Lorenzo Pieralisibjorn-helgaas
authored andcommitted
MIPS: PCI: Move map_irq() hooks out of initdata
04c81c7 ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") moved the PCI IRQ fixup to the new host bridge map/swizzle_irq() hooks mechanism. Those hooks can also be called after boot, when all the __init/__initdata/__initconst sections have been freed. Therefore, functions called by them (and the data they refer to) must not be marked as __init/__initdata/__initconst lest compilation trigger section mismatch warnings. Fix all the board files map_irq() hooks by simply removing the respective __init/__initdata/__initconst section markers and by adding another persistent hook IRQ map for the txx9 board files. Fixes: 04c81c7 ("MIPS: PCI: Replace pci_fixup_irqs() call with host bridge IRQ mapping hooks") Signed-off-by: Lorenzo Pieralisi <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Steve French <[email protected]>
1 parent 2bd6bf0 commit 19a8d6b

32 files changed

+62
-60
lines changed

arch/mips/ath79/pci.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
#include "pci.h"
2323

2424
static int (*ath79_pci_plat_dev_init)(struct pci_dev *dev);
25-
static const struct ath79_pci_irq *ath79_pci_irq_map __initdata;
26-
static unsigned ath79_pci_nr_irqs __initdata;
25+
static const struct ath79_pci_irq *ath79_pci_irq_map;
26+
static unsigned ath79_pci_nr_irqs;
2727

28-
static const struct ath79_pci_irq ar71xx_pci_irq_map[] __initconst = {
28+
static const struct ath79_pci_irq ar71xx_pci_irq_map[] = {
2929
{
3030
.slot = 17,
3131
.pin = 1,
@@ -41,15 +41,15 @@ static const struct ath79_pci_irq ar71xx_pci_irq_map[] __initconst = {
4141
}
4242
};
4343

44-
static const struct ath79_pci_irq ar724x_pci_irq_map[] __initconst = {
44+
static const struct ath79_pci_irq ar724x_pci_irq_map[] = {
4545
{
4646
.slot = 0,
4747
.pin = 1,
4848
.irq = ATH79_PCI_IRQ(0),
4949
}
5050
};
5151

52-
static const struct ath79_pci_irq qca955x_pci_irq_map[] __initconst = {
52+
static const struct ath79_pci_irq qca955x_pci_irq_map[] = {
5353
{
5454
.bus = 0,
5555
.slot = 0,
@@ -64,7 +64,7 @@ static const struct ath79_pci_irq qca955x_pci_irq_map[] __initconst = {
6464
},
6565
};
6666

67-
int __init pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin)
67+
int pcibios_map_irq(const struct pci_dev *dev, uint8_t slot, uint8_t pin)
6868
{
6969
int irq = -1;
7070
int i;

arch/mips/pci/fixup-capcella.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
#define INTC PC104PLUS_INTC_IRQ
3333
#define INTD PC104PLUS_INTD_IRQ
3434

35-
static char irq_tab_capcella[][5] __initdata = {
35+
static char irq_tab_capcella[][5] = {
3636
[11] = { -1, INT1, INT1, INT1, INT1 },
3737
[12] = { -1, INT2, INT2, INT2, INT2 },
3838
[14] = { -1, INTA, INTB, INTC, INTD }
3939
};
4040

41-
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
41+
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
4242
{
4343
return irq_tab_capcella[slot][pin];
4444
}

arch/mips/pci/fixup-cobalt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static void qube_raq_via_board_id_fixup(struct pci_dev *dev)
147147
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_0,
148148
qube_raq_via_board_id_fixup);
149149

150-
static char irq_tab_qube1[] __initdata = {
150+
static char irq_tab_qube1[] = {
151151
[COBALT_PCICONF_CPU] = 0,
152152
[COBALT_PCICONF_ETH0] = QUBE1_ETH0_IRQ,
153153
[COBALT_PCICONF_RAQSCSI] = SCSI_IRQ,
@@ -156,7 +156,7 @@ static char irq_tab_qube1[] __initdata = {
156156
[COBALT_PCICONF_ETH1] = 0
157157
};
158158

159-
static char irq_tab_cobalt[] __initdata = {
159+
static char irq_tab_cobalt[] = {
160160
[COBALT_PCICONF_CPU] = 0,
161161
[COBALT_PCICONF_ETH0] = ETH0_IRQ,
162162
[COBALT_PCICONF_RAQSCSI] = SCSI_IRQ,
@@ -165,7 +165,7 @@ static char irq_tab_cobalt[] __initdata = {
165165
[COBALT_PCICONF_ETH1] = ETH1_IRQ
166166
};
167167

168-
static char irq_tab_raq2[] __initdata = {
168+
static char irq_tab_raq2[] = {
169169
[COBALT_PCICONF_CPU] = 0,
170170
[COBALT_PCICONF_ETH0] = ETH0_IRQ,
171171
[COBALT_PCICONF_RAQSCSI] = RAQ2_SCSI_IRQ,
@@ -174,7 +174,7 @@ static char irq_tab_raq2[] __initdata = {
174174
[COBALT_PCICONF_ETH1] = ETH1_IRQ
175175
};
176176

177-
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
177+
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
178178
{
179179
if (cobalt_board_id <= COBALT_BRD_ID_QUBE1)
180180
return irq_tab_qube1[slot];

arch/mips/pci/fixup-emma2rh.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
*/
4444

4545
#define MAX_SLOT_NUM 10
46-
static unsigned char irq_map[][5] __initdata = {
46+
static unsigned char irq_map[][5] = {
4747
[3] = {0, MARKEINS_PCI_IRQ_INTB, MARKEINS_PCI_IRQ_INTC,
4848
MARKEINS_PCI_IRQ_INTD, 0,},
4949
[4] = {0, MARKEINS_PCI_IRQ_INTA, 0, 0, 0,},
@@ -85,7 +85,7 @@ static void emma2rh_pci_host_fixup(struct pci_dev *dev)
8585
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_EMMA2RH,
8686
emma2rh_pci_host_fixup);
8787

88-
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
88+
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
8989
{
9090
return irq_map[slot][pin];
9191
}

arch/mips/pci/fixup-fuloong2e.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
/* South bridge slot number is set by the pci probe process */
2020
static u8 sb_slot = 5;
2121

22-
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
22+
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2323
{
2424
int irq = 0;
2525

arch/mips/pci/fixup-ip32.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#define INTB MACEPCI_SHARED0_IRQ
2222
#define INTC MACEPCI_SHARED1_IRQ
2323
#define INTD MACEPCI_SHARED2_IRQ
24-
static char irq_tab_mace[][5] __initdata = {
24+
static char irq_tab_mace[][5] = {
2525
/* Dummy INT#A INT#B INT#C INT#D */
2626
{0, 0, 0, 0, 0}, /* This is placeholder row - never used */
2727
{0, SCSI0, SCSI0, SCSI0, SCSI0},
@@ -39,7 +39,7 @@ static char irq_tab_mace[][5] __initdata = {
3939
* irqs. I suppose a device without a pin A will thank us for doing it
4040
* right if there exists such a broken piece of crap.
4141
*/
42-
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
42+
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
4343
{
4444
return irq_tab_mace[slot][pin];
4545
}

arch/mips/pci/fixup-jmr3927.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include <asm/txx9/pci.h>
3232
#include <asm/txx9/jmr3927.h>
3333

34-
int __init jmr3927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
34+
int jmr3927_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
3535
{
3636
unsigned char irq = pin;
3737

arch/mips/pci/fixup-lantiq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int pcibios_plat_dev_init(struct pci_dev *dev)
2323
return 0;
2424
}
2525

26-
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
26+
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
2727
{
2828
return of_irq_parse_and_map_pci(dev, slot, pin);
2929
}

arch/mips/pci/fixup-lemote2f.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#define PCID 7
3131

3232
/* all the pci device has the PCIA pin, check the datasheet. */
33-
static char irq_tab[][5] __initdata = {
33+
static char irq_tab[][5] = {
3434
/* INTA INTB INTC INTD */
3535
{0, 0, 0, 0, 0}, /* 11: Unused */
3636
{0, 0, 0, 0, 0}, /* 12: Unused */
@@ -51,7 +51,7 @@ static char irq_tab[][5] __initdata = {
5151
{0, 0, 0, 0, 0}, /* 27: Unused */
5252
};
5353

54-
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
54+
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
5555
{
5656
int virq;
5757

arch/mips/pci/fixup-loongson3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static void print_fixup_info(const struct pci_dev *pdev)
3232
pdev->vendor, pdev->device, pdev->irq);
3333
}
3434

35-
int __init pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
35+
int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
3636
{
3737
print_fixup_info(dev);
3838
return dev->irq;

0 commit comments

Comments
 (0)