|
23 | 23 | #define ARC_REG_ICCM_BUILD 0x78 /* ICCM size (common) */ |
24 | 24 | #define ARC_REG_XY_MEM_BCR 0x79 |
25 | 25 | #define ARC_REG_MAC_BCR 0x7a |
26 | | -#define ARC_REG_MUL_BCR 0x7b |
| 26 | +#define ARC_REG_MPY_BCR 0x7b |
27 | 27 | #define ARC_REG_SWAP_BCR 0x7c |
28 | 28 | #define ARC_REG_NORM_BCR 0x7d |
29 | 29 | #define ARC_REG_MIXMAX_BCR 0x7e |
@@ -177,14 +177,67 @@ struct bcr_isa_arcv2 { |
177 | 177 | #endif |
178 | 178 | }; |
179 | 179 |
|
180 | | -struct bcr_uarch_build_arcv2 { |
| 180 | +struct bcr_uarch_build { |
181 | 181 | #ifdef CONFIG_CPU_BIG_ENDIAN |
182 | 182 | unsigned int pad:8, prod:8, maj:8, min:8; |
183 | 183 | #else |
184 | 184 | unsigned int min:8, maj:8, prod:8, pad:8; |
185 | 185 | #endif |
186 | 186 | }; |
187 | 187 |
|
| 188 | +struct bcr_mmu_3 { |
| 189 | +#ifdef CONFIG_CPU_BIG_ENDIAN |
| 190 | + unsigned int ver:8, ways:4, sets:4, res:3, sasid:1, pg_sz:4, |
| 191 | + u_itlb:4, u_dtlb:4; |
| 192 | +#else |
| 193 | + unsigned int u_dtlb:4, u_itlb:4, pg_sz:4, sasid:1, res:3, sets:4, |
| 194 | + ways:4, ver:8; |
| 195 | +#endif |
| 196 | +}; |
| 197 | + |
| 198 | +struct bcr_mmu_4 { |
| 199 | +#ifdef CONFIG_CPU_BIG_ENDIAN |
| 200 | + unsigned int ver:8, sasid:1, sz1:4, sz0:4, res:2, pae:1, |
| 201 | + n_ways:2, n_entry:2, n_super:2, u_itlb:3, u_dtlb:3; |
| 202 | +#else |
| 203 | + /* DTLB ITLB JES JE JA */ |
| 204 | + unsigned int u_dtlb:3, u_itlb:3, n_super:2, n_entry:2, n_ways:2, |
| 205 | + pae:1, res:2, sz0:4, sz1:4, sasid:1, ver:8; |
| 206 | +#endif |
| 207 | +}; |
| 208 | + |
| 209 | +struct bcr_cache { |
| 210 | +#ifdef CONFIG_CPU_BIG_ENDIAN |
| 211 | + unsigned int pad:12, line_len:4, sz:4, config:4, ver:8; |
| 212 | +#else |
| 213 | + unsigned int ver:8, config:4, sz:4, line_len:4, pad:12; |
| 214 | +#endif |
| 215 | +}; |
| 216 | + |
| 217 | +struct bcr_slc_cfg { |
| 218 | +#ifdef CONFIG_CPU_BIG_ENDIAN |
| 219 | + unsigned int pad:24, way:2, lsz:2, sz:4; |
| 220 | +#else |
| 221 | + unsigned int sz:4, lsz:2, way:2, pad:24; |
| 222 | +#endif |
| 223 | +}; |
| 224 | + |
| 225 | +struct bcr_clust_cfg { |
| 226 | +#ifdef CONFIG_CPU_BIG_ENDIAN |
| 227 | + unsigned int pad:7, c:1, num_entries:8, num_cores:8, ver:8; |
| 228 | +#else |
| 229 | + unsigned int ver:8, num_cores:8, num_entries:8, c:1, pad:7; |
| 230 | +#endif |
| 231 | +}; |
| 232 | + |
| 233 | +struct bcr_volatile { |
| 234 | +#ifdef CONFIG_CPU_BIG_ENDIAN |
| 235 | + unsigned int start:4, limit:4, pad:22, order:1, disable:1; |
| 236 | +#else |
| 237 | + unsigned int disable:1, order:1, pad:22, limit:4, start:4; |
| 238 | +#endif |
| 239 | +}; |
| 240 | + |
188 | 241 | struct bcr_mpy { |
189 | 242 | #ifdef CONFIG_CPU_BIG_ENDIAN |
190 | 243 | unsigned int pad:8, x1616:8, dsp:4, cycles:2, type:2, ver:8; |
@@ -302,49 +355,6 @@ struct bcr_generic { |
302 | 355 | #endif |
303 | 356 | }; |
304 | 357 |
|
305 | | -/* |
306 | | - ******************************************************************* |
307 | | - * Generic structures to hold build configuration used at runtime |
308 | | - */ |
309 | | - |
310 | | -struct cpuinfo_arc_mmu { |
311 | | - unsigned int ver:4, pg_sz_k:8, s_pg_sz_m:8, pad:10, sasid:1, pae:1; |
312 | | - unsigned int sets:12, ways:4, u_dtlb:8, u_itlb:8; |
313 | | -}; |
314 | | - |
315 | | -struct cpuinfo_arc_cache { |
316 | | - unsigned int sz_k:14, line_len:8, assoc:4, alias:1, vipt:1, pad:4; |
317 | | -}; |
318 | | - |
319 | | -struct cpuinfo_arc_bpu { |
320 | | - unsigned int ver, full, num_cache, num_pred, ret_stk; |
321 | | -}; |
322 | | - |
323 | | -struct cpuinfo_arc_ccm { |
324 | | - unsigned long base_addr; |
325 | | - unsigned int sz; |
326 | | -}; |
327 | | - |
328 | | -struct cpuinfo_arc { |
329 | | - struct cpuinfo_arc_cache icache, dcache, slc; |
330 | | - struct cpuinfo_arc_mmu mmu; |
331 | | - struct cpuinfo_arc_bpu bpu; |
332 | | - struct bcr_identity core; |
333 | | - struct bcr_isa_arcv2 isa; |
334 | | - const char *release, *name; |
335 | | - unsigned long vec_base; |
336 | | - struct cpuinfo_arc_ccm iccm, dccm; |
337 | | - struct { |
338 | | - unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, swape:1, pad1:2, |
339 | | - fpu_sp:1, fpu_dp:1, dual:1, dual_enb:1, pad2:4, |
340 | | - ap_num:4, ap_full:1, smart:1, rtt:1, pad3:1, |
341 | | - timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4; |
342 | | - } extn; |
343 | | - struct bcr_mpy extn_mpy; |
344 | | -}; |
345 | | - |
346 | | -extern struct cpuinfo_arc cpuinfo_arc700[]; |
347 | | - |
348 | 358 | static inline int is_isa_arcv3(void) |
349 | 359 | { |
350 | 360 | return IS_ENABLED(CONFIG_ISA_ARCV3); |
|
0 commit comments