Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: kernel: add MIDR to per-CPU information data

The advent of big.LITTLE ARM platforms requires the kernel to be able
to identify the MIDRs of all online CPUs upon request. MIDRs are stashed
at boot time so that kernel subsystems can detect the MIDR of online CPUs
by simply retrieving per-CPU data updated by all booted CPUs.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Nicolas Pitre <nico@linaro.org>

+2
+1
arch/arm/include/asm/cpu.h
··· 15 15 16 16 struct cpuinfo_arm { 17 17 struct cpu cpu; 18 + u32 cpuid; 18 19 #ifdef CONFIG_SMP 19 20 unsigned int loops_per_jiffy; 20 21 #endif
+1
arch/arm/kernel/smp.c
··· 281 281 struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid); 282 282 283 283 cpu_info->loops_per_jiffy = loops_per_jiffy; 284 + cpu_info->cpuid = read_cpuid_id(); 284 285 285 286 store_cpu_topology(cpuid); 286 287 }