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


Groups > linux.kernel > #1212415 > unrolled thread

h8300 build failures ijn linux-next

Started byGuenter Roeck <linux@roeck-us.net>
First post2015-08-24 20:40 +0200
Last post2015-08-25 21:10 +0200
Articles 13 — 5 participants

Back to article view | Back to linux.kernel


Contents

  h8300 build failures ijn linux-next Guenter Roeck <linux@roeck-us.net> - 2015-08-24 20:40 +0200
    Re: h8300 build failures ijn linux-next Yoshinori Sato <ysato@users.sourceforge.jp> - 2015-08-25 08:00 +0200
      Re: h8300 build failures ijn linux-next Mark Salter <msalter@redhat.com> - 2015-08-25 16:30 +0200
        Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related,  not limited to h8300) Guenter Roeck <linux@roeck-us.net> - 2015-08-25 17:10 +0200
          Re: h8300 build failures in linux-next (in rcu code, gcc 5.x  related, not limited to h8300) Oleg Nesterov <oleg@redhat.com> - 2015-08-25 18:20 +0200
            Re: h8300 build failures in linux-next (in rcu code, gcc 5.x  related, not limited to h8300) Oleg Nesterov <oleg@redhat.com> - 2015-08-25 18:30 +0200
          Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300) Yoshinori Sato <ysato@users.sourceforge.jp> - 2015-08-25 19:00 +0200
            Re: h8300 build failures in linux-next (in rcu code, gcc 5.x  related, not limited to h8300) Oleg Nesterov <oleg@redhat.com> - 2015-08-25 19:40 +0200
              Re: h8300 build failures in linux-next (in rcu code, gcc 5.x  related, not limited to h8300) Oleg Nesterov <oleg@redhat.com> - 2015-08-25 20:10 +0200
                Re: h8300 build failures in linux-next (in rcu code, gcc 5.x  related, not limited to h8300) Mark Salter <msalter@redhat.com> - 2015-08-25 20:20 +0200
          [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug Oleg Nesterov <oleg@redhat.com> - 2015-08-25 20:50 +0200
            Re: [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-08-25 21:10 +0200
            Re: [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug Oleg Nesterov <oleg@redhat.com> - 2015-08-25 21:10 +0200

#1212415 — h8300 build failures ijn linux-next

FromGuenter Roeck <linux@roeck-us.net>
Date2015-08-24 20:40 +0200
Subjecth8300 build failures ijn linux-next
Message-ID<q14P1-7rq-33@gated-at.bofh.it>
Hi,

In linux-next as of today (0824), all h8300 builds fail for me with an internal
compiler error.

Building h8300:allnoconfig ... failed
--------------
Error log:

In file included from include/linux/rcupdate.h:429:0,
                  from include/linux/rcusync.h:5,
                  from kernel/rcu/sync.c:1:
include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:
include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
  static inline void rcu_barrier_sched(void)
                     ^

I tried both gcc 5.1 and 5.2, built with the patch set available to me.

Is there a more recent compiler / patch set available that might fix the problem ?

Thanks,
Guenter
--
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] | [next] | [standalone]


#1212707

FromYoshinori Sato <ysato@users.sourceforge.jp>
Date2015-08-25 08:00 +0200
Message-ID<q1fr4-5Zp-11@gated-at.bofh.it>
In reply to#1212415
On Tue, 25 Aug 2015 03:34:20 +0900,
Guenter Roeck wrote:
> 
> Hi,
> 
> In linux-next as of today (0824), all h8300 builds fail for me with an internal
> compiler error.
> 
> Building h8300:allnoconfig ... failed
> --------------
> Error log:
> 
> In file included from include/linux/rcupdate.h:429:0,
>                  from include/linux/rcusync.h:5,
>                  from kernel/rcu/sync.c:1:
> include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:
> include/linux/rcutiny.h:55:20: internal compiler error: Segmentation fault
>  static inline void rcu_barrier_sched(void)
>                     ^
> 
> I tried both gcc 5.1 and 5.2, built with the patch set available to me.
> 
> Is there a more recent compiler / patch set available that might fix the problem ?
> 

No.
I tried gcc 6.0. It got same error.
It looks optimization problem on h8300 target.
I will investigate it.

> Thanks,
> Guenter

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>
--
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] | [next] | [standalone]


#1213073

FromMark Salter <msalter@redhat.com>
Date2015-08-25 16:30 +0200
Message-ID<q1noB-D2-7@gated-at.bofh.it>
In reply to#1212707
On Tue, 2015-08-25 at 14:56 +0900, Yoshinori Sato wrote:
> On Tue, 25 Aug 2015 03:34:20 +0900,
> Guenter Roeck wrote:
> > 
> > Hi,
> > 
> > In linux-next as of today (0824), all h8300 builds fail for me with an 
> > internal
> > compiler error.
> > 
> > Building h8300:allnoconfig ... failed
> > --------------
> > Error log:
> > 
> > In file included from include/linux/rcupdate.h:429:0,
> >                  from include/linux/rcusync.h:5,
> >                  from kernel/rcu/sync.c:1:
> > include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:
> > include/linux/rcutiny.h:55:20: internal compiler error: Segmentation 
> > fault
> >  static inline void rcu_barrier_sched(void)
> >                     ^
> > 
> > I tried both gcc 5.1 and 5.2, built with the patch set available to me.
> > 
> > Is there a more recent compiler / patch set available that might fix 
> > the problem ?
> > 
> 
> No.
> I tried gcc 6.0. It got same error.
> It looks optimization problem on h8300 target.
> I will investigate it.

I get the same ICE with c6x gcc 5.1

> > Thanks,
> > Guenter
> 

--
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] | [next] | [standalone]


#1213099 — Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)

FromGuenter Roeck <linux@roeck-us.net>
Date2015-08-25 17:10 +0200
SubjectRe: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Message-ID<q1o1j-1BK-1@gated-at.bofh.it>
In reply to#1213073
Hi Mark,

On 08/25/2015 07:27 AM, Mark Salter wrote:
> On Tue, 2015-08-25 at 14:56 +0900, Yoshinori Sato wrote:
>> On Tue, 25 Aug 2015 03:34:20 +0900,
>> Guenter Roeck wrote:
>>>
>>> Hi,
>>>
>>> In linux-next as of today (0824), all h8300 builds fail for me with an
>>> internal
>>> compiler error.
>>>
>>> Building h8300:allnoconfig ... failed
>>> --------------
>>> Error log:
>>>
>>> In file included from include/linux/rcupdate.h:429:0,
>>>                   from include/linux/rcusync.h:5,
>>>                   from kernel/rcu/sync.c:1:
>>> include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:
>>> include/linux/rcutiny.h:55:20: internal compiler error: Segmentation
>>> fault
>>>   static inline void rcu_barrier_sched(void)
>>>                      ^
>>>
>>> I tried both gcc 5.1 and 5.2, built with the patch set available to me.
>>>
>>> Is there a more recent compiler / patch set available that might fix
>>> the problem ?
>>>
>>
>> No.
>> I tried gcc 6.0. It got same error.
>> It looks optimization problem on h8300 target.
>> I will investigate it.
>
> I get the same ICE with c6x gcc 5.1
>

Interesting. h8300 was the only gcc 5+ compiler I had used so far.
Just for fun, I built an alpha toolchain with gcc 5.1. Same problem there.
So it looks like it isn't a h8300 problem after all, it is a gcc problem.

Updated subject line, and copied rcu maintainers.

Guenter

--
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] | [next] | [standalone]


#1213142 — Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)

FromOleg Nesterov <oleg@redhat.com>
Date2015-08-25 18:20 +0200
SubjectRe: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Message-ID<q1p74-3gB-19@gated-at.bofh.it>
In reply to#1213099
On 08/25, Guenter Roeck wrote:
>
> Hi Mark,
>
> On 08/25/2015 07:27 AM, Mark Salter wrote:
>> On Tue, 2015-08-25 at 14:56 +0900, Yoshinori Sato wrote:
>>> On Tue, 25 Aug 2015 03:34:20 +0900,
>>> Guenter Roeck wrote:
>>>>
>>>> Hi,
>>>>
>>>> In linux-next as of today (0824), all h8300 builds fail for me with an
>>>> internal
>>>> compiler error.
>>>>
>>>> Building h8300:allnoconfig ... failed
>>>> --------------
>>>> Error log:
>>>>
>>>> In file included from include/linux/rcupdate.h:429:0,
>>>>                   from include/linux/rcusync.h:5,
>>>>                   from kernel/rcu/sync.c:1:
>>>> include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:
>>>> include/linux/rcutiny.h:55:20: internal compiler error: Segmentation
>>>> fault
>>>>   static inline void rcu_barrier_sched(void)
>>>>                      ^
>>>>
>>>> I tried both gcc 5.1 and 5.2, built with the patch set available to me.
>>>>
>>>> Is there a more recent compiler / patch set available that might fix
>>>> the problem ?
>>>>
>>>
>>> No.
>>> I tried gcc 6.0. It got same error.
>>> It looks optimization problem on h8300 target.
>>> I will investigate it.
>>
>> I get the same ICE with c6x gcc 5.1
>>
>
> Interesting. h8300 was the only gcc 5+ compiler I had used so far.
> Just for fun, I built an alpha toolchain with gcc 5.1. Same problem there.
> So it looks like it isn't a h8300 problem after all, it is a gcc problem.
>
> Updated subject line, and copied rcu maintainers.

Damn. This was caused by my patch, I need to react, and I do not know
what to say ;)

OK, this is gcc bug. But we probably need the workaround, and I don't
have a h8300 machine so I can't test the fix.

Could you please try to compile kernel/rcu/sync.o with the patch below?
Just to know how "stable" this bug is. I expect the compilation should
fail again, rcutiny.h:rcu_barrier() is "inline" too.

Oleg.


--- a/kernel/rcu/sync.c
+++ b/kernel/rcu/sync.c
@@ -24,7 +24,6 @@ static const struct {
 	[RCU_SCHED_SYNC] = {
 		.sync = synchronize_sched,
 		.call = call_rcu_sched,
-		.wait = rcu_barrier_sched,
 		__INIT_HELD(rcu_read_lock_sched_held)
 	},
 	[RCU_BH_SYNC] = {

--
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] | [next] | [standalone]


#1213161 — Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)

FromOleg Nesterov <oleg@redhat.com>
Date2015-08-25 18:30 +0200
SubjectRe: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Message-ID<q1pgL-3rY-27@gated-at.bofh.it>
In reply to#1213142
On 08/25, Oleg Nesterov wrote:
>
> OK, this is gcc bug. But we probably need the workaround, and I don't
> have a h8300 machine so I can't test the fix.
>
> Could you please try to compile kernel/rcu/sync.o with the patch below?
> Just to know how "stable" this bug is. I expect the compilation should
> fail again, rcutiny.h:rcu_barrier() is "inline" too.

Wait, I reproduced the same problem on x86. Thanks.

Oleg.

--
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] | [next] | [standalone]


#1213184 — Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)

FromYoshinori Sato <ysato@users.sourceforge.jp>
Date2015-08-25 19:00 +0200
SubjectRe: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Message-ID<q1pJL-3ZR-11@gated-at.bofh.it>
In reply to#1213099
On Wed, 26 Aug 2015 00:03:35 +0900,
Guenter Roeck wrote:
> 
> Hi Mark,
> 
> On 08/25/2015 07:27 AM, Mark Salter wrote:
> > On Tue, 2015-08-25 at 14:56 +0900, Yoshinori Sato wrote:
> >> On Tue, 25 Aug 2015 03:34:20 +0900,
> >> Guenter Roeck wrote:
> >>> 
> >>> Hi,
> >>> 
> >>> In linux-next as of today (0824), all h8300 builds fail for me with an
> >>> internal
> >>> compiler error.
> >>> 
> >>> Building h8300:allnoconfig ... failed
> >>> --------------
> >>> Error log:
> >>> 
> >>> In file included from include/linux/rcupdate.h:429:0,
> >>>                   from include/linux/rcusync.h:5,
> >>>                   from kernel/rcu/sync.c:1:
> >>> include/linux/rcutiny.h: In function ‘rcu_barrier_sched’:
> >>> include/linux/rcutiny.h:55:20: internal compiler error: Segmentation
> >>> fault
> >>>   static inline void rcu_barrier_sched(void)
> >>>                      ^
> >>> 
> >>> I tried both gcc 5.1 and 5.2, built with the patch set available to me.
> >>> 
> >>> Is there a more recent compiler / patch set available that might fix
> >>> the problem ?
> >>> 
> >> 
> >> No.
> >> I tried gcc 6.0. It got same error.
> >> It looks optimization problem on h8300 target.
> >> I will investigate it.
> > 
> > I get the same ICE with c6x gcc 5.1
> > 
> 
> Interesting. h8300 was the only gcc 5+ compiler I had used so far.
> Just for fun, I built an alpha toolchain with gcc 5.1. Same problem there.
> So it looks like it isn't a h8300 problem after all, it is a gcc problem.
> 
> Updated subject line, and copied rcu maintainers.
> 
> Guenter
> 

Yes.
gcc bug #67055.
Already fixed in trunk.

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>
--
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] | [next] | [standalone]


#1213201 — Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)

FromOleg Nesterov <oleg@redhat.com>
Date2015-08-25 19:40 +0200
SubjectRe: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Message-ID<q1qmt-4Ya-3@gated-at.bofh.it>
In reply to#1213184
On 08/26, Yoshinori Sato wrote:
>
> Yes.
> gcc bug #67055.
> Already fixed in trunk.

Yes, thanks a lot.

Paul, it seems that gcc actually dislikes your ec90a194a "rcu:
Create a synchronize_rcu_mult()" commit ;) rcu/sync.c was just
lucky enough to trigger the problem.

I'll try to make the fix today...

Oleg.

--
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] | [next] | [standalone]


#1213215 — Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)

FromOleg Nesterov <oleg@redhat.com>
Date2015-08-25 20:10 +0200
SubjectRe: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Message-ID<q1qPw-5Lv-33@gated-at.bofh.it>
In reply to#1213201
On 08/25, Oleg Nesterov wrote:
>
> On 08/26, Yoshinori Sato wrote:
> >
> > Yes.
> > gcc bug #67055.
> > Already fixed in trunk.
>
> Yes, thanks a lot.
>
> Paul, it seems that gcc actually dislikes your ec90a194a "rcu:
> Create a synchronize_rcu_mult()" commit ;) rcu/sync.c was just
> lucky enough to trigger the problem.
>
> I'll try to make the fix today...

Mark, Guenter, any chance you can check if the patch below helps?
It does on x86.

Oleg.

--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -230,12 +230,11 @@ void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array,
 		   struct rcu_synchronize *rs_array);
 
 #define _wait_rcu_gp(checktiny, ...) \
-do { \
-	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \
-	const int __n = ARRAY_SIZE(__crcu_array); \
-	struct rcu_synchronize __rs_array[__n]; \
-	\
-	__wait_rcu_gp(checktiny, __n, __crcu_array, __rs_array); \
+do {									\
+	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; 		\
+	struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)];	\
+	__wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array),		\
+			__crcu_array, __rs_array); 			\
 } while (0)
 
 #define wait_rcu_gp(...) _wait_rcu_gp(false, __VA_ARGS__)

--
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] | [next] | [standalone]


#1213217 — Re: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)

FromMark Salter <msalter@redhat.com>
Date2015-08-25 20:20 +0200
SubjectRe: h8300 build failures in linux-next (in rcu code, gcc 5.x related, not limited to h8300)
Message-ID<q1qZc-5WK-7@gated-at.bofh.it>
In reply to#1213215
On Tue, 2015-08-25 at 20:02 +0200, Oleg Nesterov wrote:
> On 08/25, Oleg Nesterov wrote:
> > 
> > On 08/26, Yoshinori Sato wrote:
> > > 
> > > Yes.
> > > gcc bug #67055.
> > > Already fixed in trunk.
> > 
> > Yes, thanks a lot.
> > 
> > Paul, it seems that gcc actually dislikes your ec90a194a "rcu:
> > Create a synchronize_rcu_mult()" commit ;) rcu/sync.c was just
> > lucky enough to trigger the problem.
> > 
> > I'll try to make the fix today...
> 
> Mark, Guenter, any chance you can check if the patch below helps?
> It does on x86.

Works for c6x.

> 
> Oleg.
> 
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -230,12 +230,11 @@ void __wait_rcu_gp(bool checktiny, int n, 
> call_rcu_func_t *crcu_array,
>  		   struct rcu_synchronize *rs_array);
>  
>  #define _wait_rcu_gp(checktiny, ...) \
> -do { \
> -	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \
> -	const int __n = ARRAY_SIZE(__crcu_array); \
> -	struct rcu_synchronize __rs_array[__n]; \
> -	\
> -	__wait_rcu_gp(checktiny, __n, __crcu_array, __rs_array); \
> +do {									
> \
> +	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; 		
> \
> +	struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)];	
> \
> +	__wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array),		
> \
> +			__crcu_array, __rs_array); 			
> \
>  } while (0)
>  
>  #define wait_rcu_gp(...) _wait_rcu_gp(false, __VA_ARGS__)
> 

--
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] | [next] | [standalone]


#1213242 — [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug

FromOleg Nesterov <oleg@redhat.com>
Date2015-08-25 20:50 +0200
Subject[PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug
Message-ID<q1rse-6uO-21@gated-at.bofh.it>
In reply to#1213099
The code like

	const int n = const-expr;
	whatever_t array[n];

in inline function can confuse gcc, see

	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67055#c13

This leads to

	In file included from include/linux/rcupdate.h:429:0,
			  from include/linux/rcusync.h:5,
			  from kernel/rcu/sync.c:1:
	include/linux/rcutiny.h: In function 'rcu_barrier_sched':
	include/linux/rcutiny.h:55:20: internal compiler error: Segmentation
	fault
	  static inline void rcu_barrier_sched(void)

build failure after ec90a194a "rcu: Create a synchronize_rcu_mult()"
and 114b7fd4b "rcu: Create rcu_sync infrastructure" meet each other.

Reported-and-tested-by: Mark Salter <msalter@redhat.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 include/linux/rcupdate.h | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index ff47651..c353c2b 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -230,12 +230,11 @@ void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array,
 		   struct rcu_synchronize *rs_array);
 
 #define _wait_rcu_gp(checktiny, ...) \
-do { \
-	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \
-	const int __n = ARRAY_SIZE(__crcu_array); \
-	struct rcu_synchronize __rs_array[__n]; \
-	\
-	__wait_rcu_gp(checktiny, __n, __crcu_array, __rs_array); \
+do {									\
+	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; 		\
+	struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)];	\
+	__wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array),		\
+			__crcu_array, __rs_array); 			\
 } while (0)
 
 #define wait_rcu_gp(...) _wait_rcu_gp(false, __VA_ARGS__)
-- 
2.4.3


--
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] | [next] | [standalone]


#1213250 — Re: [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug

From"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Date2015-08-25 21:10 +0200
SubjectRe: [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug
Message-ID<q1rLz-77n-15@gated-at.bofh.it>
In reply to#1213242
On Tue, Aug 25, 2015 at 08:45:18PM +0200, Oleg Nesterov wrote:
> The code like
> 
> 	const int n = const-expr;
> 	whatever_t array[n];
> 
> in inline function can confuse gcc, see
> 
> 	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67055#c13
> 
> This leads to
> 
> 	In file included from include/linux/rcupdate.h:429:0,
> 			  from include/linux/rcusync.h:5,
> 			  from kernel/rcu/sync.c:1:
> 	include/linux/rcutiny.h: In function 'rcu_barrier_sched':
> 	include/linux/rcutiny.h:55:20: internal compiler error: Segmentation
> 	fault
> 	  static inline void rcu_barrier_sched(void)
> 
> build failure after ec90a194a "rcu: Create a synchronize_rcu_mult()"
> and 114b7fd4b "rcu: Create rcu_sync infrastructure" meet each other.
> 
> Reported-and-tested-by: Mark Salter <msalter@redhat.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>

Ouch!!!  Queued for testing, in the absence of problems, will push into
the upcoming merge window.

Thank you all for the testing and the fix!

							Thanx, Paul

> ---
>  include/linux/rcupdate.h | 11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index ff47651..c353c2b 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -230,12 +230,11 @@ void __wait_rcu_gp(bool checktiny, int n, call_rcu_func_t *crcu_array,
>  		   struct rcu_synchronize *rs_array);
> 
>  #define _wait_rcu_gp(checktiny, ...) \
> -do { \
> -	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; \
> -	const int __n = ARRAY_SIZE(__crcu_array); \
> -	struct rcu_synchronize __rs_array[__n]; \
> -	\
> -	__wait_rcu_gp(checktiny, __n, __crcu_array, __rs_array); \
> +do {									\
> +	call_rcu_func_t __crcu_array[] = { __VA_ARGS__ }; 		\
> +	struct rcu_synchronize __rs_array[ARRAY_SIZE(__crcu_array)];	\
> +	__wait_rcu_gp(checktiny, ARRAY_SIZE(__crcu_array),		\
> +			__crcu_array, __rs_array); 			\
>  } while (0)
> 
>  #define wait_rcu_gp(...) _wait_rcu_gp(false, __VA_ARGS__)
> -- 
> 2.4.3
> 
> 

--
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] | [next] | [standalone]


#1213251 — Re: [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug

FromOleg Nesterov <oleg@redhat.com>
Date2015-08-25 21:10 +0200
SubjectRe: [PATCH] rcu: change _wait_rcu_gp() to work around gcc 67055 bug
Message-ID<q1rLA-77n-21@gated-at.bofh.it>
In reply to#1213242
On 08/25, Oleg Nesterov wrote:
>
> The code like
> 
> 	const int n = const-expr;
> 	whatever_t array[n];
> 
> in inline function can confuse gcc, see
> 
> 	https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67055#c13
> 
> This leads to
> 
> 	In file included from include/linux/rcupdate.h:429:0,
> 			  from include/linux/rcusync.h:5,
> 			  from kernel/rcu/sync.c:1:
> 	include/linux/rcutiny.h: In function 'rcu_barrier_sched':
> 	include/linux/rcutiny.h:55:20: internal compiler error: Segmentation
> 	fault
> 	  static inline void rcu_barrier_sched(void)
> 
> build failure after ec90a194a "rcu: Create a synchronize_rcu_mult()"
> and 114b7fd4b "rcu: Create rcu_sync infrastructure" meet each other.

and just in case... make make kernel/rcu/rcutorture.o fails the same
way if CONFIG_RCU_TORTURE_TEST && CONFIG_TINY_RCU. So we need a work-
around even before/without rcu_sync.

Oleg.

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