* gcc-4.6.0 generates no code for sub_preempt_count()
@ 2011-04-13 19:50 Richard Weinberger
2011-04-14 7:49 ` Mikael Pettersson
2011-04-14 14:43 ` masterkom masterkom
0 siblings, 2 replies; 8+ messages in thread
From: Richard Weinberger @ 2011-04-13 19:50 UTC (permalink / raw)
To: linux-kernel; +Cc: user-mode-linux-devel
Hi,
I'm facing a very strange issue with gcc-4.6.0 and UML.
Within __local_bh_enable() gcc generates no code for sub_preempt_count().
See:
http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc460.txt
vs.
http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc431.txt
Interestingly it generates code for add_preempt_count().
I can reproduce this on x86 and x86_64.
The problem has to do with UML's current_thread_info() function.
When I replace it with arch/x86's (unportable) variant gcc generates code.
Any ideas whether this is a gcc or a kernel issue?
Thanks,
//richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gcc-4.6.0 generates no code for sub_preempt_count()
2011-04-13 19:50 gcc-4.6.0 generates no code for sub_preempt_count() Richard Weinberger
@ 2011-04-14 7:49 ` Mikael Pettersson
2011-04-14 13:52 ` Richard Weinberger
2011-04-14 14:43 ` masterkom masterkom
1 sibling, 1 reply; 8+ messages in thread
From: Mikael Pettersson @ 2011-04-14 7:49 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-kernel, user-mode-linux-devel
Richard Weinberger writes:
> Hi,
>
> I'm facing a very strange issue with gcc-4.6.0 and UML.
> Within __local_bh_enable() gcc generates no code for sub_preempt_count().
>
> See:
> http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc460.txt
> vs.
> http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc431.txt
>
> Interestingly it generates code for add_preempt_count().
> I can reproduce this on x86 and x86_64.
>
> The problem has to do with UML's current_thread_info() function.
> When I replace it with arch/x86's (unportable) variant gcc generates code.
>
> Any ideas whether this is a gcc or a kernel issue?
Please provide a standalone test case.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gcc-4.6.0 generates no code for sub_preempt_count()
2011-04-14 7:49 ` Mikael Pettersson
@ 2011-04-14 13:52 ` Richard Weinberger
2011-04-14 19:50 ` James McMechan
0 siblings, 1 reply; 8+ messages in thread
From: Richard Weinberger @ 2011-04-14 13:52 UTC (permalink / raw)
To: Mikael Pettersson; +Cc: linux-kernel, user-mode-linux-devel
Am Donnerstag 14 April 2011, 09:49:14 schrieb Mikael Pettersson:
> Richard Weinberger writes:
> > Hi,
> >
> > I'm facing a very strange issue with gcc-4.6.0 and UML.
> > Within __local_bh_enable() gcc generates no code for
> > sub_preempt_count().
> >
> > See:
> > http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc460.txt
> > vs.
> > http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc431.txt
> >
> > Interestingly it generates code for add_preempt_count().
> > I can reproduce this on x86 and x86_64.
> >
> > The problem has to do with UML's current_thread_info() function.
> > When I replace it with arch/x86's (unportable) variant gcc generates
> > code.
> >
> > Any ideas whether this is a gcc or a kernel issue?
>
> Please provide a standalone test case.
There you go!
http://userweb.kernel.org/~rw/uml-gcc460/testcase.c
Thanks,
//richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gcc-4.6.0 generates no code for sub_preempt_count()
2011-04-13 19:50 gcc-4.6.0 generates no code for sub_preempt_count() Richard Weinberger
2011-04-14 7:49 ` Mikael Pettersson
@ 2011-04-14 14:43 ` masterkom masterkom
2011-04-14 15:17 ` Frank Kingswood
1 sibling, 1 reply; 8+ messages in thread
From: masterkom masterkom @ 2011-04-14 14:43 UTC (permalink / raw)
To: Richard Weinberger; +Cc: linux-kernel, user-mode-linux-devel
Hi,, I have the project to make Operating System using linux kernel.
That system is multiplatform, which is combine linux and window . This
project hope All people that who has familiar with windows can use
this operating system without sin. This project is free..
I hape there people can help us to done this project ,, thx,,,
On 4/14/11, Richard Weinberger <richard@nod.at> wrote:
> Hi,
>
> I'm facing a very strange issue with gcc-4.6.0 and UML.
> Within __local_bh_enable() gcc generates no code for sub_preempt_count().
>
> See:
> http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc460.txt
> vs.
> http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc431.txt
>
> Interestingly it generates code for add_preempt_count().
> I can reproduce this on x86 and x86_64.
>
> The problem has to do with UML's current_thread_info() function.
> When I replace it with arch/x86's (unportable) variant gcc generates code.
>
> Any ideas whether this is a gcc or a kernel issue?
> Thanks,
> //richard
> --
> 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/
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: gcc-4.6.0 generates no code for sub_preempt_count()
2011-04-14 14:43 ` masterkom masterkom
@ 2011-04-14 15:17 ` Frank Kingswood
0 siblings, 0 replies; 8+ messages in thread
From: Frank Kingswood @ 2011-04-14 15:17 UTC (permalink / raw)
To: linux-kernel
On 14/04/11 15:43, masterkom masterkom wrote:
> Hi,, I have the project to make Operating System using linux kernel.
> That system is multiplatform, which is combine linux and window . This
> project hope All people that who has familiar with windows can use
> this operating system without sin. This project is free..
Well, good luck with that.
There was this Finish guy who wanted to do this, never heard from him again.
Frank
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [uml-devel] gcc-4.6.0 generates no code for sub_preempt_count()
2011-04-14 13:52 ` Richard Weinberger
@ 2011-04-14 19:50 ` James McMechan
0 siblings, 0 replies; 8+ messages in thread
From: James McMechan @ 2011-04-14 19:50 UTC (permalink / raw)
To: richard, mikpe; +Cc: linux-kernel, uml devel
> Am Donnerstag 14 April 2011, 09:49:14 schrieb Mikael Pettersson:
> > Richard Weinberger writes:
> > > Hi,
> > >
> > > I'm facing a very strange issue with gcc-4.6.0 and UML.
> > > Within __local_bh_enable() gcc generates no code for
> > > sub_preempt_count().
> > >
> > > See:
> > > http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc460.txt
> > > vs.
> > > http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc431.txt
> > >
> > > Interestingly it generates code for add_preempt_count().
> > > I can reproduce this on x86 and x86_64.
> > >
> > > The problem has to do with UML's current_thread_info() function.
> > > When I replace it with arch/x86's (unportable) variant gcc generates
> > > code.
> > >
> > > Any ideas whether this is a gcc or a kernel issue?
It looks like a gcc error with one of the optimization passes
> > Please provide a standalone test case.
>
> There you go!
> http://userweb.kernel.org/~rw/uml-gcc460/testcase.c
Replacing inline with __attribute__((noinline)) makes it produce code again
without requiring asm("esp")/asm("rsp") tricks and the code appears to be working
I think gcc is assuming only low bits in the address of stack vars and thought they
were all masked out :( with this change my test version of gcc-4.6.0 works for x86/amd64
I have not yet gotten 4.6.0 to install yet so I was testing with xgcc from the failed build
--- testcase.orig 2011-04-14 08:34:24.000000000 -0700
+++ testcase.c 2011-04-14 12:17:44.000000000 -0700
@@ -31,7 +31,7 @@
}
#else
/* UML */
-static inline struct thread_info *current_thread_info(void)
+static __attribute__((noinline)) struct thread_info *current_thread_info(void)
{
struct thread_info *ti;
unsigned long mask = THREAD_SIZE - 1;>
> Thanks,
> //richard
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] gcc-4.6.0 generates no code for sub_preempt_count()
@ 2011-04-14 19:50 ` James McMechan
0 siblings, 0 replies; 8+ messages in thread
From: James McMechan @ 2011-04-14 19:50 UTC (permalink / raw)
To: richard, mikpe; +Cc: linux-kernel, uml devel
> Am Donnerstag 14 April 2011, 09:49:14 schrieb Mikael Pettersson:
> > Richard Weinberger writes:
> > > Hi,
> > >
> > > I'm facing a very strange issue with gcc-4.6.0 and UML.
> > > Within __local_bh_enable() gcc generates no code for
> > > sub_preempt_count().
> > >
> > > See:
> > > http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc460.txt
> > > vs.
> > > http://userweb.kernel.org/~rw/uml-gcc460/__local_bh_enable-gcc431.txt
> > >
> > > Interestingly it generates code for add_preempt_count().
> > > I can reproduce this on x86 and x86_64.
> > >
> > > The problem has to do with UML's current_thread_info() function.
> > > When I replace it with arch/x86's (unportable) variant gcc generates
> > > code.
> > >
> > > Any ideas whether this is a gcc or a kernel issue?
It looks like a gcc error with one of the optimization passes
> > Please provide a standalone test case.
>
> There you go!
> http://userweb.kernel.org/~rw/uml-gcc460/testcase.c
Replacing inline with __attribute__((noinline)) makes it produce code again
without requiring asm("esp")/asm("rsp") tricks and the code appears to be working
I think gcc is assuming only low bits in the address of stack vars and thought they
were all masked out :( with this change my test version of gcc-4.6.0 works for x86/amd64
I have not yet gotten 4.6.0 to install yet so I was testing with xgcc from the failed build
--- testcase.orig 2011-04-14 08:34:24.000000000 -0700
+++ testcase.c 2011-04-14 12:17:44.000000000 -0700
@@ -31,7 +31,7 @@
}
#else
/* UML */
-static inline struct thread_info *current_thread_info(void)
+static __attribute__((noinline)) struct thread_info *current_thread_info(void)
{
struct thread_info *ti;
unsigned long mask = THREAD_SIZE - 1;>
> Thanks,
> //richard
------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve
application availability and disaster protection. Learn more about boosting
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [uml-devel] gcc-4.6.0 generates no code for sub_preempt_count()
2011-04-14 19:50 ` James McMechan
(?)
@ 2011-04-15 15:17 ` Richard Weinberger
-1 siblings, 0 replies; 8+ messages in thread
From: Richard Weinberger @ 2011-04-15 15:17 UTC (permalink / raw)
To: James McMechan; +Cc: mikpe, linux-kernel, uml devel
Am Donnerstag 14 April 2011, 21:50:13 schrieb James McMechan:
> > > > Any ideas whether this is a gcc or a kernel issue?
>
> It looks like a gcc error with one of the optimization passes
I've submitted a bug report.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48623
Thanks,
//richard
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-04-15 15:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-13 19:50 gcc-4.6.0 generates no code for sub_preempt_count() Richard Weinberger
2011-04-14 7:49 ` Mikael Pettersson
2011-04-14 13:52 ` Richard Weinberger
2011-04-14 19:50 ` [uml-devel] " James McMechan
2011-04-14 19:50 ` James McMechan
2011-04-15 15:17 ` Richard Weinberger
2011-04-14 14:43 ` masterkom masterkom
2011-04-14 15:17 ` Frank Kingswood
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.