Skip to content

Commit e575fb9

Browse files
committed
arm64: sve: Fix build failure when ARM64_SVE=y and SYSCTL=n
When I squashed the 'allnoconfig' compiler warning about the set_sve_default_vl() function being defined but not used in commit 1e570f5 ("arm64/sve: Eliminate data races on sve_default_vl"), I accidentally broke the build for configs where ARM64_SVE is enabled, but SYSCTL is not. Fix this by only compiling the SVE sysctl support if both CONFIG_SVE=y and CONFIG_SYSCTL=y. Cc: Dave Martin <[email protected]> Reported-by: Qian Cai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 034aa9c commit e575fb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/arm64/kernel/fpsimd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ static unsigned int find_supported_vector_length(unsigned int vl)
349349
return sve_vl_from_vq(__bit_to_vq(bit));
350350
}
351351

352-
#ifdef CONFIG_SYSCTL
352+
#if defined(CONFIG_ARM64_SVE) && defined(CONFIG_SYSCTL)
353353

354354
static int sve_proc_do_default_vl(struct ctl_table *table, int write,
355355
void *buffer, size_t *lenp, loff_t *ppos)
@@ -394,9 +394,9 @@ static int __init sve_sysctl_init(void)
394394
return 0;
395395
}
396396

397-
#else /* ! CONFIG_SYSCTL */
397+
#else /* ! (CONFIG_ARM64_SVE && CONFIG_SYSCTL) */
398398
static int __init sve_sysctl_init(void) { return 0; }
399-
#endif /* ! CONFIG_SYSCTL */
399+
#endif /* ! (CONFIG_ARM64_SVE && CONFIG_SYSCTL) */
400400

401401
#define ZREG(sve_state, vq, n) ((char *)(sve_state) + \
402402
(SVE_SIG_ZREG_OFFSET(vq, n) - SVE_SIG_REGS_OFFSET))

0 commit comments

Comments
 (0)