[Pkg-fglrx-devel] r1612 - in fglrx-driver/branches/15.12-jessie-backports/debian: . patches
Andreas Beckmann
anbe at moszumanska.debian.org
Sat Sep 10 09:15:23 UTC 2016
Author: anbe
Date: 2016-09-10 09:15:22 +0000 (Sat, 10 Sep 2016)
New Revision: 1612
Added:
fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.6-arch-get_user_pages-page_cache_release.patch
fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.7-arch-cpu_has_pge-v2.patch
Removed:
fglrx-driver/branches/15.12-jessie-backports/debian/patches/14-4.6.0-build.patch
Modified:
fglrx-driver/branches/15.12-jessie-backports/debian/changelog
fglrx-driver/branches/15.12-jessie-backports/debian/patches/series
Log:
take Linux 4.6/4.7 support patches from Arch Linux
Modified: fglrx-driver/branches/15.12-jessie-backports/debian/changelog
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/changelog 2016-09-08 17:20:42 UTC (rev 1611)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/changelog 2016-09-10 09:15:22 UTC (rev 1612)
@@ -1,6 +1,14 @@
+fglrx-driver (1:15.12-2~bpo8+3) UNRELEASED; urgency=medium
+
+ * Take 4.6-arch-get_user_pages-page_cache_release.patch and
+ 4.7-arch-cpu_has_pge-v2.patch from Arch Linux to fix support for newer
+ Linux kernels in a backward-compatible way. (Closes: #834732, #835392)
+
+ -- Andreas Beckmann <anbe at debian.org> Sat, 10 Sep 2016 01:43:39 +0200
+
fglrx-driver (1:15.12-2~bpo8+2) jessie-backports; urgency=medium
- * Add trival patch for 4.6.0 build.
+ * Add trival patch for 4.6.0 build. (Closes: #829036)
-- Aron Xu <aron at debian.org> Sun, 14 Aug 2016 20:38:24 +0800
Deleted: fglrx-driver/branches/15.12-jessie-backports/debian/patches/14-4.6.0-build.patch
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/patches/14-4.6.0-build.patch 2016-09-08 17:20:42 UTC (rev 1611)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/patches/14-4.6.0-build.patch 2016-09-10 09:15:22 UTC (rev 1612)
@@ -1,31 +0,0 @@
-Index: fglrx-driver-15.12/common/lib/modules/fglrx/build_mod/firegl_public.c
-===================================================================
---- fglrx-driver-15.12.orig/common/lib/modules/fglrx/build_mod/firegl_public.c
-+++ fglrx-driver-15.12/common/lib/modules/fglrx/build_mod/firegl_public.c
-@@ -3228,7 +3228,7 @@ int ATI_API_CALL KCL_LockUserPages(unsig
- int ret;
-
- down_read(¤t->mm->mmap_sem);
-- ret = get_user_pages(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
-+ ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 1, 0, (struct page **)page_list, NULL);
- up_read(¤t->mm->mmap_sem);
-
- return ret;
-@@ -3246,7 +3246,7 @@ int ATI_API_CALL KCL_LockReadOnlyUserPag
- int ret;
-
- down_read(¤t->mm->mmap_sem);
-- ret = get_user_pages(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
-+ ret = get_user_pages_remote(current, current->mm, vaddr, page_cnt, 0, 0, (struct page **)page_list, NULL);
- up_read(¤t->mm->mmap_sem);
-
- return ret;
-@@ -3257,7 +3257,7 @@ void ATI_API_CALL KCL_UnlockUserPages(un
- unsigned int i;
- for (i=0; i<page_cnt; i++)
- {
-- page_cache_release((struct page*)page_list[i]);
-+ put_page((struct page*)page_list[i]);
- }
- }
-
Copied: fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.6-arch-get_user_pages-page_cache_release.patch (from rev 1611, fglrx-driver/branches/15.12-jessie-backports/debian/patches/14-4.6.0-build.patch)
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.6-arch-get_user_pages-page_cache_release.patch (rev 0)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.6-arch-get_user_pages-page_cache_release.patch 2016-09-10 09:15:22 UTC (rev 1612)
@@ -0,0 +1,38 @@
+--- 16.5/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-18 19:47:41.000000000 +0100
++++ 16.5b/common/lib/modules/fglrx/build_mod/firegl_public.c 2016-05-09 20:29:48.227025117 +0200
+@@ -3220,7 +3220,11 @@
+ int ret;
+
+ down_read(¤t->mm->mmap_sem);
++#if 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);
++#endif
+ up_read(¤t->mm->mmap_sem);
+
+ return ret;
+@@ -3238,7 +3242,11 @@
+ int ret;
+
+ down_read(¤t->mm->mmap_sem);
++#if 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);
++#endif
+ up_read(¤t->mm->mmap_sem);
+
+ return ret;
+@@ -3249,7 +3257,11 @@
+ unsigned int i;
+ for (i=0; i<page_cnt; i++)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
++ put_page((struct page*)page_list[i]);
++#else
+ page_cache_release((struct page*)page_list[i]);
++#endif
+ }
+ }
+
Added: fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.7-arch-cpu_has_pge-v2.patch
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.7-arch-cpu_has_pge-v2.patch (rev 0)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/patches/4.7-arch-cpu_has_pge-v2.patch 2016-09-10 09:15:22 UTC (rev 1612)
@@ -0,0 +1,70 @@
+diff -uNr 16.8/common/lib/modules/fglrx/build_mod/firegl_public.c 16.8b/common/lib/modules/fglrx/build_mod/firegl_public.c
+--- 16.8/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-18 19:47:41.000000000 +0100
++++ 16.8b/common/lib/modules/fglrx/build_mod/firegl_public.c 2016-08-15 15:09:37.228538907 +0200
+@@ -4518,7 +4518,11 @@
+ write_cr0(cr0);
+ wbinvd();
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ if (boot_cpu_has(X86_FEATURE_PGE))
++#else
+ if (cpu_has_pge)
++#endif
+ {
+ cr4 = READ_CR4();
+ WRITE_CR4(cr4 & ~X86_CR4_PGE);
+@@ -4532,7 +4536,11 @@
+ wbinvd();
+ __flush_tlb();
+ write_cr0(cr0 & 0xbfffffff);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ if (boot_cpu_has(X86_FEATURE_PGE))
++#else
+ if (cpu_has_pge)
++#endif
+ {
+ WRITE_CR4(cr4);
+ }
+@@ -4559,7 +4567,11 @@
+ write_cr0(cr0);
+ wbinvd();
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ if (boot_cpu_has(X86_FEATURE_PGE))
++#else
+ if (cpu_has_pge)
++#endif
+ {
+ cr4 = READ_CR4();
+ WRITE_CR4(cr4 & ~X86_CR4_PGE);
+@@ -4572,7 +4584,11 @@
+ wbinvd();
+ __flush_tlb();
+ write_cr0(cr0 & 0xbfffffff);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++ if (boot_cpu_has(X86_FEATURE_PGE))
++#else
+ if (cpu_has_pge)
++#endif
+ {
+ WRITE_CR4(cr4);
+ }
+diff -uNr 16.8/common/lib/modules/fglrx/build_mod/firegl_public.h 16.8b/common/lib/modules/fglrx/build_mod/firegl_public.h
+--- 16.8/common/lib/modules/fglrx/build_mod/firegl_public.h 2015-12-18 19:47:41.000000000 +0100
++++ 16.8b/common/lib/modules/fglrx/build_mod/firegl_public.h 2016-08-15 15:09:05.815141238 +0200
+@@ -650,9 +650,15 @@
+ #define cpu_has_pat test_bit(X86_FEATURE_PAT, (void *) &boot_cpu_data.x86_capability)
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,7,0)
++#ifndef boot_cpu_has(X86_FEATURE_PGE)
++#define boot_cpu_has(X86_FEATURE_PGE) test_bit(X86_FEATURE_PGE, &boot_cpu_data.x86_capability)
++#endif
++#else
+ #ifndef cpu_has_pge
+ #define cpu_has_pge test_bit(X86_FEATURE_PGE, &boot_cpu_data.x86_capability)
+ #endif
++#endif
+
+ /* 2.6.29 defines pgprot_writecombine as a macro which resolves to a
+ * GPL-only function with the same name. So we always use our own
Modified: fglrx-driver/branches/15.12-jessie-backports/debian/patches/series
===================================================================
--- fglrx-driver/branches/15.12-jessie-backports/debian/patches/series 2016-09-08 17:20:42 UTC (rev 1611)
+++ fglrx-driver/branches/15.12-jessie-backports/debian/patches/series 2016-09-10 09:15:22 UTC (rev 1612)
@@ -5,4 +5,5 @@
#10-4.2.0-build.copy_xregs_to_kernel.patch
12-4.3.0-build.patch
13-4.4.0-build.patch
-14-4.6.0-build.patch
+4.6-arch-get_user_pages-page_cache_release.patch
+4.7-arch-cpu_has_pge-v2.patch
More information about the Pkg-fglrx-devel
mailing list