All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
@ 2021-12-14 17:24 broonie
  2021-12-28  9:09 ` Geert Uytterhoeven
  0 siblings, 1 reply; 17+ messages in thread
From: broonie @ 2021-12-14 17:24 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Dave Jiang, Linux Kernel Mailing List, Linux Next Mailing List

Hi all,

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

  drivers/dma/idxd/submit.c

between commit:

  8affd8a4b5ce3 ("dmaengine: idxd: fix missed completion on abort path")

from the dmaengine-fixes tree and commit:

  5d78abb6fbc97 ("dmaengine: idxd: rework descriptor free path on failure")

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 83452fbbb168b,569815a84e95b..0000000000000
--- a/drivers/dma/idxd/submit.c
+++ b/drivers/dma/idxd/submit.c
@@@ -134,20 -120,32 +125,43 @@@ static void llist_abort_desc(struct idx
  	spin_unlock(&ie->list_lock);
  
  	if (found)
- 		complete_desc(found, IDXD_COMPLETE_ABORT);
+ 		idxd_dma_complete_txd(found, IDXD_COMPLETE_ABORT, false);
 +
 +	/*
- 	 * complete_desc() will return desc to allocator and the desc can be
- 	 * acquired by a different process and the desc->list can be modified.
- 	 * Delete desc from list so the list trasversing does not get corrupted
- 	 * by the other process.
++	 * completing the descriptor will return desc to allocator and
++	 * the desc can be acquired by a different process and the
++	 * desc->list can be modified.  Delete desc from list so the
++	 * list trasversing does not get corrupted by the other process.
 +	 */
 +	list_for_each_entry_safe(d, t, &flist, list) {
 +		list_del_init(&d->list);
- 		complete_desc(d, IDXD_COMPLETE_NORMAL);
++		idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);
 +	}
  }
  
+ /*
+  * ENQCMDS typically fail when the WQ is inactive or busy. On host submission, the driver
+  * has better control of number of descriptors being submitted to a shared wq by limiting
+  * the number of driver allocated descriptors to the wq size. However, when the swq is
+  * exported to a guest kernel, it may be shared with multiple guest kernels. This means
+  * the likelihood of getting busy returned on the swq when submitting goes significantly up.
+  * Having a tunable retry mechanism allows the driver to keep trying for a bit before giving
+  * up. The sysfs knob can be tuned by the system administrator.
+  */
+ int idxd_enqcmds(struct idxd_wq *wq, void __iomem *portal, const void *desc)
+ {
+ 	int rc, retries = 0;
+ 
+ 	do {
+ 		rc = enqcmds(portal, desc);
+ 		if (rc == 0)
+ 			break;
+ 		cpu_relax();
+ 	} while (retries++ < wq->enqcmds_retries);
+ 
+ 	return rc;
+ }
+ 
  int idxd_submit_desc(struct idxd_wq *wq, struct idxd_desc *desc)
  {
  	struct idxd_device *idxd = wq->idxd;

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2021-12-14 17:24 linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree broonie
@ 2021-12-28  9:09 ` Geert Uytterhoeven
  2021-12-28 14:54   ` Jiang, Dave
  2022-01-04 21:41   ` Dave Jiang
  0 siblings, 2 replies; 17+ messages in thread
From: Geert Uytterhoeven @ 2021-12-28  9:09 UTC (permalink / raw)
  To: Dave Jiang
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Vinod Koul,
	Stephen Rothwell, Mark Brown

On Wed, Dec 15, 2021 at 10:53 AM <broonie@kernel.org> wrote:
> Today's linux-next merge of the dmaengine tree got a conflict in:
>
>   drivers/dma/idxd/submit.c
>
> between commit:
>
>   8affd8a4b5ce3 ("dmaengine: idxd: fix missed completion on abort path")
>
> from the dmaengine-fixes tree and commit:
>
>   5d78abb6fbc97 ("dmaengine: idxd: rework descriptor free path on failure")
>
> 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 83452fbbb168b,569815a84e95b..0000000000000
> --- a/drivers/dma/idxd/submit.c
> +++ b/drivers/dma/idxd/submit.c
> @@@ -134,20 -120,32 +125,43 @@@ static void llist_abort_desc(struct idx
>         spin_unlock(&ie->list_lock);
>
>         if (found)
> -               complete_desc(found, IDXD_COMPLETE_ABORT);
> +               idxd_dma_complete_txd(found, IDXD_COMPLETE_ABORT, false);
>  +
>  +      /*
> -        * complete_desc() will return desc to allocator and the desc can be
> -        * acquired by a different process and the desc->list can be modified.
> -        * Delete desc from list so the list trasversing does not get corrupted
> -        * by the other process.
> ++       * completing the descriptor will return desc to allocator and
> ++       * the desc can be acquired by a different process and the
> ++       * desc->list can be modified.  Delete desc from list so the
> ++       * list trasversing does not get corrupted by the other process.

traversing

>  +       */
>  +      list_for_each_entry_safe(d, t, &flist, list) {
>  +              list_del_init(&d->list);
> -               complete_desc(d, IDXD_COMPLETE_NORMAL);
> ++              idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);

Is "false" correct here?

>  +      }
>   }

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2021-12-28  9:09 ` Geert Uytterhoeven
@ 2021-12-28 14:54   ` Jiang, Dave
  2022-01-04 21:41   ` Dave Jiang
  1 sibling, 0 replies; 17+ messages in thread
From: Jiang, Dave @ 2021-12-28 14:54 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Vinod Koul,
	Stephen Rothwell, Mark Brown



> On Dec 28, 2021, at 2:09 AM, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> 
> On Wed, Dec 15, 2021 at 10:53 AM <broonie@kernel.org> wrote:
>> Today's linux-next merge of the dmaengine tree got a conflict in:
>> 
>>  drivers/dma/idxd/submit.c
>> 
>> between commit:
>> 
>>  8affd8a4b5ce3 ("dmaengine: idxd: fix missed completion on abort path")
>> 
>> from the dmaengine-fixes tree and commit:
>> 
>>  5d78abb6fbc97 ("dmaengine: idxd: rework descriptor free path on failure")
>> 
>> 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 83452fbbb168b,569815a84e95b..0000000000000
>> --- a/drivers/dma/idxd/submit.c
>> +++ b/drivers/dma/idxd/submit.c
>> @@@ -134,20 -120,32 +125,43 @@@ static void llist_abort_desc(struct idx
>>        spin_unlock(&ie->list_lock);
>> 
>>        if (found)
>> -               complete_desc(found, IDXD_COMPLETE_ABORT);
>> +               idxd_dma_complete_txd(found, IDXD_COMPLETE_ABORT, false);
>> +
>> +      /*
>> -        * complete_desc() will return desc to allocator and the desc can be
>> -        * acquired by a different process and the desc->list can be modified.
>> -        * Delete desc from list so the list trasversing does not get corrupted
>> -        * by the other process.
>> ++       * completing the descriptor will return desc to allocator and
>> ++       * the desc can be acquired by a different process and the
>> ++       * desc->list can be modified.  Delete desc from list so the
>> ++       * list trasversing does not get corrupted by the other process.
> 
> traversing
> 
>> +       */
>> +      list_for_each_entry_safe(d, t, &flist, list) {
>> +              list_del_init(&d->list);
>> -               complete_desc(d, IDXD_COMPLETE_NORMAL);
>> ++              idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);
> 
> Is "false" correct here?

Yes that’s correct. Thanks. 
> 
>> +      }
>>  }
> 
> Gr{oetje,eeting}s,
> 
>                        Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2021-12-28  9:09 ` Geert Uytterhoeven
  2021-12-28 14:54   ` Jiang, Dave
@ 2022-01-04 21:41   ` Dave Jiang
  2022-01-04 23:04     ` Stephen Rothwell
  1 sibling, 1 reply; 17+ messages in thread
From: Dave Jiang @ 2022-01-04 21:41 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux Kernel Mailing List, Linux Next Mailing List, Vinod Koul,
	Stephen Rothwell, Mark Brown


On 12/28/2021 2:09 AM, Geert Uytterhoeven wrote:
> On Wed, Dec 15, 2021 at 10:53 AM <broonie@kernel.org> wrote:
>> Today's linux-next merge of the dmaengine tree got a conflict in:
>>
>>    drivers/dma/idxd/submit.c
>>
>> between commit:
>>
>>    8affd8a4b5ce3 ("dmaengine: idxd: fix missed completion on abort path")
>>
>> from the dmaengine-fixes tree and commit:
>>
>>    5d78abb6fbc97 ("dmaengine: idxd: rework descriptor free path on failure")
>>
>> 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 83452fbbb168b,569815a84e95b..0000000000000
>> --- a/drivers/dma/idxd/submit.c
>> +++ b/drivers/dma/idxd/submit.c
>> @@@ -134,20 -120,32 +125,43 @@@ static void llist_abort_desc(struct idx
>>          spin_unlock(&ie->list_lock);
>>
>>          if (found)
>> -               complete_desc(found, IDXD_COMPLETE_ABORT);
>> +               idxd_dma_complete_txd(found, IDXD_COMPLETE_ABORT, false);
>>   +
>>   +      /*
>> -        * complete_desc() will return desc to allocator and the desc can be
>> -        * acquired by a different process and the desc->list can be modified.
>> -        * Delete desc from list so the list trasversing does not get corrupted
>> -        * by the other process.
>> ++       * completing the descriptor will return desc to allocator and
>> ++       * the desc can be acquired by a different process and the
>> ++       * desc->list can be modified.  Delete desc from list so the
>> ++       * list trasversing does not get corrupted by the other process.
> traversing
>
>>   +       */
>>   +      list_for_each_entry_safe(d, t, &flist, list) {
>>   +              list_del_init(&d->list);
>> -               complete_desc(d, IDXD_COMPLETE_NORMAL);
>> ++              idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);
> Is "false" correct here?

Hi Geert, took a closer look today. I believe it should be 'true' here 
since this is a normal completion that needs to release the descriptors. 
Sorry about the previous incorrect response.



>
>>   +      }
>>    }
> Gr{oetje,eeting}s,
>
>                          Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2022-01-04 21:41   ` Dave Jiang
@ 2022-01-04 23:04     ` Stephen Rothwell
  2022-01-05  7:19       ` Vinod Koul
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2022-01-04 23:04 UTC (permalink / raw)
  To: Dave Jiang
  Cc: Geert Uytterhoeven, Linux Kernel Mailing List,
	Linux Next Mailing List, Vinod Koul, Mark Brown

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

Hi Dave,

On Tue, 4 Jan 2022 14:41:00 -0700 Dave Jiang <dave.jiang@intel.com> wrote:
>
> >>   +       */
> >>   +      list_for_each_entry_safe(d, t, &flist, list) {
> >>   +              list_del_init(&d->list);
> >> -               complete_desc(d, IDXD_COMPLETE_NORMAL);
> >> ++              idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);  
> > Is "false" correct here?  
> 
> Hi Geert, took a closer look today. I believe it should be 'true'
> here since this is a normal completion that needs to release the
> descriptors. Sorry about the previous incorrect response.

I have updated my resolution from today.  Thanks for the feedback.

-- 
Cheers,
Stephen Rothwell

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2022-01-04 23:04     ` Stephen Rothwell
@ 2022-01-05  7:19       ` Vinod Koul
  2022-01-06 23:18         ` Dave Jiang
  0 siblings, 1 reply; 17+ messages in thread
From: Vinod Koul @ 2022-01-05  7:19 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Jiang, Geert Uytterhoeven, Linux Kernel Mailing List,
	Linux Next Mailing List, Mark Brown

On 05-01-22, 10:04, Stephen Rothwell wrote:
> Hi Dave,
> 
> On Tue, 4 Jan 2022 14:41:00 -0700 Dave Jiang <dave.jiang@intel.com> wrote:
> >
> > >>   +       */
> > >>   +      list_for_each_entry_safe(d, t, &flist, list) {
> > >>   +              list_del_init(&d->list);
> > >> -               complete_desc(d, IDXD_COMPLETE_NORMAL);
> > >> ++              idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);  
> > > Is "false" correct here?  
> > 
> > Hi Geert, took a closer look today. I believe it should be 'true'
> > here since this is a normal completion that needs to release the
> > descriptors. Sorry about the previous incorrect response.
> 
> I have updated my resolution from today.  Thanks for the feedback.

I have merged fixes into next as well, so this should not be required
tomorrow.

Dave pls test..

-- 
~Vinod

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2022-01-05  7:19       ` Vinod Koul
@ 2022-01-06 23:18         ` Dave Jiang
  0 siblings, 0 replies; 17+ messages in thread
From: Dave Jiang @ 2022-01-06 23:18 UTC (permalink / raw)
  To: Vinod Koul, Stephen Rothwell
  Cc: Geert Uytterhoeven, Linux Kernel Mailing List,
	Linux Next Mailing List, Mark Brown


On 1/5/2022 12:19 AM, Vinod Koul wrote:
> On 05-01-22, 10:04, Stephen Rothwell wrote:
>> Hi Dave,
>>
>> On Tue, 4 Jan 2022 14:41:00 -0700 Dave Jiang <dave.jiang@intel.com> wrote:
>>>>>    +       */
>>>>>    +      list_for_each_entry_safe(d, t, &flist, list) {
>>>>>    +              list_del_init(&d->list);
>>>>> -               complete_desc(d, IDXD_COMPLETE_NORMAL);
>>>>> ++              idxd_dma_complete_txd(d, IDXD_COMPLETE_NORMAL, false);
>>>> Is "false" correct here?
>>> Hi Geert, took a closer look today. I believe it should be 'true'
>>> here since this is a normal completion that needs to release the
>>> descriptors. Sorry about the previous incorrect response.
>> I have updated my resolution from today.  Thanks for the feedback.
> I have merged fixes into next as well, so this should not be required
> tomorrow.
>
> Dave pls test..
Tested. Looks good. Thanks.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2022-04-12  2:42 Stephen Rothwell
@ 2022-04-12 11:16 ` Vinod Koul
  0 siblings, 0 replies; 17+ messages in thread
From: Vinod Koul @ 2022-04-12 11:16 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Lad Prabhakar, Linux Kernel Mailing List,
	Linux Next Mailing List, Minghao Chi

On 12-04-22, 12:42, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the dmaengine tree got a conflict in:
> 
>   drivers/dma/mediatek/mtk-hsdma.c
> 
> between commit:
> 
>   5cfde5b82f05 ("dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the interrupt")
> 
> from the dmaengine-fixes tree and commit:
> 
>   bb40bb695ec8 ("dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the interrupt")
> 
> from the dmaengine tree.

Thanks, this should not be in fixes, I have fixed that up.

> 
> I fixed it up (I arbitrarily used the former) 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



-- 
~Vinod

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
@ 2022-04-12  2:42 Stephen Rothwell
  2022-04-12 11:16 ` Vinod Koul
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2022-04-12  2:42 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Lad Prabhakar, Linux Kernel Mailing List,
	Linux Next Mailing List, Minghao Chi

[-- Attachment #1: Type: text/plain, Size: 835 bytes --]

Hi all,

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

  drivers/dma/mediatek/mtk-hsdma.c

between commit:

  5cfde5b82f05 ("dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the interrupt")

from the dmaengine-fixes tree and commit:

  bb40bb695ec8 ("dmaengine: mediatek: mtk-hsdma: Use platform_get_irq() to get the interrupt")

from the dmaengine tree.

I fixed it up (I arbitrarily used the former) 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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
@ 2021-07-15  1:40 Stephen Rothwell
  0 siblings, 0 replies; 17+ messages in thread
From: Stephen Rothwell @ 2021-07-15  1:40 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Dave Jiang, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 805 bytes --]

Hi all,

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

  drivers/dma/idxd/submit.c

between commit:

  da435aedb00a ("dmaengine: idxd: fix array index when int_handles are being used")

from the dmaengine-fixes tree and commit:

  6cfd9e62e329 ("dmaengine: idxd: assign MSIX vectors to each WQ rather than roundrobin")

from the dmaengine tree.

I fixed it up (I just used the latter) 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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2020-12-14 19:58 ` Stephen Rothwell
@ 2020-12-15  4:33   ` Vinod Koul
  0 siblings, 0 replies; 17+ messages in thread
From: Vinod Koul @ 2020-12-15  4:33 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Dave Jiang, Linux Kernel Mailing List, Linux Next Mailing List

Hi Stephen,

On 15-12-20, 06:58, Stephen Rothwell wrote:
> Hi all,
> 
> On Thu, 19 Nov 2020 14:29:15 +1100 Stephen Rothwell <sfr@canb.auug.org.au> 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..000000000000
> > --- 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2020-11-19  3:29 Stephen Rothwell
@ 2020-12-14 19:58 ` Stephen Rothwell
  2020-12-15  4:33   ` Vinod Koul
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2020-12-14 19:58 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Dave Jiang, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2392 bytes --]

Hi all,

On Thu, 19 Nov 2020 14:29:15 +1100 Stephen Rothwell <sfr@canb.auug.org.au> 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..000000000000
> --- 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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
@ 2020-11-19  3:29 Stephen Rothwell
  2020-12-14 19:58 ` Stephen Rothwell
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2020-11-19  3:29 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Dave Jiang, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2091 bytes --]

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..000000000000
--- 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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2020-07-06  4:41   ` Vinod Koul
@ 2020-07-06  6:03     ` Stephen Rothwell
  0 siblings, 0 replies; 17+ messages in thread
From: Stephen Rothwell @ 2020-07-06  6:03 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Dave Jiang, Linux Next Mailing List, Linux Kernel Mailing List

[-- Attachment #1: Type: text/plain, Size: 2207 bytes --]

Hi all,

On Mon, 6 Jul 2020 10:11:46 +0530 Vinod Koul <vkoul@kernel.org> 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..000000000000
> > --- 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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2020-07-06  4:23 ` Dave Jiang
@ 2020-07-06  4:41   ` Vinod Koul
  2020-07-06  6:03     ` Stephen Rothwell
  0 siblings, 1 reply; 17+ messages in thread
From: Vinod Koul @ 2020-07-06  4:41 UTC (permalink / raw)
  To: Dave Jiang
  Cc: Stephen Rothwell, Linux Next Mailing List, Linux Kernel Mailing List

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..000000000000
> --- 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
  2020-07-06  3:56 Stephen Rothwell
@ 2020-07-06  4:23 ` Dave Jiang
  2020-07-06  4:41   ` Vinod Koul
  0 siblings, 1 reply; 17+ messages in thread
From: Dave Jiang @ 2020-07-06  4:23 UTC (permalink / raw)
  To: Stephen Rothwell, Vinod Koul
  Cc: Linux Next Mailing List, Linux Kernel Mailing List



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..000000000000
--- 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");

^ permalink raw reply	[flat|nested] 17+ messages in thread

* linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree
@ 2020-07-06  3:56 Stephen Rothwell
  2020-07-06  4:23 ` Dave Jiang
  0 siblings, 1 reply; 17+ messages in thread
From: Stephen Rothwell @ 2020-07-06  3:56 UTC (permalink / raw)
  To: Vinod Koul; +Cc: Linux Next Mailing List, Linux Kernel Mailing List, Dave Jiang

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

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..000000000000
--- 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");

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-04-12 12:14 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-14 17:24 linux-next: manual merge of the dmaengine tree with the dmaengine-fixes tree broonie
2021-12-28  9:09 ` Geert Uytterhoeven
2021-12-28 14:54   ` Jiang, Dave
2022-01-04 21:41   ` Dave Jiang
2022-01-04 23:04     ` Stephen Rothwell
2022-01-05  7:19       ` Vinod Koul
2022-01-06 23:18         ` Dave Jiang
  -- strict thread matches above, loose matches on Subject: below --
2022-04-12  2:42 Stephen Rothwell
2022-04-12 11:16 ` Vinod Koul
2021-07-15  1:40 Stephen Rothwell
2020-11-19  3:29 Stephen Rothwell
2020-12-14 19:58 ` Stephen Rothwell
2020-12-15  4:33   ` Vinod Koul
2020-07-06  3:56 Stephen Rothwell
2020-07-06  4:23 ` Dave Jiang
2020-07-06  4:41   ` Vinod Koul
2020-07-06  6:03     ` Stephen Rothwell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.