Skip to content

Conversation

Harry-Chen
Copy link
Contributor

Motivation and Context

Currently zfs 2.2.7 / 2.3.0-rc4 / master won't compile on armel.

See debian buildd log:

525s /tmp/autopkgtest-lxc.ai7b0w_k/downtmp/build.TuL/src/module/zcommon/simd_stat.c: In function ‘simd_stat_kstat_data’:
525s /tmp/autopkgtest-lxc.ai7b0w_k/downtmp/build.TuL/src/module/zcommon/simd_stat.c:136:41: error: ‘CONFIG_KERNEL_MODE_NEON’ undeclared (first use in this function)
525s   136 |                     "kernel_mode_neon", CONFIG_KERNEL_MODE_NEON);
525s       |                                         ^~~~~~~~~~~~~~~~~~~~~~~
525s /tmp/autopkgtest-lxc.ai7b0w_k/downtmp/build.TuL/src/module/zcommon/simd_stat.c:52:74: note: in definition of macro ‘SIMD_STAT_PRINT’
525s    52 |         kmem_scnprintf(s + off, MAX(4095-off, 0), "%-16s\t%1d\n", feat, (val))
525s       |                                                                          ^~~
525s /tmp/autopkgtest-lxc.ai7b0w_k/downtmp/build.TuL/src/module/zcommon/simd_stat.c:136:41: note: each undeclared identifier is reported only once for each function it appears in
525s   136 |                     "kernel_mode_neon", CONFIG_KERNEL_MODE_NEON);
525s       |                                         ^~~~~~~~~~~~~~~~~~~~~~~
525s /tmp/autopkgtest-lxc.ai7b0w_k/downtmp/build.TuL/src/module/zcommon/simd_stat.c:52:74: note: in definition of macro ‘SIMD_STAT_PRINT’
525s    52 |         kmem_scnprintf(s + off, MAX(4095-off, 0), "%-16s\t%1d\n", feat, (val))
525s       |                                                                          ^~~
525s make[4]: *** [/usr/src/linux-headers-6.11.10-common/scripts/Makefile.build:249: /tmp/autopkgtest-lxc.ai7b0w_k/downtmp/build.TuL/src/module/zcommon/simd_stat.o] Error 1

Description

CONFIG_KERNEL_MODE_NEON depends on CONFIG_NEON. Neither is defined on armel. So a guard is needed to avoid compilation errors.

How Has This Been Tested?

It now compiles. Should not affect any other functionalities.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

CONFIG_KERNEL_MODE_NEON depends on CONFIG_NEON. Neither is defined
on armel. Add a guard to avoid compilation errors.

ZFS-CI-Type: Quick
Signed-off-by: Shengqi Chen <[email protected]>
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@behlendorf behlendorf merged commit acda137 into openzfs:master Dec 16, 2024
24 checks passed
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Dec 16, 2024
CONFIG_KERNEL_MODE_NEON depends on CONFIG_NEON. Neither is defined
on armel. Add a guard to avoid compilation errors.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Shengqi Chen <[email protected]>
Closes openzfs#16871
@Harry-Chen Harry-Chen deleted the fix-simd-stat-arm branch December 17, 2024 02:51
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Jan 26, 2025
CONFIG_KERNEL_MODE_NEON depends on CONFIG_NEON. Neither is defined
on armel. Add a guard to avoid compilation errors.

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Shengqi Chen <[email protected]>
Closes openzfs#16871
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants