您的位置:首页 > 其它

AMD Catalyst 12.6 安装错误记录及解决方法。

2012-08-04 18:23 369 查看
1.make日志提示如下:

.../firegl_public.c:In function ‘kasInitExecutionLevels’:

.../firegl_public.c:4157:5:error: ‘cpu_possible_map’ undeclared (first use in this function)

.../firegl_public.c:4157:5:note: each undeclared identifier is reported only once for each function it appears in

.../firegl_public.c:4157:5:warning: left-hand opercpu_possible_mapcpu_possible_mapand of comma expression

has no effect [-Wunused-value]

解决方案(cpu_possible_map.patch),3.4及以后的内核可能需要此补丁:

--- /common/lib/modules/fglrx/build_mod/firegl_public.c

+++ /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,4,0)

+#define cpu_possible_map (*(cpumask_t *)cpu_possible_mask)

+#define cpu_online_map (*(cpumask_t *)cpu_online_mask)

+#endif

+

#if !defined(CONFIG_X86)

#if !defined(CONFIG_X86_PC)

#if !defined(CONFIG_X86_XEN)

@@ -4156,7 +4161,7 @@

{

unsigned int p;

KCL_DEBUG5(FN_FIREGL_KAS, "%d\n", level_init);

- for_each_cpu_mask(p, cpu_possible_map)

+ for_each_possible_cpu(p)

{

KCL_DEBUG1(FN_FIREGL_KAS,"Setting initial execution level for CPU # %d\n", p);

preempt_disable();

--- /common/lib/modules/fglrx/build_mod/kcl_ioctl.c

+++ /common/lib/modules/fglrx/build_mod/kcl_ioctl.c

@@ -217,6 +217,9 @@

* \param size [in] Number of bytes to allocate

* \return Pointer to allocated memory

*/

+#ifndef CONFIG_X86_X32

+DEFINE_PER_CPU(unsigned long, old_rsp);

+#endif

void* ATI_API_CALL KCL_IOCTL_AllocUserSpace32(long size)

{

void __user *ret = COMPAT_ALLOC_USER_SPACE(size);

2.make日志提示如下:

.../firegl_public.c: In function ‘KCL_MEM_AllocLinearAddrInterval’:

.../firegl_public.c:2149:5: error: implicit declaration of function ‘do_mmap’ [-Werror=implicit-function-declaration]

.../firegl_public.c:2149:13: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

解决方案(do_mmap.patch,请先打上面的补丁),3.5以后的内核需要此补丁:

--- /common/lib/modules/fglrx/build_mod/firegl_public.c

+++ /common/lib/modules/fglrx/build_mod/firegl_public.c

@@ -2113,6 +2113,12 @@

}

}

+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 5, 0)

+# define NO_DO_MMAP

+# define do_mmap(a,b,c,d,e,f) vm_mmap(a, b, c, d, e, f)

+# define do_munmap(a,b,c) vm_munmap(b, c)

+#endif

+

unsigned long ATI_API_CALL KCL_MEM_AllocLinearAddrInterval(

KCL_IO_FILE_Handle file,

unsigned long addr,

@@ -2124,10 +2130,13 @@

flags = MAP_SHARED;

prot = PROT_READ|PROT_WRITE;

-

+#ifdef NO_DO_MMAP

+ vaddr = (void *) vm_mmap(file, 0, len, prot, flags, pgoff);

+#else

down_write(¤t->mm->mmap_sem);

vaddr = (void *) do_mmap(file, 0, len, prot, flags, pgoff);

up_write(¤t->mm->mmap_sem);

+#endif

if (IS_ERR(vaddr))

return 0;

else

@@ -2138,7 +2147,9 @@

{

int retcode = 0;

+#ifndef NO_DO_MMAP

down_write(¤t->mm->mmap_sem);

+#endif

#ifdef FGL_LINUX_RHEL_MUNMAP_API

retcode = do_munmap(current->mm,

addr,

@@ -2148,8 +2159,10 @@

retcode = do_munmap(current->mm,

addr,

len);

-#endif

+#endif

+#ifndef NO_DO_MMAP

up_write(¤t->mm->mmap_sem);

+#endif

return retcode;

}

一般来说,出错了之后先卸载驱动,解压run文件,修改./common/lib/modules/fglrx/build_mod/make.sh文件中的logfile变量,使日志导出到固定目录,然后用关键字一搜解决方案就出来了。
本文出自 “RobberPhex” 博客,请务必保留此出处http://robberphex.blog.51cto.com/5403759/954317
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐