Displaying 13 results from an estimated 13 matches for "irq_bypass_register_producer".
Did you mean:
irq_bypass_unregister_producer
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...x || irq < 0) {
>>> +??????? spin_unlock(&vq->call_ctx.ctx_lock);
>>> +??????? return;
>>> +??? }
>>> +
>>> +??? vq->call_ctx.producer.token = vq->call_ctx.ctx;
>>> +??? vq->call_ctx.producer.irq = irq;
>>> +??? ret = irq_bypass_register_producer(&vq->call_ctx.producer);
>>> +??? spin_unlock(&vq->call_ctx.ctx_lock);
>>> +}
>>> +
>>> +static void vhost_vdpa_unsetup_vq_irq(struct vhost_vdpa *v, u16 qid)
>>> +{
>>> +??? struct vhost_virtqueue *vq = &v->vqs[qid];
>>...
2020 Jul 15
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...x.ctx_lock);
>>>>> +??? if (!vq->call_ctx.ctx)
>>>>> +??????? return;
>>>>> +
>>>>> +??? vq->call_ctx.producer.token = vq->call_ctx.ctx;
>>>>> +??? vq->call_ctx.producer.irq = irq;
>>>>> +??? ret = irq_bypass_register_producer(&vq->call_ctx.producer);
>>>>> +??? spin_unlock(&vq->call_ctx.ctx_lock);
>>>>> +
>>>>> +??? if (unlikely(ret))
>>>>> +??????? vq_err(vq,
>>>>> +??????? "irq bypass producer (token %p registration fails: %d...
2020 Aug 05
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...lock(&vq->call_ctx.ctx_lock);
>>>>> +??????? return;
>>>>> +??? }
>>>>> +
>>>>> +??? vq->call_ctx.producer.token = vq->call_ctx.ctx;
>>>>> +??? vq->call_ctx.producer.irq = irq;
>>>>> +??? ret = irq_bypass_register_producer(&vq->call_ctx.producer);
>>>>> +??? spin_unlock(&vq->call_ctx.ctx_lock);
>>>>> +}
>>>>> +
>>>>> +static void vhost_vdpa_unsetup_vq_irq(struct vhost_vdpa *v, u16 qid)
>>>>> +{
>>>>> +??? struct vh...
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...ock);
> + irq = ops->get_vq_irq(vdpa, qid);
> + if (!vq->call_ctx.ctx || irq < 0) {
> + spin_unlock(&vq->call_ctx.ctx_lock);
> + return;
> + }
> +
> + vq->call_ctx.producer.token = vq->call_ctx.ctx;
> + vq->call_ctx.producer.irq = irq;
> + ret = irq_bypass_register_producer(&vq->call_ctx.producer);
> + spin_unlock(&vq->call_ctx.ctx_lock);
> +}
> +
> +static void vhost_vdpa_unsetup_vq_irq(struct vhost_vdpa *v, u16 qid)
> +{
> + struct vhost_virtqueue *vq = &v->vqs[qid];
> +
> + spin_lock(&vq->call_ctx.ctx_lock);
>...
2020 Aug 04
0
[PATCH V5 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...x || irq < 0) {
> +??????? spin_unlock(&vq->call_ctx.ctx_lock);
> +??????? return;
> +??? }
> +
> +??? vq->call_ctx.producer.token = vq->call_ctx.ctx;
> +??? vq->call_ctx.producer.irq = irq;
> +??? ret = irq_bypass_register_producer(&vq->call_ctx.producer);
> +??? spin_unlock(&vq->call_ctx.ctx_lock);
> +}
> +
> +static void vhost_vdpa_unsetup_vq_irq(struct vhost_vdpa *v, u16 qid)
> +{
> +??? struct vhost_virtqueue *vq = &v->vqs[qid];
>...
2020 Jul 17
0
[PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...ctx) {
> + spin_unlock(&vq->call_ctx.ctx_lock);
> + return;
> + }
I think we can simply remove this check as what is done in
vhost_vdpq_update_vq_irq().
> +
> + vq->call_ctx.producer.token = vq->call_ctx.ctx;
> + vq->call_ctx.producer.irq = irq;
> + ret = irq_bypass_register_producer(&vq->call_ctx.producer);
> + spin_unlock(&vq->call_ctx.ctx_lock);
> +}
> +
> +static void vhost_vdpa_unsetup_vq_irq(struct vdpa_device *dev, int qid)
> +{
> + struct vhost_vdpa *v = vdpa_get_drvdata(dev);
> + struct vhost_virtqueue *vq = &v->vqs[qid];
>...
2020 Jul 13
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...vq_err(vq, "setup irq bypass for vq %d with irq = %d\n", qid, irq);
> + spin_lock(&vq->call_ctx.ctx_lock);
> + if (!vq->call_ctx.ctx)
> + return;
> +
> + vq->call_ctx.producer.token = vq->call_ctx.ctx;
> + vq->call_ctx.producer.irq = irq;
> + ret = irq_bypass_register_producer(&vq->call_ctx.producer);
> + spin_unlock(&vq->call_ctx.ctx_lock);
> +
> + if (unlikely(ret))
> + vq_err(vq,
> + "irq bypass producer (token %p registration fails: %d\n",
> + vq->call_ctx.producer.token, ret);
Not sure this deserves a vq_err(), irq w...
2020 Jul 15
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...>>> +??? spin_lock(&vq->call_ctx.ctx_lock);
>>> +??? if (!vq->call_ctx.ctx)
>>> +??????? return;
>>> +
>>> +??? vq->call_ctx.producer.token = vq->call_ctx.ctx;
>>> +??? vq->call_ctx.producer.irq = irq;
>>> +??? ret = irq_bypass_register_producer(&vq->call_ctx.producer);
>>> +??? spin_unlock(&vq->call_ctx.ctx_lock);
>>> +
>>> +??? if (unlikely(ret))
>>> +??????? vq_err(vq,
>>> +??????? "irq bypass producer (token %p registration fails: %d\n",
>>> +??????? vq->c...
2020 Jul 28
0
[PATCH V4 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...ed irq as "irq < 0" to be more robust.
Forcing a specific errno value is not good.
> + spin_unlock(&vq->call_ctx.ctx_lock);
> + return;
> + }
> +
> + vq->call_ctx.producer.token = vq->call_ctx.ctx;
> + vq->call_ctx.producer.irq = irq;
> + ret = irq_bypass_register_producer(&vq->call_ctx.producer);
> + spin_unlock(&vq->call_ctx.ctx_lock);
> +}
> +
> +static void vhost_vdpa_unsetup_vq_irq(struct vhost_vdpa *v, int qid)
> +{
> + struct vhost_virtqueue *vq = &v->vqs[qid];
> +
> + spin_lock(&vq->call_ctx.ctx_lock);
>...
2020 Jul 15
0
[PATCH 3/7] vhost_vdpa: implement IRQ offloading functions in vhost_vdpa
...>>>> register();
>>> This is what we are doing now, or I must missed somethig:
>>> if (ctx && ctx != token) {
>>> ????irq_bypass_unregister_producer(&vq->call_ctx.producer);
>>> ????vq->call_ctx.producer.token = ctx;
>>> ????irq_bypass_register_producer(&vq->call_ctx.producer);
>>>
>>> }
>>>
>>> It just unregister and register.
>>
>>
>> I meant there's probably no need for the check and another check and
>> unregister before. The whole function is as simple as I suggested abov...
2020 Jul 17
0
[PATCH V2 4/6] vhost_vdpa: implement IRQ offloading in vhost_vdpa
...123
124 spin_lock(&vq->call_ctx.ctx_lock);
125 if (!vq->call_ctx.ctx) {
126 spin_unlock(&vq->call_ctx.ctx_lock);
127 return;
128 }
129
130 vq->call_ctx.producer.token = vq->call_ctx.ctx;
131 vq->call_ctx.producer.irq = irq;
132 ret = irq_bypass_register_producer(&vq->call_ctx.producer);
133 spin_unlock(&vq->call_ctx.ctx_lock);
134 }
135
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all at lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Nam...
2020 Aug 05
0
[PATCH 2/2] vhost_vdpa: unified set_vq_irq() and update_vq_irq()
...en)
> - * changes.
> - */
> - if (!vq->call_ctx.producer.irq) {
> - spin_unlock(&vq->call_ctx.ctx_lock);
> - return;
> - }
> -
> - irq_bypass_unregister_producer(&vq->call_ctx.producer);
> - vq->call_ctx.producer.token = vq->call_ctx.ctx;
> - irq_bypass_register_producer(&vq->call_ctx.producer);
> - spin_unlock(&vq->call_ctx.ctx_lock);
> -}
> -
> static void vhost_vdpa_reset(struct vhost_vdpa *v)
> {
> struct vdpa_device *vdpa = v->vdpa;
> @@ -452,7 +436,7 @@ static long vhost_vdpa_vring_ioctl(struct vhost_vdpa *v, unsigned...
2020 Sep 09
0
[PATCH] vhost_vdpa: remove unnecessary spin_lock in vhost_vring_call
...t; - if (!vq->call_ctx.ctx || irq < 0) {
> - spin_unlock(&vq->call_ctx.ctx_lock);
> + if (!vq->call_ctx.ctx || irq < 0)
> return;
> - }
>
> vq->call_ctx.producer.token = vq->call_ctx.ctx;
> vq->call_ctx.producer.irq = irq;
> ret = irq_bypass_register_producer(&vq->call_ctx.producer);
> - spin_unlock(&vq->call_ctx.ctx_lock);
> }
>
> static void vhost_vdpa_unsetup_vq_irq(struct vhost_vdpa *v, u16 qid)
> {
> struct vhost_virtqueue *vq = &v->vqs[qid];
>
> - spin_lock(&vq->call_ctx.ctx_lock);...