rpms/catalyst-kmod/devel kernel_4.2_FPU.patch, NONE, 1.1 catalyst-kmod.spec, 1.31, 1.32 kernel_4.1-remove-IRQF_DISABLED.patch, 1.2, 1.3 4.1.3-kernel-compatibility-fixes.patch, 1.1, NONE

Leigh Scott leigh123linux at rpmfusion.org
Sun Aug 23 16:17:27 CEST 2015


Author: leigh123linux

Update of /cvs/nonfree/rpms/catalyst-kmod/devel
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv23416

Modified Files:
	catalyst-kmod.spec kernel_4.1-remove-IRQF_DISABLED.patch 
Added Files:
	kernel_4.2_FPU.patch 
Removed Files:
	4.1.3-kernel-compatibility-fixes.patch 
Log Message:
* Sun Aug 23 2015 Leigh Scott <leigh123linux at googlemail.com> - 1:15.7-5
- merge 4.1.3-kernel-compatibility-fixes into kernel_4.1-remove-IRQF_DISABLED patch
- Patch for 4.2 kernel 


kernel_4.2_FPU.patch:
 firegl_public.c |   39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

--- NEW FILE kernel_4.2_FPU.patch ---
>From eb7beb0ea51de526e59a0c3edc76530b28ef10e7 Mon Sep 17 00:00:00 2001
From: Alberto Milone <alberto.milone at canonical.com>
Date: Tue, 14 Jul 2015 12:56:37 +0200
Subject: [PATCH 1/1] Add support for Linux 4.2

Deal with the FPU code renaming
---
 firegl_public.c | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/firegl_public.c b/firegl_public.c
index 1a39fb7..baec03a 100755
--- lib/modules/fglrx/build_mod/firegl_public.c
+++ lib/modules/fglrx/build_mod/firegl_public.c
@@ -191,9 +191,17 @@
 #include <linux/string.h>
 #include <linux/gfp.h>
 #include <linux/swap.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
 #include "asm/i387.h"
+#else
+#include <asm/fpu/api.h>
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
 #include <asm/fpu-internal.h>
+#else
+#include <asm/fpu/internal.h>
+#endif
 #endif
 
 #include "firegl_public.h"
@@ -1698,6 +1706,9 @@ void ATI_API_CALL KCL_SetCurrentProcessState(KCL_ENUM_ProcessState state)
 
 #if defined(__i386__) 
 #ifndef __HAVE_ARCH_CMPXCHG
+#ifndef __xg
+#define __xg(x) ((volatile long *)(x))
+#endif
 static inline 
 unsigned long __fgl_cmpxchg(volatile void *ptr, unsigned long old,            
                         unsigned long new, int size)                      
@@ -1734,7 +1745,11 @@ unsigned long ATI_API_CALL kcl__cmpxchg(volatile void *ptr, unsigned long old,
          unsigned long new, int size)
 {
 #ifndef __HAVE_ARCH_CMPXCHG
+#if defined(__i386__)
     return __fgl_cmpxchg(ptr,old,new,size);
+#elif defined(__x86_64__)
+    return cmpxchg((unsigned long*)ptr,old,new);
+#endif
 #else
     /* On kernel version 2.6.34 passing a variable or unsupported size
      * argument to the __cmpxchg macro causes the default-clause of a
@@ -6450,21 +6465,36 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
    struct fpu *fpu = &tsk->thread.fpu;
 
    if(static_cpu_has(X86_FEATURE_XSAVE)) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
       fpu_xsave(fpu);
       if (!(fpu->state->xsave.xsave_hdr.xstate_bv & XSTATE_FP))
+#else
+      copy_xregs_to_kernel(&fpu->state.xsave);
+      if (!(fpu->state.xsave.header.xfeatures & XSTATE_FP))
+#endif
 	 return 1;
    } else if (static_cpu_has(X86_FEATURE_FXSR)) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
 	 fpu_fxsave(fpu);
+#else
+     copy_fxregs_to_kernel(fpu);
+#endif
    } else {
 	 asm volatile("fnsave %[fx]; fwait"
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
                   : [fx] "=m" (fpu->state->fsave));
+#else
+                  : [fx] "=m" (fpu->state.fsave));
+#endif
 	 return 0;
    }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
    if (unlikely(fpu->state->fxsave.swd & X87_FSW_ES)) {
 	asm volatile("fnclex");
 	return 0;
    }
+#endif
    return 1;
 }
 #endif
@@ -6476,8 +6506,12 @@ static int KCL_fpu_save_init(struct task_struct *tsk)
 void ATI_API_CALL KCL_fpu_begin(void)
 {
 #ifdef CONFIG_X86_64
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
     kernel_fpu_begin();
 #else
+    __kernel_fpu_begin();
+#endif
+#else
 #ifdef TS_USEDFPU
     struct thread_info *cur_thread = current_thread_info();
     struct task_struct *cur_task = get_current();
@@ -6522,7 +6556,11 @@ void ATI_API_CALL KCL_fpu_begin(void)
  */
 void ATI_API_CALL KCL_fpu_end(void)
 {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
     kernel_fpu_end();
+#else
+    __kernel_fpu_end();
+#endif
 }
 
 /** Create new directory entry under "/proc/...."
-- 
1.9.1



Index: catalyst-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/catalyst-kmod/devel/catalyst-kmod.spec,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- catalyst-kmod.spec	21 Aug 2015 14:21:32 -0000	1.31
+++ catalyst-kmod.spec	23 Aug 2015 14:17:27 -0000	1.32
@@ -3,7 +3,7 @@
 # "buildforkernels newest" macro for just that build; immediately after
 # queuing that build enable the macro again for subsequent builds; that way
 # a new akmod package will only get build when a new one is actually needed
-%global buildforkernels newest
+%global buildforkernels current
 
 # Tweak to have debuginfo - part 1/2
 %if 0%{?fedora} > 7
@@ -14,7 +14,7 @@
 Name:        catalyst-kmod
 Epoch:       1
 Version:     15.7
-Release:     4%{?dist}.2
+Release:     5%{?dist}
 # Taken over by kmodtool
 Summary:     AMD display driver kernel module
 Group:       System Environment/Kernel
@@ -25,7 +25,7 @@
 Patch0:      compat_alloc-Makefile.patch
 Patch1:      kernel_4.0-cr4-strn.patch
 Patch2:      kernel_4.1-remove-IRQF_DISABLED.patch
-Patch3:      4.1.3-kernel-compatibility-fixes.patch
+Patch3:      kernel_4.2_FPU.patch
 
 BuildRoot:   %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -105,6 +105,10 @@
 
 
 %changelog
+* Sun Aug 23 2015 Leigh Scott <leigh123linux at googlemail.com> - 1:15.7-5
+- merge 4.1.3-kernel-compatibility-fixes into kernel_4.1-remove-IRQF_DISABLED patch
+- Patch for 4.2 kernel 
+
 * Fri Aug 21 2015 Nicolas Chauvet <kwizart at gmail.com> - 1:15.7-4.2
 - Rebuilt for kernel
 

kernel_4.1-remove-IRQF_DISABLED.patch:
 firegl_public.c |    4 ++++
 kcl_acpi.c      |    4 ++++
 2 files changed, 8 insertions(+)

Index: kernel_4.1-remove-IRQF_DISABLED.patch
===================================================================
RCS file: /cvs/nonfree/rpms/catalyst-kmod/devel/kernel_4.1-remove-IRQF_DISABLED.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- kernel_4.1-remove-IRQF_DISABLED.patch	10 Aug 2015 17:08:01 -0000	1.2
+++ kernel_4.1-remove-IRQF_DISABLED.patch	23 Aug 2015 14:17:27 -0000	1.3
@@ -12,3 +12,17 @@
  #endif
          dev_name,
          context);
+--- lib/modules/fglrx/build_mod/kcl_acpi.c
++++ lib/modules/fglrx/build_mod/kcl_acpi.c
+@@ -861,7 +861,11 @@ void ATI_API_CALL KCL_ACPI_No_Hotplug(void* dev)
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,17,0)
+     if(pdev)
+     {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,1,3)
+        pci_ignore_hotplug(pdev);
++#else
++       pdev->ignore_hotplug = 1;
++#endif
+     }
+ #endif
+ }


--- 4.1.3-kernel-compatibility-fixes.patch DELETED ---


More information about the rpmfusion-commits mailing list