Skip to content

Commit e65fc01

Browse files
brooniectmarinas
authored andcommitted
arm64/sme: Standardise bitfield names for SVCR
The bitfield definitions for SVCR have a SYS_ added to the names of the constant which will be a problem for automatic generation. Remove the prefixes, no functional change. Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent a6dab6c commit e65fc01

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

arch/arm64/include/asm/fpsimd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,12 @@ extern void fpsimd_save_and_flush_cpu_state(void);
6767

6868
static inline bool thread_sm_enabled(struct thread_struct *thread)
6969
{
70-
return system_supports_sme() && (thread->svcr & SYS_SVCR_EL0_SM_MASK);
70+
return system_supports_sme() && (thread->svcr & SVCR_EL0_SM_MASK);
7171
}
7272

7373
static inline bool thread_za_enabled(struct thread_struct *thread)
7474
{
75-
return system_supports_sme() && (thread->svcr & SYS_SVCR_EL0_ZA_MASK);
75+
return system_supports_sme() && (thread->svcr & SVCR_EL0_ZA_MASK);
7676
}
7777

7878
/* Maximum VL that SVE/SME VL-agnostic software can transparently support */

arch/arm64/include/asm/processor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ static inline unsigned int thread_get_sme_vl(struct thread_struct *thread)
192192

193193
static inline unsigned int thread_get_cur_vl(struct thread_struct *thread)
194194
{
195-
if (system_supports_sme() && (thread->svcr & SYS_SVCR_EL0_SM_MASK))
195+
if (system_supports_sme() && (thread->svcr & SVCR_EL0_SM_MASK))
196196
return thread_get_sme_vl(thread);
197197
else
198198
return thread_get_sve_vl(thread);

arch/arm64/include/asm/sysreg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@
480480
#define SYS_RNDRRS_EL0 sys_reg(3, 3, 2, 4, 1)
481481

482482
#define SYS_SVCR_EL0 sys_reg(3, 3, 4, 2, 2)
483-
#define SYS_SVCR_EL0_ZA_MASK 2
484-
#define SYS_SVCR_EL0_SM_MASK 1
483+
#define SVCR_EL0_ZA_MASK 2
484+
#define SVCR_EL0_SM_MASK 1
485485

486486
#define SYS_PMCR_EL0 sys_reg(3, 3, 9, 12, 0)
487487
#define SYS_PMCNTENSET_EL0 sys_reg(3, 3, 9, 12, 1)

arch/arm64/kernel/fpsimd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ void __efi_fpsimd_begin(void)
19181918
svcr = read_sysreg_s(SYS_SVCR_EL0);
19191919

19201920
if (!system_supports_fa64())
1921-
ffr = svcr & SYS_SVCR_EL0_SM_MASK;
1921+
ffr = svcr & SVCR_EL0_SM_MASK;
19221922

19231923
__this_cpu_write(efi_sm_state, ffr);
19241924
}
@@ -1929,7 +1929,7 @@ void __efi_fpsimd_begin(void)
19291929

19301930
if (system_supports_sme())
19311931
sysreg_clear_set_s(SYS_SVCR_EL0,
1932-
SYS_SVCR_EL0_SM_MASK, 0);
1932+
SVCR_EL0_SM_MASK, 0);
19331933

19341934
} else {
19351935
fpsimd_save_state(this_cpu_ptr(&efi_fpsimd_state));
@@ -1964,7 +1964,7 @@ void __efi_fpsimd_end(void)
19641964
if (__this_cpu_read(efi_sm_state)) {
19651965
sysreg_clear_set_s(SYS_SVCR_EL0,
19661966
0,
1967-
SYS_SVCR_EL0_SM_MASK);
1967+
SVCR_EL0_SM_MASK);
19681968
if (!system_supports_fa64())
19691969
ffr = efi_sm_state;
19701970
}

0 commit comments

Comments
 (0)