mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
linux: remove kernel version checks for unsupported kernels
Following 2b069768a
(#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 <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes #16545
This commit is contained in:
parent
a877b39624
commit
a83762b3f4
@ -56,17 +56,7 @@
|
||||
#include <asm/elf.h>
|
||||
#include <asm/hwcap.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
||||
#include <asm/sysreg.h>
|
||||
#else
|
||||
#define sys_reg(op0, op1, crn, crm, op2) ( \
|
||||
((op0) << Op0_shift) | \
|
||||
((op1) << Op1_shift) | \
|
||||
((crn) << CRn_shift) | \
|
||||
((crm) << CRm_shift) | \
|
||||
((op2) << Op2_shift))
|
||||
#endif
|
||||
|
||||
#define ID_AA64PFR0_EL1 sys_reg(3, 0, 0, 1, 0)
|
||||
#define ID_AA64ISAR0_EL1 sys_reg(3, 0, 0, 6, 0)
|
||||
|
@ -56,16 +56,10 @@
|
||||
#include <asm/switch_to.h>
|
||||
#include <sys/types.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
|
||||
#include <asm/cpufeature.h>
|
||||
#else
|
||||
#include <asm/cputable.h>
|
||||
#endif
|
||||
|
||||
#define kfpu_allowed() 1
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
|
||||
#ifdef CONFIG_ALTIVEC
|
||||
#define ENABLE_KERNEL_ALTIVEC enable_kernel_altivec();
|
||||
#define DISABLE_KERNEL_ALTIVEC disable_kernel_altivec();
|
||||
@ -101,11 +95,6 @@
|
||||
DISABLE_KERNEL_ALTIVEC \
|
||||
preempt_enable(); \
|
||||
}
|
||||
#else
|
||||
/* seems that before 4.5 no-one bothered */
|
||||
#define kfpu_begin()
|
||||
#define kfpu_end() preempt_enable()
|
||||
#endif /* Linux version >= 4.5 */
|
||||
|
||||
#define kfpu_init() 0
|
||||
#define kfpu_fini() ((void) 0)
|
||||
|
@ -39,7 +39,7 @@
|
||||
#include <linux/version.h>
|
||||
#include "zfs_gitrev.h"
|
||||
|
||||
#if defined(CONSTIFY_PLUGIN) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
|
||||
#if defined(CONSTIFY_PLUGIN)
|
||||
typedef struct ctl_table __no_const spl_ctl_table;
|
||||
#else
|
||||
typedef struct ctl_table spl_ctl_table;
|
||||
|
Loading…
Reference in New Issue
Block a user