linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Hardcoded instruction causes certain features to fail on ARM platfrom due to endianness
@ 2012-10-15  3:46 Yangfei (Felix)
  2012-10-15  7:28 ` Mikael Pettersson
  0 siblings, 1 reply; 6+ messages in thread
From: Yangfei (Felix) @ 2012-10-15  3:46 UTC (permalink / raw)
  To: linux-assembly@vger.kernel.org; +Cc: linux-kernel@vger.kernel.org

Hi all,

    I found that hardcoded instruction in inline asm can cause certains certain features fail to work on ARM platform due to endianness.
    As an example, consider the following code snippet of platform_do_lowpower function from arch/arm/mach-realview/hotplug.c:
                / *
                 * here's the WFI
                 */
                asm(".word      0xe320f003\n"
                    :
                    :
                    : "memory", "cc");

    The instruction generated from this inline asm will not work on big-endian ARM platform, such as ARM BE-8 format. Instead, an exception will be generated.

    Here the code should be:
                / *
                 * here's the WFI
                 */
                asm("WFI\n"
                    :
                    :
                    : "memory", "cc");

    Seems the kernel doesn't support ARM BE-8 well. I don't know why this problem happens.
    Can anyone tell me who owns this part? I can prepare a patch then. 
    Thanks.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-16 17:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-15  3:46 Hardcoded instruction causes certain features to fail on ARM platfrom due to endianness Yangfei (Felix)
2012-10-15  7:28 ` Mikael Pettersson
2012-10-15 15:33   ` [PATCH] " Fei Yang
2012-10-16 12:49     ` Dave Martin
2012-10-16 16:33       ` Fei Yang
2012-10-16 17:25         ` Dave Martin

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).