diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-13 13:03:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-01-13 13:03:10 -0500 |
commit | 1a1b285c24e1468afe82b09330dde5192a6e0013 (patch) | |
tree | 94406d24339b3791b7b5481ee969f0300e3c48cf | |
parent | d72ec9e20e4de995aa957f171cf84b136689e4c0 (diff) | |
parent | 90e6b048365950416419c031f2f2d9a8afb5b70c (diff) |
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
-rw-r--r-- | arch/arm/vfp/vfp.h | 2 | ||||
-rw-r--r-- | arch/arm/vfp/vfpdouble.c | 14 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/hardware.h | 24 | ||||
-rw-r--r-- | include/asm-arm/system.h | 13 |
4 files changed, 34 insertions, 19 deletions
diff --git a/arch/arm/vfp/vfp.h b/arch/arm/vfp/vfp.h index 54a2ad6d9ca2..791d0238c68f 100644 --- a/arch/arm/vfp/vfp.h +++ b/arch/arm/vfp/vfp.h | |||
@@ -361,10 +361,12 @@ u32 vfp_estimate_sqrt_significand(u32 exponent, u32 significand); | |||
361 | * OP_SCALAR - this operation always operates in scalar mode | 361 | * OP_SCALAR - this operation always operates in scalar mode |
362 | * OP_SD - the instruction exceptionally writes to a single precision result. | 362 | * OP_SD - the instruction exceptionally writes to a single precision result. |
363 | * OP_DD - the instruction exceptionally writes to a double precision result. | 363 | * OP_DD - the instruction exceptionally writes to a double precision result. |
364 | * OP_SM - the instruction exceptionally reads from a single precision operand. | ||
364 | */ | 365 | */ |
365 | #define OP_SCALAR (1 << 0) | 366 | #define OP_SCALAR (1 << 0) |
366 | #define OP_SD (1 << 1) | 367 | #define OP_SD (1 << 1) |
367 | #define OP_DD (1 << 1) | 368 | #define OP_DD (1 << 1) |
369 | #define OP_SM (1 << 2) | ||
368 | 370 | ||
369 | struct op { | 371 | struct op { |
370 | u32 (* const fn)(int dd, int dn, int dm, u32 fpscr); | 372 | u32 (* const fn)(int dd, int dn, int dm, u32 fpscr); |
diff --git a/arch/arm/vfp/vfpdouble.c b/arch/arm/vfp/vfpdouble.c index 190a09ad18eb..6cac43bd1d86 100644 --- a/arch/arm/vfp/vfpdouble.c +++ b/arch/arm/vfp/vfpdouble.c | |||
@@ -668,8 +668,8 @@ static struct op fops_ext[32] = { | |||
668 | [FEXT_TO_IDX(FEXT_FCMPZ)] = { vfp_double_fcmpz, OP_SCALAR }, | 668 | [FEXT_TO_IDX(FEXT_FCMPZ)] = { vfp_double_fcmpz, OP_SCALAR }, |
669 | [FEXT_TO_IDX(FEXT_FCMPEZ)] = { vfp_double_fcmpez, OP_SCALAR }, | 669 | [FEXT_TO_IDX(FEXT_FCMPEZ)] = { vfp_double_fcmpez, OP_SCALAR }, |
670 | [FEXT_TO_IDX(FEXT_FCVT)] = { vfp_double_fcvts, OP_SCALAR|OP_SD }, | 670 | [FEXT_TO_IDX(FEXT_FCVT)] = { vfp_double_fcvts, OP_SCALAR|OP_SD }, |
671 | [FEXT_TO_IDX(FEXT_FUITO)] = { vfp_double_fuito, OP_SCALAR }, | 671 | [FEXT_TO_IDX(FEXT_FUITO)] = { vfp_double_fuito, OP_SCALAR|OP_SM }, |
672 | [FEXT_TO_IDX(FEXT_FSITO)] = { vfp_double_fsito, OP_SCALAR }, | 672 | [FEXT_TO_IDX(FEXT_FSITO)] = { vfp_double_fsito, OP_SCALAR|OP_SM }, |
673 | [FEXT_TO_IDX(FEXT_FTOUI)] = { vfp_double_ftoui, OP_SCALAR|OP_SD }, | 673 | [FEXT_TO_IDX(FEXT_FTOUI)] = { vfp_double_ftoui, OP_SCALAR|OP_SD }, |
674 | [FEXT_TO_IDX(FEXT_FTOUIZ)] = { vfp_double_ftouiz, OP_SCALAR|OP_SD }, | 674 | [FEXT_TO_IDX(FEXT_FTOUIZ)] = { vfp_double_ftouiz, OP_SCALAR|OP_SD }, |
675 | [FEXT_TO_IDX(FEXT_FTOSI)] = { vfp_double_ftosi, OP_SCALAR|OP_SD }, | 675 | [FEXT_TO_IDX(FEXT_FTOSI)] = { vfp_double_ftosi, OP_SCALAR|OP_SD }, |
@@ -1128,7 +1128,7 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) | |||
1128 | u32 exceptions = 0; | 1128 | u32 exceptions = 0; |
1129 | unsigned int dest; | 1129 | unsigned int dest; |
1130 | unsigned int dn = vfp_get_dn(inst); | 1130 | unsigned int dn = vfp_get_dn(inst); |
1131 | unsigned int dm = vfp_get_dm(inst); | 1131 | unsigned int dm; |
1132 | unsigned int vecitr, veclen, vecstride; | 1132 | unsigned int vecitr, veclen, vecstride; |
1133 | struct op *fop; | 1133 | struct op *fop; |
1134 | 1134 | ||
@@ -1146,6 +1146,14 @@ u32 vfp_double_cpdo(u32 inst, u32 fpscr) | |||
1146 | dest = vfp_get_dd(inst); | 1146 | dest = vfp_get_dd(inst); |
1147 | 1147 | ||
1148 | /* | 1148 | /* |
1149 | * f[us]ito takes a sN operand, not a dN operand. | ||
1150 | */ | ||
1151 | if (fop->flags & OP_SM) | ||
1152 | dm = vfp_get_sm(inst); | ||
1153 | else | ||
1154 | dm = vfp_get_dm(inst); | ||
1155 | |||
1156 | /* | ||
1149 | * If destination bank is zero, vector length is always '1'. | 1157 | * If destination bank is zero, vector length is always '1'. |
1150 | * ARM DDI0100F C5.1.3, C5.3.2. | 1158 | * ARM DDI0100F C5.1.3, C5.3.2. |
1151 | */ | 1159 | */ |
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 | */ | ||
86 | static inline unsigned int read_cpuid_id(void) __attribute_const__; | ||
87 | |||
88 | static 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 | ||
82 | struct thread_info; | 95 | struct thread_info; |