I've decided to check-out the source package and check that the patches (from debian/dkms/patches) have already been applied. I did the following: [code]apt-get source fglrx-installer-updates[/code]
>From patch/fix-build-issue-on-i386-where-TS_USEDFPU-is-no-longe.patch there >are two changes: #1 (file: lib/modules/fglrx/build_mod/firegl_public.c) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) +#include <asm/fpu-internal.h> +#endif [b]This change has been added.[/b] #2 (file: lib/modules/fglrx/build_mod/firegl_public.c) @@ -5834,10 +5837,16 @@ void ATI_API_CALL KCL_fpu_begin(void) #ifdef CONFIG_X86_64 kernel_fpu_begin(); #else +#ifndef TS_USEDFPU + preempt_disable(); + if (__thread_has_fpu(current)) + __save_init_fpu(current); +#else struct thread_info *cur_task = current_thread_info(); preempt_disable(); if (cur_task->status & TS_USEDFPU) __save_init_fpu(cur_task->task); +#endif else clts(); #endif The current code (at the relevant function call): [code] void ATI_API_CALL KCL_fpu_begin(void) { #ifdef CONFIG_X86_64 kernel_fpu_begin(); #else #ifdef TS_USEDFPU struct thread_info *cur_thread = current_thread_info(); struct task_struct *cur_task = get_current(); preempt_disable(); if (cur_thread->status & TS_USEDFPU) __save_init_fpu(cur_task); else clts(); #else /* TS_USEDFPU is removed in kernel 3.3+ and 3.2.8+ with the commit below: * https://github.com/torvalds/linux/commit/f94edacf998516ac9d849f7bc6949a703977a7f3 */ struct task_struct *cur_task = current; preempt_disable(); #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0) /* The thread structure is changed with the commit below for kernel 3.3: * https://github.com/torvalds/linux/commit/7e16838d94b566a17b65231073d179bc04d590c8 */ if (cur_task->thread.fpu.has_fpu) #else if (cur_task->thread.has_fpu) #endif __save_init_fpu(cur_task); else clts(); #endif #endif } [/code] There is a small difference between what the patch would do (removing the version checking for kernel version) and what is in the module code (in the source package): [code] #else /* TS_USEDFPU is removed in kernel 3.3+ and 3.2.8+ with the commit below: * https://github.com/torvalds/linux/commit/f94edacf998516ac9d849f7bc6949a703977a7f3 */ struct task_struct *cur_task = current; preempt_disable(); if (cur_task->thread.has_fpu) __save_init_fpu(cur_task); else clts(); #endif [/code] If the first line [code] struct task_struct *cur_task = current; if (cur_task->thread.has_fpu) [/code] is equivalent to below, this patch looks to have been fully applied. [code] if (__thread_has_fpu(current)) [/code] [b]It appears that these changes has been added.[/b] >From patch/replace-for_each_cpu_mask-with-for_each_possible_cpu.patch there >are two changes: #1(file: lib/modules/fglrx/build_mod/firegl_public.c) [code] @@ -4199,7 +4199,11 @@ static int kasInitExecutionLevels(unsigned long level_init) { unsigned int p; KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) + for_each_possible_cpu(p) +#else for_each_cpu_mask(p, cpu_possible_map) +#endif { KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p); preempt_disable(); [/code] [b]This change has already been applied (see line 4368).[/b] #2 (file: lib/modules/fglrx/build_mod/kcl_ioctl.c) [code] @@ -213,6 +213,10 @@ void ATI_API_CALL KCL_IOCTL_UnregisterConversion32(unsigned int cmd) #endif } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0) +DEFINE_PER_CPU(unsigned long, old_rsp); +#endif + /** \brief Allocate user space for 32-bit app making 64-bit IOCTL * \param size [in] Number of bytes to allocate * \return Pointer to allocated memory [/code] [b]This change has been applied (but at a different location, see line 38).[/b] >From patch/replace-do_mmap-and-do_munmap-with-vm_mmap-and-vm_mu.patch there >are a few changes: #1 (file: lib/modules/fglrx/build_mod/firegl_public.c) [code] @@ -2146,7 +2146,11 @@ unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval( prot = PROT_READ|PROT_WRITE; down_write(¤t->mm->mmap_sem); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) + vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff); +#else vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff); +#endif up_write(¤t->mm->mmap_sem); if (IS_ERR(vaddr)) return 0; [/code] #2 [code] @@ -2159,6 +2163,17 @@ int ATI_API_CALL KCL_MEM_ReleaseLinearAddrInterval(unsigned long addr, unsigned int retcode = 0; down_write(¤t->mm->mmap_sem); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0) +#ifdef FGL_LINUX_RHEL_MUNMAP_API + retcode = vm_munmap(addr, + len, + 1); +#else + retcode = vm_munmap(addr, + len); +#endif +#else #ifdef FGL_LINUX_RHEL_MUNMAP_API retcode = do_munmap(current->mm, addr, [/code] #3 [code] @@ -2169,6 +2184,7 @@ int ATI_API_CALL KCL_MEM_ReleaseLinearAddrInterval(unsigned long addr, unsigned addr, len); #endif +#endif up_write(¤t->mm->mmap_sem); return retcode; } [/code] This patch has not been applied. So, it would appear that this patch should be applied still. Finally, within the patch directory, there still is the following patch replace-global-lock-with-a-driver-specific-mutex.patch). According to the dkms.conf.in, this patch is not listed to be applied. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1048142 Title: fglrx-updates 2:8.982-0ubuntu0.1: fglrx-updates kernel module failed to build [Error! Application of patch fix-build-issue-on-i386-where- TS_USEDFPU-is-no-longe.patch failed.] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/fglrx-installer-updates/+bug/1048142/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs