summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorVi0L02017-02-19 18:39:06 +0100
committerVi0L02017-02-19 18:39:06 +0100
commitbe117e402f931af7954f200dd1381f330df79998 (patch)
treeaa08735499db41577c0073b43fa04c4755c113f7
parent955d85a7f5062653200d19df1864887efa48b2e7 (diff)
downloadaur-be117e402f931af7954f200dd1381f330df79998.tar.gz
15.9-15: initial 4.10 kernel support
-rw-r--r--.SRCINFO6
-rw-r--r--4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch129
-rw-r--r--PKGBUILD12
-rw-r--r--catalyst.install4
4 files changed, 143 insertions, 8 deletions
diff --git a/.SRCINFO b/.SRCINFO
index be6f9dc8bb7..9b31790ebd1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = catalyst
pkgdesc = AMD/ATI Catalyst drivers for linux. fglrx kernel module only. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED
pkgver = 15.9
- pkgrel = 14
+ pkgrel = 15
url = http://www.amd.com
install = catalyst.install
arch = i686
@@ -12,7 +12,7 @@ pkgbase = catalyst
makedepends = make
makedepends = linux-headers
depends = linux>=3.0
- depends = linux<4.10
+ depends = linux<4.11
depends = catalyst-utils
conflicts = catalyst-test
source = http://www2.ati.com/drivers/linux/amd-catalyst-15.9-linux-installer-15.201.1151-x86.x86_64.zip
@@ -30,6 +30,7 @@ pkgbase = catalyst
source = 4.6-arch-get_user_pages-page_cache_release.patch
source = 4.7-arch-cpu_has_pge-v2.patch
source = 4.9_over_4.6-arch-get_user_pages_remote.patch
+ source = 4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch
md5sums = d2de2df6946b452c266a3c892e6e46ff
md5sums = fd98b7e486d7fd4cad8de7b95b5b031e
md5sums = 3e1b82bd69774ea808da69c983d6a43b
@@ -45,6 +46,7 @@ pkgbase = catalyst
md5sums = 11b7c2e0dc4794801005d66b0e7608a3
md5sums = 37eef5103a11d8136979463e7bc31091
md5sums = 194cb44e9e2ab0e65b6267aca66d0400
+ md5sums = 05f6364db877d9c4bdf1592deda905b7
pkgname = catalyst
diff --git a/4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch b/4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch
new file mode 100644
index 00000000000..b4103abd82e
--- /dev/null
+++ b/4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch
@@ -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;
diff --git a/PKGBUILD b/PKGBUILD
index a4944dbe4cd..d3764f59129 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -10,19 +10,20 @@
# Contributor: kolasa (part of 4.3 kernel patches)
# Contributor: gentoo (part of 4.3 kernel patches)
# Contributor: Philip Muller @ Manjaro (4.4 kernel patch)
+# Contributor: sling00 (4.10 kernel patch)
_kernver=`uname -r`
pkgname=catalyst
pkgver=15.9
-pkgrel=14
+pkgrel=15
_amdver=15.201.1151
pkgdesc="AMD/ATI Catalyst drivers for linux. fglrx kernel module only. Radeons HD 2 3 4 xxx ARE NOT SUPPORTED"
arch=('i686' 'x86_64')
url="http://www.amd.com"
license=('custom')
-depends=('linux>=3.0' 'linux<4.10' 'catalyst-utils')
+depends=('linux>=3.0' 'linux<4.11' 'catalyst-utils')
makedepends=('gcc-libs' 'gcc>4.0.0' 'make' 'linux-headers')
conflicts=('catalyst-test')
install=catalyst.install
@@ -45,7 +46,8 @@ source=(
grsec_arch.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.9_over_4.6-arch-get_user_pages_remote.patch
+ 4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch)
md5sums=('d2de2df6946b452c266a3c892e6e46ff'
'fd98b7e486d7fd4cad8de7b95b5b031e'
@@ -61,7 +63,8 @@ md5sums=('d2de2df6946b452c266a3c892e6e46ff'
'8941e91fc58cb44ce21ab9bda135754e'
'11b7c2e0dc4794801005d66b0e7608a3'
'37eef5103a11d8136979463e7bc31091'
- '194cb44e9e2ab0e65b6267aca66d0400')
+ '194cb44e9e2ab0e65b6267aca66d0400'
+ '05f6364db877d9c4bdf1592deda905b7')
build() {
@@ -97,6 +100,7 @@ build() {
patch -Np1 -i ../4.6-arch-get_user_pages-page_cache_release.patch
patch -Np1 -i ../4.7-arch-cpu_has_pge-v2.patch
patch -Np1 -i ../4.9_over_4.6-arch-get_user_pages_remote.patch
+ patch -Np1 -i ../4.10-arch-sling00-virtual_address-acpi_get_table_with_size.patch
cd ${srcdir}/archive_files/common/lib/modules/fglrx/build_mod
cp ${srcdir}/archive_files/arch/${_archdir}/lib/modules/fglrx/build_mod/libfglrx_ip.a .
diff --git a/catalyst.install b/catalyst.install
index 57bf2b10609..966764ef980 100644
--- a/catalyst.install
+++ b/catalyst.install
@@ -1,5 +1,5 @@
-KERNEL_VERSION=4.7.0-1-ARCH
-EXTRAMODULES=extramodules-4.7-ARCH
+KERNEL_VERSION=4.10.0-rc8-mainline
+EXTRAMODULES=extramodules-4.10-mainline
dep_extr_mod(){