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: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
335a64a5a9
commit
3d73c2884f
|
@ -231,7 +231,7 @@ void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq)
|
|||
}
|
||||
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;
|
||||
int err;
|
||||
|
|
|
@ -300,8 +300,7 @@ static int mlx4_HW2SW_EQ(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox,
|
|||
MLX4_CMD_TIME_CLASS_A);
|
||||
}
|
||||
|
||||
static void __devinit __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev,
|
||||
struct mlx4_eq *eq)
|
||||
static void __iomem *mlx4_get_eq_uar(struct mlx4_dev *dev, struct mlx4_eq *eq)
|
||||
{
|
||||
struct mlx4_priv *priv = mlx4_priv(dev);
|
||||
int index;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
static int __devinit mlx4_create_eq(struct mlx4_dev *dev, int nent,
|
||||
u8 intr, struct mlx4_eq *eq)
|
||||
static int mlx4_create_eq(struct mlx4_dev *dev, int nent,
|
||||
u8 intr, struct mlx4_eq *eq)
|
||||
{
|
||||
struct mlx4_priv *priv = mlx4_priv(dev);
|
||||
struct mlx4_cmd_mailbox *mailbox;
|
||||
|
@ -485,7 +484,7 @@ static void mlx4_free_irqs(struct mlx4_dev *dev)
|
|||
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);
|
||||
|
||||
|
@ -506,7 +505,7 @@ static void mlx4_unmap_clr_int(struct mlx4_dev *dev)
|
|||
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);
|
||||
int ret;
|
||||
|
@ -548,7 +547,7 @@ void mlx4_unmap_eq_icm(struct mlx4_dev *dev)
|
|||
__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);
|
||||
int err;
|
||||
|
|
|
@ -85,7 +85,7 @@ static struct mlx4_profile default_profile = {
|
|||
.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 i;
|
||||
|
@ -256,10 +256,8 @@ err:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int __devinit mlx4_init_icm(struct mlx4_dev *dev,
|
||||
struct mlx4_dev_cap *dev_cap,
|
||||
struct mlx4_init_hca_param *init_hca,
|
||||
u64 icm_size)
|
||||
static int mlx4_init_icm(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap,
|
||||
struct mlx4_init_hca_param *init_hca, u64 icm_size)
|
||||
{
|
||||
struct mlx4_priv *priv = mlx4_priv(dev);
|
||||
u64 aux_pages;
|
||||
|
@ -481,7 +479,7 @@ static void mlx4_close_hca(struct mlx4_dev *dev)
|
|||
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_adapter adapter;
|
||||
|
@ -554,7 +552,7 @@ err_stop_fw:
|
|||
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);
|
||||
int err;
|
||||
|
@ -721,19 +719,12 @@ no_msi:
|
|||
priv->eq_table.eq[i].irq = dev->pdev->irq;
|
||||
}
|
||||
|
||||
static int __devinit mlx4_init_one(struct pci_dev *pdev,
|
||||
const struct pci_device_id *id)
|
||||
static int __mlx4_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||
{
|
||||
static int mlx4_version_printed;
|
||||
struct mlx4_priv *priv;
|
||||
struct mlx4_dev *dev;
|
||||
int err;
|
||||
|
||||
if (!mlx4_version_printed) {
|
||||
printk(KERN_INFO "%s", mlx4_version);
|
||||
++mlx4_version_printed;
|
||||
}
|
||||
|
||||
printk(KERN_INFO PFX "Initializing %s\n",
|
||||
pci_name(pdev));
|
||||
|
||||
|
@ -883,7 +874,20 @@ err_disable_pdev:
|
|||
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_priv *priv = mlx4_priv(dev);
|
||||
|
@ -924,7 +928,7 @@ static void __devexit mlx4_remove_one(struct pci_dev *pdev)
|
|||
int mlx4_restart_one(struct pci_dev *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[] = {
|
||||
|
|
|
@ -359,7 +359,7 @@ out:
|
|||
}
|
||||
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);
|
||||
int err;
|
||||
|
|
|
@ -430,7 +430,7 @@ int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *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;
|
||||
int err;
|
||||
|
|
|
@ -57,7 +57,7 @@ void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn)
|
|||
}
|
||||
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);
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ static int mlx4_CONF_SPECIAL_QP(struct mlx4_dev *dev, u32 base_qpn)
|
|||
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;
|
||||
int err;
|
||||
|
|
|
@ -235,7 +235,7 @@ err_out:
|
|||
}
|
||||
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;
|
||||
int err;
|
||||
|
|
Loading…
Reference in New Issue