Skip to content

Commit 4afff6c

Browse files
ardbiesheuvelwilldeacon
authored andcommitted
arm64/boot: Move global CPU override variables out of BSS
Accessing BSS will no longer be permitted from the startup code in arch/arm64/kernel/pi, as some of it executes before BSS is cleared. Clearing BSS earlier would involve managing cache coherency explicitly in software, which is a hassle we prefer to avoid. So move some variables that are assigned by the startup code out of BSS and into .data. Signed-off-by: Ard Biesheuvel <ardb@kernel.org> Tested-by: Yeoreum Yun <yeoreum.yun@arm.com> Reviewed-by: Yeoreum Yun <yeoreum.yun@arm.com> Link: https://lore.kernel.org/r/20250508114328.2460610-7-ardb+git@google.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 93d0d6f commit 4afff6c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

arch/arm64/kernel/cpufeature.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -758,17 +758,17 @@ static const struct arm64_ftr_bits ftr_raz[] = {
758758
#define ARM64_FTR_REG(id, table) \
759759
__ARM64_FTR_REG_OVERRIDE(#id, id, table, &no_override)
760760

761-
struct arm64_ftr_override id_aa64mmfr0_override;
762-
struct arm64_ftr_override id_aa64mmfr1_override;
763-
struct arm64_ftr_override id_aa64mmfr2_override;
764-
struct arm64_ftr_override id_aa64pfr0_override;
765-
struct arm64_ftr_override id_aa64pfr1_override;
766-
struct arm64_ftr_override id_aa64zfr0_override;
767-
struct arm64_ftr_override id_aa64smfr0_override;
768-
struct arm64_ftr_override id_aa64isar1_override;
769-
struct arm64_ftr_override id_aa64isar2_override;
770-
771-
struct arm64_ftr_override arm64_sw_feature_override;
761+
struct arm64_ftr_override __read_mostly id_aa64mmfr0_override;
762+
struct arm64_ftr_override __read_mostly id_aa64mmfr1_override;
763+
struct arm64_ftr_override __read_mostly id_aa64mmfr2_override;
764+
struct arm64_ftr_override __read_mostly id_aa64pfr0_override;
765+
struct arm64_ftr_override __read_mostly id_aa64pfr1_override;
766+
struct arm64_ftr_override __read_mostly id_aa64zfr0_override;
767+
struct arm64_ftr_override __read_mostly id_aa64smfr0_override;
768+
struct arm64_ftr_override __read_mostly id_aa64isar1_override;
769+
struct arm64_ftr_override __read_mostly id_aa64isar2_override;
770+
771+
struct arm64_ftr_override __read_mostly arm64_sw_feature_override;
772772

773773
static const struct __ftr_reg_entry {
774774
u32 sys_id;

0 commit comments

Comments
 (0)