diff mbox series

mesa: Disable asm on musl

Message ID 20181002191136.8792-1-raj.khem@gmail.com
State Superseded
Headers show
Series mesa: Disable asm on musl | expand

Commit Message

Khem Raj Oct. 2, 2018, 7:11 p.m. UTC
some unknown part of mesa's x86 assembly
code is broken by readonly text segments

[ YOCTO #12918 ]

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.19.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Ross Burton Oct. 2, 2018, 7:27 p.m. UTC | #1
Isn't this a bit overkill?  Is the assembler actually broken?

Ross
On Tue, 2 Oct 2018 at 20:21, Khem Raj <raj.khem@gmail.com> wrote:
>

> some unknown part of mesa's x86 assembly

> code is broken by readonly text segments

>

> [ YOCTO #12918 ]

>

> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> ---

>  meta/recipes-graphics/mesa/mesa.inc | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc

> index 8d0e2cb67c..e6f3712706 100644

> --- a/meta/recipes-graphics/mesa/mesa.inc

> +++ b/meta/recipes-graphics/mesa/mesa.inc

> @@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"

>  PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"

>

>  EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"

> -EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"

> +EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"

>  # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)

>  FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"

>

> --

> 2.19.0

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Oct. 2, 2018, 7:37 p.m. UTC | #2
I think it is. The way th calls are set for performance reasons seems to be
causing this
Ideally we should ensure to use right dialect for  tls calls I think musl
is exposing a bug in Mesa
Which we covered by disabling tls in Glx once we disable that then this
problem pops up so we disable ASM

So this is a workaround until then

On Tue, Oct 2, 2018 at 12:28 PM Burton, Ross <ross.burton@intel.com> wrote:

> Isn't this a bit overkill?  Is the assembler actually broken?

>

> Ross

> On Tue, 2 Oct 2018 at 20:21, Khem Raj <raj.khem@gmail.com> wrote:

> >

> > some unknown part of mesa's x86 assembly

> > code is broken by readonly text segments

> >

> > [ YOCTO #12918 ]

> >

> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> > ---

> >  meta/recipes-graphics/mesa/mesa.inc | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> >

> > diff --git a/meta/recipes-graphics/mesa/mesa.inc

> b/meta/recipes-graphics/mesa/mesa.inc

> > index 8d0e2cb67c..e6f3712706 100644

> > --- a/meta/recipes-graphics/mesa/mesa.inc

> > +++ b/meta/recipes-graphics/mesa/mesa.inc

> > @@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] =

> "--enable-${OSMESA},--disable-${OSMESA}"

> >  PACKAGECONFIG[unwind] =

> "--enable-libunwind,--disable-libunwind,libunwind"

> >

> >  EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"

> > -EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"

> > +EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"

> >  # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)

> >  FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"

> >

> > --

> > 2.19.0

> >

> > --

> > _______________________________________________

> > Openembedded-core mailing list

> > Openembedded-core@lists.openembedded.org

> > http://lists.openembedded.org/mailman/listinfo/openembedded-core

>
<div><div dir="auto">I think it is. The way th calls are set for performance reasons seems to be causing this</div></div><div dir="auto">Ideally we should ensure to use right dialect for  tls calls I think musl is exposing a bug in Mesa </div><div dir="auto">Which we covered by disabling tls in Glx once we disable that then this problem pops up so we disable ASM </div><div dir="auto"><br></div><div dir="auto">So this is a workaround until then </div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 2, 2018 at 12:28 PM Burton, Ross &lt;<a href="mailto:ross.burton@intel.com">ross.burton@intel.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Isn&#39;t this a bit overkill?  Is the assembler actually broken?<br>
<br>
Ross<br>
On Tue, 2 Oct 2018 at 20:21, Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; some unknown part of mesa&#39;s x86 assembly<br>
&gt; code is broken by readonly text segments<br>
&gt;<br>
&gt; [ YOCTO #12918 ]<br>
&gt;<br>
&gt; Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt;  meta/recipes-graphics/mesa/mesa.inc | 2 +-<br>
&gt;  1 file changed, 1 insertion(+), 1 deletion(-)<br>
&gt;<br>
&gt; diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc<br>
&gt; index 8d0e2cb67c..e6f3712706 100644<br>
&gt; --- a/meta/recipes-graphics/mesa/mesa.inc<br>
&gt; +++ b/meta/recipes-graphics/mesa/mesa.inc<br>
&gt; @@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] = &quot;--enable-${OSMESA},--disable-${OSMESA}&quot;<br>
&gt;  PACKAGECONFIG[unwind] = &quot;--enable-libunwind,--disable-libunwind,libunwind&quot;<br>
&gt;<br>
&gt;  EXTRA_OECONF_remove_libc-musl = &quot;--enable-glx-tls&quot;<br>
&gt; -EXTRA_OECONF_append_libc-musl = &quot; --disable-glx-tls&quot;<br>
&gt; +EXTRA_OECONF_append_libc-musl = &quot; --disable-asm --disable-glx-tls&quot;<br>
&gt;  # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)<br>
&gt;  FULL_OPTIMIZATION_append = &quot; -fno-omit-frame-pointer&quot;<br>
&gt;<br>
&gt; --<br>
&gt; 2.19.0<br>
&gt;<br>
&gt; --<br>
&gt; _______________________________________________<br>
&gt; Openembedded-core mailing list<br>
&gt; <a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openembedded.org</a><br>
&gt; <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a><br>
</blockquote></div></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Ross Burton Oct. 2, 2018, 8:42 p.m. UTC | #3
Can you file a bug with mesa so we don't forget and Mesa knows?

Ross
On Tue, 2 Oct 2018 at 20:37, Khem Raj <raj.khem@gmail.com> wrote:
>

> I think it is. The way th calls are set for performance reasons seems to be causing this

> Ideally we should ensure to use right dialect for  tls calls I think musl is exposing a bug in Mesa

> Which we covered by disabling tls in Glx once we disable that then this problem pops up so we disable ASM

>

> So this is a workaround until then

>

> On Tue, Oct 2, 2018 at 12:28 PM Burton, Ross <ross.burton@intel.com> wrote:

>>

>> Isn't this a bit overkill?  Is the assembler actually broken?

>>

>> Ross

>> On Tue, 2 Oct 2018 at 20:21, Khem Raj <raj.khem@gmail.com> wrote:

>> >

>> > some unknown part of mesa's x86 assembly

>> > code is broken by readonly text segments

>> >

>> > [ YOCTO #12918 ]

>> >

>> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

>> > ---

>> >  meta/recipes-graphics/mesa/mesa.inc | 2 +-

>> >  1 file changed, 1 insertion(+), 1 deletion(-)

>> >

>> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc

>> > index 8d0e2cb67c..e6f3712706 100644

>> > --- a/meta/recipes-graphics/mesa/mesa.inc

>> > +++ b/meta/recipes-graphics/mesa/mesa.inc

>> > @@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"

>> >  PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"

>> >

>> >  EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"

>> > -EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"

>> > +EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"

>> >  # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)

>> >  FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"

>> >

>> > --

>> > 2.19.0

>> >

>> > --

>> > _______________________________________________

>> > Openembedded-core mailing list

>> > Openembedded-core@lists.openembedded.org

>> > http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Oct. 2, 2018, 8:58 p.m. UTC | #4
Yes, will do. I think it will need some time since this needs to be
well explained so mesa devs can see the reasoning behind it
On Tue, Oct 2, 2018 at 1:42 PM Burton, Ross <ross.burton@intel.com> wrote:
>

> Can you file a bug with mesa so we don't forget and Mesa knows?

>

> Ross

> On Tue, 2 Oct 2018 at 20:37, Khem Raj <raj.khem@gmail.com> wrote:

> >

> > I think it is. The way th calls are set for performance reasons seems to be causing this

> > Ideally we should ensure to use right dialect for  tls calls I think musl is exposing a bug in Mesa

> > Which we covered by disabling tls in Glx once we disable that then this problem pops up so we disable ASM

> >

> > So this is a workaround until then

> >

> > On Tue, Oct 2, 2018 at 12:28 PM Burton, Ross <ross.burton@intel.com> wrote:

> >>

> >> Isn't this a bit overkill?  Is the assembler actually broken?

> >>

> >> Ross

> >> On Tue, 2 Oct 2018 at 20:21, Khem Raj <raj.khem@gmail.com> wrote:

> >> >

> >> > some unknown part of mesa's x86 assembly

> >> > code is broken by readonly text segments

> >> >

> >> > [ YOCTO #12918 ]

> >> >

> >> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> >> > ---

> >> >  meta/recipes-graphics/mesa/mesa.inc | 2 +-

> >> >  1 file changed, 1 insertion(+), 1 deletion(-)

> >> >

> >> > diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc

> >> > index 8d0e2cb67c..e6f3712706 100644

> >> > --- a/meta/recipes-graphics/mesa/mesa.inc

> >> > +++ b/meta/recipes-graphics/mesa/mesa.inc

> >> > @@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"

> >> >  PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"

> >> >

> >> >  EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"

> >> > -EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"

> >> > +EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"

> >> >  # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)

> >> >  FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"

> >> >

> >> > --

> >> > 2.19.0

> >> >

> >> > --

> >> > _______________________________________________

> >> > Openembedded-core mailing list

> >> > Openembedded-core@lists.openembedded.org

> >> > http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Paul Eggleton Oct. 2, 2018, 9:19 p.m. UTC | #5
Can we have bit more detail in the commit message about what the issues are? 
We're not supposed to rely solely on a bug report reference to do that; also 
if it's considered a workaround and we're working with upstream to fix it, the 
commit message should state that as well.

Thanks
Paul

On Wednesday, 3 October 2018 8:37:10 AM NZDT Khem Raj wrote:
> I think it is. The way th calls are set for performance reasons seems to be

> causing this

> Ideally we should ensure to use right dialect for  tls calls I think musl

> is exposing a bug in Mesa

> Which we covered by disabling tls in Glx once we disable that then this

> problem pops up so we disable ASM

> 

> So this is a workaround until then

> 

> On Tue, Oct 2, 2018 at 12:28 PM Burton, Ross <ross.burton@intel.com> wrote:

> 

> > Isn't this a bit overkill?  Is the assembler actually broken?

> >

> > Ross

> > On Tue, 2 Oct 2018 at 20:21, Khem Raj <raj.khem@gmail.com> wrote:

> > >

> > > some unknown part of mesa's x86 assembly

> > > code is broken by readonly text segments

> > >

> > > [ YOCTO #12918 ]

> > >

> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> > > ---

> > >  meta/recipes-graphics/mesa/mesa.inc | 2 +-

> > >  1 file changed, 1 insertion(+), 1 deletion(-)

> > >

> > > diff --git a/meta/recipes-graphics/mesa/mesa.inc

> > b/meta/recipes-graphics/mesa/mesa.inc

> > > index 8d0e2cb67c..e6f3712706 100644

> > > --- a/meta/recipes-graphics/mesa/mesa.inc

> > > +++ b/meta/recipes-graphics/mesa/mesa.inc

> > > @@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] =

> > "--enable-${OSMESA},--disable-${OSMESA}"

> > >  PACKAGECONFIG[unwind] =

> > "--enable-libunwind,--disable-libunwind,libunwind"

> > >

> > >  EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"

> > > -EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"

> > > +EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"

> > >  # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)

> > >  FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"

> > >

> > > --

> > > 2.19.0

> > >

> > > --

> > > _______________________________________________

> > > Openembedded-core mailing list

> > > Openembedded-core@lists.openembedded.org

> > > http://lists.openembedded.org/mailman/listinfo/openembedded-core

> >

> 



-- 

Paul Eggleton
Intel Open Source Technology Centre


-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 8d0e2cb67c..e6f3712706 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -107,7 +107,7 @@  PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
 PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
 
 EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
-EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
+EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"