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>
This commit is contained in:

committed by
Will Deacon

parent
5e49d73c1d
commit
6f2b7eeff9
@@ -72,7 +72,6 @@ struct arm64_ftr_bits {
|
||||
* @sys_val Safe value across the CPUs (system view)
|
||||
*/
|
||||
struct arm64_ftr_reg {
|
||||
u32 sys_id;
|
||||
const char *name;
|
||||
u64 strict_mask;
|
||||
u64 sys_val;
|
||||
|
Reference in New Issue
Block a user