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
.../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
相关文章推荐
- 手动编译安装PHP遇到错误以及解决方法记录
- ubuntu12.04安装ltib是提示错误解决方法记录
- ruby安装错误及解决方法记录
- 安装常见的错误及解决方法(记录)
- openstack安装部署时遇到的错误记录及解决方法
- Win7/Win8 系统下安装Oracle 10g 提示“程序异常终止,发生未知错误”的解决方法
- 首次在matable中安装libsvm碰到的问题和解决方法----" mxGetIr 已过时" 错误
- Eclipse安装插件时错误解决方法
- phpMyadmin 安装错误及解决方法
- Windows 10封装中出现“无法验证你的Windows安装”错误解决方法 推荐
- apt-get 安装软件时,出现错误的解决方法
- 安装win8系统提示something happened错误提示并阻止继续安装解决方法
- Ubuntu13.04,ADT安装subclipse,出现JAVAHL错误的解决方法
- LNMP一键安装包的Nginx 502 Bad Gateway错误可能原因及解决方法
- ubuntu 安装deb文件依赖错误问题解决方法
- 安装loadrunner时出现”命令行选项语法错误键入命令 \?获得帮助“的解决方法
- android studio安装中出现Failed to install Intel HAXM错误的解决方法
- 在GHOST的WINXPSP2安装SQL SERVER2000个人版时出现“以前的某个程序安装已在安装计算机上创建挂起的文件操作。运行安装之前,必须重新启动计算机。”错误的解决方法
- 为PHP安装imagick时出现Cannot locate header file MagickWand.h错误的解决方法
- Can't exec "gnuplot": Permission denied错误解决方法及gnuplot安装方法