From e7fd39859dbe7c39e0e9adf779aad0182304d714 Mon Sep 17 00:00:00 2001 From: Greg Ungerer Date: Fri, 23 May 2008 08:31:39 +0100 Subject: [PATCH] --- yaml --- r: 97289 b: refs/heads/master c: 415ad1e50abcc86c235a42fbab57f2b6134412d7 h: refs/heads/master i: 97287: d44b91c9e99dae51e93bf7812662c3158f75a524 v: v3 --- [refs] | 2 +- trunk/include/asm-arm/system.h | 29 +++++++++++++++-------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/[refs] b/[refs] index 06706506044b..d62d90533cd5 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 66aaeff1c27545909e502546120be2c5432394e3 +refs/heads/master: 415ad1e50abcc86c235a42fbab57f2b6134412d7 diff --git a/trunk/include/asm-arm/system.h b/trunk/include/asm-arm/system.h index 6335de9a2bb3..514af792a598 100644 --- a/trunk/include/asm-arm/system.h +++ b/trunk/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 #include +#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