Like the last time, this patch is an ugly hack and it needs a professional touch before any sane dev would take it seriously.
But here it is anyway :) BTW, I replaced for_each_cpu_mask because I still haven't learned the correct syntax for it. The number "4" is the number of cpus in this particular machine. You should use the correct number for your machine, obviously. --- firegl_public.c.orig 2012-06-12 11:15:38.025293759 -0700 +++ firegl_public.c 2012-06-12 12:02:11.463348365 -0700 @@ -2120,9 +2120,9 @@ flags = MAP_SHARED; prot = PROT_READ|PROT_WRITE; - down_write(¤t->mm->mmap_sem); - vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff); - up_write(¤t->mm->mmap_sem); +// down_write(¤t->mm->mmap_sem); + vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff); +// up_write(¤t->mm->mmap_sem); if (IS_ERR(vaddr)) return 0; else @@ -2133,18 +2133,18 @@ { int retcode = 0; - down_write(¤t->mm->mmap_sem); +// down_write(¤t->mm->mmap_sem); #ifdef FGL_LINUX_RHEL_MUNMAP_API - retcode = do_munmap(current->mm, + retcode = vm_munmap( addr, len, 1); #else - retcode = do_munmap(current->mm, + retcode = vm_munmap( addr, len); #endif - up_write(¤t->mm->mmap_sem); +// up_write(¤t->mm->mmap_sem); return retcode; } @@ -4156,7 +4156,7 @@ { unsigned int p; KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init); - for_each_cpu_mask(p, cpu_possible_map) + for(p=0;p<4;p++) { KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p); preempt_disable();