public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: santosh.shilimkar@ti•com (Santosh Shilimkar)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] ARM: keystone: remove hand-coded smc instruction
Date: Fri, 21 Jun 2013 16:49:30 -0400	[thread overview]
Message-ID: <51C4BC5A.70105@ti.com> (raw)
In-Reply-To: <201306212235.43125.arnd@arndb.de>

On Friday 21 June 2013 04:35 PM, Arnd Bergmann wrote:
> On Friday 21 June 2013, Arnd Bergmann wrote:
>> This lets us build keystone with CONFIG_THUMB2_KERNEL enabled,
>> without the patch we get this error:
>>
>> Error: cannot determine Thumb instruction size. Use .inst.n/.inst.w instead
>>
>> This follows the same change for all other platforms done
>> earlier.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb•de>
>> Cc: Santosh Shilimkar <santosh.shilimkar@ti•com>
>>
>> diff --git a/arch/arm/mach-keystone/platsmp.c b/arch/arm/mach-keystone/platsmp.c
>> index 630ab3bd..1800c33 100644
>> --- a/arch/arm/mach-keystone/platsmp.c
>> +++ b/arch/arm/mach-keystone/platsmp.c
>> @@ -34,7 +34,7 @@ static int __cpuinit keystone_smp_boot_secondary(unsigned int cpu,
>>  		"mov    r0, #0\n"	/* power on cmd	*/
>>  		"mov    r1, %1\n"	/* cpu		*/
>>  		"mov    r2, %2\n"	/* start	*/
>> -		".inst  0xe1600070\n"	/* smc #0	*/
>> +		"smc	#0\n"		/* smc #0	*/
>>  		"mov    %0, r0\n"
>>  		: "=r" (error)
>>  		: "r"(cpu), "r"(start)
> 
> Ah, damm, now I get this error for building an ARMv6+ARMv7 combined kernel:
> 
> /tmp/ccSWHCik.s:55: Error: selected processor does not support ARM mode `smc #0'
> 
> I'll add a -march=armv7-a gcc flag as well.
> 
I was just typing about the error. I started with smc first but then
hit the below one which lead me to write an opcode. I couldn't compile c file
for v7 only build and hence letf it in encoded format.

I will be moving this code to separate asm file along with other smc
API support.

Regards,
Santosh 

  reply	other threads:[~2013-06-21 20:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-21 20:28 [PATCH] ARM: keystone: remove hand-coded smc instruction Arnd Bergmann
2013-06-21 20:35 ` Arnd Bergmann
2013-06-21 20:49   ` Santosh Shilimkar [this message]
2013-06-21 21:13     ` Arnd Bergmann
2013-06-21 21:20       ` Santosh Shilimkar
2013-06-21 21:41         ` Arnd Bergmann
2013-06-21 22:54           ` Santosh Shilimkar
2013-06-25 14:13             ` Dave Martin
2013-06-25 14:27               ` Santosh Shilimkar
2013-06-25 14:32                 ` Dave Martin
2013-06-25 14:40                   ` Santosh Shilimkar
2013-06-25 15:39                     ` Dave Martin
2013-06-25 15:51                       ` Santosh Shilimkar
2013-06-25 14:07     ` Dave Martin
2013-06-25 14:10       ` Santosh Shilimkar

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=51C4BC5A.70105@ti.com \
    --to=santosh.shilimkar@ti$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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