aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2008-01-10 07:33:54 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-01-10 07:33:54 -0500
commit198a6d5a6189501e2b8abf4e3149ccb337866f65 (patch)
tree772eb567f7b42b4ebf0be739bf33c56ffbfb95ab /include
parentfd0b45dfd1858c6b49d06355a460bcf36d654c06 (diff)
[ARM] pxa: silence warnings from cpu_is_xxx() macros
If only a single CPU type is selected, __cpu_is_xxx() doesn't use its argument. This causes the compiler to issue a warning about an unused variable in the parent function. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/arch-pxa/hardware.h24
-rw-r--r--include/asm-arm/system.h13
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 ab2d963e742a..e25558faa5a4 100644
--- a/include/asm-arm/arch-pxa/hardware.h
+++ b/include/asm-arm/arch-pxa/hardware.h
@@ -121,38 +121,32 @@
121 121
122#define cpu_is_pxa21x() \ 122#define cpu_is_pxa21x() \
123 ({ \ 123 ({ \
124 unsigned int id = read_cpuid(CPUID_ID); \ 124 __cpu_is_pxa21x(read_cpuid_id()); \
125 __cpu_is_pxa21x(id); \
126 }) 125 })
127 126
128#define cpu_is_pxa25x() \ 127#define cpu_is_pxa25x() \
129 ({ \ 128 ({ \
130 unsigned int id = read_cpuid(CPUID_ID); \ 129 __cpu_is_pxa25x(read_cpuid_id()); \
131 __cpu_is_pxa25x(id); \
132 }) 130 })
133 131
134#define cpu_is_pxa27x() \ 132#define cpu_is_pxa27x() \
135 ({ \ 133 ({ \
136 unsigned int id = read_cpuid(CPUID_ID); \ 134 __cpu_is_pxa27x(read_cpuid_id()); \
137 __cpu_is_pxa27x(id); \
138 }) 135 })
139 136
140#define cpu_is_pxa300() \ 137#define cpu_is_pxa300() \
141 ({ \ 138 ({ \
142 unsigned int id = read_cpuid(CPUID_ID); \ 139 __cpu_is_pxa300(read_cpuid_id()); \
143 __cpu_is_pxa300(id); \
144 }) 140 })
145 141
146#define cpu_is_pxa310() \ 142#define cpu_is_pxa310() \
147 ({ \ 143 ({ \
148 unsigned int id = read_cpuid(CPUID_ID); \ 144 __cpu_is_pxa310(read_cpuid_id()); \
149 __cpu_is_pxa310(id); \
150 }) 145 })
151 146
152#define cpu_is_pxa320() \ 147#define cpu_is_pxa320() \
153 ({ \ 148 ({ \
154 unsigned int id = read_cpuid(CPUID_ID); \ 149 __cpu_is_pxa320(read_cpuid_id()); \
155 __cpu_is_pxa320(id); \
156 }) 150 })
157 151
158/* 152/*
@@ -174,14 +168,12 @@
174 168
175#define cpu_is_pxa2xx() \ 169#define cpu_is_pxa2xx() \
176 ({ \ 170 ({ \
177 unsigned int id = read_cpuid(CPUID_ID); \ 171 __cpu_is_pxa2xx(read_cpuid_id()); \
178 __cpu_is_pxa2xx(id); \
179 }) 172 })
180 173
181#define cpu_is_pxa3xx() \ 174#define cpu_is_pxa3xx() \
182 ({ \ 175 ({ \
183 unsigned int id = read_cpuid(CPUID_ID); \ 176 __cpu_is_pxa3xx(read_cpuid_id()); \
184 __cpu_is_pxa3xx(id); \
185 }) 177 })
186 178
187/* 179/*
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index 94ea8c6dc1a4..28425c473e71 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -75,8 +75,21 @@
75#ifndef __ASSEMBLY__ 75#ifndef __ASSEMBLY__
76 76
77#include <linux/linkage.h> 77#include <linux/linkage.h>
78#include <linux/stringify.h>
78#include <linux/irqflags.h> 79#include <linux/irqflags.h>
79 80
81/*
82 * The CPU ID never changes at run time, so we might as well tell the
83 * compiler that it's constant. Use this function to read the CPU ID
84 * rather than directly reading processor_id or read_cpuid() directly.
85 */
86static inline unsigned int read_cpuid_id(void) __attribute_const__;
87
88static inline unsigned int read_cpuid_id(void)
89{
90 return read_cpuid(CPUID_ID);
91}
92
80#define __exception __attribute__((section(".exception.text"))) 93#define __exception __attribute__((section(".exception.text")))
81 94
82struct thread_info; 95struct thread_info;