diff options
Diffstat (limited to 'arch/arm/include/asm/smp_mpidr.h')
-rw-r--r-- | arch/arm/include/asm/smp_mpidr.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/include/asm/smp_mpidr.h b/arch/arm/include/asm/smp_mpidr.h new file mode 100644 index 000000000000..7da7105e83e5 --- /dev/null +++ b/arch/arm/include/asm/smp_mpidr.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef ASMARM_SMP_MIDR_H | ||
2 | #define ASMARM_SMP_MIDR_H | ||
3 | |||
4 | #define hard_smp_processor_id() \ | ||
5 | ({ \ | ||
6 | unsigned int cpunum; \ | ||
7 | __asm__("mrc p15, 0, %0, c0, c0, 5\n" \ | ||
8 | : "=r" (cpunum)); \ | ||
9 | cpunum &= 0x0F; \ | ||
10 | }) | ||
11 | |||
12 | #endif | ||