summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Gardner <je_fro@gentoo.org>2007-10-26 19:38:38 +0000
committerJeffrey Gardner <je_fro@gentoo.org>2007-10-26 19:38:38 +0000
commit758dd1586bd360ffc07ea6f5104b1176c54123ec (patch)
tree30a1b9313cd33cfd8b704af99e5476a03a39fb2b /x11-drivers/ati-drivers/files
parentgone crazy and adding etqw... (diff)
downloadje_fro-758dd1586bd360ffc07ea6f5104b1176c54123ec.tar.gz
je_fro-758dd1586bd360ffc07ea6f5104b1176c54123ec.tar.bz2
je_fro-758dd1586bd360ffc07ea6f5104b1176c54123ec.zip
ebuild with help from bugzilla
svn path=/; revision=110
Diffstat (limited to 'x11-drivers/ati-drivers/files')
-rw-r--r--x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23-2.patch78
-rw-r--r--x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23.patch107
2 files changed, 109 insertions, 76 deletions
diff --git a/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23-2.patch b/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23-2.patch
new file mode 100644
index 0000000..4ab3ac6
--- /dev/null
+++ b/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23-2.patch
@@ -0,0 +1,78 @@
+diff -Naur common/lib/modules/fglrx/build_mod/firegl_public.c.old common/lib/modules/fglrx/build_mod/firegl_public.c
+--- common/lib/modules/fglrx/build_mod/firegl_public.c 2007-10-24 14:10:52.000000000 +0000
++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2007-10-24 14:14:39.000000000 +0000
+@@ -217,6 +217,56 @@
+ #define preempt_enable()
+ #endif
+
++#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)
++#if defined(__i386__)
++#define ptep_test_and_clear_dirty(vma, addr, ptep) ({ \
++ int __ret = 0; \
++ if (pte_dirty(*(ptep))) \
++ __ret = test_and_clear_bit(_PAGE_BIT_DIRTY, \
++ &(ptep)->pte_low); \
++ if (__ret) \
++ pte_update((vma)->vm_mm, addr, ptep); \
++ __ret; \
++})
++
++static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
++static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
++#ifdef CONFIG_X86_PAE
++/*
++ * Is the pte executable?
++ */
++static inline int pte_x(pte_t pte)
++{
++ return !(pte_val(pte) & _PAGE_NX);
++}
++
++/*
++ * All present user-pages with !NX bit are user-executable:
++ */
++static inline int pte_exec(pte_t pte)
++{
++ return pte_user(pte) && pte_x(pte);
++}
++#else
++static inline int pte_exec(pte_t pte)
++{
++ return pte_user(pte);
++}
++#endif /* PAE */
++
++#elif defined(__x86_64__)
++static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma,
++ unsigned long addr, pte_t *ptep)
++{
++ if (!pte_dirty(*ptep))
++ return 0;
++ return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte);
++}
++static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
++static inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NX); }
++#endif
++#endif
++
+ // ============================================================
+ /* globals */
+
+@@ -2490,7 +2540,7 @@
+ #ifndef ptep_clear_flush_dirty
+ #define ptep_clear_flush_dirty(__vma, __address, __ptep) \
+ ({ \
+- int __dirty = ptep_test_and_clear_dirty(__ptep); \
++ int __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); \
+ if (__dirty) \
+ flush_tlb_page(__vma, __address); \
+ __dirty; \
+@@ -2937,7 +2987,7 @@
+ {
+ return request_irq(irq,
+ (void(*)(int, void *, struct pt_regs *))handler,
+- SA_SHIRQ, dev_name, dev_id);
++ IRQF_SHARED, dev_name, dev_id);
+ }
+
+ void ATI_API_CALL __ke_free_irq(unsigned int irq, void *dev_id)
diff --git a/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23.patch b/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23.patch
index e02c757..9713208 100644
--- a/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23.patch
+++ b/x11-drivers/ati-drivers/files/8.42.3/ati-drivers-2.6.23.patch
@@ -1,86 +1,41 @@
---- firegl_public.c 2007-10-23 23:32:06.000000000 -0500
-+++ firegl_public.c.new 2007-10-23 23:58:31.000000000 -0500
-@@ -217,6 +217,56 @@
- #define preempt_enable()
- #endif
-
-+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,22)
-+#if defined(__i386__)
-+#define ptep_test_and_clear_dirty(vma, addr, ptep) ({ \
-+ int __ret = 0; \
-+ if (pte_dirty(*(ptep))) \
-+ __ret = test_and_clear_bit(_PAGE_BIT_DIRTY, \
-+ &(ptep)->pte_low); \
-+ if (__ret) \
-+ pte_update((vma)->vm_mm, addr, ptep); \
-+ __ret; \
-+})
-+
-+static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
-+static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; }
-+#ifdef CONFIG_X86_PAE
-+/*
-+ * Is the pte executable?
-+ */
-+static inline int pte_x(pte_t pte)
-+{
-+ return !(pte_val(pte) & _PAGE_NX);
-+}
-+
-+/*
-+ * All present user-pages with !NX bit are user-executable:
-+ */
-+static inline int pte_exec(pte_t pte)
-+{
-+ return pte_user(pte) && pte_x(pte);
-+}
+diff -Naur common/lib/modules/fglrx/build_mod/firegl_public.c common/lib/modules/fglrx/build_mod/firegl_public.c
+--- common/lib/modules/fglrx/build_mod/firegl_public.c 2007-07-29 13:36:37.000000000 +0200
++++ common/lib/modules/fglrx/build_mod/firegl_public.c 2007-07-29 14:24:11.000000000 +0200
+@@ -2409,7 +2409,11 @@
+ #ifdef pte_offset_map
+ pte_p = pte_offset_map(pmd_p, virtual_addr);
+ if (pte_present(*pte_p))
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
+ ret = (ptep_clear_flush_dirty(vma, virtual_addr, pte_p) ? 1 : 0);
+#else
-+static inline int pte_exec(pte_t pte)
-+{
-+ return pte_user(pte);
-+}
-+#endif /* PAE */
-+
-+#elif defined(__x86_64__)
-+static inline int ptep_test_and_clear_dirty(struct vm_area_struct *vma,
-+ unsigned long addr, pte_t *ptep)
-+{
-+ if (!pte_dirty(*ptep))
-+ return 0;
-+ return test_and_clear_bit(_PAGE_BIT_DIRTY, &ptep->pte);
-+}
-+static inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; }
-+static inline int pte_exec(pte_t pte) { return !(pte_val(pte) & _PAGE_NX); }
++ return 0;
+#endif
+ else
+ __KE_DEBUG("page not exists!\n");
+ pte_unmap(pte_p);
+@@ -3399,9 +3403,11 @@
+ sprintf(buf, "0x%Lx %c%c%c%c%c%c\n",
+ *phys_address,
+ pte_present (pte) ? 'p' : '-',
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+ pte_read (pte) ? 'r' : '-',
+- pte_write (pte) ? 'w' : '-',
+ pte_exec (pte) ? 'x' : '-',
+#endif
-+
- // ============================================================
- /* globals */
-
-@@ -2490,7 +2540,7 @@
- #ifndef ptep_clear_flush_dirty
- #define ptep_clear_flush_dirty(__vma, __address, __ptep) \
- ({ \
-- int __dirty = ptep_test_and_clear_dirty(__ptep); \
-+ int __dirty = ptep_test_and_clear_dirty(__vma, __address, __ptep); \
- if (__dirty) \
- flush_tlb_page(__vma, __address); \
- __dirty; \
-@@ -2937,7 +2987,7 @@
- {
- return request_irq(irq,
- (void(*)(int, void *, struct pt_regs *))handler,
-- SA_SHIRQ, dev_name, dev_id);
-+ IRQF_SHARED, dev_name, dev_id);
- }
-
- void ATI_API_CALL __ke_free_irq(unsigned int irq, void *dev_id)
-@@ -5481,7 +5531,7 @@
++ pte_write (pte) ? 'w' : '-',
+ pte_dirty (pte) ? 'd' : '-',
+ pte_young (pte) ? 'a' : '-');
+ }
+@@ -5348,7 +5354,11 @@
DBG_TRACE("creating slab object '%s'", slabcache_obj->name);
if ((slabcache_obj->cache =
-- kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL, NULL)))
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+ kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL, NULL)))
++#else
+ kmem_cache_create(slabcache_obj->name, iEntrySize, 0, 0, NULL)))
++#endif
{
ret = 1;
}
+