All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] poky-tiny: prefer thumb mode by default
@ 2020-11-17  2:45 Sinan Kaya
  2020-11-17  7:35 ` [poky] " Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Sinan Kaya @ 2020-11-17  2:45 UTC (permalink / raw)
  To: poky; +Cc: Sinan Kaya

We can use ARM_INSTRUCTION_SET to select the default instruction
mode for userspace.

Signed-off-by: Sinan Kaya <okaya@kernel.org>
---
 meta-poky/conf/distro/poky-tiny.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
index c6d4b88f83d..87ee0970b93 100644
--- a/meta-poky/conf/distro/poky-tiny.conf
+++ b/meta-poky/conf/distro/poky-tiny.conf
@@ -122,3 +122,6 @@ PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny"
 
 # Disable python usage in opkg-utils since it won't build with tiny config
 PACKAGECONFIG_remove_pn-opkg-utils = "python"
+
+# prefer thumb mode by default for userspace
+ARM_INSTRUCTION_SET = "thumb"
-- 
2.17.1


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

* Re: [poky] [PATCH] poky-tiny: prefer thumb mode by default
  2020-11-17  2:45 [PATCH] poky-tiny: prefer thumb mode by default Sinan Kaya
@ 2020-11-17  7:35 ` Khem Raj
  2020-11-17 14:14   ` Sinan Kaya
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2020-11-17  7:35 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: poky

On Mon, Nov 16, 2020 at 6:46 PM Sinan Kaya <okaya@kernel.org> wrote:
>
> We can use ARM_INSTRUCTION_SET to select the default instruction
> mode for userspace.
>
> Signed-off-by: Sinan Kaya <okaya@kernel.org>
> ---
>  meta-poky/conf/distro/poky-tiny.conf | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
> index c6d4b88f83d..87ee0970b93 100644
> --- a/meta-poky/conf/distro/poky-tiny.conf
> +++ b/meta-poky/conf/distro/poky-tiny.conf
> @@ -122,3 +122,6 @@ PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny"
>
>  # Disable python usage in opkg-utils since it won't build with tiny config
>  PACKAGECONFIG_remove_pn-opkg-utils = "python"
> +
> +# prefer thumb mode by default for userspace
> +ARM_INSTRUCTION_SET = "thumb"

we have defaulted armv7a+ machines to use thumb ISA if DEFAULTTUNE has
't' attribute in it
which SOCs do you target with this change ?

> --
> 2.17.1
>
>
> 
>

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

* Re: [poky] [PATCH] poky-tiny: prefer thumb mode by default
  2020-11-17  7:35 ` [poky] " Khem Raj
@ 2020-11-17 14:14   ` Sinan Kaya
  2020-11-17 22:50     ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Sinan Kaya @ 2020-11-17 14:14 UTC (permalink / raw)
  To: poky

On 11/17/2020 2:35 AM, Khem Raj wrote:
>> +# prefer thumb mode by default for userspace
>> +ARM_INSTRUCTION_SET = "thumb"
> we have defaulted armv7a+ machines to use thumb ISA if DEFAULTTUNE has
> 't' attribute in it
> which SOCs do you target with this change ?
> 

I wanted to use it on ARM926EJS. I noticed that it is defaulting to arm
even though the CPU supports thumb.

Why was the same decision not made for armv5 and armv6?

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

* Re: [poky] [PATCH] poky-tiny: prefer thumb mode by default
  2020-11-17 14:14   ` Sinan Kaya
@ 2020-11-17 22:50     ` Khem Raj
  2020-11-18 16:30       ` Sinan Kaya
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2020-11-17 22:50 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: poky

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

On Tue, Nov 17, 2020 at 6:14 AM Sinan Kaya <okaya@kernel.org> wrote:

> On 11/17/2020 2:35 AM, Khem Raj wrote:
> >> +# prefer thumb mode by default for userspace
> >> +ARM_INSTRUCTION_SET = "thumb"
> > we have defaulted armv7a+ machines to use thumb ISA if DEFAULTTUNE has
> > 't' attribute in it
> > which SOCs do you target with this change ?
> >
>
> I wanted to use it on ARM926EJS. I noticed that it is defaulting to arm
> even though the CPU supports thumb.
>
> Why was the same decision not made for armv5 and armv6?


Right lot of older arm implementation may or may not have thumb ISA so
there was no reliable way of choosing it and secondly it’s a bit less
tested ISA especially when it came to thumb1 for long Martin ran qemuarm/v5
build using thumb ISA and he would find weird corner cases and build
failures

I think this makes sense for poky-tiny but we do not test it as much and it
might give a bad experience unless we test this combo regularly

>
>
> 
>
>

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

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

* Re: [poky] [PATCH] poky-tiny: prefer thumb mode by default
  2020-11-17 22:50     ` Khem Raj
@ 2020-11-18 16:30       ` Sinan Kaya
  2020-11-18 16:50         ` Martin Jansa
  0 siblings, 1 reply; 7+ messages in thread
From: Sinan Kaya @ 2020-11-18 16:30 UTC (permalink / raw)
  To: Khem Raj; +Cc: poky

On 11/17/2020 5:50 PM, Khem Raj wrote:
>     Why was the same decision not made for armv5 and armv6?
> 
> 
> Right lot of older arm implementation may or may not have thumb ISA so
> there was no reliable way of choosing it and secondly it’s a bit less
> tested ISA especially when it came to thumb1 for long Martin ran
> qemuarm/v5 build using thumb ISA and he would find weird corner cases
> and build failures
> 
> I think this makes sense for poky-tiny but we do not test it as much and
> it might give a bad experience unless we test this combo regularly 

I think I need to bring the support detection logic here to find out
if platform in use supports thumb mode.

I'll do some more builds to ensure everything builds correctly with
thumb mode. I think I found one more recipe that doesn't play nice.

Setting it default for tiny profile makes sense so that it also gets
regularly exercised.

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

* Re: [poky] [PATCH] poky-tiny: prefer thumb mode by default
  2020-11-18 16:30       ` Sinan Kaya
@ 2020-11-18 16:50         ` Martin Jansa
  2020-11-18 21:37           ` Sinan Kaya
  0 siblings, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2020-11-18 16:50 UTC (permalink / raw)
  To: Sinan Kaya; +Cc: Khem Raj, poky

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

The detection should work fine as long as you select the right DEFAULTTUNE

thumb is used only when ARM_INSTRUCTION_SET is set to thumb AND thumb
appears in TUNE_FEATURES (which are defined by selected DEFAULTTUNE).

I've stopped building for armv4t (om-gta0* MACHINEs dropped in
https://github.com/shr-distribution/meta-smartphone/commit/647d43223ed6ace5d68b1e36d34978da472634e7)
and armv5te (tune-xscare.inc used by e.g. spitz MACHINE from meta-handheld)
more than 3 years ago, I don't know how much the support for thumb1
degraded since then.

On Wed, Nov 18, 2020 at 5:31 PM Sinan Kaya <okaya@kernel.org> wrote:

> On 11/17/2020 5:50 PM, Khem Raj wrote:
> >     Why was the same decision not made for armv5 and armv6?
> >
> >
> > Right lot of older arm implementation may or may not have thumb ISA so
> > there was no reliable way of choosing it and secondly it’s a bit less
> > tested ISA especially when it came to thumb1 for long Martin ran
> > qemuarm/v5 build using thumb ISA and he would find weird corner cases
> > and build failures
> >
> > I think this makes sense for poky-tiny but we do not test it as much and
> > it might give a bad experience unless we test this combo regularly
>
> I think I need to bring the support detection logic here to find out
> if platform in use supports thumb mode.
>
> I'll do some more builds to ensure everything builds correctly with
> thumb mode. I think I found one more recipe that doesn't play nice.
>
> Setting it default for tiny profile makes sense so that it also gets
> regularly exercised.
>
> 
>
>

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

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

* Re: [poky] [PATCH] poky-tiny: prefer thumb mode by default
  2020-11-18 16:50         ` Martin Jansa
@ 2020-11-18 21:37           ` Sinan Kaya
  0 siblings, 0 replies; 7+ messages in thread
From: Sinan Kaya @ 2020-11-18 21:37 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Khem Raj, poky

On 11/18/2020 11:50 AM, Martin Jansa wrote:
> The detection should work fine as long as you select the right DEFAULTTUNE
> 
> thumb is used only when ARM_INSTRUCTION_SET is set to thumb AND thumb
> appears in TUNE_FEATURES (which are defined by selected DEFAULTTUNE).
> 
> I've stopped building for armv4t (om-gta0* MACHINEs dropped in
> https://github.com/shr-distribution/meta-smartphone/commit/647d43223ed6ace5d68b1e36d34978da472634e7
> <https://github.com/shr-distribution/meta-smartphone/commit/647d43223ed6ace5d68b1e36d34978da472634e7>)
> and armv5te (tune-xscare.inc used by e.g. spitz MACHINE from
> meta-handheld) more than 3 years ago, I don't know how much the support
> for thumb1 degraded since then.

Thanks for sharing. I'm building core-image-minimal at this moment and
am not having any issues. There were some issues in the SDK world that
I need to debug.

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

end of thread, other threads:[~2020-11-18 21:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17  2:45 [PATCH] poky-tiny: prefer thumb mode by default Sinan Kaya
2020-11-17  7:35 ` [poky] " Khem Raj
2020-11-17 14:14   ` Sinan Kaya
2020-11-17 22:50     ` Khem Raj
2020-11-18 16:30       ` Sinan Kaya
2020-11-18 16:50         ` Martin Jansa
2020-11-18 21:37           ` Sinan Kaya

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.