diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-13 10:03:10 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-13 10:03:10 -0800 |
commit | 1a1b285c24e1468afe82b09330dde5192a6e0013 (patch) | |
tree | 94406d24339b3791b7b5481ee969f0300e3c48cf /include | |
parent | d72ec9e20e4de995aa957f171cf84b136689e4c0 (diff) | |
parent | 90e6b048365950416419c031f2f2d9a8afb5b70c (diff) | |
download | kernel-crypto-1a1b285c24e1468afe82b09330dde5192a6e0013.tar.gz kernel-crypto-1a1b285c24e1468afe82b09330dde5192a6e0013.tar.xz kernel-crypto-1a1b285c24e1468afe82b09330dde5192a6e0013.zip |
Merge master.kernel.org:/home/rmk/linux-2.6-arm
* master.kernel.org:/home/rmk/linux-2.6-arm:
[ARM] vfp: fix fuitod/fsitod instructions
[ARM] pxa: silence warnings from cpu_is_xxx() macros
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-pxa/hardware.h | 24 | ||||
-rw-r--r-- | include/asm-arm/system.h | 13 |
2 files changed, 21 insertions, 16 deletions
diff --git a/include/asm-arm/arch-pxa/hardware.h b/include/asm-arm/arch-pxa/hardware.h index ab2d963e742..e25558faa5a 100644 --- a/include/asm-arm/arch-pxa/hardware.h +++ b/include/asm-arm/arch-pxa/hardware.h @@ -121,38 +121,32 @@ #define cpu_is_pxa21x() \ ({ \ - unsigned int id = read_cpuid(CPUID_ID); \ - __cpu_is_pxa21x(id); \ + __cpu_is_pxa21x(read_cpuid_id()); \ }) #define cpu_is_pxa25x() \ ({ \ - unsigned int id = read_cpuid(CPUID_ID); \ - __cpu_is_pxa25x(id); \ + __cpu_is_pxa25x(read_cpuid_id()); \ }) #define cpu_is_pxa27x() \ ({ \ - unsigned int id = read_cpuid(CPUID_ID); \ - __cpu_is_pxa27x(id); \ + __cpu_is_pxa27x(read_cpuid_id()); \ }) #define cpu_is_pxa300() \ ({ \ - unsigned int id = read_cpuid(CPUID_ID); \ - __cpu_is_pxa300(id); \ + __cpu_is_pxa300(read_cpuid_id()); \ }) #define cpu_is_pxa310() \ ({ \ - unsigned int id = read_cpuid(CPUID_ID); \ - __cpu_is_pxa310(id); \ + __cpu_is_pxa310(read_cpuid_id()); \ }) #define cpu_is_pxa320() \ ({ \ - unsigned int id = read_cpuid(CPUID_ID); \ - __cpu_is_pxa320(id); \ + __cpu_is_pxa320(read_cpuid_id()); \ }) /* @@ -174,14 +168,12 @@ #define cpu_is_pxa2xx() \ ({ \ - unsigned int id = read_cpuid(CPUID_ID); \ - __cpu_is_pxa2xx(id); \ + __cpu_is_pxa2xx(read_cpuid_id()); \ }) #define cpu_is_pxa3xx() \ ({ \ - unsigned int id = read_cpuid(CPUID_ID); \ - __cpu_is_pxa3xx(id); \ + __cpu_is_pxa3xx(read_cpuid_id()); \ }) /* diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h index 94ea8c6dc1a..28425c473e7 100644 --- a/include/asm-arm/system.h +++ b/include/asm-arm/system.h @@ -75,8 +75,21 @@ #ifndef __ASSEMBLY__ #include <linux/linkage.h> +#include <linux/stringify.h> #include <linux/irqflags.h> +/* + * 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 + * rather than directly reading processor_id or read_cpuid() directly. + */ +static inline unsigned int read_cpuid_id(void) __attribute_const__; + +static inline unsigned int read_cpuid_id(void) +{ + return read_cpuid(CPUID_ID); +} + #define __exception __attribute__((section(".exception.text"))) struct thread_info; |