diff options
author | Vi0L0 | 2017-10-16 22:28:57 +0200 |
---|---|---|
committer | Vi0L0 | 2017-10-16 22:28:57 +0200 |
commit | 9fb3698bc366b007b83f993e00ad65a49d921162 (patch) | |
tree | 3863963ae64f017a7e809de7a3a8e61188c4c3b2 | |
parent | 6dc8a64bafef4082d69544bd3a3611c8f91d9708 (diff) | |
download | aur-9fb3698bc366b007b83f993e00ad65a49d921162.tar.gz |
15.9-17: 4.13 kernel support
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | 4.12-arch-remove_clts.patch | 21 | ||||
-rw-r--r-- | 4.12-npfeiler-PUD_OFFSET.patch | 171 | ||||
-rw-r--r-- | 4.12-npfeiler-movsl_mask.patch | 10 | ||||
-rw-r--r-- | 4.13-npfeiler-wait_queue_t.patch | 13 | ||||
-rw-r--r-- | PKGBUILD | 22 |
6 files changed, 242 insertions, 7 deletions
@@ -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 = 16 + pkgrel = 17 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.12 + depends = linux<4.14 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 @@ -32,6 +32,10 @@ pkgbase = catalyst 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 source = 4.11-npfeiler-signal_vmf.patch + source = 4.12-npfeiler-PUD_OFFSET.patch + source = 4.12-arch-remove_clts.patch + source = 4.12-npfeiler-movsl_mask.patch + source = 4.13-npfeiler-wait_queue_t.patch md5sums = d2de2df6946b452c266a3c892e6e46ff md5sums = fd98b7e486d7fd4cad8de7b95b5b031e md5sums = 3e1b82bd69774ea808da69c983d6a43b @@ -49,6 +53,10 @@ pkgbase = catalyst md5sums = 194cb44e9e2ab0e65b6267aca66d0400 md5sums = 05f6364db877d9c4bdf1592deda905b7 md5sums = 8e53ba65a0aad42eb2ff771c1ace6609 + md5sums = f090e47160403e4ba65d1e0de69973c9 + md5sums = 782769206ed12ded10c347be3e476729 + md5sums = cb25bc7fbb7d5cb1c07d2f3fa5fda826 + md5sums = 0a725f40bc980d578cbed3e57a05b765 pkgname = catalyst diff --git a/4.12-arch-remove_clts.patch b/4.12-arch-remove_clts.patch new file mode 100644 index 000000000000..e34034da861b --- /dev/null +++ b/4.12-arch-remove_clts.patch @@ -0,0 +1,21 @@ +--- archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c 2015-12-18 19:47:41.000000000 +0100 ++++ archive_filesb/common/lib/modules/fglrx/build_mod/firegl_public.c 2017-08-15 21:14:37.288814512 +0200 +@@ -6508,8 +6508,6 @@ + #else + __save_init_fpu(cur_task); + #endif +- else +- clts(); + + #else + /* TS_USEDFPU is removed in kernel 3.3+ and 3.2.8+ with the commit below: +@@ -6534,8 +6532,7 @@ + #else + __save_init_fpu(cur_task); + #endif +- else +- clts(); ++ + #endif + #endif + } diff --git a/4.12-npfeiler-PUD_OFFSET.patch b/4.12-npfeiler-PUD_OFFSET.patch new file mode 100644 index 000000000000..c2b2bd5e15e1 --- /dev/null +++ b/4.12-npfeiler-PUD_OFFSET.patch @@ -0,0 +1,171 @@ +diff --git archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c
+index b2c9e7c..2e9a112 100755
+--- archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ archive_files/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -208,6 +208,10 @@
+ #include <linux/sched/signal.h>
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++#include <asm/set_memory.h>
++#endif
++
+ #include "firegl_public.h"
+ #include "kcl_osconfig.h"
+ #include "kcl_io.h"
+@@ -2752,6 +2756,9 @@ int ATI_API_CALL KCL_MEM_VerifyWriteAccess(void* addr, kcl_size_t size)
+ unsigned long ATI_API_CALL KCL_GetInitKerPte(unsigned long address)
+ {
+ pgd_t *pgd_p;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ p4d_t *p4d_p;
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+ pud_t *pud_p;
+ #endif
+@@ -2766,7 +2773,13 @@ unsigned long ATI_API_CALL KCL_GetInitKerPte(unsigned long address)
+ #endif
+ PGD_PRESENT(pgd_p);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ P4D_OFFSET(p4d_p, pgd_p, address);
++ P4D_PRESENT(p4d_p);
++ PUD_OFFSET(pud_p, p4d_p, address);
++#else
+ PUD_OFFSET(pud_p, pgd_p, address);
++#endif
+ PUD_PRESENT(pud_p);
+ PMD_OFFSET(pmd_p, pud_p, address);
+ #else
+@@ -2823,6 +2836,9 @@ unsigned long ATI_API_CALL KCL_GetPageTableByVirtAddr(
+ unsigned long * page_addr)
+ {
+ pgd_t* pgd_p;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ p4d_t *p4d_p;
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+ pud_t* pud_p;
+ #endif
+@@ -2835,7 +2851,13 @@ unsigned long ATI_API_CALL KCL_GetPageTableByVirtAddr(
+ KCL_DEBUG2(FN_FIREGL_KCL,"pgd_p=0x%08lx\n", (unsigned long)pgd_p);
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ P4D_OFFSET(p4d_p, pgd_p, virtual_addr);
++ P4D_PRESENT(p4d_p);
++ PUD_OFFSET(pud_p, p4d_p, virtual_addr);
++#else
+ PUD_OFFSET(pud_p, pgd_p, virtual_addr);
++#endif
+ PUD_PRESENT(pud_p);
+ KCL_DEBUG2(FN_FIREGL_KCL,"pud_p=0x%08lx\n", (unsigned long)pud_p);
+ PMD_OFFSET(pmd_p, pud_p, virtual_addr);
+@@ -2892,6 +2914,9 @@ unsigned int ATI_API_CALL KCL_GetPageSizeByVirtAddr(
+ unsigned int * page_size)
+ {
+ pgd_t* pgd_p;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ p4d_t *p4d_p;
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+ pud_t* pud_p;
+ #endif
+@@ -2904,7 +2929,13 @@ unsigned int ATI_API_CALL KCL_GetPageSizeByVirtAddr(
+ KCL_DEBUG2(FN_FIREGL_KCL,"pgd_p=0x%08lx\n", (unsigned long)pgd_p);
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ P4D_OFFSET(p4d_p, pgd_p, virtual_addr);
++ P4D_PRESENT(p4d_p);
++ PUD_OFFSET(pud_p, p4d_p, virtual_addr);
++#else
+ PUD_OFFSET(pud_p, pgd_p, virtual_addr);
++#endif
+ PUD_PRESENT(pud_p);
+ KCL_DEBUG2(FN_FIREGL_KCL,"pud_p=0x%08lx\n", (unsigned long)pud_p);
+ PMD_OFFSET(pmd_p, pud_p, virtual_addr);
+@@ -3083,6 +3114,9 @@ int ATI_API_CALL KCL_TestAndClearPageDirtyFlag(unsigned long virtual_addr, unsig
+ {
+ int ret = -1; // init with page not present
+ pgd_t* pgd_p;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ p4d_t *p4d_p;
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+ pud_t* pud_p;
+ #endif
+@@ -3135,7 +3169,16 @@ int ATI_API_CALL KCL_TestAndClearPageDirtyFlag(unsigned long virtual_addr, unsig
+ KCL_DEBUG1(FN_FIREGL_KCL,"pgd_p=0x%08lx\n", (unsigned long)pgd_p);
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+- PUD_OFFSET(pud_p, pgd_p, page_addr);
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ P4D_OFFSET(p4d_p, pgd_p, page_addr);
++ if (!p4d_present(*p4d_p)) {
++ KCL_DEBUG1(FN_FIREGL_KCL,"ERROR: !p4d_present\n");
++ continue;
++ }
++ PUD_OFFSET(pud_p, p4d_p, page_addr);
++ #else
++ PUD_OFFSET(pud_p, pgd_p, page_addr);
++ #endif
+ if (!pud_present(*pud_p))
+ {
+ KCL_DEBUG1(FN_FIREGL_KCL,"ERROR: !pud_present\n");
+@@ -4077,6 +4120,9 @@ char* ATI_API_CALL KCL_MEM_VM_GetRegionPhysAddrStr(struct vm_area_struct* vma,
+ kcl_dma_addr_t* phys_address)
+ {
+ pgd_t* pgd_p;
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ p4d_t *p4d_p;
++#endif
+ pmd_t* pmd_p;
+ pte_t pte;
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+@@ -4090,7 +4136,17 @@ char* ATI_API_CALL KCL_MEM_VM_GetRegionPhysAddrStr(struct vm_area_struct* vma,
+ return buf;
+ }
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
++ #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++ p4d_p = p4d_offset(pgd_p, virtual_addr);
++ if (!p4d_present(*p4d_p))
++ {
++ *buf = 0;
++ return buf;
++ }
++ pud_p = pud_offset(p4d_p, virtual_addr);
++ #else
+ pud_p = pud_offset(pgd_p, virtual_addr);
++ #endif
+ if (!pud_present(*pud_p))
+ {
+ *buf = 0;
+diff --git archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h
+index 14e25f9..aca2940 100755
+--- archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h
++++ archive_files/common/lib/modules/fglrx/build_mod/firegl_public.h
+@@ -91,6 +91,23 @@ do { \
+ } \
+ } while(0)
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++#define P4D_OFFSET(p4d_p, pgd_p, pte_linear) \
++do { \
++ p4d_p = p4d_offset(pgd_p, pte_linear); \
++} while(0)
++
++#define P4D_PRESENT(p4d_p) \
++do { \
++ if (!p4d_present(*(p4d_p))) \
++ { \
++ return PAGING_FAULT_SIGBUS_INT; /* Something bad happened; generate SIGBUS */ \
++ /* alternatively we could generate a NOPAGE_OOM "out of memory" */ \
++ } \
++} while(0)
++
++#endif // LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0)
++
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
+ #define PUD_PRESENT(pud_p) \
+ do { \
\ No newline at end of file diff --git a/4.12-npfeiler-movsl_mask.patch b/4.12-npfeiler-movsl_mask.patch new file mode 100644 index 000000000000..284aa471931c --- /dev/null +++ b/4.12-npfeiler-movsl_mask.patch @@ -0,0 +1,10 @@ +--- archive_files/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2015-12-18 19:47:41.000000000 +0100 ++++ archive_filesb/common/lib/modules/fglrx/build_mod/kcl_ioctl.c 2017-08-20 19:44:10.356564038 +0200 +@@ -30,6 +30,7 @@ + * + */ + ++#include <linux/cache.h> + #include <linux/version.h> + #include <asm/uaccess.h> + diff --git a/4.13-npfeiler-wait_queue_t.patch b/4.13-npfeiler-wait_queue_t.patch new file mode 100644 index 000000000000..8e5ed7da9ab9 --- /dev/null +++ b/4.13-npfeiler-wait_queue_t.patch @@ -0,0 +1,13 @@ +--- archive_files/common/lib/modules/fglrx/build_mod/kcl_wait.c 2015-12-18 19:47:41.000000000 +0100
++++ archive_filesb/common/lib/modules/fglrx/build_mod/kcl_wait.c 2017-09-30 14:13:37.285611187 +0200
+@@ -43,6 +43,10 @@
+ #include "kcl_config.h"
+ #include "kcl_wait.h"
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0)
++typedef wait_queue_entry_t wait_queue_t;
++#endif
++
+ /** \brief Create wait object, init it and add to the kernel queue
+ ** \param object_handle [in] Object handle
+ ** \return Kernel wait handle on success, 0 otherwise
@@ -11,20 +11,20 @@ # Contributor: gentoo (part of 4.3 kernel patches) # Contributor: Philip Muller @ Manjaro (4.4 kernel patch) # Contributor: sling00 (4.10 kernel patch) -# Contributor: npfeiler (4.11 kernel patch) +# Contributor: npfeiler (4.11, 4.12 and 4.13 kernel patch) _kernver=`uname -r` pkgname=catalyst pkgver=15.9 -pkgrel=16 +pkgrel=17 _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.12' 'catalyst-utils') +depends=('linux>=3.0' 'linux<4.14' 'catalyst-utils') makedepends=('gcc-libs' 'gcc>4.0.0' 'make' 'linux-headers') conflicts=('catalyst-test') install=catalyst.install @@ -49,7 +49,11 @@ source=( 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) + 4.11-npfeiler-signal_vmf.patch + 4.12-npfeiler-PUD_OFFSET.patch + 4.12-arch-remove_clts.patch + 4.12-npfeiler-movsl_mask.patch + 4.13-npfeiler-wait_queue_t.patch) md5sums=('d2de2df6946b452c266a3c892e6e46ff' 'fd98b7e486d7fd4cad8de7b95b5b031e' @@ -67,7 +71,11 @@ md5sums=('d2de2df6946b452c266a3c892e6e46ff' '37eef5103a11d8136979463e7bc31091' '194cb44e9e2ab0e65b6267aca66d0400' '05f6364db877d9c4bdf1592deda905b7' - '8e53ba65a0aad42eb2ff771c1ace6609') + '8e53ba65a0aad42eb2ff771c1ace6609' + 'f090e47160403e4ba65d1e0de69973c9' + '782769206ed12ded10c347be3e476729' + 'cb25bc7fbb7d5cb1c07d2f3fa5fda826' + '0a725f40bc980d578cbed3e57a05b765') build() { @@ -105,6 +113,10 @@ build() { 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 patch -Np1 -i ../4.11-npfeiler-signal_vmf.patch + patch -Np1 -i ../4.12-npfeiler-PUD_OFFSET.patch + patch -Np1 -i ../4.12-arch-remove_clts.patch + patch -Np1 -i ../4.12-npfeiler-movsl_mask.patch + patch -Np1 -i ../4.13-npfeiler-wait_queue_t.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 . |