Skip to contentSkip to conversation

linux-next: manual merge of the percpu tree with the tip tree

DISCUSSION Stephen Rothwell 3 participants 4 messages Oct 9, 2014 Linux-next tree

lore
Share & tools
lore
#0 lore raw

Hi all,

Today's linux-next merge of the percpu tree got a conflict in kernel/irq_work.c between commit 76a33061b932 ("irq_work: Force raised irq work to run on irq work interrupt") from the tip tree and commit 22127e93c587 ("time: Replace __get_cpu_var uses") from the percpu tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 24 lines
Cheers,
Stephen Rothwell                    [email protected]

diff --cc kernel/irq_work.c
index 385b85aded19,345d19edcdae..000000000000
--- a/kernel/irq_work.c
+++ b/kernel/irq_work.c
@@@ -113,12 -113,10 +113,12 @@@ bool irq_work_needs_cpu(void
  {
  	struct llist_head *raised, *lazy;
  
- 	raised = &__get_cpu_var(raised_list);
- 	lazy = &__get_cpu_var(lazy_list);
+ 	raised = this_cpu_ptr(&raised_list);
+ 	lazy = this_cpu_ptr(&lazy_list);
 -	if (llist_empty(raised) && llist_empty(lazy))
 -		return false;
 +
 +	if (llist_empty(raised) || arch_irq_work_has_interrupt())
 +		if (llist_empty(lazy))
 +			return false;
  
  	/* All work should have been flushed before going offline */
  	WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));
#1 lore raw
Quoted 19 lines · Stephen Rothwell

Hi all,

Today's linux-next merge of the percpu tree got a conflict in kernel/irq_work.c between commit 76a33061b932 ("irq_work: Force raised irq work to run on irq work interrupt") from the tip tree and commit 22127e93c587 ("time: Replace __get_cpu_var uses") from the percpu tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
kernel/irq_work.c +0 -0
diff --cc kernel/irq_work.c
index 385b85aded19,345d19edcdae..000000000000

kernel/irq_work.c

Quoted 7 lines
kernel/irq_work.c +2 -2
@@@ -113,12 -113,10 +113,12 @@@ bool irq_work_needs_cpu(void
  {
  	struct llist_head *raised, *lazy;
 
- 	raised = &__get_cpu_var(raised_list);
- 	lazy = &__get_cpu_var(lazy_list);
+ 	raised = this_cpu_ptr(&raised_list);
+ 	lazy = this_cpu_ptr(&lazy_list);

Ah thanks! The conflict is compile time rather than merge time, thanks for spotting it!

Should we notify Linus about it? That's certainly something that should be applied with the percpu tree.

Quoted 9 lines

- if (llist_empty(raised) && llist_empty(lazy))
- return false;
+
+ if (llist_empty(raised) || arch_irq_work_has_interrupt())
+ if (llist_empty(lazy))
+ return false;

/* All work should have been flushed before going offline */ WARN_ON_ONCE(cpu_is_offline(smp_processor_id()));

#2 lore raw
Quoted 31 lines · Frederic Weisbecker
Quoted 19 lines · Stephen Rothwell

Hi all,

Today's linux-next merge of the percpu tree got a conflict in kernel/irq_work.c between commit 76a33061b932 ("irq_work: Force raised irq work to run on irq work interrupt") from the tip tree and commit 22127e93c587 ("time: Replace __get_cpu_var uses") from the percpu tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
kernel/irq_work.c +0 -0
diff --cc kernel/irq_work.c
index 385b85aded19,345d19edcdae..000000000000

kernel/irq_work.c

Quoted 7 lines
kernel/irq_work.c +2 -2
@@@ -113,12 -113,10 +113,12 @@@ bool irq_work_needs_cpu(void
  {
  	struct llist_head *raised, *lazy;
 
- 	raised = &__get_cpu_var(raised_list);
- 	lazy = &__get_cpu_var(lazy_list);
+ 	raised = this_cpu_ptr(&raised_list);
+ 	lazy = this_cpu_ptr(&lazy_list);

Ah thanks! The conflict is compile time rather than merge time, thanks for spotting it!

Quoted 2 lines

Should we notify Linus about it? That's certainly something that should be applied with the percpu tree.

I'm holding back percpu/for-3.18-consistent-ops till other trees are merged and collecting the conflicts. I'll list them when sending the pull request.

Thanks.

Signature · 1 line
tejun
#3 lore raw
Quoted 32 lines · Tejun Heo
Quoted 31 lines · Frederic Weisbecker
Quoted 19 lines · Stephen Rothwell

Hi all,

Today's linux-next merge of the percpu tree got a conflict in kernel/irq_work.c between commit 76a33061b932 ("irq_work: Force raised irq work to run on irq work interrupt") from the tip tree and commit 22127e93c587 ("time: Replace __get_cpu_var uses") from the percpu tree.

I fixed it up (see below) and can carry the fix as necessary (no action is required).

Signature · 2 lines
Cheers,
Stephen Rothwell                    [email protected]
kernel/irq_work.c +0 -0
diff --cc kernel/irq_work.c
index 385b85aded19,345d19edcdae..000000000000

kernel/irq_work.c

Quoted 7 lines
kernel/irq_work.c +2 -2
@@@ -113,12 -113,10 +113,12 @@@ bool irq_work_needs_cpu(void
  {
  	struct llist_head *raised, *lazy;
 
- 	raised = &__get_cpu_var(raised_list);
- 	lazy = &__get_cpu_var(lazy_list);
+ 	raised = this_cpu_ptr(&raised_list);
+ 	lazy = this_cpu_ptr(&lazy_list);

Ah thanks! The conflict is compile time rather than merge time, thanks for spotting it!

Quoted 6 lines
Quoted 2 lines

Should we notify Linus about it? That's certainly something that should be applied with the percpu tree.

I'm holding back percpu/for-3.18-consistent-ops till other trees are merged and collecting the conflicts. I'll list them when sending the pull request.

Sounds good!

Thanks.