Skip to contentSkip to conversation

linux-next: manual merge of the usb tree with the drm-intel-fixes tree

DISCUSSION Stephen Rothwell 6 participants 9 messages Jan 31, 2023 – Feb 1, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi all,

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

drivers/gpu/drm/i915/gt/intel_engine_cs.c

between commit:

5bc4b43d5c6c ("drm/i915: Fix up locking around dumping requests lists")

from the drm-intel-fixes tree and commit:

4d70c74659d9 ("i915: Move list_count() to list.h as list_count_nodes() for broader use")

from the usb tree.

I fixed it up (the former removed the code changed by 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.

Signature · 2 lines
Cheers,
Stephen Rothwell
#1 lore raw
Quoted 14 lines · Stephen Rothwell

Hi all,

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

drivers/gpu/drm/i915/gt/intel_engine_cs.c

between commit:

5bc4b43d5c6c ("drm/i915: Fix up locking around dumping requests lists")

from the drm-intel-fixes tree and commit:

4d70c74659d9 ("i915: Move list_count() to list.h as list_count_nodes() for broader use")

Quoted 8 lines

from the usb tree.

I fixed it up (the former removed the code changed by 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.

Thanks for the merge resolution.

greg k-h

#2 lore raw
In reply to Stephen Rothwell
Quoted 10 lines · Stephen Rothwell

Hi all,

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

drivers/gpu/drm/i915/gt/intel_engine_cs.c

between commit:

5bc4b43d5c6c ("drm/i915: Fix up locking around dumping requests lists")

Quoted 7 lines

from the drm-intel-fixes tree and commit:

4d70c74659d9 ("i915: Move list_count() to list.h as list_count_nodes() for broader use")

from the usb tree.

I fixed it up (the former removed the code changed by the latter)

Hmm... Currently I see that [email protected] moves the code to the drivers/gpu/drm/i915/gt/intel_execlists_submission.c.

Is there any new series beside the above mentioned that touches that file and actually _removes_ that code?

Quoted 6 lines

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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw
Quoted 15 lines · Andy Shevchenko
Quoted 14 lines · Stephen Rothwell

Hi all,

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

   drivers/gpu/drm/i915/gt/intel_engine_cs.c

between commit:

5bc4b43d5c6c ("drm/i915: Fix up locking around dumping requests lists")

from the drm-intel-fixes tree and commit:

   4d70c74659d9 ("i915: Move list_count() to list.h as list_count_nodes() for broader use")
Quoted 8 lines
Quoted 3 lines

from the usb tree.

I fixed it up (the former removed the code changed by the latter)

Hmm... Currently I see that [email protected] moves the code to the drivers/gpu/drm/i915/gt/intel_execlists_submission.c.

Is there any new series beside the above mentioned that touches that file and actually _removes_ that code?

As long as the removal is limited to list_count/list_count_nodes, that's fine. I only moved it from one file to another because the one and only function that was using it was being moved to the other file. If someone else has found a use for the same and wants to move it to a more common place then great. I assume there was no conflict happening in the i915 specific code.

John.

Quoted 7 lines
Quoted 7 lines

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.

#4 lore raw

Hi all,

Quoted 22 lines · On Tue, 31 Jan 2023 10:27:29 -0800 John Harrison <[email protected]>…
Quoted 20 lines · Andy Shevchenko
Quoted 9 lines · Stephen Rothwell

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

   drivers/gpu/drm/i915/gt/intel_engine_cs.c

between commit:

5bc4b43d5c6c ("drm/i915: Fix up locking around dumping requests lists")

Quoted 7 lines

from the drm-intel-fixes tree and commit:

   4d70c74659d9 ("i915: Move list_count() to list.h as list_count_nodes() for broader use")

from the usb tree.

I fixed it up (the former removed the code changed by the latter)

Hmm... Currently I see that [email protected] moves the code to the drivers/gpu/drm/i915/gt/intel_execlists_submission.c.

Quoted 8 lines
Quoted 2 lines

Is there any new series beside the above mentioned that touches that file and actually _removes_ that code?

As long as the removal is limited to list_count/list_count_nodes, that's fine. I only moved it from one file to another because the one and only function that was using it was being moved to the other file. If someone else has found a use for the same and wants to move it to a more common place then great. I assume there was no conflict happening in the i915 specific code.

I have added this fix up patch to linux-next today (more or less - this is a hand hacked version, but you get the idea):

From: Stephen Rothwell <[email protected]>
Date: Wed, 1 Feb 2023 13:13:01 +1100
Subject: [PATCH] i915: fix up for "drm/i915: Fix up locking around dumping requests lists"

interacting with "i915: Move list_count() to list.h as list_count_nodes() for broader use"

---
 .../gpu/drm/i915/gt/intel_execlists_submission.c    | 15 +------------
 1 file changed, 2 insertion(+), 13 deletions(-)
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +2 -13
index 3c573d41d404..e919d41a48d9 100644
@@ -4150,17 +4150,6 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
 	spin_unlock_irqrestore(&sched_engine->lock, flags);
 }
 
-static unsigned long list_count(struct list_head *list)
-{
-	struct list_head *pos;
-	unsigned long count = 0;
-
-	list_for_each(pos, list)
-		count++;
-
-	return count;
-}
-
 void intel_execlists_dump_active_requests(struct intel_engine_cs *engine,
 					  struct i915_request *hung_rq,
 					  struct drm_printer *m)
@@ -4172,7 +4161,7 @@ void intel_execlists_dump_active_requests(struct intel_engine_cs *engine,
 	intel_engine_dump_active_requests(&engine->sched_engine->requests, hung_rq, m);
 
-	drm_printf(m, "\tOn hold?: %lu\n",
-		   list_count(&engine->sched_engine->hold));
+	drm_printf(m, "\tOn hold?: %zu\n",
+		   list_count_nodes(&engine->sched_engine->hold));
 
 	spin_unlock_irqrestore(&engine->sched_engine->lock, flags);
 }
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
maintainer
#5 lore raw
Quoted 71 lines · Stephen Rothwell

Hi all,

Quoted 22 lines · On Tue, 31 Jan 2023 10:27:29 -0800 John Harrison <[email protected]>…
Quoted 20 lines · Andy Shevchenko
Quoted 9 lines · Stephen Rothwell

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

   drivers/gpu/drm/i915/gt/intel_engine_cs.c

between commit:

5bc4b43d5c6c ("drm/i915: Fix up locking around dumping requests lists")

Quoted 7 lines

from the drm-intel-fixes tree and commit:

   4d70c74659d9 ("i915: Move list_count() to list.h as list_count_nodes() for broader use")

from the usb tree.

I fixed it up (the former removed the code changed by the latter)

Hmm... Currently I see that [email protected] moves the code to the drivers/gpu/drm/i915/gt/intel_execlists_submission.c.

Quoted 8 lines
Quoted 2 lines

Is there any new series beside the above mentioned that touches that file and actually _removes_ that code?

As long as the removal is limited to list_count/list_count_nodes, that's fine. I only moved it from one file to another because the one and only function that was using it was being moved to the other file. If someone else has found a use for the same and wants to move it to a more common place then great. I assume there was no conflict happening in the i915 specific code.

I have added this fix up patch to linux-next today (more or less - this is a hand hacked version, but you get the idea):

From: Stephen Rothwell <[email protected]>
Date: Wed, 1 Feb 2023 13:13:01 +1100
Subject: [PATCH] i915: fix up for "drm/i915: Fix up locking around dumping requests lists"

interacting with "i915: Move list_count() to list.h as list_count_nodes() for broader use"

---
 .../gpu/drm/i915/gt/intel_execlists_submission.c    | 15 +------------
 1 file changed, 2 insertion(+), 13 deletions(-)
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +0 -11
index 3c573d41d404..e919d41a48d9 100644
@@ -4150,17 +4150,6 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
 	spin_unlock_irqrestore(&sched_engine->lock, flags);
 }
 
-static unsigned long list_count(struct list_head *list)
-{
-	struct list_head *pos;
-	unsigned long count = 0;
-
-	list_for_each(pos, list)
-		count++;
-
-	return count;
-}
-
 void intel_execlists_dump_active_requests(struct intel_engine_cs *engine,
 					  struct i915_request *hung_rq,
 					  struct drm_printer *m)

drivers/gpu/drm/i915/gt/intel_execlists_submission.c void intel_execlists_dump_active_requests(struct intel_engine_cs *engine, · line 4164

Quoted 6 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +2 -2
@@ -4172,7 +4161,7 @@ void intel_execlists_dump_active_requests(struct intel_engine_cs *engine,
 	intel_engine_dump_active_requests(&engine->sched_engine->requests, hung_rq, m);
 
-	drm_printf(m, "\tOn hold?: %lu\n",
-		   list_count(&engine->sched_engine->hold));
+	drm_printf(m, "\tOn hold?: %zu\n",
+		   list_count_nodes(&engine->sched_engine->hold));

something awkward here.
The resolution on linux-next should align with the resolution on drm-tip where we have the list_count still there as we preferred the version on drm-intel-gt-next as the resolution of the conflict instead of the fixes one.

Quoted 9 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +0 -0
 	spin_unlock_irqrestore(&engine->sched_engine->lock, flags);
 }
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
#6 lore raw
Quoted 71 lines · Rodrigo Vivi
Quoted 70 lines · Stephen Rothwell

Hi all,

Quoted 20 lines · On Tue, 31 Jan 2023 10:27:29 -0800 John Harrison <[email protected]>…
Quoted 19 lines · Andy Shevchenko
Quoted 8 lines · Stephen Rothwell

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

    drivers/gpu/drm/i915/gt/intel_engine_cs.c

between commit:

5bc4b43d5c6c ("drm/i915: Fix up locking around dumping requests lists")

Quoted 7 lines

from the drm-intel-fixes tree and commit:

    4d70c74659d9 ("i915: Move list_count() to list.h as list_count_nodes() for broader use")

from the usb tree.

I fixed it up (the former removed the code changed by the latter)

Hmm... Currently I see that [email protected] moves the code to the drivers/gpu/drm/i915/gt/intel_execlists_submission.c.

Quoted 8 lines
Quoted 2 lines

Is there any new series beside the above mentioned that touches that file and actually _removes_ that code?

As long as the removal is limited to list_count/list_count_nodes, that's fine. I only moved it from one file to another because the one and only function that was using it was being moved to the other file. If someone else has found a use for the same and wants to move it to a more common place then great. I assume there was no conflict happening in the i915 specific code.

I have added this fix up patch to linux-next today (more or less - this is a hand hacked version, but you get the idea):

From: Stephen Rothwell <[email protected]>
Date: Wed, 1 Feb 2023 13:13:01 +1100
Subject: [PATCH] i915: fix up for "drm/i915: Fix up locking around dumping requests lists"

interacting with "i915: Move list_count() to list.h as list_count_nodes() for broader use"

---
  .../gpu/drm/i915/gt/intel_execlists_submission.c    | 15 +------------
  1 file changed, 2 insertion(+), 13 deletions(-)
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +0 -11
index 3c573d41d404..e919d41a48d9 100644
@@ -4150,17 +4150,6 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
  	spin_unlock_irqrestore(&sched_engine->lock, flags);
  }
 
-static unsigned long list_count(struct list_head *list)
-{
-	struct list_head *pos;
-	unsigned long count = 0;
-
-	list_for_each(pos, list)
-		count++;
-
-	return count;
-}
-
  void intel_execlists_dump_active_requests(struct intel_engine_cs *engine,
  					  struct i915_request *hung_rq,
  					  struct drm_printer *m)
@@ -4172,7 +4161,7 @@ void intel_execlists_dump_active_requests(struct intel_engine_cs *engine,
  	intel_engine_dump_active_requests(&engine->sched_engine->requests, hung_rq, m);
 
Quoted 9 lines

drivers/gpu/drm/i915/gt/intel_execlists_submission.c void intel_execlists_dump_active_requests(struct intel_engine_cs *engine, · line 4164

Quoted 4 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +2 -2
-	drm_printf(m, "\tOn hold?: %lu\n",
-		   list_count(&engine->sched_engine->hold));
+	drm_printf(m, "\tOn hold?: %zu\n",
+		   list_count_nodes(&engine->sched_engine->hold));

something awkward here.
The resolution on linux-next should align with the resolution on drm-tip where we have the list_count still there as we preferred the version on drm-intel-gt-next as the resolution of the conflict instead of the fixes one.

Not following why you want to keep list_count as a local function in the i915 driver? Surely the correct fix is to move it to the common header and share the code? In which case, the correct name is list_count_nodes() as that is what got merged to the common header.

John.

Quoted 11 lines
Quoted 10 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +0 -0
  	spin_unlock_irqrestore(&engine->sched_engine->lock, flags);
  }
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
maintainer
#7 lore raw
Quoted 79 lines · John Harrison
Quoted 70 lines · Rodrigo Vivi
Quoted 69 lines · Stephen Rothwell

Hi all,

Quoted 20 lines · On Tue, 31 Jan 2023 10:27:29 -0800 John Harrison <[email protected]>…
Quoted 19 lines · Andy Shevchenko
Quoted 8 lines · Stephen Rothwell

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

    drivers/gpu/drm/i915/gt/intel_engine_cs.c

between commit:

5bc4b43d5c6c ("drm/i915: Fix up locking around dumping requests lists")

Quoted 7 lines

from the drm-intel-fixes tree and commit:

    4d70c74659d9 ("i915: Move list_count() to list.h as list_count_nodes() for broader use")

from the usb tree.

I fixed it up (the former removed the code changed by the latter)

Hmm... Currently I see that [email protected] moves the code to the drivers/gpu/drm/i915/gt/intel_execlists_submission.c.

Quoted 8 lines
Quoted 2 lines

Is there any new series beside the above mentioned that touches that file and actually _removes_ that code?

As long as the removal is limited to list_count/list_count_nodes, that's fine. I only moved it from one file to another because the one and only function that was using it was being moved to the other file. If someone else has found a use for the same and wants to move it to a more common place then great. I assume there was no conflict happening in the i915 specific code.

I have added this fix up patch to linux-next today (more or less - this is a hand hacked version, but you get the idea):

From: Stephen Rothwell <[email protected]>
Date: Wed, 1 Feb 2023 13:13:01 +1100
Subject: [PATCH] i915: fix up for "drm/i915: Fix up locking around dumping requests lists"

interacting with "i915: Move list_count() to list.h as list_count_nodes() for broader use"

---
  .../gpu/drm/i915/gt/intel_execlists_submission.c    | 15 +------------
  1 file changed, 2 insertion(+), 13 deletions(-)
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +0 -12
index 3c573d41d404..e919d41a48d9 100644
@@ -4150,17 +4150,6 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
  	spin_unlock_irqrestore(&sched_engine->lock, flags);
  }
-static unsigned long list_count(struct list_head *list)
-{
-	struct list_head *pos;
-	unsigned long count = 0;
-
-	list_for_each(pos, list)
-		count++;
-
-	return count;
-}
-
  void intel_execlists_dump_active_requests(struct intel_engine_cs *engine,
  					  struct i915_request *hung_rq,
  					  struct drm_printer *m)
@@ -4172,7 +4161,7 @@ void intel_execlists_dump_active_requests(struct intel_engine_cs *engine,
  	intel_engine_dump_active_requests(&engine->sched_engine->requests, hung_rq, m);
-	drm_printf(m, "\tOn hold?: %lu\n",
Quoted 8 lines

drivers/gpu/drm/i915/gt/intel_execlists_submission.c void intel_execlists_dump_active_requests(struct intel_engine_cs *engine, · line 4164

Quoted 3 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +2 -1
-		   list_count(&engine->sched_engine->hold));
+	drm_printf(m, "\tOn hold?: %zu\n",
+		   list_count_nodes(&engine->sched_engine->hold));

something awkward here.
The resolution on linux-next should align with the resolution on drm-tip where we have the list_count still there as we preferred the version on drm-intel-gt-next as the resolution of the conflict instead of the fixes one.

Quoted 4 lines

Not following why you want to keep list_count as a local function in the i915 driver? Surely the correct fix is to move it to the common header and share the code? In which case, the correct name is list_count_nodes() as that is what got merged to the common header.

right. please ignore my previous email and accept my apologies for the unnecessary noise. I had just read the commit '4d70c74659d9 ("i915: Move
list_count() to list.h as list_count_nodes() for broader use")'
and it now the final resolution makes total sense. And that patch had been reviewed and acked by us, so everything is good.

I just confused with other conflict that we have with our on gt-next and -fixes tree but with an easier resolution.

Sorry,
Rodrigo.

Quoted 14 lines

John.

Quoted 10 lines
Quoted 9 lines
drivers/gpu/drm/i915/gt/intel_execlists_submission.c +0 -0
  	spin_unlock_irqrestore(&engine->sched_engine->lock, flags);
  }
Signature · 5 lines
2.35.1

-- 
Cheers,
Stephen Rothwell
#8 lore raw

[Intel-gfx] ✗ Fi.CI.BUILD: failure for linux-next: manual merge of the usb tree with the drm-intel-fixes tree

In reply to Stephen Rothwell
== Series Details ==

== Series Details ==

Series: linux-next: manual merge of the usb tree with the drm-intel-fixes tree
URL : https://patchwork.freedesktop.org/series/113544/
State : failure

== Summary ==

Error: make failed
CALL scripts/checksyscalls.sh
DESCEND objtool
CC [M] drivers/gpu/drm/i915/gt/intel_execlists_submission.o
drivers/gpu/drm/i915/gt/intel_execlists_submission.c: In function ‘intel_execlists_dump_active_requests’:
drivers/gpu/drm/i915/gt/intel_execlists_submission.c:4164:6: error: implicit declaration of function ‘list_count_nodes’; did you mean ‘list_lru_count_node’? [-Werror=implicit-function-declaration]

 4164 |      list_count_nodes(&engine->sched_engine->hold));
      |      ^~~~~~~~~~~~~~~~
      |      list_lru_count_node
drivers/gpu/drm/i915/gt/intel_execlists_submission.c:4163:31: error: format ‘%zu’ expects argument of type ‘size_t’, but argument 3 has type ‘int’ [-Werror=format=]
 4163 |  drm_printf(m, "\tOn hold?: %zu\n",
      |                             ~~^
      |                               |
      |                               long unsigned int
      |                             %u
 4164 |      list_count_nodes(&engine->sched_engine->hold));
      |      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |      |
      |      int

cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:252: drivers/gpu/drm/i915/gt/intel_execlists_submission.o] Error 1 make[4]: *** [scripts/Makefile.build:504: drivers/gpu/drm/i915] Error 2
make[3]: *** [scripts/Makefile.build:504: drivers/gpu/drm] Error 2
make[2]: *** [scripts/Makefile.build:504: drivers/gpu] Error 2
make[1]: *** [scripts/Makefile.build:504: drivers] Error 2
make: *** [Makefile:2021: .] Error 2