linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: Android and compatibility with deprecated armv7 instructions
Date: Sat, 5 Jul 2014 12:14:07 +0100	[thread overview]
Message-ID: <20140705111406.GA23692@arm.com> (raw)
In-Reply-To: <20140704132250.A2447C40ADD@trevor.secretlab.ca>

On Fri, Jul 04, 2014 at 02:22:50PM +0100, Grant Likely wrote:
> On Thu, 3 Jul 2014 18:43:18 +0100, Catalin Marinas <catalin.marinas@arm.com> wrote:
> > On Thu, Jul 03, 2014 at 05:22:30PM +0100, Grant Likely wrote:
> > > So, no. I completely reject any notion that breaking existing apps is
> > > okay. If we're going to say that v8 still supports 32-bit apps, then
> > > it has to be all of v7, not just the 'good' bits. Nor do I think
> > > saying "it's just a bunch of games" justifies anything. We're kernel
> > > engineers. Applications are applications and we don't break userspace.
> > > Period.
> > 
> > Here you need to define user-space. OABI?
> 
> This is where we can be pragmatic. Listen to our users. Colin was very
> clear about what some apps need in order to keep working. He's not even
> asking for old kernels or system libraries to be supported because he
> has control over those components and they can be fixed. The important
> ABI is the ABI used by Android applications.
> 
> We can drop ABIs that nobody uses. If nobody complains, is it really
> broken?

OK, so I think we now agree that being asked not to break the ABI ever
is not feasible (and not in the community's interest either; think about
carrying over NWFPE for ARMv8 just because someone wants to run an old
distro when there are alternatives already, such requests would need
proper justification).

Another aspect is that users don't always know what's good (or bad) for
them. EABI provided means via kuser helpers to use arch-independent
barrier code and cmpxchg. Glibc and various threads libraries moved to
using them but as we can see, not all user space. As Russell pointed
out, we failed to raise the SWP issue properly in the ARMv7 kernel (more
warnings, always emulation) and I see this as a valid reason to allow
for a _transition_ period in ARMv8.

But we have to agree on a way to handle deprecated/removed architecture
features (as I said, some of them are removed for good reasons). And
that's also for user's benefit, performance wise they should rather use
native than emulated features.

The timeline I propose would be:

1. Architecture feature deprecation (still present, no way to disable)
   - In Linux we need to find ways and push for alternatives to be
     adopted by user space (like we did with kuser helpers)
2. Architecture feature disabling (still present but needs to be enabled
   explicitly via SCTLR bit)
   - Linux disables the feature by default and provides emulation
     (enabled by default), clear warnings
   - In certain cases, there may be justification to enable the hardware
     feature but certainly not in defconfig nor distro Image builds.
     Otherwise they can't complain that users are still using such
     feature at point 3 below
3. Architecture feature removed
   - Default Linux behaviour changes to SIGILL
   - Emulation could be still available in the kernel but maybe under
     a CONFIG_EXPERT option
4. Eventually remove kernel emulation support entirely (or don't carry
   it over to a new port, though I don't foresee any arm128 ;))

With SWP, we are currently at 3/4 with the counter arguments that 2
wasn't entirely clear to users, so the transition needs to be
carried over for ARMv8 (but I'm against 2 for arm64, 3 is as far as I
would go). Arguably, with CP15 barriers we are at point 2, in which case
if we add them to the arm64 kernel, they should be emulated with clear
warnings (ratelimited).

-- 
Catalin

  parent reply	other threads:[~2014-07-05 11:14 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-01 23:06 Android and compatibility with deprecated armv7 instructions Colin Cross
2014-07-01 23:42 ` Olof Johansson
2014-07-01 23:48   ` Mark Brown
2014-07-02 10:01     ` Will Deacon
2014-07-02 15:48       ` Colin Cross
2014-07-02 16:16         ` Will Deacon
2014-07-02 18:03           ` Christopher Covington
2014-07-02 18:25             ` Will Deacon
2014-07-02 19:47               ` Mark Brown
2014-07-05 21:26           ` Rob Herring
2014-07-02 16:39       ` Mark Brown
2014-07-02 17:01         ` Will Deacon
2014-07-02 17:33           ` Mark Brown
2014-07-02 22:14           ` Grant Likely
2014-07-03 10:41             ` Catalin Marinas
2014-07-03 14:28               ` Arnd Bergmann
2014-07-03 15:00                 ` Russell King - ARM Linux
2014-07-03 15:40                   ` Grant Likely
2014-07-03 17:13                   ` Catalin Marinas
2014-07-03 17:48                     ` Russell King - ARM Linux
2014-07-03 18:15                     ` Arnd Bergmann
2014-07-03 18:30                       ` Russell King - ARM Linux
2014-07-03 18:37                         ` Will Deacon
2014-07-03 18:52                           ` Russell King - ARM Linux
2014-07-03 19:00                             ` Will Deacon
2014-07-04  8:57                         ` Catalin Marinas
2014-07-04  9:25                           ` Russell King - ARM Linux
2014-07-04 10:12                             ` Arnd Bergmann
2014-07-04 14:09                               ` Dr. David Alan Gilbert
2014-07-04 12:56                             ` Grant Likely
2014-07-04 13:31                               ` Russell King - ARM Linux
2014-07-03 18:46                       ` Will Deacon
2014-07-03 18:53                         ` Arnd Bergmann
2014-07-03 19:07                           ` Russell King - ARM Linux
2014-07-03 19:40                             ` Arnd Bergmann
2014-07-04 13:25                     ` Grant Likely
2014-07-03 16:22               ` Grant Likely
2014-07-03 17:05                 ` Russell King - ARM Linux
2014-07-03 17:32                   ` Will Deacon
2014-07-03 18:23                     ` Arnd Bergmann
2014-07-03 18:38                       ` Peter Maydell
2014-07-03 18:40                       ` Will Deacon
2014-07-03 18:32                     ` Mark Brown
2014-07-03 22:16                     ` Måns Rullgård
2014-07-03 22:47                       ` Russell King - ARM Linux
2014-07-04  7:08                         ` Ard Biesheuvel
2014-07-04  8:24                           ` Catalin Marinas
2014-07-04  8:33                             ` Ard Biesheuvel
2014-07-04  9:21                               ` Måns Rullgård
2014-07-04  9:34                                 ` Russell King - ARM Linux
2014-07-04 10:21                                   ` Måns Rullgård
2014-07-04 10:33                                     ` Russell King - ARM Linux
2014-07-04 11:00                                       ` Ard Biesheuvel
2014-07-04 17:28                                         ` Nicolas Pitre
2014-07-03 17:43                 ` Catalin Marinas
2014-07-04 13:22                   ` Grant Likely
2014-07-04 19:24                     ` Mark Brown
2014-07-04 19:33                       ` Arnd Bergmann
2014-07-04 22:06                         ` Måns Rullgård
2014-07-04 22:08                         ` Mark Brown
2014-07-05 11:14                     ` Catalin Marinas [this message]
2014-07-05 11:25                       ` Russell King - ARM Linux
2014-07-05 16:43                       ` Mark Brown
2014-07-05 17:06                         ` Catalin Marinas
2014-07-05 18:43                           ` Arnd Bergmann
2014-07-05 21:19                             ` Catalin Marinas
2014-07-06 15:39                               ` Arnd Bergmann
2014-07-07 13:59                                 ` Janne Grunau
2014-07-07 14:52                                   ` Catalin Marinas
2014-07-07 17:52                                     ` Janne Grunau
2014-07-07 15:43                                   ` Peter Maydell
2014-07-08  5:28                                   ` Måns Rullgård
2014-07-07 14:35                                 ` Catalin Marinas
2014-07-07 21:26                                   ` Arnd Bergmann
2014-07-07 12:28                       ` Grant Likely
2014-07-07 18:35                         ` Colin Cross

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=20140705111406.GA23692@arm.com \
    --to=catalin.marinas@arm.com \
    --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).