aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arc/kernel
diff options
context:
space:
mode:
authorVineet Gupta <vgupta@synopsys.com>2016-01-22 04:50:18 -0500
committerVineet Gupta <vgupta@synopsys.com>2016-01-29 06:21:03 -0500
commitb89bd1f4fbaecaa842588a034f8a44f4a84597e4 (patch)
tree292aa39d38593408da734c3126ce598ba9df1940 /arch/arc/kernel
parentd584f0fb041d86b9605fae1f0ed9e268f217daa9 (diff)
ARC: shrink cpuinfo by not saving full timer BCR
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Diffstat (limited to 'arch/arc/kernel')
-rw-r--r--arch/arc/kernel/setup.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/arc/kernel/setup.c b/arch/arc/kernel/setup.c
index e1b87444ea9a..7f0a3cb300a8 100644
--- a/arch/arc/kernel/setup.c
+++ b/arch/arc/kernel/setup.c
@@ -45,6 +45,7 @@ struct cpuinfo_arc cpuinfo_arc700[NR_CPUS];
45static void read_arc_build_cfg_regs(void) 45static void read_arc_build_cfg_regs(void)
46{ 46{
47 struct bcr_perip uncached_space; 47 struct bcr_perip uncached_space;
48 struct bcr_timer timer;
48 struct bcr_generic bcr; 49 struct bcr_generic bcr;
49 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()]; 50 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
50 unsigned long perip_space; 51 unsigned long perip_space;
@@ -53,7 +54,11 @@ static void read_arc_build_cfg_regs(void)
53 READ_BCR(AUX_IDENTITY, cpu->core); 54 READ_BCR(AUX_IDENTITY, cpu->core);
54 READ_BCR(ARC_REG_ISA_CFG_BCR, cpu->isa); 55 READ_BCR(ARC_REG_ISA_CFG_BCR, cpu->isa);
55 56
56 READ_BCR(ARC_REG_TIMERS_BCR, cpu->timers); 57 READ_BCR(ARC_REG_TIMERS_BCR, timer);
58 cpu->extn.timer0 = timer.t0;
59 cpu->extn.timer1 = timer.t1;
60 cpu->extn.rtc = timer.rtc;
61
57 cpu->vec_base = read_aux_reg(AUX_INTR_VEC_BASE); 62 cpu->vec_base = read_aux_reg(AUX_INTR_VEC_BASE);
58 63
59 READ_BCR(ARC_REG_D_UNCACH_BCR, uncached_space); 64 READ_BCR(ARC_REG_D_UNCACH_BCR, uncached_space);
@@ -208,9 +213,9 @@ static char *arc_cpu_mumbojumbo(int cpu_id, char *buf, int len)
208 (unsigned int)(arc_get_core_freq() / 10000) % 100); 213 (unsigned int)(arc_get_core_freq() / 10000) % 100);
209 214
210 n += scnprintf(buf + n, len - n, "Timers\t\t: %s%s%s%s\nISA Extn\t: ", 215 n += scnprintf(buf + n, len - n, "Timers\t\t: %s%s%s%s\nISA Extn\t: ",
211 IS_AVAIL1(cpu->timers.t0, "Timer0 "), 216 IS_AVAIL1(cpu->extn.timer0, "Timer0 "),
212 IS_AVAIL1(cpu->timers.t1, "Timer1 "), 217 IS_AVAIL1(cpu->extn.timer1, "Timer1 "),
213 IS_AVAIL2(cpu->timers.rtc, "64-bit RTC ", 218 IS_AVAIL2(cpu->extn.rtc, "Local-64-bit-Ctr ",
214 CONFIG_ARC_HAS_RTC)); 219 CONFIG_ARC_HAS_RTC));
215 220
216 n += i = scnprintf(buf + n, len - n, "%s%s%s%s%s", 221 n += i = scnprintf(buf + n, len - n, "%s%s%s%s%s",
@@ -293,13 +298,13 @@ static void arc_chk_core_config(void)
293 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()]; 298 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()];
294 int fpu_enabled; 299 int fpu_enabled;
295 300
296 if (!cpu->timers.t0) 301 if (!cpu->extn.timer0)
297 panic("Timer0 is not present!\n"); 302 panic("Timer0 is not present!\n");
298 303
299 if (!cpu->timers.t1) 304 if (!cpu->extn.timer1)
300 panic("Timer1 is not present!\n"); 305 panic("Timer1 is not present!\n");
301 306
302 if (IS_ENABLED(CONFIG_ARC_HAS_RTC) && !cpu->timers.rtc) 307 if (IS_ENABLED(CONFIG_ARC_HAS_RTC) && !cpu->extn.rtc)
303 panic("RTC is not present\n"); 308 panic("RTC is not present\n");
304 309
305#ifdef CONFIG_ARC_HAS_DCCM 310#ifdef CONFIG_ARC_HAS_DCCM