diff options
author | Roland Dreier <rolandd@cisco.com> | 2006-11-29 18:33:06 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-29 18:33:06 -0500 |
commit | f4f3d0f0ece2527184b6c91afa1196a27a5bfaf5 (patch) | |
tree | dfe19adf7cb0ad8307b8b5719c8d5a09bbae852e /drivers/infiniband/hw | |
parent | 3c8edf0eca2e47340c960b2f27c659c097118ffe (diff) |
IB/mthca: Fix section mismatches
Commit b3b30f5e ("IB/mthca: Recover from catastrophic errors")
introduced some section mismatch breakage, because the error recovery
code tears down and reinitializes the device, which calls into lots of
code originally marked __devinit and __devexit from regular .text.
Fix this by getting rid of these now-incorrect section markers.
Reported by Randy Dunlap <randy.dunlap@oracle.com>.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_av.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_cq.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_eq.c | 21 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mad.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_main.c | 29 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mcg.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_mr.c | 5 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_pd.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_qp.c | 3 | ||||
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_srq.c | 2 |
10 files changed, 33 insertions, 41 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_av.c b/drivers/infiniband/hw/mthca/mthca_av.c index 69599455aca2..57cdc1bc5f50 100644 --- a/drivers/infiniband/hw/mthca/mthca_av.c +++ b/drivers/infiniband/hw/mthca/mthca_av.c | |||
@@ -33,7 +33,6 @@ | |||
33 | * $Id: mthca_av.c 1349 2004-12-16 21:09:43Z roland $ | 33 | * $Id: mthca_av.c 1349 2004-12-16 21:09:43Z roland $ |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/init.h> | ||
37 | #include <linux/string.h> | 36 | #include <linux/string.h> |
38 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
39 | 38 | ||
@@ -323,7 +322,7 @@ int mthca_ah_query(struct ib_ah *ibah, struct ib_ah_attr *attr) | |||
323 | return 0; | 322 | return 0; |
324 | } | 323 | } |
325 | 324 | ||
326 | int __devinit mthca_init_av_table(struct mthca_dev *dev) | 325 | int mthca_init_av_table(struct mthca_dev *dev) |
327 | { | 326 | { |
328 | int err; | 327 | int err; |
329 | 328 | ||
diff --git a/drivers/infiniband/hw/mthca/mthca_cq.c b/drivers/infiniband/hw/mthca/mthca_cq.c index 149b36901239..283d50b76c3d 100644 --- a/drivers/infiniband/hw/mthca/mthca_cq.c +++ b/drivers/infiniband/hw/mthca/mthca_cq.c | |||
@@ -36,7 +36,6 @@ | |||
36 | * $Id: mthca_cq.c 1369 2004-12-20 16:17:07Z roland $ | 36 | * $Id: mthca_cq.c 1369 2004-12-20 16:17:07Z roland $ |
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include <linux/init.h> | ||
40 | #include <linux/hardirq.h> | 39 | #include <linux/hardirq.h> |
41 | 40 | ||
42 | #include <asm/io.h> | 41 | #include <asm/io.h> |
@@ -970,7 +969,7 @@ void mthca_free_cq(struct mthca_dev *dev, | |||
970 | mthca_free_mailbox(dev, mailbox); | 969 | mthca_free_mailbox(dev, mailbox); |
971 | } | 970 | } |
972 | 971 | ||
973 | int __devinit mthca_init_cq_table(struct mthca_dev *dev) | 972 | int mthca_init_cq_table(struct mthca_dev *dev) |
974 | { | 973 | { |
975 | int err; | 974 | int err; |
976 | 975 | ||
diff --git a/drivers/infiniband/hw/mthca/mthca_eq.c b/drivers/infiniband/hw/mthca/mthca_eq.c index e284e0613a94..8ec9fa1ff9ea 100644 --- a/drivers/infiniband/hw/mthca/mthca_eq.c +++ b/drivers/infiniband/hw/mthca/mthca_eq.c | |||
@@ -33,7 +33,6 @@ | |||
33 | * $Id: mthca_eq.c 1382 2004-12-24 02:21:02Z roland $ | 33 | * $Id: mthca_eq.c 1382 2004-12-24 02:21:02Z roland $ |
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/init.h> | ||
37 | #include <linux/errno.h> | 36 | #include <linux/errno.h> |
38 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
39 | #include <linux/pci.h> | 38 | #include <linux/pci.h> |
@@ -479,10 +478,10 @@ static irqreturn_t mthca_arbel_msi_x_interrupt(int irq, void *eq_ptr) | |||
479 | return IRQ_HANDLED; | 478 | return IRQ_HANDLED; |
480 | } | 479 | } |
481 | 480 | ||
482 | static int __devinit mthca_create_eq(struct mthca_dev *dev, | 481 | static int mthca_create_eq(struct mthca_dev *dev, |
483 | int nent, | 482 | int nent, |
484 | u8 intr, | 483 | u8 intr, |
485 | struct mthca_eq *eq) | 484 | struct mthca_eq *eq) |
486 | { | 485 | { |
487 | int npages; | 486 | int npages; |
488 | u64 *dma_list = NULL; | 487 | u64 *dma_list = NULL; |
@@ -664,9 +663,9 @@ static void mthca_free_irqs(struct mthca_dev *dev) | |||
664 | dev->eq_table.eq + i); | 663 | dev->eq_table.eq + i); |
665 | } | 664 | } |
666 | 665 | ||
667 | static int __devinit mthca_map_reg(struct mthca_dev *dev, | 666 | static int mthca_map_reg(struct mthca_dev *dev, |
668 | unsigned long offset, unsigned long size, | 667 | unsigned long offset, unsigned long size, |
669 | void __iomem **map) | 668 | void __iomem **map) |
670 | { | 669 | { |
671 | unsigned long base = pci_resource_start(dev->pdev, 0); | 670 | unsigned long base = pci_resource_start(dev->pdev, 0); |
672 | 671 | ||
@@ -691,7 +690,7 @@ static void mthca_unmap_reg(struct mthca_dev *dev, unsigned long offset, | |||
691 | iounmap(map); | 690 | iounmap(map); |
692 | } | 691 | } |
693 | 692 | ||
694 | static int __devinit mthca_map_eq_regs(struct mthca_dev *dev) | 693 | static int mthca_map_eq_regs(struct mthca_dev *dev) |
695 | { | 694 | { |
696 | if (mthca_is_memfree(dev)) { | 695 | if (mthca_is_memfree(dev)) { |
697 | /* | 696 | /* |
@@ -781,7 +780,7 @@ static void mthca_unmap_eq_regs(struct mthca_dev *dev) | |||
781 | } | 780 | } |
782 | } | 781 | } |
783 | 782 | ||
784 | int __devinit mthca_map_eq_icm(struct mthca_dev *dev, u64 icm_virt) | 783 | int mthca_map_eq_icm(struct mthca_dev *dev, u64 icm_virt) |
785 | { | 784 | { |
786 | int ret; | 785 | int ret; |
787 | u8 status; | 786 | u8 status; |
@@ -825,7 +824,7 @@ void mthca_unmap_eq_icm(struct mthca_dev *dev) | |||
825 | __free_page(dev->eq_table.icm_page); | 824 | __free_page(dev->eq_table.icm_page); |
826 | } | 825 | } |
827 | 826 | ||
828 | int __devinit mthca_init_eq_table(struct mthca_dev *dev) | 827 | int mthca_init_eq_table(struct mthca_dev *dev) |
829 | { | 828 | { |
830 | int err; | 829 | int err; |
831 | u8 status; | 830 | u8 status; |
diff --git a/drivers/infiniband/hw/mthca/mthca_mad.c b/drivers/infiniband/hw/mthca/mthca_mad.c index 45e106f14807..acfa41d968ee 100644 --- a/drivers/infiniband/hw/mthca/mthca_mad.c +++ b/drivers/infiniband/hw/mthca/mthca_mad.c | |||
@@ -317,7 +317,7 @@ err: | |||
317 | return ret; | 317 | return ret; |
318 | } | 318 | } |
319 | 319 | ||
320 | void __devexit mthca_free_agents(struct mthca_dev *dev) | 320 | void mthca_free_agents(struct mthca_dev *dev) |
321 | { | 321 | { |
322 | struct ib_mad_agent *agent; | 322 | struct ib_mad_agent *agent; |
323 | int p, q; | 323 | int p, q; |
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c index 47ea02148368..0491ec7a7c0a 100644 --- a/drivers/infiniband/hw/mthca/mthca_main.c +++ b/drivers/infiniband/hw/mthca/mthca_main.c | |||
@@ -98,7 +98,7 @@ static struct mthca_profile default_profile = { | |||
98 | .uarc_size = 1 << 18, /* Arbel only */ | 98 | .uarc_size = 1 << 18, /* Arbel only */ |
99 | }; | 99 | }; |
100 | 100 | ||
101 | static int __devinit mthca_tune_pci(struct mthca_dev *mdev) | 101 | static int mthca_tune_pci(struct mthca_dev *mdev) |
102 | { | 102 | { |
103 | int cap; | 103 | int cap; |
104 | u16 val; | 104 | u16 val; |
@@ -143,7 +143,7 @@ static int __devinit mthca_tune_pci(struct mthca_dev *mdev) | |||
143 | return 0; | 143 | return 0; |
144 | } | 144 | } |
145 | 145 | ||
146 | static int __devinit mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim) | 146 | static int mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim) |
147 | { | 147 | { |
148 | int err; | 148 | int err; |
149 | u8 status; | 149 | u8 status; |
@@ -255,7 +255,7 @@ static int __devinit mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim | |||
255 | return 0; | 255 | return 0; |
256 | } | 256 | } |
257 | 257 | ||
258 | static int __devinit mthca_init_tavor(struct mthca_dev *mdev) | 258 | static int mthca_init_tavor(struct mthca_dev *mdev) |
259 | { | 259 | { |
260 | u8 status; | 260 | u8 status; |
261 | int err; | 261 | int err; |
@@ -333,7 +333,7 @@ err_disable: | |||
333 | return err; | 333 | return err; |
334 | } | 334 | } |
335 | 335 | ||
336 | static int __devinit mthca_load_fw(struct mthca_dev *mdev) | 336 | static int mthca_load_fw(struct mthca_dev *mdev) |
337 | { | 337 | { |
338 | u8 status; | 338 | u8 status; |
339 | int err; | 339 | int err; |
@@ -379,10 +379,10 @@ err_free: | |||
379 | return err; | 379 | return err; |
380 | } | 380 | } |
381 | 381 | ||
382 | static int __devinit mthca_init_icm(struct mthca_dev *mdev, | 382 | static int mthca_init_icm(struct mthca_dev *mdev, |
383 | struct mthca_dev_lim *dev_lim, | 383 | struct mthca_dev_lim *dev_lim, |
384 | struct mthca_init_hca_param *init_hca, | 384 | struct mthca_init_hca_param *init_hca, |
385 | u64 icm_size) | 385 | u64 icm_size) |
386 | { | 386 | { |
387 | u64 aux_pages; | 387 | u64 aux_pages; |
388 | u8 status; | 388 | u8 status; |
@@ -575,7 +575,7 @@ static void mthca_free_icms(struct mthca_dev *mdev) | |||
575 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); | 575 | mthca_free_icm(mdev, mdev->fw.arbel.aux_icm); |
576 | } | 576 | } |
577 | 577 | ||
578 | static int __devinit mthca_init_arbel(struct mthca_dev *mdev) | 578 | static int mthca_init_arbel(struct mthca_dev *mdev) |
579 | { | 579 | { |
580 | struct mthca_dev_lim dev_lim; | 580 | struct mthca_dev_lim dev_lim; |
581 | struct mthca_profile profile; | 581 | struct mthca_profile profile; |
@@ -683,7 +683,7 @@ static void mthca_close_hca(struct mthca_dev *mdev) | |||
683 | mthca_SYS_DIS(mdev, &status); | 683 | mthca_SYS_DIS(mdev, &status); |
684 | } | 684 | } |
685 | 685 | ||
686 | static int __devinit mthca_init_hca(struct mthca_dev *mdev) | 686 | static int mthca_init_hca(struct mthca_dev *mdev) |
687 | { | 687 | { |
688 | u8 status; | 688 | u8 status; |
689 | int err; | 689 | int err; |
@@ -720,7 +720,7 @@ err_close: | |||
720 | return err; | 720 | return err; |
721 | } | 721 | } |
722 | 722 | ||
723 | static int __devinit mthca_setup_hca(struct mthca_dev *dev) | 723 | static int mthca_setup_hca(struct mthca_dev *dev) |
724 | { | 724 | { |
725 | int err; | 725 | int err; |
726 | u8 status; | 726 | u8 status; |
@@ -875,8 +875,7 @@ err_uar_table_free: | |||
875 | return err; | 875 | return err; |
876 | } | 876 | } |
877 | 877 | ||
878 | static int __devinit mthca_request_regions(struct pci_dev *pdev, | 878 | static int mthca_request_regions(struct pci_dev *pdev, int ddr_hidden) |
879 | int ddr_hidden) | ||
880 | { | 879 | { |
881 | int err; | 880 | int err; |
882 | 881 | ||
@@ -928,7 +927,7 @@ static void mthca_release_regions(struct pci_dev *pdev, | |||
928 | MTHCA_HCR_SIZE); | 927 | MTHCA_HCR_SIZE); |
929 | } | 928 | } |
930 | 929 | ||
931 | static int __devinit mthca_enable_msi_x(struct mthca_dev *mdev) | 930 | static int mthca_enable_msi_x(struct mthca_dev *mdev) |
932 | { | 931 | { |
933 | struct msix_entry entries[3]; | 932 | struct msix_entry entries[3]; |
934 | int err; | 933 | int err; |
@@ -1213,7 +1212,7 @@ int __mthca_restart_one(struct pci_dev *pdev) | |||
1213 | } | 1212 | } |
1214 | 1213 | ||
1215 | static int __devinit mthca_init_one(struct pci_dev *pdev, | 1214 | static int __devinit mthca_init_one(struct pci_dev *pdev, |
1216 | const struct pci_device_id *id) | 1215 | const struct pci_device_id *id) |
1217 | { | 1216 | { |
1218 | static int mthca_version_printed = 0; | 1217 | static int mthca_version_printed = 0; |
1219 | int ret; | 1218 | int ret; |
diff --git a/drivers/infiniband/hw/mthca/mthca_mcg.c b/drivers/infiniband/hw/mthca/mthca_mcg.c index 47ca8a9b7247..a8ad072be074 100644 --- a/drivers/infiniband/hw/mthca/mthca_mcg.c +++ b/drivers/infiniband/hw/mthca/mthca_mcg.c | |||
@@ -32,7 +32,6 @@ | |||
32 | * $Id: mthca_mcg.c 1349 2004-12-16 21:09:43Z roland $ | 32 | * $Id: mthca_mcg.c 1349 2004-12-16 21:09:43Z roland $ |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <linux/init.h> | ||
36 | #include <linux/string.h> | 35 | #include <linux/string.h> |
37 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
38 | 37 | ||
@@ -371,7 +370,7 @@ int mthca_multicast_detach(struct ib_qp *ibqp, union ib_gid *gid, u16 lid) | |||
371 | return err; | 370 | return err; |
372 | } | 371 | } |
373 | 372 | ||
374 | int __devinit mthca_init_mcg_table(struct mthca_dev *dev) | 373 | int mthca_init_mcg_table(struct mthca_dev *dev) |
375 | { | 374 | { |
376 | int err; | 375 | int err; |
377 | int table_size = dev->limits.num_mgms + dev->limits.num_amgms; | 376 | int table_size = dev->limits.num_mgms + dev->limits.num_amgms; |
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c index a486dec1707e..f71ffa88db3a 100644 --- a/drivers/infiniband/hw/mthca/mthca_mr.c +++ b/drivers/infiniband/hw/mthca/mthca_mr.c | |||
@@ -34,7 +34,6 @@ | |||
34 | */ | 34 | */ |
35 | 35 | ||
36 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
37 | #include <linux/init.h> | ||
38 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
39 | 38 | ||
40 | #include "mthca_dev.h" | 39 | #include "mthca_dev.h" |
@@ -135,7 +134,7 @@ static void mthca_buddy_free(struct mthca_buddy *buddy, u32 seg, int order) | |||
135 | spin_unlock(&buddy->lock); | 134 | spin_unlock(&buddy->lock); |
136 | } | 135 | } |
137 | 136 | ||
138 | static int __devinit mthca_buddy_init(struct mthca_buddy *buddy, int max_order) | 137 | static int mthca_buddy_init(struct mthca_buddy *buddy, int max_order) |
139 | { | 138 | { |
140 | int i, s; | 139 | int i, s; |
141 | 140 | ||
@@ -759,7 +758,7 @@ void mthca_arbel_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr) | |||
759 | *(u8 *) fmr->mem.arbel.mpt = MTHCA_MPT_STATUS_SW; | 758 | *(u8 *) fmr->mem.arbel.mpt = MTHCA_MPT_STATUS_SW; |
760 | } | 759 | } |
761 | 760 | ||
762 | int __devinit mthca_init_mr_table(struct mthca_dev *dev) | 761 | int mthca_init_mr_table(struct mthca_dev *dev) |
763 | { | 762 | { |
764 | unsigned long addr; | 763 | unsigned long addr; |
765 | int err, i; | 764 | int err, i; |
diff --git a/drivers/infiniband/hw/mthca/mthca_pd.c b/drivers/infiniband/hw/mthca/mthca_pd.c index 59df51614c85..c1e950764bd8 100644 --- a/drivers/infiniband/hw/mthca/mthca_pd.c +++ b/drivers/infiniband/hw/mthca/mthca_pd.c | |||
@@ -34,7 +34,6 @@ | |||
34 | * $Id: mthca_pd.c 1349 2004-12-16 21:09:43Z roland $ | 34 | * $Id: mthca_pd.c 1349 2004-12-16 21:09:43Z roland $ |
35 | */ | 35 | */ |
36 | 36 | ||
37 | #include <linux/init.h> | ||
38 | #include <linux/errno.h> | 37 | #include <linux/errno.h> |
39 | 38 | ||
40 | #include "mthca_dev.h" | 39 | #include "mthca_dev.h" |
@@ -69,7 +68,7 @@ void mthca_pd_free(struct mthca_dev *dev, struct mthca_pd *pd) | |||
69 | mthca_free(&dev->pd_table.alloc, pd->pd_num); | 68 | mthca_free(&dev->pd_table.alloc, pd->pd_num); |
70 | } | 69 | } |
71 | 70 | ||
72 | int __devinit mthca_init_pd_table(struct mthca_dev *dev) | 71 | int mthca_init_pd_table(struct mthca_dev *dev) |
73 | { | 72 | { |
74 | return mthca_alloc_init(&dev->pd_table.alloc, | 73 | return mthca_alloc_init(&dev->pd_table.alloc, |
75 | dev->limits.num_pds, | 74 | dev->limits.num_pds, |
diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c b/drivers/infiniband/hw/mthca/mthca_qp.c index 6a7822e0fc19..33e3ba7937f1 100644 --- a/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/drivers/infiniband/hw/mthca/mthca_qp.c | |||
@@ -35,7 +35,6 @@ | |||
35 | * $Id: mthca_qp.c 1355 2004-12-17 15:23:43Z roland $ | 35 | * $Id: mthca_qp.c 1355 2004-12-17 15:23:43Z roland $ |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #include <linux/init.h> | ||
39 | #include <linux/string.h> | 38 | #include <linux/string.h> |
40 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
41 | 40 | ||
@@ -2241,7 +2240,7 @@ void mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send, | |||
2241 | *new_wqe = 0; | 2240 | *new_wqe = 0; |
2242 | } | 2241 | } |
2243 | 2242 | ||
2244 | int __devinit mthca_init_qp_table(struct mthca_dev *dev) | 2243 | int mthca_init_qp_table(struct mthca_dev *dev) |
2245 | { | 2244 | { |
2246 | int err; | 2245 | int err; |
2247 | u8 status; | 2246 | u8 status; |
diff --git a/drivers/infiniband/hw/mthca/mthca_srq.c b/drivers/infiniband/hw/mthca/mthca_srq.c index f5d7677d1079..58fcf5a691e4 100644 --- a/drivers/infiniband/hw/mthca/mthca_srq.c +++ b/drivers/infiniband/hw/mthca/mthca_srq.c | |||
@@ -715,7 +715,7 @@ int mthca_max_srq_sge(struct mthca_dev *dev) | |||
715 | sizeof (struct mthca_data_seg)); | 715 | sizeof (struct mthca_data_seg)); |
716 | } | 716 | } |
717 | 717 | ||
718 | int __devinit mthca_init_srq_table(struct mthca_dev *dev) | 718 | int mthca_init_srq_table(struct mthca_dev *dev) |
719 | { | 719 | { |
720 | int err; | 720 | int err; |
721 | 721 | ||