Skip to content

Commit 85d6adc

Browse files
committed
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>
1 parent 00a4ae6 commit 85d6adc

File tree

2 files changed

+32
-61
lines changed

2 files changed

+32
-61
lines changed

arch/arc/include/asm/arcregs.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,6 @@ struct bcr_mpy {
168168
#endif
169169
};
170170

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-
179171
struct bcr_iccm_arcompact {
180172
#ifdef CONFIG_CPU_BIG_ENDIAN
181173
unsigned int base:16, pad:5, sz:3, ver:8;
@@ -323,7 +315,6 @@ struct cpuinfo_arc {
323315
timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4;
324316
} extn;
325317
struct bcr_mpy extn_mpy;
326-
struct bcr_extn_xymem extn_xymem;
327318
};
328319

329320
extern struct cpuinfo_arc cpuinfo_arc700[];

arch/arc/kernel/setup.c

Lines changed: 32 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -188,16 +188,6 @@ static void read_arc_build_cfg_regs(void)
188188

189189
READ_BCR(ARC_REG_MUL_BCR, cpu->extn_mpy);
190190

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-
201191
/* Read CCM BCRs for boot reporting even if not enabled in Kconfig */
202192
read_decode_ccm_bcr(cpu);
203193

@@ -282,6 +272,7 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
282272
{
283273
struct cpuinfo_arc *cpu = &cpuinfo_arc700[cpu_id];
284274
struct bcr_identity *core = &cpu->core;
275+
char mpy_opt[16];
285276
int n = 0;
286277

287278
FIX_PTR(cpu);
@@ -302,10 +293,27 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
302293
IS_AVAIL2(cpu->extn.rtc, "RTC [UP 64-bit] ", CONFIG_ARC_TIMERS_64BIT),
303294
IS_AVAIL2(cpu->extn.gfrc, "GFRC [SMP 64-bit] ", CONFIG_ARC_TIMERS_64BIT));
304295

305-
n += scnprintf(buf + n, len - n, "%s%s%s%s%s%s",
296+
if (cpu->extn_mpy.ver) {
297+
if (is_isa_arcompact()) {
298+
scnprintf(mpy_opt, 16, "mpy");
299+
} else {
300+
301+
int opt = 2; /* stock MPY/MPYH */
302+
303+
if (cpu->extn_mpy.dsp) /* OPT 7-9 */
304+
opt = cpu->extn_mpy.dsp + 6;
305+
306+
scnprintf(mpy_opt, 16, "mpy[opt %d] ", opt);
307+
}
308+
}
309+
310+
n += scnprintf(buf + n, len - n, "%s%s%s%s%s%s%s%s\n",
306311
IS_AVAIL2(cpu->isa.atomic, "atomic ", CONFIG_ARC_HAS_LLSC),
307312
IS_AVAIL2(cpu->isa.ldd, "ll64 ", CONFIG_ARC_HAS_LL64),
308-
IS_AVAIL2(cpu->isa.unalign, "unalign ", CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS));
313+
IS_AVAIL2(cpu->isa.unalign, "unalign ", CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS),
314+
IS_AVAIL1(cpu->extn_mpy.ver, mpy_opt),
315+
IS_AVAIL1(cpu->isa.div_rem, "div_rem "));
316+
309317

310318
#if defined(__ARC_UNALIGNED__) && !defined(CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS)
311319
/*
@@ -318,52 +326,29 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
318326
BUILD_BUG_ON_MSG(1, "gcc doesn't support -mno-unaligned-access");
319327
#endif
320328

321-
n += scnprintf(buf + n, len - n, "\n\t\t: ");
322-
323-
if (cpu->extn_mpy.ver) {
324-
if (cpu->extn_mpy.ver <= 0x2) { /* ARCompact */
325-
n += scnprintf(buf + n, len - n, "mpy ");
326-
} else {
327-
int opt = 2; /* stock MPY/MPYH */
328-
329-
if (cpu->extn_mpy.dsp) /* OPT 7-9 */
330-
opt = cpu->extn_mpy.dsp + 6;
331-
332-
n += scnprintf(buf + n, len - n, "mpy[opt %d] ", opt);
333-
}
334-
}
335-
336-
n += scnprintf(buf + n, len - n, "%s%s%s%s%s%s%s%s\n",
337-
IS_AVAIL1(cpu->isa.div_rem, "div_rem "),
338-
IS_AVAIL1(cpu->extn.norm, "norm "),
339-
IS_AVAIL1(cpu->extn.barrel, "barrel-shift "),
340-
IS_AVAIL1(cpu->extn.swap, "swap "),
341-
IS_AVAIL1(cpu->extn.minmax, "minmax "),
342-
IS_AVAIL1(cpu->extn.crc, "crc "),
343-
IS_AVAIL2(cpu->extn.swape, "swape", CONFIG_ARC_HAS_SWAPE));
344-
345-
if (cpu->bpu.ver)
329+
if (cpu->bpu.ver) {
346330
n += scnprintf(buf + n, len - n,
347331
"BPU\t\t: %s%s match, cache:%d, Predict Table:%d Return stk: %d",
348332
IS_AVAIL1(cpu->bpu.full, "full"),
349333
IS_AVAIL1(!cpu->bpu.full, "partial"),
350334
cpu->bpu.num_cache, cpu->bpu.num_pred, cpu->bpu.ret_stk);
351335

352-
if (is_isa_arcv2()) {
353-
struct bcr_lpb lpb;
336+
if (is_isa_arcv2()) {
337+
struct bcr_lpb lpb;
354338

355-
READ_BCR(ARC_REG_LPB_BUILD, lpb);
356-
if (lpb.ver) {
357-
unsigned int ctl;
358-
ctl = read_aux_reg(ARC_REG_LPB_CTRL);
339+
READ_BCR(ARC_REG_LPB_BUILD, lpb);
340+
if (lpb.ver) {
341+
unsigned int ctl;
342+
ctl = read_aux_reg(ARC_REG_LPB_CTRL);
359343

360-
n += scnprintf(buf + n, len - n, " Loop Buffer:%d %s",
361-
lpb.entries,
362-
IS_DISABLED_RUN(!ctl));
344+
n += scnprintf(buf + n, len - n, " Loop Buffer:%d %s",
345+
lpb.entries,
346+
IS_DISABLED_RUN(!ctl));
347+
}
363348
}
349+
n += scnprintf(buf + n, len - n, "\n");
364350
}
365351

366-
n += scnprintf(buf + n, len - n, "\n");
367352
return buf;
368353
}
369354

@@ -416,11 +401,6 @@ static char *arc_extn_mumbojumbo(int cpu_id, char *buf, int len)
416401
}
417402
}
418403

419-
n += scnprintf(buf + n, len - n, "OS ABI [v%d]\t: %s\n",
420-
EF_ARC_OSABI_CURRENT >> 8,
421-
EF_ARC_OSABI_CURRENT == EF_ARC_OSABI_V3 ?
422-
"no-legacy-syscalls" : "64-bit data any register aligned");
423-
424404
return buf;
425405
}
426406

0 commit comments

Comments
 (0)