Commit 3d73c288 authored by Roland Dreier's avatar Roland Dreier

mlx4_core: Fix section mismatches

    
Commit ee49bd93 ("mlx4_core: Reset device when internal error is
detected") introduced some section mismatch problems when
CONFIG_HOTPLUG=n, because the error recovery code tears down and
reinitializes the device after everything is loaded, which ends up
calling into lots of code marked __devinit and __devexit from regular
.text.  Fix this by getting rid of these now-incorrect section
markers.
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 335a64a5
...@@ -231,7 +231,7 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq) ...@@ -231,7 +231,7 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq)
} }
EXPORT_SYMBOL_GPL(mlx4_cq_free); EXPORT_SYMBOL_GPL(mlx4_cq_free);
int __devinit mlx4_init_cq_table(struct mlx4_dev *dev) int mlx4_init_cq_table(struct mlx4_dev *dev)
{ {
struct mlx4_cq_table *cq_table = &mlx4_priv(dev)->cq_table; struct mlx4_cq_table *cq_table = &mlx4_priv(dev)->cq_table;
int err; int err;
......
...@@ -300,8 +300,7 @@ static int mlx4_HW2SW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox, ...@@ -300,8 +300,7 @@ static int mlx4_HW2SW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
MLX4_CMD_TIME_CLASS_A); MLX4_CMD_TIME_CLASS_A);
} }
static void __devinit __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev, static void __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev, struct mlx4_eq *eq)
struct mlx4_eq *eq)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
int index; int index;
...@@ -323,8 +322,8 @@ static void __devinit __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev, ...@@ -323,8 +322,8 @@ static void __devinit __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev,
return priv->eq_table.uar_map[index] + 0x800 + 8 * (eq->eqn % 4); return priv->eq_table.uar_map[index] + 0x800 + 8 * (eq->eqn % 4);
} }
static int __devinit mlx4_create_eq(struct mlx4_dev *dev, int nent, static int mlx4_create_eq(struct mlx4_dev *dev, int nent,
u8 intr, struct mlx4_eq *eq) u8 intr, struct mlx4_eq *eq)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_cmd_mailbox *mailbox; struct mlx4_cmd_mailbox *mailbox;
...@@ -485,7 +484,7 @@ static void mlx4_free_irqs(struct mlx4_dev *dev) ...@@ -485,7 +484,7 @@ static void mlx4_free_irqs(struct mlx4_dev *dev)
free_irq(eq_table->eq[i].irq, eq_table->eq + i); free_irq(eq_table->eq[i].irq, eq_table->eq + i);
} }
static int __devinit mlx4_map_clr_int(struct mlx4_dev *dev) static int mlx4_map_clr_int(struct mlx4_dev *dev)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
...@@ -506,7 +505,7 @@ static void mlx4_unmap_clr_int(struct mlx4_dev *dev) ...@@ -506,7 +505,7 @@ static void mlx4_unmap_clr_int(struct mlx4_dev *dev)
iounmap(priv->clr_base); iounmap(priv->clr_base);
} }
int __devinit mlx4_map_eq_icm(struct mlx4_dev *dev, u64 icm_virt) int mlx4_map_eq_icm(struct mlx4_dev *dev, u64 icm_virt)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
int ret; int ret;
...@@ -548,7 +547,7 @@ void mlx4_unmap_eq_icm(struct mlx4_dev *dev) ...@@ -548,7 +547,7 @@ void mlx4_unmap_eq_icm(struct mlx4_dev *dev)
__free_page(priv->eq_table.icm_page); __free_page(priv->eq_table.icm_page);
} }
int __devinit mlx4_init_eq_table(struct mlx4_dev *dev) int mlx4_init_eq_table(struct mlx4_dev *dev)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
int err; int err;
......
...@@ -85,7 +85,7 @@ static struct mlx4_profile default_profile = { ...@@ -85,7 +85,7 @@ static struct mlx4_profile default_profile = {
.num_mtt = 1 << 20, .num_mtt = 1 << 20,
}; };
static int __devinit mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
{ {
int err; int err;
int i; int i;
...@@ -256,10 +256,8 @@ static int __devinit mlx4_init_cmpt_table(struct mlx4_dev *dev, u64 cmpt_base, ...@@ -256,10 +256,8 @@ static int __devinit mlx4_init_cmpt_table(struct mlx4_dev *dev, u64 cmpt_base,
return err; return err;
} }
static int __devinit mlx4_init_icm(struct mlx4_dev *dev, static int mlx4_init_icm(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap,
struct mlx4_dev_cap *dev_cap, struct mlx4_init_hca_param *init_hca, u64 icm_size)
struct mlx4_init_hca_param *init_hca,
u64 icm_size)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
u64 aux_pages; u64 aux_pages;
...@@ -481,7 +479,7 @@ static void mlx4_close_hca(struct mlx4_dev *dev) ...@@ -481,7 +479,7 @@ static void mlx4_close_hca(struct mlx4_dev *dev)
mlx4_free_icm(dev, mlx4_priv(dev)->fw.fw_icm, 0); mlx4_free_icm(dev, mlx4_priv(dev)->fw.fw_icm, 0);
} }
static int __devinit mlx4_init_hca(struct mlx4_dev *dev) static int mlx4_init_hca(struct mlx4_dev *dev)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
struct mlx4_adapter adapter; struct mlx4_adapter adapter;
...@@ -554,7 +552,7 @@ static int __devinit mlx4_init_hca(struct mlx4_dev *dev) ...@@ -554,7 +552,7 @@ static int __devinit mlx4_init_hca(struct mlx4_dev *dev)
return err; return err;
} }
static int __devinit mlx4_setup_hca(struct mlx4_dev *dev) static int mlx4_setup_hca(struct mlx4_dev *dev)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
int err; int err;
...@@ -721,19 +719,12 @@ static void __devinit mlx4_enable_msi_x(struct mlx4_dev *dev) ...@@ -721,19 +719,12 @@ static void __devinit mlx4_enable_msi_x(struct mlx4_dev *dev)
priv->eq_table.eq[i].irq = dev->pdev->irq; priv->eq_table.eq[i].irq = dev->pdev->irq;
} }
static int __devinit mlx4_init_one(struct pci_dev *pdev, static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
const struct pci_device_id *id)
{ {
static int mlx4_version_printed;
struct mlx4_priv *priv; struct mlx4_priv *priv;
struct mlx4_dev *dev; struct mlx4_dev *dev;
int err; int err;
if (!mlx4_version_printed) {
printk(KERN_INFO "%s", mlx4_version);
++mlx4_version_printed;
}
printk(KERN_INFO PFX "Initializing %s\n", printk(KERN_INFO PFX "Initializing %s\n",
pci_name(pdev)); pci_name(pdev));
...@@ -883,7 +874,20 @@ static int __devinit mlx4_init_one(struct pci_dev *pdev, ...@@ -883,7 +874,20 @@ static int __devinit mlx4_init_one(struct pci_dev *pdev,
return err; return err;
} }
static void __devexit mlx4_remove_one(struct pci_dev *pdev) static int __devinit mlx4_init_one(struct pci_dev *pdev,
const struct pci_device_id *id)
{
static int mlx4_version_printed;
if (!mlx4_version_printed) {
printk(KERN_INFO "%s", mlx4_version);
++mlx4_version_printed;
}
return mlx4_init_one(pdev, id);
}
static void mlx4_remove_one(struct pci_dev *pdev)
{ {
struct mlx4_dev *dev = pci_get_drvdata(pdev); struct mlx4_dev *dev = pci_get_drvdata(pdev);
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
...@@ -924,7 +928,7 @@ static void __devexit mlx4_remove_one(struct pci_dev *pdev) ...@@ -924,7 +928,7 @@ static void __devexit mlx4_remove_one(struct pci_dev *pdev)
int mlx4_restart_one(struct pci_dev *pdev) int mlx4_restart_one(struct pci_dev *pdev)
{ {
mlx4_remove_one(pdev); mlx4_remove_one(pdev);
return mlx4_init_one(pdev, NULL); return __mlx4_init_one(pdev, NULL);
} }
static struct pci_device_id mlx4_pci_table[] = { static struct pci_device_id mlx4_pci_table[] = {
......
...@@ -359,7 +359,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]) ...@@ -359,7 +359,7 @@ int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16])
} }
EXPORT_SYMBOL_GPL(mlx4_multicast_detach); EXPORT_SYMBOL_GPL(mlx4_multicast_detach);
int __devinit mlx4_init_mcg_table(struct mlx4_dev *dev) int mlx4_init_mcg_table(struct mlx4_dev *dev)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
int err; int err;
......
...@@ -430,7 +430,7 @@ int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt, ...@@ -430,7 +430,7 @@ int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
} }
EXPORT_SYMBOL_GPL(mlx4_buf_write_mtt); EXPORT_SYMBOL_GPL(mlx4_buf_write_mtt);
int __devinit mlx4_init_mr_table(struct mlx4_dev *dev) int mlx4_init_mr_table(struct mlx4_dev *dev)
{ {
struct mlx4_mr_table *mr_table = &mlx4_priv(dev)->mr_table; struct mlx4_mr_table *mr_table = &mlx4_priv(dev)->mr_table;
int err; int err;
......
...@@ -57,7 +57,7 @@ void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn) ...@@ -57,7 +57,7 @@ void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn)
} }
EXPORT_SYMBOL_GPL(mlx4_pd_free); EXPORT_SYMBOL_GPL(mlx4_pd_free);
int __devinit mlx4_init_pd_table(struct mlx4_dev *dev) int mlx4_init_pd_table(struct mlx4_dev *dev)
{ {
struct mlx4_priv *priv = mlx4_priv(dev); struct mlx4_priv *priv = mlx4_priv(dev);
......
...@@ -251,7 +251,7 @@ static int mlx4_CONF_SPECIAL_QP(struct mlx4_dev *dev, u32 base_qpn) ...@@ -251,7 +251,7 @@ static int mlx4_CONF_SPECIAL_QP(struct mlx4_dev *dev, u32 base_qpn)
MLX4_CMD_TIME_CLASS_B); MLX4_CMD_TIME_CLASS_B);
} }
int __devinit mlx4_init_qp_table(struct mlx4_dev *dev) int mlx4_init_qp_table(struct mlx4_dev *dev)
{ {
struct mlx4_qp_table *qp_table = &mlx4_priv(dev)->qp_table; struct mlx4_qp_table *qp_table = &mlx4_priv(dev)->qp_table;
int err; int err;
......
...@@ -235,7 +235,7 @@ int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_waterm ...@@ -235,7 +235,7 @@ int mlx4_srq_query(struct mlx4_dev *dev, struct mlx4_srq *srq, int *limit_waterm
} }
EXPORT_SYMBOL_GPL(mlx4_srq_query); EXPORT_SYMBOL_GPL(mlx4_srq_query);
int __devinit mlx4_init_srq_table(struct mlx4_dev *dev) int mlx4_init_srq_table(struct mlx4_dev *dev)
{ {
struct mlx4_srq_table *srq_table = &mlx4_priv(dev)->srq_table; struct mlx4_srq_table *srq_table = &mlx4_priv(dev)->srq_table;
int err; int err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment