ARC: boot log: refactor printing abt features not captured in BCRs
authorVineet Gupta <vgupta@synopsys.com>
Fri, 21 Oct 2016 00:49:15 +0000 (17:49 -0700)
committerVineet Gupta <vgupta@synopsys.com>
Fri, 28 Oct 2016 17:07:43 +0000 (10:07 -0700)
commit73e284d2572581d848267c74552215f95f0f0996
tree4d08aaf2d2c9ffcb43341ac8ef5be6246180db3e
parent711c1f2671174c918045e2cb20aece976ac516cd
ARC: boot log: refactor printing abt features not captured in BCRs

On older arc700 cores, some of the features configured were not present
in Build config registers. To print about them at boot, we just use the
Kconfig option i.e. whether linux is built to use them or not.
So yes this seems bogus, but what else can be done. Moreover if linux is
booting with these enabled, then the Kconfig info is a good indicator
anyways.

Over time these "hacks" accumulated in read_arc_build_cfg_regs() as well
as arc_cpu_mumbojumbo(). so refactor and move all of those in a single
place: read_arc_build_cfg_regs(). This causes some code redcution too:

| bloat-o-meter2 arch/arc/kernel/setup.o.0 arch/arc/kernel/setup.o.1
| add/remove: 0/0 grow/shrink: 2/1 up/down: 64/-132 (-68)
| function                                     old     new   delta
| setup_processor                              610     670     +60
| cpuinfo_arc700                                76      80      +4
| arc_cpu_mumbojumbo                           752     620    -132

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/arcregs.h
arch/arc/kernel/setup.c