diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2016-10-20 21:08:10 -0400 |
---|---|---|
committer | Vineet Gupta <vgupta@synopsys.com> | 2016-10-28 13:09:06 -0400 |
commit | a024fd9bc4d0b102b8aa66b8ecba678d2d32fdcf (patch) | |
tree | 291d30ae7b47acf0eb3ab14f0c96a3061967fee8 | |
parent | 73e284d2572581d848267c74552215f95f0f0996 (diff) |
ARC: boot log: don't assume SWAPE instruction support
This came to light when helping a customer with oldish ARC750 core who
were getting instruction errors because of lack of SWAPE but boot log
was incorrectly printing it as being present
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
-rw-r--r-- | arch/arc/include/asm/arcregs.h | 2 | ||||
-rw-r--r-- | arch/arc/kernel/setup.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/arch/arc/include/asm/arcregs.h b/arch/arc/include/asm/arcregs.h index 819b44c1a719..b8d29b136b96 100644 --- a/arch/arc/include/asm/arcregs.h +++ b/arch/arc/include/asm/arcregs.h | |||
@@ -353,7 +353,7 @@ struct cpuinfo_arc { | |||
353 | unsigned int vec_base; | 353 | unsigned int vec_base; |
354 | struct cpuinfo_arc_ccm iccm, dccm; | 354 | struct cpuinfo_arc_ccm iccm, dccm; |
355 | struct { | 355 | struct { |
356 | unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, pad1:3, | 356 | unsigned int swap:1, norm:1, minmax:1, barrel:1, crc:1, swape:1, pad1:2, |
357 | fpu_sp:1, fpu_dp:1, pad2:6, | 357 | fpu_sp:1, fpu_dp:1, pad2:6, |
358 | debug:1, ap:1, smart:1, rtt:1, pad3:4, | 358 | debug:1, ap:1, smart:1, rtt:1, pad3:4, |
359 | timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4; | 359 | timer0:1, timer1:1, rtc:1, gfrc:1, pad4:4; |
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c index 0170d94f3860..156981aecd74 100644 --- a/arch/arc/kernel/setup.c +++ b/arch/arc/kernel/setup.c | |||
@@ -138,6 +138,9 @@ static void read_arc_build_cfg_regs(void) | |||
138 | cpu->extn.swap = read_aux_reg(ARC_REG_SWAP_BCR) ? 1 : 0; /* 1,3 */ | 138 | cpu->extn.swap = read_aux_reg(ARC_REG_SWAP_BCR) ? 1 : 0; /* 1,3 */ |
139 | cpu->extn.crc = read_aux_reg(ARC_REG_CRC_BCR) ? 1 : 0; | 139 | cpu->extn.crc = read_aux_reg(ARC_REG_CRC_BCR) ? 1 : 0; |
140 | cpu->extn.minmax = read_aux_reg(ARC_REG_MIXMAX_BCR) > 1 ? 1 : 0; /* 2 */ | 140 | cpu->extn.minmax = read_aux_reg(ARC_REG_MIXMAX_BCR) > 1 ? 1 : 0; /* 2 */ |
141 | cpu->extn.swape = (cpu->core.family >= 0x34) ? 1 : | ||
142 | IS_ENABLED(CONFIG_ARC_HAS_SWAPE); | ||
143 | |||
141 | READ_BCR(ARC_REG_XY_MEM_BCR, cpu->extn_xymem); | 144 | READ_BCR(ARC_REG_XY_MEM_BCR, cpu->extn_xymem); |
142 | 145 | ||
143 | /* Read CCM BCRs for boot reporting even if not enabled in Kconfig */ | 146 | /* Read CCM BCRs for boot reporting even if not enabled in Kconfig */ |
@@ -250,7 +253,7 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len) | |||
250 | IS_AVAIL1(cpu->extn.swap, "swap "), | 253 | IS_AVAIL1(cpu->extn.swap, "swap "), |
251 | IS_AVAIL1(cpu->extn.minmax, "minmax "), | 254 | IS_AVAIL1(cpu->extn.minmax, "minmax "), |
252 | IS_AVAIL1(cpu->extn.crc, "crc "), | 255 | IS_AVAIL1(cpu->extn.crc, "crc "), |
253 | IS_AVAIL2(1, "swape", CONFIG_ARC_HAS_SWAPE)); | 256 | IS_AVAIL2(cpu->extn.swape, "swape", CONFIG_ARC_HAS_SWAPE)); |
254 | 257 | ||
255 | if (cpu->bpu.ver) | 258 | if (cpu->bpu.ver) |
256 | n += scnprintf(buf + n, len - n, | 259 | n += scnprintf(buf + n, len - n, |