diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-12 13:27:22 +0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-12 13:27:22 +0400 |
commit | bb6dfb32f90094fea647e1f27d994a8b6ddd2766 (patch) | |
tree | e63681727543bcc3251bbc82b81a9cc822cc3f5e /include/asm-arm/system.h | |
parent | 4f384f8bcdb5d618a0a68fb84c809e602c798b8f (diff) | |
parent | 5e70b7f3c24468bb1635b295945edb48ecd9656a (diff) | |
download | linux-bb6dfb32f90094fea647e1f27d994a8b6ddd2766.tar.xz |
Merge branch 'linus' into x86/gart
Diffstat (limited to 'include/asm-arm/system.h')
-rw-r--r-- | include/asm-arm/system.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 6335de9a2bb3..514af792a598 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 |