Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARC: boot log: cut down on verbosity

The syscall ABI has long been fixed, so no need to call that out now.

Also, there's no need to print really fine details such as norm,
barrel-shifter etc. Those are given in a Linux enabled hardware config.
So now we print just 1 line for all optional "instruction" related
hardware features

|
| ISA Extn : atomic ll64 unalign mpy[opt 9] div_rem

vs. 2 before

|
|ISA Extn : atomic ll64 unalign
| : mpy[opt 9] div_rem norm barrel-shift swap minmax swape

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>

+32 -61
-9
arch/arc/include/asm/arcregs.h
··· 168 168 #endif 169 169 }; 170 170 171 - struct bcr_extn_xymem { 172 - #ifdef CONFIG_CPU_BIG_ENDIAN 173 - unsigned int ram_org:2, num_banks:4, bank_sz:4, ver:8; 174 - #else 175 - unsigned int ver:8, bank_sz:4, num_banks:4, ram_org:2; 176 - #endif 177 - }; 178 - 179 171 struct bcr_iccm_arcompact { 180 172 #ifdef CONFIG_CPU_BIG_ENDIAN 181 173 unsigned int base:16, pad:5, sz:3, ver:8; ··· 315 323 timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4; 316 324 } extn; 317 325 struct bcr_mpy extn_mpy; 318 - struct bcr_extn_xymem extn_xymem; 319 326 }; 320 327 321 328 extern struct cpuinfo_arc cpuinfo_arc700[];
+32 -52
arch/arc/kernel/setup.c
··· 188 188 189 189 READ_BCR(ARC_REG_MUL_BCR, cpu->extn_mpy); 190 190 191 - cpu->extn.norm = read_aux_reg(ARC_REG_NORM_BCR) > 1 ? 1 : 0; /* 2,3 */ 192 - cpu->extn.barrel = read_aux_reg(ARC_REG_BARREL_BCR) > 1 ? 1 : 0; /* 2,3 */ 193 - cpu->extn.swap = read_aux_reg(ARC_REG_SWAP_BCR) ? 1 : 0; /* 1,3 */ 194 - cpu->extn.crc = read_aux_reg(ARC_REG_CRC_BCR) ? 1 : 0; 195 - cpu->extn.minmax = read_aux_reg(ARC_REG_MIXMAX_BCR) > 1 ? 1 : 0; /* 2 */ 196 - cpu->extn.swape = (cpu->core.family >= 0x34) ? 1 : 197 - IS_ENABLED(CONFIG_ARC_HAS_SWAPE); 198 - 199 - READ_BCR(ARC_REG_XY_MEM_BCR, cpu->extn_xymem); 200 - 201 191 /* Read CCM BCRs for boot reporting even if not enabled in Kconfig */ 202 192 read_decode_ccm_bcr(cpu); 203 193 ··· 272 282 { 273 283 struct cpuinfo_arc *cpu = &cpuinfo_arc700[cpu_id]; 274 284 struct bcr_identity *core = &cpu->core; 285 + char mpy_opt[16]; 275 286 int n = 0; 276 287 277 288 FIX_PTR(cpu); ··· 293 302 IS_AVAIL2(cpu->extn.rtc, "RTC [UP 64-bit] ", CONFIG_ARC_TIMERS_64BIT), 294 303 IS_AVAIL2(cpu->extn.gfrc, "GFRC [SMP 64-bit] ", CONFIG_ARC_TIMERS_64BIT)); 295 304 296 - n += scnprintf(buf + n, len - n, "%s%s%s%s%s%s", 305 + if (cpu->extn_mpy.ver) { 306 + if (is_isa_arcompact()) { 307 + scnprintf(mpy_opt, 16, "mpy"); 308 + } else { 309 + 310 + int opt = 2; /* stock MPY/MPYH */ 311 + 312 + if (cpu->extn_mpy.dsp) /* OPT 7-9 */ 313 + opt = cpu->extn_mpy.dsp + 6; 314 + 315 + scnprintf(mpy_opt, 16, "mpy[opt %d] ", opt); 316 + } 317 + } 318 + 319 + n += scnprintf(buf + n, len - n, "%s%s%s%s%s%s%s%s\n", 297 320 IS_AVAIL2(cpu->isa.atomic, "atomic ", CONFIG_ARC_HAS_LLSC), 298 321 IS_AVAIL2(cpu->isa.ldd, "ll64 ", CONFIG_ARC_HAS_LL64), 299 - IS_AVAIL2(cpu->isa.unalign, "unalign ", CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS)); 322 + IS_AVAIL2(cpu->isa.unalign, "unalign ", CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS), 323 + IS_AVAIL1(cpu->extn_mpy.ver, mpy_opt), 324 + IS_AVAIL1(cpu->isa.div_rem, "div_rem ")); 325 + 300 326 301 327 #if defined(__ARC_UNALIGNED__) && !defined(CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS) 302 328 /* ··· 326 318 BUILD_BUG_ON_MSG(1, "gcc doesn't support -mno-unaligned-access"); 327 319 #endif 328 320 329 - n += scnprintf(buf + n, len - n, "\n\t\t: "); 330 - 331 - if (cpu->extn_mpy.ver) { 332 - if (cpu->extn_mpy.ver <= 0x2) { /* ARCompact */ 333 - n += scnprintf(buf + n, len - n, "mpy "); 334 - } else { 335 - int opt = 2; /* stock MPY/MPYH */ 336 - 337 - if (cpu->extn_mpy.dsp) /* OPT 7-9 */ 338 - opt = cpu->extn_mpy.dsp + 6; 339 - 340 - n += scnprintf(buf + n, len - n, "mpy[opt %d] ", opt); 341 - } 342 - } 343 - 344 - n += scnprintf(buf + n, len - n, "%s%s%s%s%s%s%s%s\n", 345 - IS_AVAIL1(cpu->isa.div_rem, "div_rem "), 346 - IS_AVAIL1(cpu->extn.norm, "norm "), 347 - IS_AVAIL1(cpu->extn.barrel, "barrel-shift "), 348 - IS_AVAIL1(cpu->extn.swap, "swap "), 349 - IS_AVAIL1(cpu->extn.minmax, "minmax "), 350 - IS_AVAIL1(cpu->extn.crc, "crc "), 351 - IS_AVAIL2(cpu->extn.swape, "swape", CONFIG_ARC_HAS_SWAPE)); 352 - 353 - if (cpu->bpu.ver) 321 + if (cpu->bpu.ver) { 354 322 n += scnprintf(buf + n, len - n, 355 323 "BPU\t\t: %s%s match, cache:%d, Predict Table:%d Return stk: %d", 356 324 IS_AVAIL1(cpu->bpu.full, "full"), 357 325 IS_AVAIL1(!cpu->bpu.full, "partial"), 358 326 cpu->bpu.num_cache, cpu->bpu.num_pred, cpu->bpu.ret_stk); 359 327 360 - if (is_isa_arcv2()) { 361 - struct bcr_lpb lpb; 328 + if (is_isa_arcv2()) { 329 + struct bcr_lpb lpb; 362 330 363 - READ_BCR(ARC_REG_LPB_BUILD, lpb); 364 - if (lpb.ver) { 365 - unsigned int ctl; 366 - ctl = read_aux_reg(ARC_REG_LPB_CTRL); 331 + READ_BCR(ARC_REG_LPB_BUILD, lpb); 332 + if (lpb.ver) { 333 + unsigned int ctl; 334 + ctl = read_aux_reg(ARC_REG_LPB_CTRL); 367 335 368 - n += scnprintf(buf + n, len - n, " Loop Buffer:%d %s", 369 - lpb.entries, 370 - IS_DISABLED_RUN(!ctl)); 336 + n += scnprintf(buf + n, len - n, " Loop Buffer:%d %s", 337 + lpb.entries, 338 + IS_DISABLED_RUN(!ctl)); 339 + } 371 340 } 341 + n += scnprintf(buf + n, len - n, "\n"); 372 342 } 373 343 374 - n += scnprintf(buf + n, len - n, "\n"); 375 344 return buf; 376 345 } 377 346 ··· 400 415 IS_AVAIL3(erp.mmu, !ctl.mpd, "MMU ")); 401 416 } 402 417 } 403 - 404 - n += scnprintf(buf + n, len - n, "OS ABI [v%d]\t: %s\n", 405 - EF_ARC_OSABI_CURRENT >> 8, 406 - EF_ARC_OSABI_CURRENT == EF_ARC_OSABI_V3 ? 407 - "no-legacy-syscalls" : "64-bit data any register aligned"); 408 418 409 419 return buf; 410 420 }