]> git.baikalelectronics.ru Git - kernel.git/commit
cacheinfo: Add helper to access any cache index for a given CPU
authorSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Jul 2022 10:15:47 +0000 (11:15 +0100)
committerSudeep Holla <sudeep.holla@arm.com>
Mon, 4 Jul 2022 15:22:28 +0000 (16:22 +0100)
commitf70819b9fe0a3a8a1231e5357899c393924ce520
tree2c497c2e090db90380f3535c47cde8f5a76980b2
parent25908e84441a2562023e00736539fdccc47618bf
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: Ionela Voinescu <ionela.voinescu@arm.com>
Tested-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
drivers/base/cacheinfo.c