Skip to content

Commit 973e02c

Browse files
author
Sudeep KarkadaNagesha
committed
ARM: DT/kernel: define ARM specific arch_match_cpu_phys_id
OF/DT core library now provides architecture specific hook to match the logical cpu index with the corresponding physical identifier. Most of the cpu DT node parsing and initialisation is contained in devtree.c. So it's better to define ARM specific arch_match_cpu_phys_id there. This mainly helps to avoid replication of the code doing CPU node parsing and physical(MPIDR) to logical mapping. Cc: Russell King <[email protected]> Cc: Lorenzo Pieralisi <[email protected]> Acked-by: Rob Herring <[email protected]> Acked-by: Nicolas Pitre <[email protected]> Signed-off-by: Sudeep KarkadaNagesha <[email protected]>
1 parent 183912d commit 973e02c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/arm/kernel/devtree.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ void __init arm_dt_init_cpu_maps(void)
169169
}
170170
}
171171

172+
bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
173+
{
174+
return (phys_id & MPIDR_HWID_BITMASK) == cpu_logical_map(cpu);
175+
}
176+
172177
/**
173178
* setup_machine_fdt - Machine setup when an dtb was passed to the kernel
174179
* @dt_phys: physical address of dt blob

0 commit comments

Comments
 (0)