Lines Matching full:cpu
15 #include <linux/cpu.h>
70 static void read_decode_ccm_bcr(struct cpuinfo_arc *cpu) in read_decode_ccm_bcr() argument
78 cpu->iccm.sz = 4096 << iccm.sz; /* 8K to 512K */ in read_decode_ccm_bcr()
79 cpu->iccm.base_addr = iccm.base << 16; in read_decode_ccm_bcr()
85 cpu->dccm.sz = 2048 << dccm.sz; /* 2K to 256K */ in read_decode_ccm_bcr()
88 cpu->dccm.base_addr = base & ~0xF; in read_decode_ccm_bcr()
97 cpu->iccm.sz = 256 << iccm.sz00; /* 512B to 16M */ in read_decode_ccm_bcr()
99 cpu->iccm.sz <<= iccm.sz01; in read_decode_ccm_bcr()
102 cpu->iccm.base_addr = region & 0xF0000000; in read_decode_ccm_bcr()
107 cpu->dccm.sz = 256 << dccm.sz0; in read_decode_ccm_bcr()
109 cpu->dccm.sz <<= dccm.sz1; in read_decode_ccm_bcr()
112 cpu->dccm.base_addr = region & 0xF0000000; in read_decode_ccm_bcr()
117 static void decode_arc_core(struct cpuinfo_arc *cpu) in decode_arc_core() argument
122 if (cpu->core.family < 0x54) { /* includes arc700 */ in decode_arc_core()
125 if (cpu->core.family == tbl->id) { in decode_arc_core()
126 cpu->release = tbl->str; in decode_arc_core()
132 cpu->name = "ARC700"; in decode_arc_core()
134 cpu->name = "HS38"; in decode_arc_core()
136 cpu->name = cpu->release = "Unknown"; in decode_arc_core()
149 cpu->name = "HS48"; in decode_arc_core()
150 cpu->extn.dual = 1; in decode_arc_core()
153 cpu->name = "HS38"; in decode_arc_core()
158 cpu->release = tbl->str; in decode_arc_core()
168 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()]; in read_arc_build_cfg_regs() local
172 FIX_PTR(cpu); in read_arc_build_cfg_regs()
174 READ_BCR(AUX_IDENTITY, cpu->core); in read_arc_build_cfg_regs()
175 decode_arc_core(cpu); in read_arc_build_cfg_regs()
178 cpu->extn.timer0 = timer.t0; in read_arc_build_cfg_regs()
179 cpu->extn.timer1 = timer.t1; in read_arc_build_cfg_regs()
180 cpu->extn.rtc = timer.rtc; in read_arc_build_cfg_regs()
182 cpu->vec_base = read_aux_reg(AUX_INTR_VEC_BASE); in read_arc_build_cfg_regs()
184 READ_BCR(ARC_REG_MUL_BCR, cpu->extn_mpy); in read_arc_build_cfg_regs()
187 read_decode_ccm_bcr(cpu); in read_arc_build_cfg_regs()
198 cpu->extn.fpu_sp = sp.ver ? 1 : 0; in read_arc_build_cfg_regs()
199 cpu->extn.fpu_dp = dp.ver ? 1 : 0; in read_arc_build_cfg_regs()
202 cpu->bpu.ver = bpu.ver; in read_arc_build_cfg_regs()
203 cpu->bpu.full = bpu.fam ? 1 : 0; in read_arc_build_cfg_regs()
205 cpu->bpu.num_cache = 256 << (bpu.ent - 1); in read_arc_build_cfg_regs()
206 cpu->bpu.num_pred = 256 << (bpu.ent - 1); in read_arc_build_cfg_regs()
213 cpu->extn.fpu_sp = spdp.sp ? 1 : 0; in read_arc_build_cfg_regs()
214 cpu->extn.fpu_dp = spdp.dp ? 1 : 0; in read_arc_build_cfg_regs()
217 cpu->bpu.ver = bpu.ver; in read_arc_build_cfg_regs()
218 cpu->bpu.full = bpu.ft; in read_arc_build_cfg_regs()
219 cpu->bpu.num_cache = 256 << bpu.bce; in read_arc_build_cfg_regs()
220 cpu->bpu.num_pred = 2048 << bpu.pte; in read_arc_build_cfg_regs()
221 cpu->bpu.ret_stk = 4 << bpu.rse; in read_arc_build_cfg_regs()
224 if (cpu->extn.dual) { in read_arc_build_cfg_regs()
228 cpu->extn.dual_enb = !(exec_ctrl & 1); in read_arc_build_cfg_regs()
234 cpu->extn.ap_num = 2 << ap.num; in read_arc_build_cfg_regs()
235 cpu->extn.ap_full = !ap.min; in read_arc_build_cfg_regs()
239 cpu->extn.smart = bcr.ver ? 1 : 0; in read_arc_build_cfg_regs()
242 cpu->extn.rtt = bcr.ver ? 1 : 0; in read_arc_build_cfg_regs()
249 cpu->isa.atomic = IS_ENABLED(CONFIG_ARC_HAS_LLSC); in read_arc_build_cfg_regs()
253 cpu->isa.atomic = bcr.info & 1; in read_arc_build_cfg_regs()
256 cpu->isa.be = IS_ENABLED(CONFIG_CPU_BIG_ENDIAN); in read_arc_build_cfg_regs()
259 if (unlikely(cpu->core.family < 0x34 || cpu->mmu.ver < 3)) in read_arc_build_cfg_regs()
260 cpu->name = "ARC750"; in read_arc_build_cfg_regs()
262 cpu->isa = isa; in read_arc_build_cfg_regs()
268 struct cpuinfo_arc *cpu = &cpuinfo_arc700[cpu_id]; in arc_cpu_mumbojumbo() local
269 struct bcr_identity *core = &cpu->core; in arc_cpu_mumbojumbo()
273 FIX_PTR(cpu); in arc_cpu_mumbojumbo()
280 cpu_id, cpu->name, cpu->release, in arc_cpu_mumbojumbo()
282 IS_AVAIL1(cpu->isa.be, "[Big-Endian]"), in arc_cpu_mumbojumbo()
283 IS_AVAIL3(cpu->extn.dual, cpu->extn.dual_enb, " Dual-Issue ")); in arc_cpu_mumbojumbo()
286 IS_AVAIL1(cpu->extn.timer0, "Timer0 "), in arc_cpu_mumbojumbo()
287 IS_AVAIL1(cpu->extn.timer1, "Timer1 "), in arc_cpu_mumbojumbo()
288 IS_AVAIL2(cpu->extn.rtc, "RTC [UP 64-bit] ", CONFIG_ARC_TIMERS_64BIT), in arc_cpu_mumbojumbo()
289 IS_AVAIL2(cpu->extn.gfrc, "GFRC [SMP 64-bit] ", CONFIG_ARC_TIMERS_64BIT)); in arc_cpu_mumbojumbo()
291 if (cpu->extn_mpy.ver) { in arc_cpu_mumbojumbo()
298 if (cpu->extn_mpy.dsp) /* OPT 7-9 */ in arc_cpu_mumbojumbo()
299 opt = cpu->extn_mpy.dsp + 6; in arc_cpu_mumbojumbo()
306 IS_AVAIL2(cpu->isa.atomic, "atomic ", CONFIG_ARC_HAS_LLSC), in arc_cpu_mumbojumbo()
307 IS_AVAIL2(cpu->isa.ldd, "ll64 ", CONFIG_ARC_HAS_LL64), in arc_cpu_mumbojumbo()
308 IS_AVAIL2(cpu->isa.unalign, "unalign ", CONFIG_ARC_USE_UNALIGNED_MEM_ACCESS), in arc_cpu_mumbojumbo()
309 IS_AVAIL1(cpu->extn_mpy.ver, mpy_opt), in arc_cpu_mumbojumbo()
310 IS_AVAIL1(cpu->isa.div_rem, "div_rem ")); in arc_cpu_mumbojumbo()
312 if (cpu->bpu.ver) { in arc_cpu_mumbojumbo()
315 IS_AVAIL1(cpu->bpu.full, "full"), in arc_cpu_mumbojumbo()
316 IS_AVAIL1(!cpu->bpu.full, "partial"), in arc_cpu_mumbojumbo()
317 cpu->bpu.num_cache, cpu->bpu.num_pred, cpu->bpu.ret_stk); in arc_cpu_mumbojumbo()
341 struct cpuinfo_arc *cpu = &cpuinfo_arc700[cpu_id]; in arc_extn_mumbojumbo() local
343 FIX_PTR(cpu); in arc_extn_mumbojumbo()
345 n += scnprintf(buf + n, len - n, "Vector Table\t: %#x\n", cpu->vec_base); in arc_extn_mumbojumbo()
347 if (cpu->extn.fpu_sp || cpu->extn.fpu_dp) in arc_extn_mumbojumbo()
349 IS_AVAIL1(cpu->extn.fpu_sp, "SP "), in arc_extn_mumbojumbo()
350 IS_AVAIL1(cpu->extn.fpu_dp, "DP ")); in arc_extn_mumbojumbo()
352 if (cpu->extn.ap_num | cpu->extn.smart | cpu->extn.rtt) { in arc_extn_mumbojumbo()
354 IS_AVAIL1(cpu->extn.smart, "smaRT "), in arc_extn_mumbojumbo()
355 IS_AVAIL1(cpu->extn.rtt, "RTT ")); in arc_extn_mumbojumbo()
356 if (cpu->extn.ap_num) { in arc_extn_mumbojumbo()
358 cpu->extn.ap_num, in arc_extn_mumbojumbo()
359 cpu->extn.ap_full ? "full":"min"); in arc_extn_mumbojumbo()
364 if (cpu->dccm.sz || cpu->iccm.sz) in arc_extn_mumbojumbo()
366 cpu->dccm.base_addr, TO_KB(cpu->dccm.sz), in arc_extn_mumbojumbo()
367 cpu->iccm.base_addr, TO_KB(cpu->iccm.sz)); in arc_extn_mumbojumbo()
406 struct cpuinfo_arc *cpu = &cpuinfo_arc700[smp_processor_id()]; in arc_chk_core_config() local
409 if (!cpu->extn.timer0) in arc_chk_core_config()
412 if (!cpu->extn.timer1) in arc_chk_core_config()
420 if ((unsigned int)__arc_dccm_base != cpu->dccm.base_addr) in arc_chk_core_config()
423 if (CONFIG_ARC_DCCM_SZ * SZ_1K != cpu->dccm.sz) in arc_chk_core_config()
428 if (CONFIG_ARC_ICCM_SZ * SZ_1K != cpu->iccm.sz) in arc_chk_core_config()
440 present = cpu->extn.fpu_dp; in arc_chk_core_config()
444 present = cpu->extn_mpy.dsp | cpu->extn.fpu_sp | cpu->extn.fpu_dp; in arc_chk_core_config()
454 * such as only for boot CPU etc
583 * Called from start_kernel() - boot CPU only
609 * Get CPU information for use by the procfs.
636 seq_printf(m, "CPU speed \t: Cannot get clock for processor [%d]\n", in show_cpuinfo()
642 seq_printf(m, "CPU speed\t: %lu.%02lu Mhz\n", in show_cpuinfo()
664 * Callback returns cpu-id to iterator for show routine, NULL to stop. in c_start()
665 * However since NULL is also a valid cpu-id (0), we use a round-about in c_start()
667 * Encode cpu-id as 0xFFcccc, which is decoded by show routine. in c_start()
689 static DEFINE_PER_CPU(struct cpu, cpu_topology);
693 int cpu; in topology_init() local
695 for_each_present_cpu(cpu) in topology_init()
696 register_cpu(&per_cpu(cpu_topology, cpu), cpu); in topology_init()