]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: cachetype: report weakest cache policy
authorMark Rutland <mark.rutland@arm.com>
Wed, 16 Jul 2014 15:32:45 +0000 (16:32 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 18 Jul 2014 14:24:10 +0000 (15:24 +0100)
commit504412473c7b67cfcbebaba8a411b27e75d5f9e4
tree6a9a1c3aa4f346b8061cc841b738dcf7670c15c3
parentbef4a1a002901917aac27906b5175658d6974470
arm64: cachetype: report weakest cache policy

In big.LITTLE systems, the I-cache policy may differ across CPUs, and
thus we must always meet the most stringent maintenance requirements of
any I-cache in the system when performing maintenance to ensure
correctness. Unfortunately this requirement is not met as we always look
at the current CPU's cache type register to determine the maintenance
requirements.

This patch causes the I-cache policy of all CPUs to be taken into
account for icache_is_aliasing and icache_is_aivivt. If any I-cache in
the system is aliasing or AIVIVT, the respective function will return
true. At boot each CPU may set flags to identify that at least one
I-cache in the system is aliasing and/or AIVIVT.

The now unused and potentially misleading icache_policy function is
removed.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Will Deacon <will.deacon@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/cachetype.h
arch/arm64/kernel/cpuinfo.c