[Pkg-fglrx-devel] r1498 - in fglrx-driver/trunk/debian: . patches

Patrick Matthäi pmatthaei at moszumanska.debian.org
Tue Sep 1 08:15:47 UTC 2015


Author: pmatthaei
Date: 2015-09-01 08:15:46 +0000 (Tue, 01 Sep 2015)
New Revision: 1498

Added:
   fglrx-driver/trunk/debian/patches/07-4.1.0-build.patch
   fglrx-driver/trunk/debian/patches/08-4.2.0-build.patch
Modified:
   fglrx-driver/trunk/debian/changelog
   fglrx-driver/trunk/debian/patches/series
Log:
 * Add Ubuntu patches 07-4.1.0-build and 08-4.2.0-build to fix a FTBFS with
   Linux 4.1.
   Closes: #795222, #795230


Modified: fglrx-driver/trunk/debian/changelog
===================================================================
--- fglrx-driver/trunk/debian/changelog	2015-09-01 08:12:52 UTC (rev 1497)
+++ fglrx-driver/trunk/debian/changelog	2015-09-01 08:15:46 UTC (rev 1498)
@@ -7,6 +7,9 @@
 
   [ Patrick Matthäi ]
   * Add Ubuntu patch 06-4.0.0-build-2.
+  * Add Ubuntu patches 07-4.1.0-build and 08-4.2.0-build to fix a FTBFS with
+    Linux 4.1.
+    Closes: #795222, #795230
 
  -- Andreas Beckmann <anbe at debian.org>  Tue, 11 Aug 2015 23:48:01 +0200
 

Added: fglrx-driver/trunk/debian/patches/07-4.1.0-build.patch
===================================================================
--- fglrx-driver/trunk/debian/patches/07-4.1.0-build.patch	                        (rev 0)
+++ fglrx-driver/trunk/debian/patches/07-4.1.0-build.patch	2015-09-01 08:15:46 UTC (rev 1498)
@@ -0,0 +1,41 @@
+From 94631bfd9b813d9d2f1af0ea744e7121d72d25c5 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone at canonical.com>
+Date: Fri, 10 Jul 2015 16:52:29 +0200
+Subject: [PATCH 1/2] Add support for Linux 4.1
+
+Drop the IRQF_DISABLED flag, as it was removed in Linux 4.1
+
+Signed-off-by: Alberto Milone <alberto.milone at canonical.com>
+
+diff -Naur fglrx-driver-15.7.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-15.7/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-15.7.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-09-01 10:00:50.440106425 +0200
++++ fglrx-driver-15.7/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-09-01 10:02:17.519844336 +0200
+@@ -3503,10 +3503,12 @@
+         KCL_PUB_InterruptHandlerWrap,
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+         ((useMSI) ? (SA_INTERRUPT) : (SA_SHIRQ)),
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0)
+         //when MSI enabled. keep irq disabled when calling the action handler,
+         //exclude this IRQ from irq balancing (only on one CPU) 
+         ((useMSI) ? (IRQF_DISABLED) : (IRQF_SHARED)),    
++#else
++        ((useMSI) ? (0x0) : (IRQF_SHARED)),
+ #endif
+         dev_name,
+         context);
+diff -Naur fglrx-driver-15.7.orig/common/lib/modules/fglrx/build_mod/kcl_acpi.c fglrx-driver-15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c
+--- fglrx-driver-15.7.orig/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2015-09-01 09:46:47.000000000 +0200
++++ fglrx-driver-15.7/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2015-09-01 10:02:17.519844336 +0200
+@@ -863,7 +863,11 @@
+ #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
+ }

Added: fglrx-driver/trunk/debian/patches/08-4.2.0-build.patch
===================================================================
--- fglrx-driver/trunk/debian/patches/08-4.2.0-build.patch	                        (rev 0)
+++ fglrx-driver/trunk/debian/patches/08-4.2.0-build.patch	2015-09-01 08:15:46 UTC (rev 1498)
@@ -0,0 +1,112 @@
+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
+
+diff -Naur fglrx-driver-15.7.orig/common/lib/modules/fglrx/build_mod/firegl_public.c fglrx-driver-15.7/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- fglrx-driver-15.7.orig/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-09-01 10:03:54.963550372 +0200
++++ fglrx-driver-15.7/common/lib/modules/fglrx/build_mod/firegl_public.c	2015-09-01 10:04:59.455356368 +0200
+@@ -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"
+@@ -1706,6 +1714,9 @@
+ 
+ #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)                      
+@@ -1742,7 +1753,11 @@
+          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
+@@ -6456,21 +6471,36 @@
+    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
+@@ -6482,8 +6512,12 @@
+ 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();
+@@ -6528,7 +6562,11 @@
+  */
+ 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/...."

Modified: fglrx-driver/trunk/debian/patches/series
===================================================================
--- fglrx-driver/trunk/debian/patches/series	2015-09-01 08:12:52 UTC (rev 1497)
+++ fglrx-driver/trunk/debian/patches/series	2015-09-01 08:15:46 UTC (rev 1498)
@@ -4,3 +4,5 @@
 04-3.17rc6-no_hotplug.patch
 05-4.0.0-build.patch
 06-4.0.0-build-2.patch
+07-4.1.0-build.patch
+08-4.2.0-build.patch




More information about the Pkg-fglrx-devel mailing list