Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree

2020-12-14 Thread Vinod Koul
Hi Stephen,

On 15-12-20, 06:58, Stephen Rothwell wrote:
> Hi all,
> 
> On Thu, 19 Nov 2020 14:29:15 +1100 Stephen Rothwell  
> wrote:
> >
> > Today's linux-next merge of the dmaengine tree got a conflict in:
> > 
> >   drivers/dma/idxd/submit.c
> > 
> > between commit:
> > 
> >   8326be9f1c0b ("dmaengine: idxd: fix mapping of portal size")
> > 
> > from the dmaengine-fixes tree and commit:
> > 
> >   8e50d392652f ("dmaengine: idxd: Add shared workqueue support")
> > 
> > from the dmaengine tree.
> > 
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging.  You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> > 
> > diff --cc drivers/dma/idxd/submit.c
> > index 417048e3c42a,efca5d8468a6..
> > --- a/drivers/dma/idxd/submit.c
> > +++ b/drivers/dma/idxd/submit.c
> > @@@ -74,14 -86,27 +86,27 @@@ int idxd_submit_desc(struct idxd_wq *wq
> > if (idxd->state != IDXD_DEV_ENABLED)
> > return -EIO;
> >   
> > -   portal = wq->dportal;
> >  -  portal = wq->portal + idxd_get_wq_portal_offset(IDXD_PORTAL_LIMITED);
> > ++  portal = wq->portal;
> > + 
> > /*
> > -* The wmb() flushes writes to coherent DMA data before possibly
> > -* triggering a DMA read. The wmb() is necessary even on UP because
> > -* the recipient is a device.
> > +* The wmb() flushes writes to coherent DMA data before
> > +* possibly triggering a DMA read. The wmb() is necessary
> > +* even on UP because the recipient is a device.
> >  */
> > wmb();
> > -   iosubmit_cmds512(portal, desc->hw, 1);
> > +   if (wq_dedicated(wq)) {
> > +   iosubmit_cmds512(portal, desc->hw, 1);
> > +   } else {
> > +   /*
> > +* It's not likely that we would receive queue full rejection
> > +* since the descriptor allocation gates at wq size. If we
> > +* receive a -EAGAIN, that means something went wrong such as 
> > the
> > +* device is not accepting descriptor at all.
> > +*/
> > +   rc = enqcmds(portal, desc->hw);
> > +   if (rc < 0)
> > +   return rc;
> > +   }
> >   
> > /*
> >  * Pending the descriptor to the lockless list for the irq_entry
> 
> Just a reminder that this conflict still exists.  Commit 8326be9f1c0b
> is now in Linus' tree.

Thanks for the reminder. Since Linus like to see the conflicts, I am
going to send this as is and let him resolve it :)

-- 
~Vinod


Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree

2020-12-14 Thread Stephen Rothwell
Hi all,

On Thu, 19 Nov 2020 14:29:15 +1100 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the dmaengine tree got a conflict in:
> 
>   drivers/dma/idxd/submit.c
> 
> between commit:
> 
>   8326be9f1c0b ("dmaengine: idxd: fix mapping of portal size")
> 
> from the dmaengine-fixes tree and commit:
> 
>   8e50d392652f ("dmaengine: idxd: Add shared workqueue support")
> 
> from the dmaengine tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> diff --cc drivers/dma/idxd/submit.c
> index 417048e3c42a,efca5d8468a6..
> --- a/drivers/dma/idxd/submit.c
> +++ b/drivers/dma/idxd/submit.c
> @@@ -74,14 -86,27 +86,27 @@@ int idxd_submit_desc(struct idxd_wq *wq
>   if (idxd->state != IDXD_DEV_ENABLED)
>   return -EIO;
>   
> - portal = wq->dportal;
>  -portal = wq->portal + idxd_get_wq_portal_offset(IDXD_PORTAL_LIMITED);
> ++portal = wq->portal;
> + 
>   /*
> -  * The wmb() flushes writes to coherent DMA data before possibly
> -  * triggering a DMA read. The wmb() is necessary even on UP because
> -  * the recipient is a device.
> +  * The wmb() flushes writes to coherent DMA data before
> +  * possibly triggering a DMA read. The wmb() is necessary
> +  * even on UP because the recipient is a device.
>*/
>   wmb();
> - iosubmit_cmds512(portal, desc->hw, 1);
> + if (wq_dedicated(wq)) {
> + iosubmit_cmds512(portal, desc->hw, 1);
> + } else {
> + /*
> +  * It's not likely that we would receive queue full rejection
> +  * since the descriptor allocation gates at wq size. If we
> +  * receive a -EAGAIN, that means something went wrong such as 
> the
> +  * device is not accepting descriptor at all.
> +  */
> + rc = enqcmds(portal, desc->hw);
> + if (rc < 0)
> + return rc;
> + }
>   
>   /*
>* Pending the descriptor to the lockless list for the irq_entry

Just a reminder that this conflict still exists.  Commit 8326be9f1c0b
is now in Linus' tree.

-- 
Cheers,
Stephen Rothwell


pgpSRdWRHSgu7.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree

2020-11-18 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the dmaengine tree got a conflict in:

  drivers/dma/idxd/submit.c

between commit:

  8326be9f1c0b ("dmaengine: idxd: fix mapping of portal size")

from the dmaengine-fixes tree and commit:

  8e50d392652f ("dmaengine: idxd: Add shared workqueue support")

from the dmaengine tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/dma/idxd/submit.c
index 417048e3c42a,efca5d8468a6..
--- a/drivers/dma/idxd/submit.c
+++ b/drivers/dma/idxd/submit.c
@@@ -74,14 -86,27 +86,27 @@@ int idxd_submit_desc(struct idxd_wq *wq
if (idxd->state != IDXD_DEV_ENABLED)
return -EIO;
  
-   portal = wq->dportal;
 -  portal = wq->portal + idxd_get_wq_portal_offset(IDXD_PORTAL_LIMITED);
++  portal = wq->portal;
+ 
/*
-* The wmb() flushes writes to coherent DMA data before possibly
-* triggering a DMA read. The wmb() is necessary even on UP because
-* the recipient is a device.
+* The wmb() flushes writes to coherent DMA data before
+* possibly triggering a DMA read. The wmb() is necessary
+* even on UP because the recipient is a device.
 */
wmb();
-   iosubmit_cmds512(portal, desc->hw, 1);
+   if (wq_dedicated(wq)) {
+   iosubmit_cmds512(portal, desc->hw, 1);
+   } else {
+   /*
+* It's not likely that we would receive queue full rejection
+* since the descriptor allocation gates at wq size. If we
+* receive a -EAGAIN, that means something went wrong such as 
the
+* device is not accepting descriptor at all.
+*/
+   rc = enqcmds(portal, desc->hw);
+   if (rc < 0)
+   return rc;
+   }
  
/*
 * Pending the descriptor to the lockless list for the irq_entry


pgpsBKUgiOga7.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree

2020-07-05 Thread Stephen Rothwell
Hi all,

On Mon, 6 Jul 2020 10:11:46 +0530 Vinod Koul  wrote:
>
> On 05-07-20, 21:23, Dave Jiang wrote:
> > 
> > On 7/5/2020 8:56 PM, Stephen Rothwell wrote:  
> > > 
> > > Today's linux-next merge of the dmaengine tree got a conflict in:
> > > 
> > >drivers/dma/idxd/sysfs.c
> > > 
> > > between commit:
> > > 
> > >da32b28c95a7 ("dmaengine: idxd: cleanup workqueue config after 
> > > disabling")
> > > 
> > > from the dmaengine-fixes tree and commit:
> > > 
> > >f50b150e315e ("dmaengine: idxd: add work queue drain support")
> > > 
> > > from the dmaengine tree.
> > > 
> > > I fixed it up (see below) and can carry the fix as necessary. This
> > > is now fixed as far as linux-next is concerned, but any non trivial
> > > conflicts should be mentioned to your upstream maintainer when your tree
> > > is submitted for merging.  You may also want to consider cooperating
> > > with the maintainer of the conflicting tree to minimise any particularly
> > > complex conflicts.
> > >   
> > 
> > Hi Stephen. Thanks for the fixup. I think there are two more bits that are
> > needed from f50b150e315e if you don't mind adding:  
> 
> I will merge the fixes into next so it should be resolved for tomorrow,

Thanks,

> > 
> > diff --cc drivers/dma/idxd/sysfs.c
> > index 2e2c5082f322,6f0711a822a1..
> > --- a/drivers/dma/idxd/sysfs.c
> > +++ b/drivers/dma/idxd/sysfs.c
> > @@@ -313,14 -303,7 +303,12 @@@ static int idxd_config_bus_remove(struc
> > }
> > 
> > idxd_unregister_dma_device(idxd);
> > -   spin_lock_irqsave(&idxd->dev_lock, flags);
> > rc = idxd_device_disable(idxd);
> >  +  for (i = 0; i < idxd->max_wqs; i++) {
> >  +  struct idxd_wq *wq = &idxd->wqs[i];
> >  +
> >   
> > >   mutex_lock(&wq->wq_lock);  
> > 
> >  +  idxd_wq_disable_cleanup(wq);
> >   
> > >   mutex_unlock(&wq->wq_lock);  
> > 
> >  +  }
> > -   spin_unlock_irqrestore(&idxd->dev_lock, flags);
> > module_put(THIS_MODULE);
> > if (rc < 0)
> > dev_warn(dev, "Device disable failed\n");  
> 

I added that fix up by hand today just in case it matters for testing.

-- 
Cheers,
Stephen Rothwell


pgpQzHELLWFST.pgp
Description: OpenPGP digital signature


Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree

2020-07-05 Thread Vinod Koul
On 05-07-20, 21:23, Dave Jiang wrote:
> 
> 
> On 7/5/2020 8:56 PM, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Today's linux-next merge of the dmaengine tree got a conflict in:
> > 
> >drivers/dma/idxd/sysfs.c
> > 
> > between commit:
> > 
> >da32b28c95a7 ("dmaengine: idxd: cleanup workqueue config after 
> > disabling")
> > 
> > from the dmaengine-fixes tree and commit:
> > 
> >f50b150e315e ("dmaengine: idxd: add work queue drain support")
> > 
> > from the dmaengine tree.
> > 
> > I fixed it up (see below) and can carry the fix as necessary. This
> > is now fixed as far as linux-next is concerned, but any non trivial
> > conflicts should be mentioned to your upstream maintainer when your tree
> > is submitted for merging.  You may also want to consider cooperating
> > with the maintainer of the conflicting tree to minimise any particularly
> > complex conflicts.
> > 
> 
> Hi Stephen. Thanks for the fixup. I think there are two more bits that are
> needed from f50b150e315e if you don't mind adding:

I will merge the fixes into next so it should be resolved for tomorrow,
thanks

> 
> diff --cc drivers/dma/idxd/sysfs.c
> index 2e2c5082f322,6f0711a822a1..
> --- a/drivers/dma/idxd/sysfs.c
> +++ b/drivers/dma/idxd/sysfs.c
> @@@ -313,14 -303,7 +303,12 @@@ static int idxd_config_bus_remove(struc
>   }
> 
>   idxd_unregister_dma_device(idxd);
> - spin_lock_irqsave(&idxd->dev_lock, flags);
>   rc = idxd_device_disable(idxd);
>  +for (i = 0; i < idxd->max_wqs; i++) {
>  +struct idxd_wq *wq = &idxd->wqs[i];
>  +
> 
> > mutex_lock(&wq->wq_lock);
> 
>  +idxd_wq_disable_cleanup(wq);
> 
> > mutex_unlock(&wq->wq_lock);
> 
>  +}
> - spin_unlock_irqrestore(&idxd->dev_lock, flags);
>   module_put(THIS_MODULE);
>   if (rc < 0)
>   dev_warn(dev, "Device disable failed\n");

-- 
~Vinod


Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree

2020-07-05 Thread Dave Jiang




On 7/5/2020 8:56 PM, Stephen Rothwell wrote:

Hi all,

Today's linux-next merge of the dmaengine tree got a conflict in:

   drivers/dma/idxd/sysfs.c

between commit:

   da32b28c95a7 ("dmaengine: idxd: cleanup workqueue config after disabling")

from the dmaengine-fixes tree and commit:

   f50b150e315e ("dmaengine: idxd: add work queue drain support")

from the dmaengine tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.



Hi Stephen. Thanks for the fixup. I think there are two more bits that are 
needed from f50b150e315e if you don't mind adding:


diff --cc drivers/dma/idxd/sysfs.c
index 2e2c5082f322,6f0711a822a1..
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@@ -313,14 -303,7 +303,12 @@@ static int idxd_config_bus_remove(struc
}

idxd_unregister_dma_device(idxd);
-   spin_lock_irqsave(&idxd->dev_lock, flags);
rc = idxd_device_disable(idxd);
 +  for (i = 0; i < idxd->max_wqs; i++) {
 +  struct idxd_wq *wq = &idxd->wqs[i];
 +

>mutex_lock(&wq->wq_lock);

 +  idxd_wq_disable_cleanup(wq);

>mutex_unlock(&wq->wq_lock);

 +  }
-   spin_unlock_irqrestore(&idxd->dev_lock, flags);
module_put(THIS_MODULE);
if (rc < 0)
dev_warn(dev, "Device disable failed\n");


linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree

2020-07-05 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the dmaengine tree got a conflict in:

  drivers/dma/idxd/sysfs.c

between commit:

  da32b28c95a7 ("dmaengine: idxd: cleanup workqueue config after disabling")

from the dmaengine-fixes tree and commit:

  f50b150e315e ("dmaengine: idxd: add work queue drain support")

from the dmaengine tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/dma/idxd/sysfs.c
index 2e2c5082f322,6f0711a822a1..
--- a/drivers/dma/idxd/sysfs.c
+++ b/drivers/dma/idxd/sysfs.c
@@@ -313,14 -303,7 +303,12 @@@ static int idxd_config_bus_remove(struc
}
  
idxd_unregister_dma_device(idxd);
-   spin_lock_irqsave(&idxd->dev_lock, flags);
rc = idxd_device_disable(idxd);
 +  for (i = 0; i < idxd->max_wqs; i++) {
 +  struct idxd_wq *wq = &idxd->wqs[i];
 +
 +  idxd_wq_disable_cleanup(wq);
 +  }
-   spin_unlock_irqrestore(&idxd->dev_lock, flags);
module_put(THIS_MODULE);
if (rc < 0)
dev_warn(dev, "Device disable failed\n");


pgpJlbHAhDnnt.pgp
Description: OpenPGP digital signature