linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: Android and compatibility with deprecated armv7 instructions
Date: Thu, 3 Jul 2014 19:52:43 +0100	[thread overview]
Message-ID: <20140703185243.GD32514@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140703183739.GA21086@arm.com>

On Thu, Jul 03, 2014 at 07:37:39PM +0100, Will Deacon wrote:
> On Thu, Jul 03, 2014 at 07:30:55PM +0100, Russell King - ARM Linux wrote:
> > which produces the correct answer of 5.  SWP_EMULATE is off.  HWCAP_SWP
> > is set (as it always has been).  There's no warning in the kernel
> > message log.
> 
> Even more worrying, that swp you just executed probably wasn't atomic. Try
> it with a multithreaded program...
> 
> > Now look at the situation on ARMv8.  Executing the above suddenly fails
> > with SIGILL.
> > 
> > This means that from the developer and user point of view, there has
> > been *no* visible deprecation of this instruction.  There's only
> > "it used to work on ARMv7 but doesn't on ARMv8".
> > 
> > Yes, SWP_EMULATE was introduced.  Great, that has the power to issue
> > warnings, except it doesn't because they're at DEBUG level, which
> > normally gets compiled out.  So that doesn't help warn people.
> > 
> > Even with SWP_EMULATE enabled and with the debug problem fixed... does
> > it help warn people?  Only if you're running on a CPU with virtualisation
> > extensions, because it silently continues to work on CPUs without.
> 
> Not *quite* true; SWP_EMULATE=y disables the h/w SWP instruction by
> configuring the sctlr accordingly. So even without virtualisation
> extensions (more specifically, on cores with MP extensions), you would
> still see the warning if it was fixed.

Well, does anyone have SWP_EMULATE enabled?

arch/arm/configs/spear13xx_defconfig:# CONFIG_SWP_EMULATE is not set
arch/arm/configs/mvebu_v7_defconfig:# CONFIG_SWP_EMULATE is not set
arch/arm/configs/prima2_defconfig:# CONFIG_SWP_EMULATE is not set
arch/arm/configs/marzen_defconfig:# CONFIG_SWP_EMULATE is not set
arch/arm/configs/shmobile_defconfig:# CONFIG_SWP_EMULATE is not set
arch/arm/configs/koelsch_defconfig:# CONFIG_SWP_EMULATE is not set
arch/arm/configs/vexpress_defconfig:# CONFIG_SWP_EMULATE is not set

I think not.  Even with SWP_EMULATE set, HWCAP_SWP is still
advertised, which you must admit is a very contradictory situation.

-- 
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly
improving, and getting towards what was expected from it.

  reply	other threads:[~2014-07-03 18:52 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 [this message]
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
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=20140703185243.GD32514@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).