Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e15d0e0 authored by Sudeep Holla's avatar Sudeep Holla Committed by Catalin Marinas
Browse files

ARM64: DT: define ARM64 specific arch_match_cpu_phys_id



OF/DT core library provides architecture specific hook to match the
logical cpu index with the corresponding physical identifier.

On ARM64, the MPIDR_EL1 contains specific bitfields(MPIDR_EL1.Aff{3..0})
which uniquely identify a CPU, in addition to some non-identifying
information and reserved bits. The ARM cpu binding defines the 'reg'
property to only contain the affinity bits, and any cpu nodes with other
bits set in their 'reg' entry are skipped.

This patch overrides the weak definition of arch_match_cpu_phys_id
with ARM64 specific version using MPIDR_EL1.Aff{3..0} as cpu physical
identifiers.

Signed-off-by: default avatarSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent c04e8e2f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -98,6 +98,11 @@ void __init early_print(const char *str, ...)
	printk("%s", buf);
}

bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
{
	return phys_id == cpu_logical_map(cpu);
}

static void __init setup_processor(void)
{
	struct cpu_info *cpu_info;