Skip to content

Commit a83762b

Browse files
robnbehlendorf
authored andcommitted
linux: remove kernel version checks for unsupported kernels
Following 2b06976 (#16479), anything gated on a kernel version before 4.18 can be always included/excluded. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Reviewed-by: Tino Reichardt <[email protected]> Signed-off-by: Rob Norris <[email protected]> Closes #16545
1 parent a877b39 commit a83762b

File tree

3 files changed

+1
-22
lines changed

3 files changed

+1
-22
lines changed

include/os/linux/kernel/linux/simd_aarch64.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,7 @@
5656
#include <asm/elf.h>
5757
#include <asm/hwcap.h>
5858
#include <linux/version.h>
59-
60-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
6159
#include <asm/sysreg.h>
62-
#else
63-
#define sys_reg(op0, op1, crn, crm, op2) ( \
64-
((op0) << Op0_shift) | \
65-
((op1) << Op1_shift) | \
66-
((crn) << CRn_shift) | \
67-
((crm) << CRm_shift) | \
68-
((op2) << Op2_shift))
69-
#endif
7060

7161
#define ID_AA64PFR0_EL1 sys_reg(3, 0, 0, 1, 0)
7262
#define ID_AA64ISAR0_EL1 sys_reg(3, 0, 0, 6, 0)

include/os/linux/kernel/linux/simd_powerpc.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,10 @@
5656
#include <asm/switch_to.h>
5757
#include <sys/types.h>
5858
#include <linux/version.h>
59-
60-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
6159
#include <asm/cpufeature.h>
62-
#else
63-
#include <asm/cputable.h>
64-
#endif
6560

6661
#define kfpu_allowed() 1
6762

68-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
6963
#ifdef CONFIG_ALTIVEC
7064
#define ENABLE_KERNEL_ALTIVEC enable_kernel_altivec();
7165
#define DISABLE_KERNEL_ALTIVEC disable_kernel_altivec();
@@ -101,11 +95,6 @@
10195
DISABLE_KERNEL_ALTIVEC \
10296
preempt_enable(); \
10397
}
104-
#else
105-
/* seems that before 4.5 no-one bothered */
106-
#define kfpu_begin()
107-
#define kfpu_end() preempt_enable()
108-
#endif /* Linux version >= 4.5 */
10998

11099
#define kfpu_init() 0
111100
#define kfpu_fini() ((void) 0)

module/os/linux/spl/spl-proc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <linux/version.h>
4040
#include "zfs_gitrev.h"
4141

42-
#if defined(CONSTIFY_PLUGIN) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
42+
#if defined(CONSTIFY_PLUGIN)
4343
typedef struct ctl_table __no_const spl_ctl_table;
4444
#else
4545
typedef struct ctl_table spl_ctl_table;

0 commit comments

Comments
 (0)