• Home
  • Raw
  • Download

Lines Matching refs:eq

77 	struct mlx5_ib_pf_eq	*eq;  member
1454 struct mlx5_ib_pf_eq *eq = pfault->eq; in mlx5_ib_eqe_pf_action() local
1456 mlx5_ib_pfault(eq->dev, pfault); in mlx5_ib_eqe_pf_action()
1457 mempool_free(pfault, eq->pool); in mlx5_ib_eqe_pf_action()
1460 static void mlx5_ib_eq_pf_process(struct mlx5_ib_pf_eq *eq) in mlx5_ib_eq_pf_process() argument
1467 while ((eqe = mlx5_eq_get_eqe(eq->core, cc))) { in mlx5_ib_eq_pf_process()
1468 pfault = mempool_alloc(eq->pool, GFP_ATOMIC); in mlx5_ib_eq_pf_process()
1470 schedule_work(&eq->work); in mlx5_ib_eq_pf_process()
1478 mlx5_ib_dbg(eq->dev, in mlx5_ib_eq_pf_process()
1498 mlx5_ib_dbg(eq->dev, in mlx5_ib_eq_pf_process()
1502 mlx5_ib_dbg(eq->dev, in mlx5_ib_eq_pf_process()
1521 mlx5_ib_dbg(eq->dev, in mlx5_ib_eq_pf_process()
1529 mlx5_ib_warn(eq->dev, in mlx5_ib_eq_pf_process()
1537 pfault->eq = eq; in mlx5_ib_eq_pf_process()
1539 queue_work(eq->wq, &pfault->work); in mlx5_ib_eq_pf_process()
1541 cc = mlx5_eq_update_cc(eq->core, ++cc); in mlx5_ib_eq_pf_process()
1544 mlx5_eq_update_ci(eq->core, cc, 1); in mlx5_ib_eq_pf_process()
1550 struct mlx5_ib_pf_eq *eq = in mlx5_ib_eq_pf_int() local
1554 if (spin_trylock_irqsave(&eq->lock, flags)) { in mlx5_ib_eq_pf_int()
1555 mlx5_ib_eq_pf_process(eq); in mlx5_ib_eq_pf_int()
1556 spin_unlock_irqrestore(&eq->lock, flags); in mlx5_ib_eq_pf_int()
1558 schedule_work(&eq->work); in mlx5_ib_eq_pf_int()
1576 struct mlx5_ib_pf_eq *eq = in mlx5_ib_eq_pf_action() local
1579 mempool_refill(eq->pool); in mlx5_ib_eq_pf_action()
1581 spin_lock_irq(&eq->lock); in mlx5_ib_eq_pf_action()
1582 mlx5_ib_eq_pf_process(eq); in mlx5_ib_eq_pf_action()
1583 spin_unlock_irq(&eq->lock); in mlx5_ib_eq_pf_action()
1592 mlx5_ib_create_pf_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf_eq *eq) in mlx5_ib_create_pf_eq() argument
1597 INIT_WORK(&eq->work, mlx5_ib_eq_pf_action); in mlx5_ib_create_pf_eq()
1598 spin_lock_init(&eq->lock); in mlx5_ib_create_pf_eq()
1599 eq->dev = dev; in mlx5_ib_create_pf_eq()
1601 eq->pool = mempool_create_kmalloc_pool(MLX5_IB_NUM_PF_DRAIN, in mlx5_ib_create_pf_eq()
1603 if (!eq->pool) in mlx5_ib_create_pf_eq()
1606 eq->wq = alloc_workqueue("mlx5_ib_page_fault", in mlx5_ib_create_pf_eq()
1609 if (!eq->wq) { in mlx5_ib_create_pf_eq()
1614 eq->irq_nb.notifier_call = mlx5_ib_eq_pf_int; in mlx5_ib_create_pf_eq()
1620 eq->core = mlx5_eq_create_generic(dev->mdev, &param); in mlx5_ib_create_pf_eq()
1621 if (IS_ERR(eq->core)) { in mlx5_ib_create_pf_eq()
1622 err = PTR_ERR(eq->core); in mlx5_ib_create_pf_eq()
1625 err = mlx5_eq_enable(dev->mdev, eq->core, &eq->irq_nb); in mlx5_ib_create_pf_eq()
1633 mlx5_eq_destroy_generic(dev->mdev, eq->core); in mlx5_ib_create_pf_eq()
1635 destroy_workqueue(eq->wq); in mlx5_ib_create_pf_eq()
1637 mempool_destroy(eq->pool); in mlx5_ib_create_pf_eq()
1642 mlx5_ib_destroy_pf_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf_eq *eq) in mlx5_ib_destroy_pf_eq() argument
1646 mlx5_eq_disable(dev->mdev, eq->core, &eq->irq_nb); in mlx5_ib_destroy_pf_eq()
1647 err = mlx5_eq_destroy_generic(dev->mdev, eq->core); in mlx5_ib_destroy_pf_eq()
1648 cancel_work_sync(&eq->work); in mlx5_ib_destroy_pf_eq()
1649 destroy_workqueue(eq->wq); in mlx5_ib_destroy_pf_eq()
1650 mempool_destroy(eq->pool); in mlx5_ib_destroy_pf_eq()