U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] armv5 and OMAP3 Question
Date: Fri, 3 Aug 2018 11:20:39 -0400	[thread overview]
Message-ID: <20180803152039.GJ32145@bill-the-cat> (raw)
In-Reply-To: <CAHCN7xKPWTg3RW4mPZr1=yzq=-TJmeGyzhWRxgSyEPHaOuxi_A@mail.gmail.com>

On Fri, Aug 03, 2018 at 10:02:17AM -0500, Adam Ford wrote:
> On Fri, Aug 3, 2018 at 10:00 AM Tom Rini <trini@konsulko.com> wrote:
> >
> > On Fri, Aug 03, 2018 at 05:43:46AM -0500, Adam Ford wrote:
> > > On Tue, Jul 25, 2017 at 11:08 AM Tom Rini <trini@konsulko.com> wrote:
> > > >
> > > > On Tue, Jul 25, 2017 at 08:14:57AM -0500, Adam Ford wrote:
> > > >
> > > > > The readme file for OMAP indicates that we compile using armv5 to "to
> > > > > allow more compilers to work"
> > > > >
> > > > > We have our arch/arm/mach-omap2/omap3/lowlevel_init.S file also noting
> > > > > some special assembly insturctions becuse we use armv5.  The barriers
> > > > > defined also indicate we're using CP15 instead of the separate barrier
> > > > > instructions for armv7 because we're using armv5 instead.
> > > > >
> > > > > I just wonder in this day and age when we're noting a GCC version and
> > > > > generating warnings based on the GCC warning, do we still need to
> > > > > compile as armv5 any more?  It seems like "to allow more compilers to
> > > > > work" would not really apply any more we're trying to push newer
> > > > > versions of GCC.
> > > >
> > > > So, these are historical notes that really should be corrected.
> > > > Initially, when ARMv7 support was added, most people did not have
> > > > compilers new enough to recognize -march=armv7-a.  We still even support
> > > > them, see the logic in arch/arm/Makefile around CONFIG_CPU_V7 (the
> > > > options are any sort of modern gcc, llvm, ancient gcc).  When we move to
> > > > gcc-6 being the oldest gcc supported for ARM we can fixup those comments
> > > > and logic as well.
> > >
> > > My understanding is that we've made the requirement for GCC 6 now.  I
> > > just pushed a patch which enabled mtune=armv7-a-generic when
> > > CONFIG_CPU_V7A is enabled and that seems to shrink the code a bit on
> > > omap3_logic.  Does it make sense to remove the , -march=armv5 from
> > > arch/arm/Makefile and or the plain -march=armv7 since CONFIG_CPU_V7A
> > > implies armv-a?
> >
> > Yes, we can probably at least drop the v5 portion of that logic.  As
> > noted in the other patch, LLVM and GCC disagree on "armv7" vs "armv7-a"
> > as being the appropriate name, or at least did in the past.
> 
> Can you point me to an example of how to tune armv7 for both GCC and
> LLVM?  I was looking around and I'm not seeing an obvious syntax.
> I'll do a 2-part patch.  One to remove the armv5, and one to enable
> the armv7 optimization.

In arch/arm/Makefile:
arch-$(CONFIG_CPU_V7A)          =$(call cc-option, -march=armv7-a, \
                                 $(call cc-option, -march=armv7, -march=armv5))

this works in both cases.  And doc/README.clang is correct on how to
build with LLVM on ARM.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180803/bd14b386/attachment.sig>

  reply	other threads:[~2018-08-03 15:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-25 13:14 [U-Boot] armv5 and OMAP3 Question Adam Ford
2017-07-25 16:09 ` Tom Rini
2018-08-03 10:43   ` Adam Ford
2018-08-03 14:59     ` Tom Rini
2018-08-03 15:02       ` Adam Ford
2018-08-03 15:20         ` Tom Rini [this message]
2018-08-04 10:32           ` Adam Ford
2018-08-04 11:44             ` Tom Rini
2018-08-04 14:39               ` Adam Ford
2018-08-04 15:50                 ` Tom Rini

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=20180803152039.GJ32145@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox