All of lore.kernel.org
 help / color / mirror / Atom feed
From: Martin Jansa <martin.jansa@gmail.com>
To: Andre McCurdy <armccurdy@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] arch-armv7a.inc: default to Thumb2 instruction set for armv7a and above
Date: Sat, 19 May 2018 09:11:54 +0200	[thread overview]
Message-ID: <20180519071154.GA1395@jama> (raw)
In-Reply-To: <CAJ86T=WG426=cyvtG811fWViqp+Sx7u0k9sUxo88SOJzVMQ2hA@mail.gmail.com>

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

  reply	other threads:[~2018-05-19  7:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180519071154.GA1395@jama \
    --to=martin.jansa@gmail.com \
    --cc=armccurdy@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.