Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1170994 > unrolled thread

Re: linux-next: manual merge of the rcu tree with the modules and tip trees

Started byStephen Rothwell <sfr@canb.auug.org.au>
First post2015-06-24 01:30 +0200
Last post2015-06-24 02:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: linux-next: manual merge of the rcu tree with the modules and  tip trees Stephen Rothwell <sfr@canb.auug.org.au> - 2015-06-24 01:30 +0200
    Re: linux-next: manual merge of the rcu tree with the modules and tip trees Rusty Russell <rusty@rustcorp.com.au> - 2015-06-24 02:30 +0200

#1170994 — Re: linux-next: manual merge of the rcu tree with the modules and tip trees

FromStephen Rothwell <sfr@canb.auug.org.au>
Date2015-06-24 01:30 +0200
SubjectRe: linux-next: manual merge of the rcu tree with the modules and tip trees
Message-ID<pEFNE-E2-3@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

Hi Rusty,

On Thu, 28 May 2015 17:25:07 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Today's linux-next merge of the rcu tree got a conflict in
> include/linux/rcupdate.h between commits 0a04b0166929 ("rcu: Move
> lockless_dereference() out of rcupdate.h") from the modules tree and
> c1ad348b452a ("tick: Nohz: Rework next timer evaluation") from the tip
> tree and commits 7d0ae8086b82 ("rcu: Convert ACCESS_ONCE() to
> READ_ONCE() and WRITE_ONCE()") and 3382adbc1bb8 ("rcu: Eliminate a few
> CONFIG_RCU_NOCB_CPU_ALL #ifdefs") from the rcu tree.
> 
> I fixed it up (see below) and can carry the fix as necessary (no action
> is required).
> 
> I also had to add this merge fix patch:
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 28 May 2015 17:20:58 +1000
> Subject: [PATCH] rcu: merge fix for Convert ACCESS_ONCE() to READ_ONCE() and
>  WRITE_ONCE()
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  include/linux/compiler.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> index ba91e5c88a32..f7e7235f3a91 100644
> --- a/include/linux/compiler.h
> +++ b/include/linux/compiler.h
> @@ -483,7 +483,7 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
>   */
>  #define lockless_dereference(p) \
>  ({ \
> -	typeof(p) _________p1 = ACCESS_ONCE(p); \
> +	typeof(p) _________p1 = READ_ONCE(p); \
>  	smp_read_barrier_depends(); /* Dependency order vs. p above. */ \
>  	(_________p1); \
>  })
> -- 
> 2.1.4
> 
> -- 
> Cheers,
> Stephen Rothwell                    sfr@canb.auug.org.au
> 
> diff --cc include/linux/rcupdate.h
> index ed5f66464ab3,3a4d1bf430b1..000000000000
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@@ -1140,13 -1063,13 +1050,13 @@@ static inline notrace void rcu_read_unl
>   #define kfree_rcu(ptr, rcu_head)					\
>   	__kfree_rcu(&((ptr)->rcu_head), offsetof(typeof(*(ptr)), rcu_head))
>   
> - #if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL)
> + #ifdef CONFIG_TINY_RCU
>  -static inline int rcu_needs_cpu(unsigned long *delta_jiffies)
>  +static inline int rcu_needs_cpu(u64 basemono, u64 *nextevt)
>   {
>  -	*delta_jiffies = ULONG_MAX;
>  +	*nextevt = KTIME_MAX;
>   	return 0;
>   }
> - #endif /* #if defined(CONFIG_TINY_RCU) || defined(CONFIG_RCU_NOCB_CPU_ALL) */
> + #endif /* #ifdef CONFIG_TINY_RCU */
>   
>   #if defined(CONFIG_RCU_NOCB_CPU_ALL)
>   static inline bool rcu_is_nocb_cpu(int cpu) { return true; }

The above resolutions are now needed when the modules tree is merged
into Linus' tree (as the tip and rcu parts have already been merged).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[toc] | [next] | [standalone]


#1171009 — Re: linux-next: manual merge of the rcu tree with the modules and tip trees

FromRusty Russell <rusty@rustcorp.com.au>
Date2015-06-24 02:30 +0200
SubjectRe: linux-next: manual merge of the rcu tree with the modules and tip trees
Message-ID<pEGJH-1Yh-3@gated-at.bofh.it>
In reply to#1170994
Stephen Rothwell <sfr@canb.auug.org.au> writes:
> Hi Rusty,
>
> On Thu, 28 May 2015 17:25:07 +1000 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>>
>> Today's linux-next merge of the rcu tree got a conflict in
>> include/linux/rcupdate.h between commits 0a04b0166929 ("rcu: Move
>> lockless_dereference() out of rcupdate.h") from the modules tree and
>> c1ad348b452a ("tick: Nohz: Rework next timer evaluation") from the tip
>> tree and commits 7d0ae8086b82 ("rcu: Convert ACCESS_ONCE() to
>> READ_ONCE() and WRITE_ONCE()") and 3382adbc1bb8 ("rcu: Eliminate a few
>> CONFIG_RCU_NOCB_CPU_ALL #ifdefs") from the rcu tree.
>> 
>> I fixed it up (see below) and can carry the fix as necessary (no action
>> is required).
>> 
>> I also had to add this merge fix patch:
>> 
>> From: Stephen Rothwell <sfr@canb.auug.org.au>
>> Date: Thu, 28 May 2015 17:20:58 +1000
>> Subject: [PATCH] rcu: merge fix for Convert ACCESS_ONCE() to READ_ONCE() and
>>  WRITE_ONCE()
>> 
>> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> ---
>>  include/linux/compiler.h | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/include/linux/compiler.h b/include/linux/compiler.h
>> index ba91e5c88a32..f7e7235f3a91 100644
>> --- a/include/linux/compiler.h
>> +++ b/include/linux/compiler.h
>> @@ -483,7 +483,7 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
>>   */
>>  #define lockless_dereference(p) \
>>  ({ \
>> -	typeof(p) _________p1 = ACCESS_ONCE(p); \
>> +	typeof(p) _________p1 = READ_ONCE(p); \
>>  	smp_read_barrier_depends(); /* Dependency order vs. p above. */ \
>>  	(_________p1); \
>>  })

Good catch.  I've apply this to my modules-next tree now, as it will
work fine pre-merge.

Thanks,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web