arm64: alternative: avoid external cpufeature code

The read_sanitized_ftr_reg() function is reasonably complex (including a
bsearch), and may be instrumented with functions which use patched code.
Thus, it is not safe to call from clean_dcache_range_nopatch().

Instead, we can assume the architectural minimum dcache line size when
performing the D-cache maintenance, which is pessimistic but not
harmful. As this is only used at boot time, the additional work is
unlikely to be a problem.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
1 file changed