aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm
diff options
context:
space:
mode:
authorGreg Ungerer <gerg@snapgear.com>2008-05-23 08:31:39 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-05-23 13:50:08 +0100
commit415ad1e50abcc86c235a42fbab57f2b6134412d7 (patch)
tree544076100f62d1210a8f4babe2fed7f62afa92c5 /include/asm-arm
parent66aaeff1c27545909e502546120be2c5432394e3 (diff)
downloadkernel_samsung_aries-415ad1e50abcc86c235a42fbab57f2b6134412d7.zip
kernel_samsung_aries-415ad1e50abcc86c235a42fbab57f2b6134412d7.tar.gz
kernel_samsung_aries-415ad1e50abcc86c235a42fbab57f2b6134412d7.tar.bz2
[ARM] 5053/1: define before use of processor_id
For the simple read_cpuid() macro case the variable processor_id has no definition on use of the macro. Add an extern for it. Move all the processor ID macros into the #ifndef __ASSEMBLEY__ block. Signed-off-by: Greg Ungerer <gerg@uclinux.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm')
-rw-r--r--include/asm-arm/system.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 6335de9..514af79 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -48,20 +48,6 @@
#define CPUID_TCM 2
#define CPUID_TLBTYPE 3
-#ifdef CONFIG_CPU_CP15
-#define read_cpuid(reg) \
- ({ \
- unsigned int __val; \
- asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \
- : "=r" (__val) \
- : \
- : "cc"); \
- __val; \
- })
-#else
-#define read_cpuid(reg) (processor_id)
-#endif
-
/*
* This is used to ensure the compiler did actually allocate the register we
* asked it for some inline assembly sequences. Apparently we can't trust
@@ -78,6 +64,21 @@
#include <linux/stringify.h>
#include <linux/irqflags.h>
+#ifdef CONFIG_CPU_CP15
+#define read_cpuid(reg) \
+ ({ \
+ unsigned int __val; \
+ asm("mrc p15, 0, %0, c0, c0, " __stringify(reg) \
+ : "=r" (__val) \
+ : \
+ : "cc"); \
+ __val; \
+ })
+#else
+extern unsigned int processor_id;
+#define read_cpuid(reg) (processor_id)
+#endif
+
/*
* The CPU ID never changes at run time, so we might as well tell the
* compiler that it's constant. Use this function to read the CPU ID