Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 5e4dee1bb767614ac7a93e8454dde6f0 > files > 6

kernel-5.6.8-1.mga7.src.rpm

diff -Nurp linux-5.5/3rdparty/ndiswrapper.old/ntoskernel.c linux-5.5/3rdparty/ndiswrapper/ntoskernel.c
--- linux-5.5/3rdparty/ndiswrapper.old/ntoskernel.c	2020-04-04 01:59:47.629938696 +0300
+++ linux-5.5/3rdparty/ndiswrapper/ntoskernel.c	2020-04-04 02:01:55.554963846 +0300
@@ -2546,7 +2546,11 @@ int ntoskernel_init(void)
 			info->task = NULL;
 			info->count = 0;
 #ifdef CONFIG_SMP
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
 			cpumask_setall(&info->cpus_allowed);
+#else
+			cpumask_setall(&info->cpus_mask);
+#endif
 #endif
 		}
 	} while (0);
diff -Nurp linux-5.5/3rdparty/ndiswrapper.old/ntoskernel.h linux-5.5/3rdparty/ndiswrapper/ntoskernel.h
--- linux-5.5/3rdparty/ndiswrapper.old/ntoskernel.h	2020-04-04 01:59:47.629938696 +0300
+++ linux-5.5/3rdparty/ndiswrapper/ntoskernel.h	2020-04-04 02:01:55.554963846 +0300
@@ -110,7 +110,11 @@ static cpumask_t cpumasks[NR_CPUS];
 #endif /* CONFIG_SMP */
 
 #ifndef tsk_cpus_allowed
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
 #define tsk_cpus_allowed(tsk) (&(tsk)->cpus_allowed)
+#else
+#define tsk_cpus_allowed(tsk) (&(tsk)->cpus_mask)
+#endif
 #endif
 
 #ifndef __packed
@@ -638,7 +642,12 @@ struct irql_info {
 	int count;
 	struct mutex lock;
 #ifdef CONFIG_SMP
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
 	cpumask_t cpus_allowed;
+#else
+	const cpumask_t	*cpus_ptr;
+	cpumask_t	cpus_mask;
+#endif
 #endif
 	struct task_struct *task;
 };
@@ -665,7 +674,11 @@ static inline KIRQL raise_irql(KIRQL new
 	/* TODO: is this enough to pin down to current cpu? */
 #ifdef CONFIG_SMP
 	assert(task_cpu(current) == smp_processor_id());
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
 	cpumask_copy(&info->cpus_allowed, tsk_cpus_allowed(current));
+#else
+	cpumask_copy(&info->cpus_mask, tsk_cpus_allowed(current));
+#endif
 	set_cpus_allowed_ptr(current, cpumask_of(smp_processor_id()));
 #endif
 	put_cpu_var(irql_info);
@@ -689,7 +702,11 @@ static inline void lower_irql(KIRQL oldi
 	if (--info->count == 0) {
 		info->task = NULL;
 #ifdef CONFIG_SMP
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
 		set_cpus_allowed_ptr(current, &info->cpus_allowed);
+#else
+		set_cpus_allowed_ptr(current, &info->cpus_mask);
+#endif
 #endif
 		mutex_unlock(&info->lock);
 	}