summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2013-06-18 14:00:32 +0000
committerChí-Thanh Christopher Nguyễn <chithanh@gentoo.org>2013-06-18 14:00:32 +0000
commit551700572dd4910f0b64243ca5a9d8dcd17b5081 (patch)
treed5300bac669b37999ffb302b7f54d2ce09880298 /x11-drivers
parentVersion bump. (diff)
downloadgentoo-2-551700572dd4910f0b64243ca5a9d8dcd17b5081.tar.gz
gentoo-2-551700572dd4910f0b64243ca5a9d8dcd17b5081.tar.bz2
gentoo-2-551700572dd4910f0b64243ca5a9d8dcd17b5081.zip
Fix building with recent kernels, bug #470596. Import of Emil Karlson's ebuild from the x11 overlay.
(Portage version: 2.1.12.2/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'x11-drivers')
-rw-r--r--x11-drivers/ati-drivers/ChangeLog10
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild4
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-13.4.ebuild4
-rw-r--r--x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild6
-rw-r--r--x11-drivers/ati-drivers/files/ati-drivers-13.6-linux-3.10-proc.diff (renamed from x11-drivers/ati-drivers/files/linux-3.10-proc.diff)99
-rw-r--r--x11-drivers/ati-drivers/files/linux-3.9-kuid.diff33
-rw-r--r--x11-drivers/ati-drivers/files/typesafe-kuid.diff34
7 files changed, 131 insertions, 59 deletions
diff --git a/x11-drivers/ati-drivers/ChangeLog b/x11-drivers/ati-drivers/ChangeLog
index 66bff3c09865..51da488e1c37 100644
--- a/x11-drivers/ati-drivers/ChangeLog
+++ b/x11-drivers/ati-drivers/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for x11-drivers/ati-drivers
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.332 2013/06/03 16:08:10 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ChangeLog,v 1.333 2013/06/18 14:00:32 chithanh Exp $
+
+ 18 Jun 2013; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
+ +files/ati-drivers-13.6-linux-3.10-proc.diff, +files/typesafe-kuid.diff,
+ -files/linux-3.10-proc.diff, -files/linux-3.9-kuid.diff,
+ ati-drivers-13.1_pre897.ebuild, ati-drivers-13.4.ebuild,
+ ati-drivers-13.6_beta.ebuild:
+ Fix building with recent kernels, bug #470596. Import of Emil Karlson's ebuild
+ from the x11 overlay.
03 Jun 2013; Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org>
ati-drivers-13.4.ebuild, ati-drivers-13.6_beta.ebuild:
diff --git a/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild
index c3af99b746d7..2515ccff730a 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild,v 1.8 2013/05/30 13:48:39 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-13.1_pre897.ebuild,v 1.9 2013/06/18 14:00:32 chithanh Exp $
EAPI=5
@@ -302,7 +302,7 @@ src_prepare() {
use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
# Compile fix for kernel typesafe uid types #469160
- epatch "${FILESDIR}/linux-3.9-kuid.diff"
+ epatch "${FILESDIR}/typesafe-kuid.diff"
epatch "${FILESDIR}/linux-3.10-proc.diff"
diff --git a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
index 70ed93c9bb58..27dada738560 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild,v 1.3 2013/06/03 16:08:10 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-13.4.ebuild,v 1.4 2013/06/18 14:00:32 chithanh Exp $
EAPI=5
@@ -313,7 +313,7 @@ src_prepare() {
epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
# Compile fix for kernel typesafe uid types #469160
- epatch "${FILESDIR}/linux-3.9-kuid.diff"
+ epatch "${FILESDIR}/typesafe-kuid.diff"
epatch "${FILESDIR}/linux-3.10-proc.diff"
diff --git a/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild b/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild
index 17fa82afc09c..1b67f9a8195a 100644
--- a/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild
+++ b/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild,v 1.3 2013/06/03 16:08:10 chithanh Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-drivers/ati-drivers/ati-drivers-13.6_beta.ebuild,v 1.4 2013/06/18 14:00:32 chithanh Exp $
EAPI=5
@@ -313,9 +313,9 @@ src_prepare() {
epatch "${FILESDIR}"/ati-drivers-12.9-KCL_AGP_FindCapsRegisters-stub.patch
# Compile fix for kernel typesafe uid types #469160
- epatch "${FILESDIR}/linux-3.9-kuid.diff"
+ epatch "${FILESDIR}/typesafe-kuid.diff"
- epatch "${FILESDIR}/linux-3.10-proc.diff"
+ epatch "${FILESDIR}/ati-drivers-13.6-linux-3.10-proc.diff"
# Compile fix, https://bugs.gentoo.org/show_bug.cgi?id=454870
use pax_kernel && epatch "${FILESDIR}/const-notifier-block.patch"
diff --git a/x11-drivers/ati-drivers/files/linux-3.10-proc.diff b/x11-drivers/ati-drivers/files/ati-drivers-13.6-linux-3.10-proc.diff
index ce4871c0658b..bdb22eae768a 100644
--- a/x11-drivers/ati-drivers/files/linux-3.10-proc.diff
+++ b/x11-drivers/ati-drivers/files/ati-drivers-13.6-linux-3.10-proc.diff
@@ -1,7 +1,8 @@
-diff -Nur common/lib/modules/fglrx/build_mod/drmP.h common-r1/lib/modules/fglrx/build_mod/drmP.h
---- common/lib/modules/fglrx/build_mod/drmP.h 2013-05-15 09:26:23.555752577 +0300
-+++ common-r1/lib/modules/fglrx/build_mod/drmP.h 2013-05-16 10:39:17.496212055 +0300
-@@ -901,10 +901,6 @@
+diff --git a/common/lib/modules/fglrx/build_mod/drmP.h b/common/lib/modules/fglrx/build_mod/drmP.h
+index 81546b2..4e74526 100755
+--- a/common/lib/modules/fglrx/build_mod/drmP.h
++++ b/common/lib/modules/fglrx/build_mod/drmP.h
+@@ -901,10 +901,6 @@ int DRM(stub_register)(const char *name,
int DRM(stub_unregister)(int minor);
/* Proc support (drm_proc.h) */
@@ -12,10 +13,11 @@ diff -Nur common/lib/modules/fglrx/build_mod/drmP.h common-r1/lib/modules/fglrx/
extern int DRM(proc_cleanup)(int minor,
struct proc_dir_entry *root,
struct proc_dir_entry *dev_root);
-diff -Nur common/lib/modules/fglrx/build_mod/drm_proc.h common-r1/lib/modules/fglrx/build_mod/drm_proc.h
---- common/lib/modules/fglrx/build_mod/drm_proc.h 2013-05-15 09:26:23.555752577 +0300
-+++ common-r1/lib/modules/fglrx/build_mod/drm_proc.h 2013-05-19 02:16:16.584406160 +0300
-@@ -75,61 +75,6 @@
+diff --git a/common/lib/modules/fglrx/build_mod/drm_proc.h b/common/lib/modules/fglrx/build_mod/drm_proc.h
+index 1e3ab4a..c52ad7e 100755
+--- a/common/lib/modules/fglrx/build_mod/drm_proc.h
++++ b/common/lib/modules/fglrx/build_mod/drm_proc.h
+@@ -75,61 +75,6 @@ struct drm_proc_list {
#define DRM_PROC_ENTRIES (sizeof(DRM(proc_list))/sizeof(DRM(proc_list)[0]))
/**
@@ -77,10 +79,11 @@ diff -Nur common/lib/modules/fglrx/build_mod/drm_proc.h common-r1/lib/modules/fg
* Cleanup the proc filesystem resources.
*
* \param minor device minor number.
-diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modules/fglrx/build_mod/firegl_public.c
---- common/lib/modules/fglrx/build_mod/firegl_public.c 2013-05-15 09:26:23.545752925 +0300
-+++ common-r1/lib/modules/fglrx/build_mod/firegl_public.c 2013-05-19 03:07:10.236552522 +0300
-@@ -583,6 +583,202 @@
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index d3ad3ce..890a0aa 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -583,6 +583,202 @@ kcl_proc_list_t KCL_PROC_FileList[] =
{ "NULL", NULL, NULL} // Terminate List!!!
};
@@ -110,7 +113,7 @@ diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modul
+ return -EIO;
+ }
+ //printk(KERN_NOTICE " call with: dev %p, func %p\n", wrapper_data->data, wrapper_data->read_func);
-+
++
+ usebuffer=kmalloc(2*PAGE_SIZE, GFP_KERNEL);
+ if (!usebuffer)
+ return -ENOMEM;
@@ -132,7 +135,7 @@ diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modul
+ goto out;
+ }
+ *offset+=retval;
-+
++
+out:
+ if (usebuffer)
+ kfree(usebuffer);
@@ -146,7 +149,7 @@ diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modul
+ BUG_ON(*offset);
+ if (!wrapper_data->write_func)
+ return -EPERM;
-+
++
+ usebuffer=kmalloc(count, GFP_KERNEL);
+ if (!usebuffer)
+ return -ENOMEM;
@@ -155,7 +158,7 @@ diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modul
+ retval=-EFAULT;
+ goto out;
+ }
-+
++
+ retval=wrapper_data->write_func(myfile, buffer, count, wrapper_data->data);
+ *offset+=retval;
+out:
@@ -172,7 +175,7 @@ diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modul
+ .write=gentoo_proc_wrapper_write,
+ .open=gentoo_proc_wrapper_open,
+};
-+
++
+static void *gentoo_proc_wrapper_data(read_proc_t *reader, write_proc_t *writer, void *mydata) {
+ gentoo_proc_wrapper_t *retval=kmalloc(sizeof(gentoo_proc_wrapper_t), GFP_KERNEL);
+ if (!retval)
@@ -283,7 +286,7 @@ diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modul
static struct proc_dir_entry *firegl_proc_init( device_t *dev,
int minor,
struct proc_dir_entry *root,
-@@ -677,6 +873,7 @@
+@@ -677,6 +873,7 @@ static struct proc_dir_entry *firegl_proc_init( device_t *dev,
return root;
}
@@ -291,3 +294,63 @@ diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modul
static int firegl_proc_cleanup( int minor,
struct proc_dir_entry *root,
+@@ -6135,59 +6332,4 @@ void ATI_API_CALL KCL_fpu_end(void)
+ kernel_fpu_end();
+ }
+
+-/** Create new directory entry under "/proc/ati/...."
+- * Where
+- * root_dir - Root directory. If NULL then we should use "/proc/ati" root.
+- * name - Pointer to the name of directory
+- * access - Access attribute. We could use it to disable access to the directory for everybody accept owner.
+- * By default owner is root.
+- * Return NULL if failure. Pointer to proc_dir_entry otherwise
+- */
+-void * KCL_create_proc_dir(void *root_dir, const char *name, unsigned int access)
+-{
+- struct proc_dir_entry *dir = NULL;
+-
+- if (root_dir == NULL)
+- dir = create_proc_entry(name, S_IFDIR | access, firegl_stub_root);
+- else
+- dir = create_proc_entry(name, S_IFDIR | access, (struct proc_dir_entry *)root_dir);
+-
+- return dir;
+-}
+-
+-/* Remove proc directory entry
+- * root - Pointer to directory proc entry or NULL if for "/proc/ati"
+- * name - Name to delete
+- */
+-void KCL_remove_proc_dir_entry(void *root, const char *name)
+-{
+- if (root == NULL)
+- remove_proc_entry(name, firegl_stub_root);
+- else
+- remove_proc_entry(name, (struct proc_dir_entry *)root);
+-}
+-
+-
+-/* Create proc_entry under "root_dir"
+- * read_fn - Function which will be called on read request
+- * write_fn - Function which will be called on write request
+- * private_data - Pointer to private data which will be passed
+- */
+-void KCL_create_proc_entry(void *root_dir, const char *name, unsigned int access_mode, void *read_fn, void *write_fn, void *private_data)
+-{
+- struct proc_dir_entry *ent = NULL;
+-
+- if (root_dir == NULL || name == NULL)
+- return;
+-
+- ent = create_proc_entry(name, access_mode, (struct proc_dir_entry *)root_dir);
+-
+- if (ent)
+- {
+- ent->read_proc = (read_proc_t *)read_fn;
+- ent->write_proc = (write_proc_t *)write_fn;
+- ent->data = private_data;
+- }
+-}
+-
+ #endif /* __KERNEL__ */
diff --git a/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff b/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff
deleted file mode 100644
index 7e910d9269c6..000000000000
--- a/x11-drivers/ati-drivers/files/linux-3.9-kuid.diff
+++ /dev/null
@@ -1,33 +0,0 @@
-diff -Nur common/lib/modules/fglrx/build_mod/firegl_public.c common-r1/lib/modules/fglrx/build_mod/firegl_public.c
---- common/lib/modules/fglrx/build_mod/firegl_public.c 2013-04-17 00:29:55.000000000 +0300
-+++ common-r1/lib/modules/fglrx/build_mod/firegl_public.c 2013-05-11 00:37:44.653966585 +0300
-@@ -34,6 +34,11 @@
- #include <linux/autoconf.h>
- #endif
-
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
-+#include <linux/uidgid.h>
-+#endif
-+
-+
- #if !defined(CONFIG_X86)
- #if !defined(CONFIG_X86_PC)
- #if !defined(CONFIG_X86_XEN)
-@@ -1543,9 +1548,17 @@
- KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void)
- {
- #ifdef current_euid
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
-+ return __kuid_val(current_euid());
-+# else
- return current_euid();
-+# endif
- #else
-+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)
-+ return __kuid_val(current->euid);
-+# else
- return current->euid;
-+# endif
- #endif
- }
-
diff --git a/x11-drivers/ati-drivers/files/typesafe-kuid.diff b/x11-drivers/ati-drivers/files/typesafe-kuid.diff
new file mode 100644
index 000000000000..c226ea3dbcfd
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/typesafe-kuid.diff
@@ -0,0 +1,34 @@
+diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
+index d3ad3ce..9362b58 100755
+--- a/common/lib/modules/fglrx/build_mod/firegl_public.c
++++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
+@@ -34,6 +34,11 @@
+ #include <linux/autoconf.h>
+ #endif
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++#include <linux/uidgid.h>
++#endif
++
++
+ #if !defined(CONFIG_X86)
+ #if !defined(CONFIG_X86_PC)
+ #if !defined(CONFIG_X86_XEN)
+@@ -1543,9 +1548,17 @@ KCL_TYPE_Pid ATI_API_CALL KCL_GetTgid(void)
+ KCL_TYPE_Uid ATI_API_CALL KCL_GetEffectiveUid(void)
+ {
+ #ifdef current_euid
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++ return __kuid_val(current_euid());
++# else
+ return current_euid();
++# endif
+ #else
++# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
++ return __kuid_val(current->euid);
++# else
+ return current->euid;
++# endif
+ #endif
+ }
+