blob: b59f7bc9725d251812f102b0443f1f714270afe8 [file] [log] [blame]
Mian Yousaf Kaukabb1b22612010-05-01 21:46:35 +02001/*
Mian Yousaf Kaukab04b84332010-06-16 16:07:57 +02002 * This file is based ARM realview platform.
3 * Copyright (C) ARM Limited.
Mian Yousaf Kaukabb1b22612010-05-01 21:46:35 +02004 *
Mian Yousaf Kaukab04b84332010-06-16 16:07:57 +02005 * This file is licensed under the terms of the GNU General Public
6 * License version 2. This program is licensed "as is" without any
7 * warranty of any kind, whether express or implied.
Mian Yousaf Kaukabb1b22612010-05-01 21:46:35 +02008 */
9#ifndef ASMARM_ARCH_SMP_H
10#define ASMARM_ARCH_SMP_H
11
Mian Yousaf Kaukabb1b22612010-05-01 21:46:35 +020012#include <asm/hardware/gic.h>
13
Mian Yousaf Kaukab04b84332010-06-16 16:07:57 +020014/* This is required to wakeup the secondary core */
15extern void u8500_secondary_startup(void);
16
17#define hard_smp_processor_id() \
Mian Yousaf Kaukabb1b22612010-05-01 21:46:35 +020018 ({ \
19 unsigned int cpunum; \
20 __asm__("mrc p15, 0, %0, c0, c0, 5" \
21 : "=r" (cpunum)); \
22 cpunum &= 0x0F; \
23 })
24
25/*
26 * We use IRQ1 as the IPI
27 */
Sundar R Iyercf676762010-03-02 20:29:25 +053028static inline void smp_cross_call(const struct cpumask *mask)
Mian Yousaf Kaukabb1b22612010-05-01 21:46:35 +020029{
Sundar R Iyercf676762010-03-02 20:29:25 +053030 gic_raise_softirq(mask, 1);
Mian Yousaf Kaukabb1b22612010-05-01 21:46:35 +020031}
Mian Yousaf Kaukabb1b22612010-05-01 21:46:35 +020032#endif