From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: let CPUs not being able to run in ARM mode enter in THUMB mode
Date: Fri, 11 Jan 2013 16:51:50 +0100 [thread overview]
Message-ID: <20130111155150.GL14860@pengutronix.de> (raw)
In-Reply-To: <50F0310F.3070502@arm.com>
Hi Jonny,
On Fri, Jan 11, 2013 at 03:34:39PM +0000, Jonathan Austin wrote:
> Hi Uwe,
> On 11/01/13 11:39, Uwe Kleine-K?nig wrote:
> >Some ARM cores are not capable to run in ARM mode (e.g. Cortex-M3). So
> >obviously these cannot enter the kernel in ARM mode. Make an exception
> >for them and let them enter in THUMB mode.
>
> Clearly something like this is necessary, but it isn't something I'd
> like for people to start using *unless* they have a THUMB only CPU
> (for example, to work around dodgy boot-loaders, etc)
>
> Seeing as there are no THUMB-only CPUs with an MMU, I think we could
> safely constrain this change to:
> a) depend on !MMU
> b) only touch head-nommu.S
>
> Does that cause any issue for what you're doing.
Would be ok for me, too. I don't care much.
> >diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
> >index 3fd629d..bc3150c 100644
> >--- a/arch/arm/mm/Kconfig
> >+++ b/arch/arm/mm/Kconfig
> >@@ -1,5 +1,11 @@
> > comment "Processor Type"
> >
> >+# Select this if your CPU doesn't support the 32 bit ARM instructions.
> >+config THUMBONLY_CPU
> >+ bool
> >+ select THUMB2_KERNEL
> >+ select ARM_THUMB
> >+
> > # Select CPU types depending on the architecture selected. This selects
> > # which CPUs we support in the kernel image, and the compiler instruction
> > # optimiser behaviour.
>
> Also, a couple of minor questions about this:
> - What's the rationale for the placement within the file - it looks
> a bit curious up the top there.
Conceptually it's a symbol that is selected by the different processor
symbols. So IMHO it's fine to have it in front of the processor symbols.
Maybe it should even go before the line reading:
comment "Processor Type"
. OTOH similar symbols (like CPU_32v4, CPU_CP15) are at the end, too.
So yes, probably it's better to move it further down. And maybe rename
it to CPU_THUMBONLY?
> - Given the fact that we don't want people using this except in very
> specific circumstances, should we write a little bit of help for the
> option?
I can move what I wrote in the comment above the symbol into a help text
instead.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |
next prev parent reply other threads:[~2013-01-11 15:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-11 11:39 [PATCH] ARM: let CPUs not being able to run in ARM mode enter in THUMB mode Uwe Kleine-König
2013-01-11 15:34 ` Jonathan Austin
2013-01-11 15:51 ` Uwe Kleine-König [this message]
2013-01-12 17:19 ` Nicolas Pitre
2013-01-11 16:07 ` Russell King - ARM Linux
2013-01-11 16:20 ` Uwe Kleine-König
2013-01-14 9:50 ` Uwe Kleine-König
2013-01-11 18:00 ` Jonathan Austin
2013-01-11 18:12 ` Russell King - ARM Linux
2013-01-14 11:15 ` [PATCH v2] " Uwe Kleine-König
2013-01-14 21:53 ` Nicolas Pitre
2013-01-29 12:44 ` [PATCH] " Dave Martin
2013-01-31 15:51 ` Uwe Kleine-König
2013-02-19 11:39 ` Dave Martin
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=20130111155150.GL14860@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.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).