lkml.org 
[lkml]   [2012]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectHardcoded instruction causes certain features to fail on ARM platfrom due to endianness
Date
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.


\
 
 \ /
  Last update: 2012-10-15 06:21    [W:0.400 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site