From: Dave P Martin <Dave.Martin@arm.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Tony Lindgren <tony@atomide.com>,
Grazvydas Ignotas <notasas@gmail.com>,
Kevin Hilman <khilman@kernel.org>,
"tyler.baker@linaro.org" <tyler.baker@linaro.org>,
Stephen Boyd <sboyd@codeaurora.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC] Fix omap3 booting with thumb2 compiled kernel
Date: Fri, 29 May 2015 12:06:24 +0100 [thread overview]
Message-ID: <20150529110624.GD3648@e103592.cambridge.arm.com> (raw)
In-Reply-To: <6381487.LvuhvmaVk1@wuerfel>
On Thu, May 28, 2015 at 07:55:16PM +0100, Arnd Bergmann wrote:
> On Thursday 28 May 2015 09:36:05 Tony Lindgren wrote:
> > * Dave Martin <Dave.Martin@arm.com> [150528 09:19]:
> > > On Thu, May 28, 2015 at 07:21:25AM -0700, Tony Lindgren wrote:
> > > > --- a/arch/arm/mach-omap2/sleep34xx.S
> > > > +++ b/arch/arm/mach-omap2/sleep34xx.S
> > > > @@ -203,23 +203,8 @@ save_context_wfi:
> > > > */
> > > > ldr r1, kernel_flush
> > > > blx r1
> > > > - /*
> > > > - * The kernel doesn't interwork: v7_flush_dcache_all in particluar will
> > > > - * always return in Thumb state when CONFIG_THUMB2_KERNEL is enabled.
> > > > - * This sequence switches back to ARM. Note that .align may insert a
> > > > - * nop: bx pc needs to be word-aligned in order to work.
> > > > - */
> > > > - THUMB( .thumb )
> > > > - THUMB( .align )
> > > > - THUMB( bx pc )
> > > > - THUMB( nop )
> > > > - .arm
> > > > -
> > >
> > > ^ This looks unrelated to the issue? This code is simply unnecessary
> > > after Russell introduced the "ret" macro in commit 6ebbf2ce43. That
> > > made v7_flush_dcache_all do a proper interworking return.
> > >
> > > It should probably be in a separate commit, or at least mentioned
> > > explicitly in the commit log.
> >
> > Thanks, I've updated the description with the commit info above.
> >
> > I'll keep the removal of the duplicate code in this patch, as it's
> > all related to the mode switching and we don't want to do it twice.
>
> I would have thought that the change is actually necessary after
> 6ebbf2ce43, because it now returns in ARM mode, which will cause the
> "bx pc; nop" thumb instruction sequence be misinterpreted as an
> ARM instruction.
>
> Arnd
You're right. The THUMB2_KERNEL indeed won't work without deleting this
code.
Cheers
---Dave
next prev parent reply other threads:[~2015-05-29 11:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 21:55 [RFC] Fix omap3 booting with thumb2 compiled kernel Tony Lindgren
2015-05-27 22:19 ` Kevin Hilman
2015-05-27 22:55 ` Tony Lindgren
2015-05-27 23:19 ` Kevin Hilman
2015-05-28 11:43 ` Grazvydas Ignotas
2015-05-28 14:21 ` Tony Lindgren
2015-05-28 16:17 ` Dave Martin
2015-05-28 16:36 ` Tony Lindgren
2015-05-28 17:31 ` Dave Martin
2015-05-28 18:55 ` Arnd Bergmann
2015-05-28 20:41 ` Tony Lindgren
2015-05-29 11:06 ` Dave P Martin [this message]
2015-05-29 16:28 ` Tony Lindgren
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=20150529110624.GD3648@e103592.cambridge.arm.com \
--to=dave.martin@arm.com \
--cc=arnd@arndb.de \
--cc=khilman@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-omap@vger.kernel.org \
--cc=notasas@gmail.com \
--cc=sboyd@codeaurora.org \
--cc=tony@atomide.com \
--cc=tyler.baker@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).