catalyst: 4.7 patch
This commit is contained in:
parent
2b26443011
commit
25a3daa6ec
2 changed files with 72 additions and 1 deletions
70
srcpkgs/catalyst/files/4.7-arch-cpu_has_pge-v2.patch
Normal file
70
srcpkgs/catalyst/files/4.7-arch-cpu_has_pge-v2.patch
Normal file
|
@ -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
|
|
@ -5,7 +5,7 @@ _desc="AMD catalyst driver ${_release} for Linux"
|
|||
|
||||
pkgname=catalyst
|
||||
version=15.302
|
||||
revision=1
|
||||
revision=2
|
||||
maintainer="Juan RP <xtraeme@voidlinux.eu>"
|
||||
license="Proprietary AMD license"
|
||||
homepage="http://www.amd.com"
|
||||
|
@ -46,6 +46,7 @@ do_build() {
|
|||
patch -Np1 -i ${FILESDIR}/4.4-manjaro-xstate.patch
|
||||
patch -Np1 -i ${FILESDIR}/grsec_arch.patch
|
||||
patch -Np1 -i ${FILESDIR}/4.6-void-user_page.patch
|
||||
patch -Np1 -i ${FILESDIR}/4.7-arch-cpu_has_pge-v2.patch
|
||||
}
|
||||
do_install() {
|
||||
cd fglrx-${version}
|
||||
|
|
Loading…
Reference in a new issue