[PATCH v2 3/3] ARM: keystone: Enable SMP support on Keystone machines
Santosh Shilimkar
santosh.shilimkar at ti.com
Thu Jun 13 17:15:24 EDT 2013
Marc,
On Thursday 13 June 2013 11:49 AM, Mark Rutland wrote:
> On Wed, Jun 12, 2013 at 10:25:17PM +0100, Santosh Shilimkar wrote:
>> Add basic SMP support for Keystone machines. This does not
>> include support for CPU hotplug for now.
>>
>> Cc: Olof Johansson <olof at lixom.net>
>> Cc: Arnd Bergmann <arnd at arndb.de>
>> Cc: arm at kernel.org
>>
>> Signed-off-by: Santosh Shilimkar <santosh.shilimkar at ti.com>
>> ---
[..]
>> +static int __cpuinit keystone_smp_boot_secondary(unsigned int cpu,
>> + struct task_struct *idle)
>> +{
>> + unsigned long start = virt_to_phys(&secondary_startup);
>> + int error;
>> +
>> + pr_debug("keystone-smp: booting cpu %d, vector %08lx\n",
>> + cpu, start);
>> +
>> + asm volatile (
>> + "mov r0, #0\n" /* power on cmd */
>> + "mov r1, %1\n" /* cpu */
>> + "mov r2, %2\n" /* start */
>> + ".inst 0xe1600070\n" /* smc #0 */
>
> In arch/arm/asm/opcodes-sec.h we have an __SMC() macro you could use here
> that'll use the correct opcode for arm or thumb kernels.
>
Thanks for the suggestion though I am going to leave above as is now.
I need to move this code to asm file when I add remainder of the
monitor API support. Also inserting the macro in between means,
I need to break down the asm into two blocks which I want to
avoid for now.
Regards,
Santosh
More information about the linux-arm-kernel
mailing list