arm64: cpufeature: constify arm64_ftr_regs array
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Wed, 31 Aug 2016 10:31:09 +0000 (11:31 +0100)
committerWill Deacon <will.deacon@arm.com>
Wed, 31 Aug 2016 12:48:15 +0000 (13:48 +0100)
commit6f2b7eeff9dbadeb7366d44086aa34792a996fc9
treecd7233c0c346a9551beaf27b5f62533d56e00a6e
parent5e49d73c1d87de50353844d263c1c7664aefeec8
arm64: cpufeature: constify arm64_ftr_regs array

Constify the arm64_ftr_regs array, by moving the mutable arm64_ftr_reg
fields out of the array itself. This also streamlines the bsearch, since
the entire array can be covered by fewer cachelines. Moving the payload
out of the array also allows us to have special explicitly defined
struct instance in case other code needs to refer to it directly.

Note that this replaces the runtime sorting of the array with a runtime
BUG() check whether the array is sorted correctly in the code.

Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/cpufeature.h
arch/arm64/kernel/cpufeature.c