summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/smp_mpidr.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/include/asm/smp_mpidr.h')
-rw-r--r--arch/arm/include/asm/smp_mpidr.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/include/asm/smp_mpidr.h b/arch/arm/include/asm/smp_mpidr.h
index 7da7105e83e5..6a9307d64900 100644
--- a/arch/arm/include/asm/smp_mpidr.h
+++ b/arch/arm/include/asm/smp_mpidr.h
@@ -4,7 +4,12 @@
#define hard_smp_processor_id() \
({ \
unsigned int cpunum; \
- __asm__("mrc p15, 0, %0, c0, c0, 5\n" \
+ __asm__("\n" \
+ "1: mrc p15, 0, %0, c0, c0, 5\n" \
+ " .pushsection \".alt.smp.init\", \"a\"\n"\
+ " .long 1b\n" \
+ " mov %0, #0\n" \
+ " .popsection" \
: "=r" (cpunum)); \
cpunum &= 0x0F; \
})