All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
@ 2018-05-18 22:50 Andre McCurdy
  2018-05-18 23:40 ` Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Andre McCurdy @ 2018-05-18 22:50 UTC (permalink / raw)
  To: openembedded-core

Although there may still be specific cases which can benefit from the
ARM instruction set, the Thumb2 instruction set is generally a better
default for armv7a class CPUs. Distros such as Debian and Fedora have
been targeting Thumb2 by default for some time.

Note that setting ARM_INSTRUCTION_SET has no effect unless
TUNE_FEATURES contains "thumb" (which is controlled by the "t" suffix
in DEFAULTTUNE, e.g. armv7vehf-neon -vs- armv7vethf-neon, etc) so out
of tree machine configs may need to update their DEFAULTTUNE to take
advantage of this change.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 meta/conf/machine/include/arm/arch-armv7a.inc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/conf/machine/include/arm/arch-armv7a.inc b/meta/conf/machine/include/arm/arch-armv7a.inc
index bad1c27..a2663d8 100644
--- a/meta/conf/machine/include/arm/arch-armv7a.inc
+++ b/meta/conf/machine/include/arm/arch-armv7a.inc
@@ -1,4 +1,5 @@
 DEFAULTTUNE ?= "armv7athf"
+ARM_INSTRUCTION_SET ?= "thumb"
 
 TUNEVALID[armv7a] = "Enable instructions for ARMv7-a"
 TUNECONFLICTS[armv7a] = "armv4 armv5 armv6 armv7"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-05-18 22:50 [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above Andre McCurdy
@ 2018-05-18 23:40 ` Khem Raj
  2018-05-19  5:42   ` Martin Jansa
  0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2018-05-18 23:40 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1674 bytes --]

On Fri, May 18, 2018 at 3:50 PM Andre McCurdy <armccurdy@gmail.com> wrote:

> Although there may still be specific cases which can benefit from the
> ARM instruction set, the Thumb2 instruction set is generally a better
> default for armv7a class CPUs. Distros such as Debian and Fedora have
> been targeting Thumb2 by default for some time.
>
> Note that setting ARM_INSTRUCTION_SET has no effect unless
> TUNE_FEATURES contains "thumb" (which is controlled by the "t" suffix
> in DEFAULTTUNE, e.g. armv7vehf-neon -vs- armv7vethf-neon, etc) so out
> of tree machine configs may need to update their DEFAULTTUNE to take
> advantage of this change.



I think this is a good change and we shoudl take it in thumb2 is default
ISA
for other major distros as well

Oe based distros who ship feeds might be affected

>
>
> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> ---
>  meta/conf/machine/include/arm/arch-armv7a.inc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/conf/machine/include/arm/arch-armv7a.inc
> b/meta/conf/machine/include/arm/arch-armv7a.inc
> index bad1c27..a2663d8 100644
> --- a/meta/conf/machine/include/arm/arch-armv7a.inc
> +++ b/meta/conf/machine/include/arm/arch-armv7a.inc
> @@ -1,4 +1,5 @@
>  DEFAULTTUNE ?= "armv7athf"
> +ARM_INSTRUCTION_SET ?= "thumb"
>
>  TUNEVALID[armv7a] = "Enable instructions for ARMv7-a"
>  TUNECONFLICTS[armv7a] = "armv4 armv5 armv6 armv7"
> --
> 1.9.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 2538 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-05-18 23:40 ` Khem Raj
@ 2018-05-19  5:42   ` Martin Jansa
  2018-05-19  6:48     ` Andre McCurdy
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Jansa @ 2018-05-19  5:42 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2212 bytes --]

This variable was always meant to be used from DISTRO config, why not add
it to:
oe-core/meta/conf/distro/include/default-distrovars.inc
or
oe-core/meta/conf/distro/include/tcmode-default.inc

?

On Sat, May 19, 2018 at 1:40 AM Khem Raj <raj.khem@gmail.com> wrote:

>
> On Fri, May 18, 2018 at 3:50 PM Andre McCurdy <armccurdy@gmail.com> wrote:
>
>> Although there may still be specific cases which can benefit from the
>> ARM instruction set, the Thumb2 instruction set is generally a better
>> default for armv7a class CPUs. Distros such as Debian and Fedora have
>> been targeting Thumb2 by default for some time.
>>
>> Note that setting ARM_INSTRUCTION_SET has no effect unless
>> TUNE_FEATURES contains "thumb" (which is controlled by the "t" suffix
>> in DEFAULTTUNE, e.g. armv7vehf-neon -vs- armv7vethf-neon, etc) so out
>> of tree machine configs may need to update their DEFAULTTUNE to take
>> advantage of this change.
>
>
>
> I think this is a good change and we shoudl take it in thumb2 is default
> ISA
> for other major distros as well
>
> Oe based distros who ship feeds might be affected
>
>>
>>
>> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
>> ---
>>  meta/conf/machine/include/arm/arch-armv7a.inc | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/meta/conf/machine/include/arm/arch-armv7a.inc
>> b/meta/conf/machine/include/arm/arch-armv7a.inc
>> index bad1c27..a2663d8 100644
>> --- a/meta/conf/machine/include/arm/arch-armv7a.inc
>> +++ b/meta/conf/machine/include/arm/arch-armv7a.inc
>> @@ -1,4 +1,5 @@
>>  DEFAULTTUNE ?= "armv7athf"
>> +ARM_INSTRUCTION_SET ?= "thumb"
>>
>>  TUNEVALID[armv7a] = "Enable instructions for ARMv7-a"
>>  TUNECONFLICTS[armv7a] = "armv4 armv5 armv6 armv7"
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> 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
>

[-- Attachment #2: Type: text/html, Size: 3526 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-05-19  5:42   ` Martin Jansa
@ 2018-05-19  6:48     ` Andre McCurdy
  2018-05-19  7:11       ` Martin Jansa
  0 siblings, 1 reply; 12+ messages in thread
From: Andre McCurdy @ 2018-05-19  6:48 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Fri, May 18, 2018 at 10:42 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> This variable was always meant to be used from DISTRO config

I'm not sure if that's true. Do you have a reference?

>, why not add it
> to:
> oe-core/meta/conf/distro/include/default-distrovars.inc
> or
> oe-core/meta/conf/distro/include/tcmode-default.inc
>
> ?

Because then it would either apply to all ARM machines, including
those which only support Thumb1, which isn't ideal. Keeping it as part
of the machine config makes it easy to apply selectively to armv7a and
above where we know it's safe and desirable. Distros can of course
still over-ride (ie the machine only sets a weak default).

Is there a specific problem you see with the current patch?

> On Sat, May 19, 2018 at 1:40 AM Khem Raj <raj.khem@gmail.com> wrote:
>>
>>
>> On Fri, May 18, 2018 at 3:50 PM Andre McCurdy <armccurdy@gmail.com> wrote:
>>>
>>> Although there may still be specific cases which can benefit from the
>>> ARM instruction set, the Thumb2 instruction set is generally a better
>>> default for armv7a class CPUs. Distros such as Debian and Fedora have
>>> been targeting Thumb2 by default for some time.
>>>
>>> Note that setting ARM_INSTRUCTION_SET has no effect unless
>>> TUNE_FEATURES contains "thumb" (which is controlled by the "t" suffix
>>> in DEFAULTTUNE, e.g. armv7vehf-neon -vs- armv7vethf-neon, etc) so out
>>> of tree machine configs may need to update their DEFAULTTUNE to take
>>> advantage of this change.
>>
>>
>>
>> I think this is a good change and we shoudl take it in thumb2 is default
>> ISA
>> for other major distros as well
>>
>> Oe based distros who ship feeds might be affected
>>>
>>>
>>>
>>> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
>>> ---
>>>  meta/conf/machine/include/arm/arch-armv7a.inc | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/meta/conf/machine/include/arm/arch-armv7a.inc
>>> b/meta/conf/machine/include/arm/arch-armv7a.inc
>>> index bad1c27..a2663d8 100644
>>> --- a/meta/conf/machine/include/arm/arch-armv7a.inc
>>> +++ b/meta/conf/machine/include/arm/arch-armv7a.inc
>>> @@ -1,4 +1,5 @@
>>>  DEFAULTTUNE ?= "armv7athf"
>>> +ARM_INSTRUCTION_SET ?= "thumb"
>>>
>>>  TUNEVALID[armv7a] = "Enable instructions for ARMv7-a"
>>>  TUNECONFLICTS[armv7a] = "armv4 armv5 armv6 armv7"
>>> --
>>> 1.9.1
>>>
>>> --
>>> _______________________________________________
>>> 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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-05-19  6:48     ` Andre McCurdy
@ 2018-05-19  7:11       ` Martin Jansa
  2018-05-19  7:31         ` Andre McCurdy
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Jansa @ 2018-05-19  7:11 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 4457 bytes --]

On Fri, May 18, 2018 at 11:48:45PM -0700, Andre McCurdy wrote:
> On Fri, May 18, 2018 at 10:42 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> > This variable was always meant to be used from DISTRO config
> 
> I'm not sure if that's true. Do you have a reference?

http://git.openembedded.org/openembedded-core/commit/?id=951200673af27538beaef647a33308b4f15d1fb0
"in case we have MACHINE without "thumb" in TUNE_FEATURES and distro setting ARM_INSTRUCTION_SET to "thumb""

https://github.com/Angstrom-distribution/meta-angstrom/blob/master/conf/distro/include/angstrom.inc#L39
https://github.com/shr-distribution/meta-smartphone/blob/fido/meta-shr-distro/conf/distro/shr.conf#L150
...

> >, why not add it
> > to:
> > oe-core/meta/conf/distro/include/default-distrovars.inc
> > or
> > oe-core/meta/conf/distro/include/tcmode-default.inc
> >
> > ?
> 
> Because then it would either apply to all ARM machines, including
> those which only support Thumb1, which isn't ideal. Keeping it as part
> of the machine config makes it easy to apply selectively to armv7a and
> above where we know it's safe and desirable. Distros can of course
> still over-ride (ie the machine only sets a weak default).

You can still enable it with weak assignment only for some architectures
like Angstrom does. But I don't see any reason why not enable it for all
architectures? Yes Thumb1 isn't as good as Thumb2 but still many people
are using it, why shouldn't oe-core be tested with thumb enabled (with
armv5te qemuarm?), see:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9213
https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
https://bugzilla.yoctoproject.org/show_bug.cgi?id=1709

> Is there a specific problem you see with the current patch?

DISTROs doing multi machine builds already need to select the right
DEFAULTTUNEs to find good compromise with common denominator of the
MACHINEs they want to support (or groups of MACHINEs they want to
support). Supporting or not supporting thumb at all is part of that
question so DISTRO should decide that, tune files already have the thumb
knob in TUNE_FEATURES to say which MACHINE is capable of supporting it.

Regards,

> 
> > On Sat, May 19, 2018 at 1:40 AM Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >>
> >> On Fri, May 18, 2018 at 3:50 PM Andre McCurdy <armccurdy@gmail.com> wrote:
> >>>
> >>> Although there may still be specific cases which can benefit from the
> >>> ARM instruction set, the Thumb2 instruction set is generally a better
> >>> default for armv7a class CPUs. Distros such as Debian and Fedora have
> >>> been targeting Thumb2 by default for some time.
> >>>
> >>> Note that setting ARM_INSTRUCTION_SET has no effect unless
> >>> TUNE_FEATURES contains "thumb" (which is controlled by the "t" suffix
> >>> in DEFAULTTUNE, e.g. armv7vehf-neon -vs- armv7vethf-neon, etc) so out
> >>> of tree machine configs may need to update their DEFAULTTUNE to take
> >>> advantage of this change.
> >>
> >>
> >>
> >> I think this is a good change and we shoudl take it in thumb2 is default
> >> ISA
> >> for other major distros as well
> >>
> >> Oe based distros who ship feeds might be affected
> >>>
> >>>
> >>>
> >>> Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
> >>> ---
> >>>  meta/conf/machine/include/arm/arch-armv7a.inc | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/meta/conf/machine/include/arm/arch-armv7a.inc
> >>> b/meta/conf/machine/include/arm/arch-armv7a.inc
> >>> index bad1c27..a2663d8 100644
> >>> --- a/meta/conf/machine/include/arm/arch-armv7a.inc
> >>> +++ b/meta/conf/machine/include/arm/arch-armv7a.inc
> >>> @@ -1,4 +1,5 @@
> >>>  DEFAULTTUNE ?= "armv7athf"
> >>> +ARM_INSTRUCTION_SET ?= "thumb"
> >>>
> >>>  TUNEVALID[armv7a] = "Enable instructions for ARMv7-a"
> >>>  TUNECONFLICTS[armv7a] = "armv4 armv5 armv6 armv7"
> >>> --
> >>> 1.9.1
> >>>
> >>> --
> >>> _______________________________________________
> >>> 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

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-05-19  7:11       ` Martin Jansa
@ 2018-05-19  7:31         ` Andre McCurdy
  2018-05-19  7:41           ` Martin Jansa
  0 siblings, 1 reply; 12+ messages in thread
From: Andre McCurdy @ 2018-05-19  7:31 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Sat, May 19, 2018 at 12:11 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Fri, May 18, 2018 at 11:48:45PM -0700, Andre McCurdy wrote:
>> On Fri, May 18, 2018 at 10:42 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> > This variable was always meant to be used from DISTRO config
>>
>> I'm not sure if that's true. Do you have a reference?
>
> http://git.openembedded.org/openembedded-core/commit/?id=951200673af27538beaef647a33308b4f15d1fb0
> "in case we have MACHINE without "thumb" in TUNE_FEATURES and distro setting ARM_INSTRUCTION_SET to "thumb""
>
> https://github.com/Angstrom-distribution/meta-angstrom/blob/master/conf/distro/include/angstrom.inc#L39
> https://github.com/shr-distribution/meta-smartphone/blob/fido/meta-shr-distro/conf/distro/shr.conf#L150

Certainly there are distros which force ARM_INSTRUCTION_SET. I'm not
sure if that's evidence that machines shouldn't set a default though?

>> >, why not add it
>> > to:
>> > oe-core/meta/conf/distro/include/default-distrovars.inc
>> > or
>> > oe-core/meta/conf/distro/include/tcmode-default.inc
>> >
>> > ?
>>
>> Because then it would either apply to all ARM machines, including
>> those which only support Thumb1, which isn't ideal. Keeping it as part
>> of the machine config makes it easy to apply selectively to armv7a and
>> above where we know it's safe and desirable. Distros can of course
>> still over-ride (ie the machine only sets a weak default).
>
> You can still enable it with weak assignment only for some architectures
> like Angstrom does. But I don't see any reason why not enable it for all
> architectures? Yes Thumb1 isn't as good as Thumb2 but still many people
> are using it

I'm not sure if there are "many people" still trying to persevere with
Thumb1. Maybe there are a few masochists left, but I guess they
probably have their own distros and don't rely on the oe-core
defaults.

My approach is to try to make small, safe, incremental improvements
and doing anything which might change the default instruction set to
Thumb for CPUs which can only support Thumb1 doesn't fit that
approach.

>, why shouldn't oe-core be tested with thumb enabled (with
> armv5te qemuarm?), see:
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=9213
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
> https://bugzilla.yoctoproject.org/show_bug.cgi?id=1709
>
>> Is there a specific problem you see with the current patch?
>
> DISTROs doing multi machine builds already need to select the right
> DEFAULTTUNEs to find good compromise with common denominator of the
> MACHINEs they want to support (or groups of MACHINEs they want to
> support). Supporting or not supporting thumb at all is part of that
> question so DISTRO should decide that, tune files already have the thumb
> knob in TUNE_FEATURES to say which MACHINE is capable of supporting it.

Setting a weak default for armv7a and above from the machine config
doesn't change any of that. Distros still have full control.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-05-19  7:31         ` Andre McCurdy
@ 2018-05-19  7:41           ` Martin Jansa
  2018-05-21 17:15             ` Andre McCurdy
  0 siblings, 1 reply; 12+ messages in thread
From: Martin Jansa @ 2018-05-19  7:41 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 3530 bytes --]

On Sat, May 19, 2018 at 12:31:51AM -0700, Andre McCurdy wrote:
> On Sat, May 19, 2018 at 12:11 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> > On Fri, May 18, 2018 at 11:48:45PM -0700, Andre McCurdy wrote:
> >> On Fri, May 18, 2018 at 10:42 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
> >> > This variable was always meant to be used from DISTRO config
> >>
> >> I'm not sure if that's true. Do you have a reference?
> >
> > http://git.openembedded.org/openembedded-core/commit/?id=951200673af27538beaef647a33308b4f15d1fb0
> > "in case we have MACHINE without "thumb" in TUNE_FEATURES and distro setting ARM_INSTRUCTION_SET to "thumb""
> >
> > https://github.com/Angstrom-distribution/meta-angstrom/blob/master/conf/distro/include/angstrom.inc#L39
> > https://github.com/shr-distribution/meta-smartphone/blob/fido/meta-shr-distro/conf/distro/shr.conf#L150
> 
> Certainly there are distros which force ARM_INSTRUCTION_SET. I'm not
> sure if that's evidence that machines shouldn't set a default though?

It's still more evidence then what you've shown that it should be in
machine config.

> >> >, why not add it
> >> > to:
> >> > oe-core/meta/conf/distro/include/default-distrovars.inc
> >> > or
> >> > oe-core/meta/conf/distro/include/tcmode-default.inc
> >> >
> >> > ?
> >>
> >> Because then it would either apply to all ARM machines, including
> >> those which only support Thumb1, which isn't ideal. Keeping it as part
> >> of the machine config makes it easy to apply selectively to armv7a and
> >> above where we know it's safe and desirable. Distros can of course
> >> still over-ride (ie the machine only sets a weak default).
> >
> > You can still enable it with weak assignment only for some architectures
> > like Angstrom does. But I don't see any reason why not enable it for all
> > architectures? Yes Thumb1 isn't as good as Thumb2 but still many people
> > are using it
> 
> I'm not sure if there are "many people" still trying to persevere with
> Thumb1. Maybe there are a few masochists left, but I guess they
> probably have their own distros and don't rely on the oe-core
> defaults.
> 
> My approach is to try to make small, safe, incremental improvements
> and doing anything which might change the default instruction set to
> Thumb for CPUs which can only support Thumb1 doesn't fit that
> approach.

You can still apply it only for some architectures as mentioned before.

> >, why shouldn't oe-core be tested with thumb enabled (with
> > armv5te qemuarm?), see:
> > https://bugzilla.yoctoproject.org/show_bug.cgi?id=9213
> > https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
> > https://bugzilla.yoctoproject.org/show_bug.cgi?id=1709
> >
> >> Is there a specific problem you see with the current patch?
> >
> > DISTROs doing multi machine builds already need to select the right
> > DEFAULTTUNEs to find good compromise with common denominator of the
> > MACHINEs they want to support (or groups of MACHINEs they want to
> > support). Supporting or not supporting thumb at all is part of that
> > question so DISTRO should decide that, tune files already have the thumb
> > knob in TUNE_FEATURES to say which MACHINE is capable of supporting it.
> 
> Setting a weak default for armv7a and above from the machine config
> doesn't change any of that. Distros still have full control.

If it's in distros control, then it should be in distros default config.

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 201 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-05-19  7:41           ` Martin Jansa
@ 2018-05-21 17:15             ` Andre McCurdy
  0 siblings, 0 replies; 12+ messages in thread
From: Andre McCurdy @ 2018-05-21 17:15 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Patches and discussions about the oe-core layer

On Sat, May 19, 2018 at 12:41 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
> On Sat, May 19, 2018 at 12:31:51AM -0700, Andre McCurdy wrote:
>> On Sat, May 19, 2018 at 12:11 AM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> > On Fri, May 18, 2018 at 11:48:45PM -0700, Andre McCurdy wrote:
>> >> On Fri, May 18, 2018 at 10:42 PM, Martin Jansa <martin.jansa@gmail.com> wrote:
>> >> > This variable was always meant to be used from DISTRO config
>> >>
>> >> I'm not sure if that's true. Do you have a reference?
>> >
>> > http://git.openembedded.org/openembedded-core/commit/?id=951200673af27538beaef647a33308b4f15d1fb0
>> > "in case we have MACHINE without "thumb" in TUNE_FEATURES and distro setting ARM_INSTRUCTION_SET to "thumb""
>> >
>> > https://github.com/Angstrom-distribution/meta-angstrom/blob/master/conf/distro/include/angstrom.inc#L39
>> > https://github.com/shr-distribution/meta-smartphone/blob/fido/meta-shr-distro/conf/distro/shr.conf#L150
>>
>> Certainly there are distros which force ARM_INSTRUCTION_SET. I'm not
>> sure if that's evidence that machines shouldn't set a default though?
>
> It's still more evidence then what you've shown that it should be in
> machine config.

I had two criteria for this change:

  1) Only change the default for cores which support Thumb2.

  2) Don't have any effect on distros or recipes which already define
their own policy for setting ARM_INSTRUCTION_SET (ie don't use
over-rides).

Setting a weak default from armv7a.inc seems to be the simplest and
cleanest way to meet those two criteria.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-06-04 21:33   ` Andre McCurdy
@ 2018-06-26 19:52     ` Andre McCurdy
  0 siblings, 0 replies; 12+ messages in thread
From: Andre McCurdy @ 2018-06-26 19:52 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Mon, Jun 4, 2018 at 2:33 PM, Andre McCurdy <armccurdy@gmail.com> wrote:
> On Tue, May 22, 2018 at 3:33 AM, Khem Raj <raj.khem@gmail.com> wrote:
>> On Tue, May 22, 2018 at 5:58 AM,  <Jef.Driesen@niko.eu> wrote:
>>> Andre McCurdy wrote:
>>>> Although there may still be specific cases which can benefit from the
>>>> ARM instruction set, the Thumb2 instruction set is generally a better
>>>> default for armv7a class CPUs. Distros such as Debian and Fedora have
>>>> been targeting Thumb2 by default for some time.
>>>>
>>>> Note that setting ARM_INSTRUCTION_SET has no effect unless
>>>> TUNE_FEATURES contains "thumb" (which is controlled by the "t" suffix
>>>> in DEFAULTTUNE, e.g. armv7vehf-neon -vs- armv7vethf-neon, etc) so out
>>>> of tree machine configs may need to update their DEFAULTTUNE to take
>>>> advantage of this change.
>>>
>>> I recently ran into some major problems due to thumb vs arm. It turns out glibc doesn't support systems with thumb disabled anymore. See this bug report for details:
>>>
>>> https://sourceware.org/bugzilla/show_bug.cgi?id=23031
>>>
>>> This might be useful input for this discussion also.
>>>
>
> Thanks to everyone for the feedback!
>
> I've reviewed Martin's examples of distros which control
> ARM_INSTRUCTION_SET and don't see anything which would conflict with
> this patch.
>
> I've also reviewed the glibc bug (Thumb2 instructions used in glibc
> even when glibc is compiled for ARM) and it's a positive in this
> discussion. It means that anyone running without Thumb support enabled
> in their kernel will already have run into issues simply by using
> glibc in rocko. The glibc bug has therefore "cleaned the pipes" for a
> more formal switch to using Thumb2 instructions in user space.
>
> So, unless there's any further feedback, I think this patch is ready to merge.

Ping.

Richard, Ross, please let me know if anything else needs to be done
before merging this update.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-05-22 10:33 ` Khem Raj
@ 2018-06-04 21:33   ` Andre McCurdy
  2018-06-26 19:52     ` Andre McCurdy
  0 siblings, 1 reply; 12+ messages in thread
From: Andre McCurdy @ 2018-06-04 21:33 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Tue, May 22, 2018 at 3:33 AM, Khem Raj <raj.khem@gmail.com> wrote:
> On Tue, May 22, 2018 at 5:58 AM,  <Jef.Driesen@niko.eu> wrote:
>> Andre McCurdy wrote:
>>> Although there may still be specific cases which can benefit from the
>>> ARM instruction set, the Thumb2 instruction set is generally a better
>>> default for armv7a class CPUs. Distros such as Debian and Fedora have
>>> been targeting Thumb2 by default for some time.
>>>
>>> Note that setting ARM_INSTRUCTION_SET has no effect unless
>>> TUNE_FEATURES contains "thumb" (which is controlled by the "t" suffix
>>> in DEFAULTTUNE, e.g. armv7vehf-neon -vs- armv7vethf-neon, etc) so out
>>> of tree machine configs may need to update their DEFAULTTUNE to take
>>> advantage of this change.
>>
>> I recently ran into some major problems due to thumb vs arm. It turns out glibc doesn't support systems with thumb disabled anymore. See this bug report for details:
>>
>> https://sourceware.org/bugzilla/show_bug.cgi?id=23031
>>
>> This might be useful input for this discussion also.
>>

Thanks to everyone for the feedback!

I've reviewed Martin's examples of distros which control
ARM_INSTRUCTION_SET and don't see anything which would conflict with
this patch.

I've also reviewed the glibc bug (Thumb2 instructions used in glibc
even when glibc is compiled for ARM) and it's a positive in this
discussion. It means that anyone running without Thumb support enabled
in their kernel will already have run into issues simply by using
glibc in rocko. The glibc bug has therefore "cleaned the pipes" for a
more formal switch to using Thumb2 instructions in user space.

So, unless there's any further feedback, I think this patch is ready to merge.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
  2018-05-22  9:58 Jef.Driesen
@ 2018-05-22 10:33 ` Khem Raj
  2018-06-04 21:33   ` Andre McCurdy
  0 siblings, 1 reply; 12+ messages in thread
From: Khem Raj @ 2018-05-22 10:33 UTC (permalink / raw)
  To: Jef.Driesen; +Cc: Patches and discussions about the oe-core layer

On Tue, May 22, 2018 at 5:58 AM,  <Jef.Driesen@niko.eu> wrote:
> Andre McCurdy wrote:
>> Although there may still be specific cases which can benefit from the
>> ARM instruction set, the Thumb2 instruction set is generally a better
>> default for armv7a class CPUs. Distros such as Debian and Fedora have
>> been targeting Thumb2 by default for some time.
>>
>> Note that setting ARM_INSTRUCTION_SET has no effect unless
>> TUNE_FEATURES contains "thumb" (which is controlled by the "t" suffix
>> in DEFAULTTUNE, e.g. armv7vehf-neon -vs- armv7vethf-neon, etc) so out
>> of tree machine configs may need to update their DEFAULTTUNE to take
>> advantage of this change.
>
> I recently ran into some major problems due to thumb vs arm. It turns out glibc doesn't support systems with thumb disabled anymore. See this bug report for details:
>
> https://sourceware.org/bugzilla/show_bug.cgi?id=23031
>
> This might be useful input for this discussion also.
>

Thanks, this would be useful for us to check if kernel defconfig does
not disable CONFIG_ARM_THUMB
on armv6t2+ regardless of this patch. This patch however will require
this option enabled too.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
@ 2018-05-22  9:58 Jef.Driesen
  2018-05-22 10:33 ` Khem Raj
  0 siblings, 1 reply; 12+ messages in thread
From: Jef.Driesen @ 2018-05-22  9:58 UTC (permalink / raw)
  To: armccurdy, openembedded-core

Andre McCurdy wrote:
> Although there may still be specific cases which can benefit from the
> ARM instruction set, the Thumb2 instruction set is generally a better
> default for armv7a class CPUs. Distros such as Debian and Fedora have
> been targeting Thumb2 by default for some time.
>
> Note that setting ARM_INSTRUCTION_SET has no effect unless
> TUNE_FEATURES contains "thumb" (which is controlled by the "t" suffix
> in DEFAULTTUNE, e.g. armv7vehf-neon -vs- armv7vethf-neon, etc) so out
> of tree machine configs may need to update their DEFAULTTUNE to take
> advantage of this change.

I recently ran into some major problems due to thumb vs arm. It turns out glibc doesn't support systems with thumb disabled anymore. See this bug report for details:

https://sourceware.org/bugzilla/show_bug.cgi?id=23031

This might be useful input for this discussion also.

Jef
Disclaimer

This e-mail and its attachments is intended only for the person(s) or entity to which it is addressed. If you receive this e-mail by mistake, please delete this e-mail from your system and destroy all copies of it. It may contain confidential and/or privileged information. You should not copy it or use it for any purpose nor disclose its contents to any person unless allowed by a written document between the sender and the addressee.


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-06-26 19:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-18 22:50 [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above Andre McCurdy
2018-05-18 23:40 ` Khem Raj
2018-05-19  5:42   ` Martin Jansa
2018-05-19  6:48     ` Andre McCurdy
2018-05-19  7:11       ` Martin Jansa
2018-05-19  7:31         ` Andre McCurdy
2018-05-19  7:41           ` Martin Jansa
2018-05-21 17:15             ` Andre McCurdy
2018-05-22  9:58 Jef.Driesen
2018-05-22 10:33 ` Khem Raj
2018-06-04 21:33   ` Andre McCurdy
2018-06-26 19:52     ` Andre McCurdy

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.