Skip to content
Commit b14e8d21 authored by Sudeep Holla's avatar Sudeep Holla
Browse files

cacheinfo: Add helper to access any cache index for a given CPU



The cacheinfo for a given CPU at a given index is used at quite a few
places by fetching the base point for index 0 using the helper
per_cpu_cacheinfo(cpu) and offsetting it by the required index.

Instead, add another helper to fetch the required pointer directly and
use it to simplify and improve readability.

Link: https://lore.kernel.org/r/20220704101605.1318280-4-sudeep.holla@arm.com
Tested-by: default avatarIonela Voinescu <ionela.voinescu@arm.com>
Tested-by: default avatarConor Dooley <conor.dooley@microchip.com>
Reviewed-by: default avatarGavin Shan <gshan@redhat.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent d4ec840b
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment