[Pkg-fglrx-devel] r1618 - in fglrx-driver/branches/15.12-jessie-backports/debian: . patches

Andreas Beckmann anbe at moszumanska.debian.org
Sat Jul 1 01:15:50 UTC 2017


Author: anbe
Date: 2017-07-01 01:15:50 +0000 (Sat, 01 Jul 2017)
New Revision: 1618

Added:
   fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch
   fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.11-npfeiler-signal_vmf.patch
   fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.9_over_4.6-arch-get_user_pages_remote.patch
Modified:
   fglrx-driver/branches/15.12-jessie-backports/debian/changelog
   fglrx-driver/branches/15.12-jessie-backports/debian/patches/series
Log:
take more patches from Arch Linux for Linux 4.9-4.11 support

Modified: fglrx-driver/branches/15.12-jessie-backports/debian/changelog
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/changelog	2016-09-10 11:09:39 UTC (rev 1617)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/changelog	2017-07-01 01:15:50 UTC (rev 1618)
@@ -1,3 +1,12 @@
+fglrx-driver (1:15.12-2~bpo8+4) jessie-backports; urgency=medium
+
+  * Take 4.9_over_4.6-arch-get_user_pages_remote.patch,
+    4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch,
+    4.11-npfeiler-signal_vmf.patch from Arch Linux to fix support for newer
+    Linux kernels.  (Closes: #860825)
+
+ -- Andreas Beckmann <anbe at debian.org>  Sat, 01 Jul 2017 03:14:39 +0200
+
 fglrx-driver (1:15.12-2~bpo8+3) jessie-backports; urgency=medium
 
   * Take 4.6-arch-get_user_pages-page_cache_release.patch and

Added: fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch	                        (rev 0)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch	2017-07-01 01:15:50 UTC (rev 1618)
@@ -0,0 +1,129 @@
+diff -uNr 17.2/common/lib/modules/fglrx/build_mod/firegl_public.c 17.2b/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- 17.2/common/lib/modules/fglrx/build_mod/firegl_public.c	2017-02-12 19:41:19.000000000 +0100
++++ 17.2b/common/lib/modules/fglrx/build_mod/firegl_public.c	2017-02-12 20:27:36.924630194 +0100
+@@ -3225,7 +3225,9 @@
+     int ret;
+ 
+     down_read(&current->mm->mmap_sem);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++    ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 1, (struct page **)page_list, NULL, NULL);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
+     ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 1, (struct page **)page_list, NULL);
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+     ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
+@@ -3249,7 +3251,9 @@
+     int ret;
+ 
+     down_read(&current->mm->mmap_sem);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++    ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 0, (struct page **)page_list, NULL, NULL);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
+     ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 0, (struct page **)page_list, NULL);
+ #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+     ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
+@@ -3626,7 +3630,9 @@
+     unsigned long vma_offset;
+     unsigned long pte_linear;
+     mem_map_t* pMmPage;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++    unsigned long address = (unsigned long) (vmf->address);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+     unsigned long address = (unsigned long) (vmf->virtual_address);
+ #endif
+ 
+@@ -3701,7 +3707,9 @@
+ {
+     unsigned long kaddr;
+     mem_map_t* pMmPage;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++    unsigned long address = (unsigned long) (vmf->address);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+     unsigned long address = (unsigned long) (vmf->virtual_address);
+ #endif
+ 
+@@ -3746,7 +3754,9 @@
+ {
+     unsigned long kaddr;
+     mem_map_t* pMmPage;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++    unsigned long address = (unsigned long) (vmf->address);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+     unsigned long address = (unsigned long) (vmf->virtual_address);
+ #endif
+ 
+@@ -3809,7 +3819,9 @@
+     mem_map_t* pMmPage;
+     struct firegl_pcie_mem* pciemem;
+     unsigned long* pagelist;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++    unsigned long address = (unsigned long) (vmf->address);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+     unsigned long address = (unsigned long) (vmf->virtual_address);
+ #endif
+     
+@@ -3871,7 +3883,9 @@
+ 
+     unsigned long offset;
+     struct page *page;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++    unsigned long address = (unsigned long) (vmf->address);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+     unsigned long address = (unsigned long) (vmf->virtual_address);
+ #endif
+ 
+@@ -4166,12 +4180,21 @@
+ 
+ #else
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++#define TRACE_FAULT(_f, _v,_a)                                          \
++   int  ret;                                                            \
++   KCL_DEBUG_TRACEIN(FN_DRM_NOPAGE, (unsigned long)_a->address, NULL); \
++   ret = _f(_v,_a);                                                     \
++   KCL_DEBUG_TRACEOUT(FN_DRM_NOPAGE, ret, NULL);                                \
++   return ret;
++#else
+ #define TRACE_FAULT(_f, _v,_a)                                          \
+    int  ret;                                                            \
+    KCL_DEBUG_TRACEIN(FN_DRM_NOPAGE, (unsigned long)_a->virtual_address, NULL); \
+    ret = _f(_v,_a);                                                     \
+    KCL_DEBUG_TRACEOUT(FN_DRM_NOPAGE, ret, NULL);                                \
+    return ret;
++#endif
+ 
+ static int ip_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+ {
+diff -uNr 17.2/common/lib/modules/fglrx/build_mod/kcl_acpi.c 17.2b/common/lib/modules/fglrx/build_mod/kcl_acpi.c
+--- 17.2/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2017-02-12 19:41:19.000000000 +0100
++++ 17.2b/common/lib/modules/fglrx/build_mod/kcl_acpi.c	2017-02-12 20:40:04.632067465 +0100
+@@ -363,7 +363,10 @@
+ {
+     struct acpi_table_header *hdr;
+     acpi_size tbl_size ;
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,3)    
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++    tbl_size = hdr->length;
++    if (!ACPI_SUCCESS(acpi_get_table("VFCT", 1, &hdr)))
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,3)    
+     if (!ACPI_SUCCESS(acpi_get_table_with_size("VFCT", 1, &hdr, &tbl_size)))
+ #else
+     tbl_size = 0x7fffffff;
+@@ -1041,7 +1044,10 @@
+         return KCL_ACPI_ERROR; 
+     }
+ 
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,3)    
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)
++    tbl_size = hdr->length;
++    if (!ACPI_SUCCESS(acpi_get_table(id, 0, &hdr)))
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,3)
+     if (!ACPI_SUCCESS(acpi_get_table_with_size(id, 0, &hdr, &tbl_size)))
+ #else
+     tbl_size = 0x7fffffff;

Added: fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.11-npfeiler-signal_vmf.patch
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.11-npfeiler-signal_vmf.patch	                        (rev 0)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.11-npfeiler-signal_vmf.patch	2017-07-01 01:15:50 UTC (rev 1618)
@@ -0,0 +1,66 @@
+--- archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c.pre	2017-05-25 19:18:22.773622548 +0200
++++ archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c	2017-05-25 19:17:13.929285722 +0200
+@@ -203,6 +203,10 @@
+ #include <asm/fpu/internal.h>
+ #endif
+ #endif
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#include <linux/mm.h>
++#include <linux/sched/signal.h>
++#endif
+ 
+ #include "firegl_public.h"
+ #include "kcl_osconfig.h"
+@@ -4196,6 +4200,29 @@
+    return ret;
+ #endif
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++
++static int ip_vm_fault(struct vm_fault *vmf) {
++    TRACE_FAULT(do_vm_fault, vmf->vma, vmf);
++}
++static int ip_vm_shm_fault(struct vm_fault *vmf) {
++    TRACE_FAULT(do_vm_shm_fault, vmf->vma, vmf);
++}
++static int ip_vm_dma_fault(struct vm_fault *vmf) {
++    TRACE_FAULT(do_vm_dma_fault, vmf->vma, vmf);
++}
++static int ip_vm_kmap_fault(struct vm_fault *vmf) {
++    TRACE_FAULT(do_vm_kmap_fault, vmf->vma, vmf);
++}
++static int ip_vm_pcie_fault(struct vm_fault *vmf) {
++    TRACE_FAULT(do_vm_pcie_fault, vmf->vma, vmf);
++}
++static int ip_vm_gart_fault(struct vm_fault *vmf) {
++    TRACE_FAULT(do_vm_gart_fault, vmf->vma, vmf);
++}
++
++#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) */
++
+ static int ip_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
+ {
+     TRACE_FAULT(do_vm_fault, vma, vmf);
+@@ -4226,6 +4253,8 @@
+     TRACE_FAULT(do_vm_gart_fault, vma, vmf);
+ }
+ 
++#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) */
++
+ #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26) */
+ 
+ static struct vm_operations_struct vm_ops =
+--- archive_files/common/lib/modules/fglrx/build_mod/kcl.c.pre	2017-05-25 19:18:22.776955783 +0200
++++ archive_files/common/lib/modules/fglrx/build_mod/kcl.c	2017-05-25 19:18:19.697047011 +0200
+@@ -30,6 +30,11 @@
+ #include <linux/slab.h>
+ #include <linux/pci.h>
+ 
++#include <linux/version.h>
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0)
++#include <linux/sched/signal.h>
++#endif
++
+ #define SUSPEND_CONSOLE  (MAX_NR_CONSOLES-1)
+ 
+ /** \brief Send signal to a specified pid

Added: fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.9_over_4.6-arch-get_user_pages_remote.patch
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.9_over_4.6-arch-get_user_pages_remote.patch	                        (rev 0)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.9_over_4.6-arch-get_user_pages_remote.patch	2017-07-01 01:15:50 UTC (rev 1618)
@@ -0,0 +1,24 @@
+--- 16.12/common/lib/modules/fglrx/build_mod/firegl_public.c	2016-12-10 19:44:46.764677311 +0100
++++ 16.12b/common/lib/modules/fglrx/build_mod/firegl_public.c	2016-12-10 19:45:43.941354338 +0100
+@@ -3225,7 +3225,9 @@
+     int ret;
+ 
+     down_read(&current->mm->mmap_sem);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
++    ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 1, (struct page **)page_list, NULL);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+     ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
+ #else
+     ret = get_user_pages(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
+@@ -3247,7 +3249,9 @@
+     int ret;
+ 
+     down_read(&current->mm->mmap_sem);
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)
++    ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 0, (struct page **)page_list, NULL);
++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
+     ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
+ #else
+     ret = get_user_pages(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);

Modified: fglrx-driver/branches/15.12-jessie-backports/debian/patches/series
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/patches/series	2016-09-10 11:09:39 UTC (rev 1617)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/patches/series	2017-07-01 01:15:50 UTC (rev 1618)
@@ -7,3 +7,6 @@
 13-4.4.0-build.patch
 4.6-arch-get_user_pages-page_cache_release.patch
 4.7-arch-cpu_has_pge-v2.patch
+4.9_over_4.6-arch-get_user_pages_remote.patch
+4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch
+4.11-npfeiler-signal_vmf.patch




More information about the Pkg-fglrx-devel mailing list