Bug 495 - ‘cpu_possible_map’ removal in >= 3.4-rc2(?) kernels prevents fglrx from being compiled
: ‘cpu_possible_map’ removal in >= 3.4-rc2(?) kernels prevents fglrx from bein...
Status: CLOSED WONTFIX
Product: AMD Catalyst™Proprietary Display Driver
Classification: Unclassified
Component: Kernel Module
: .archived
: All Linux
: low normal
Assigned To: nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-01 07:02 CDT by Adrien Dessemond
Modified: 2013-05-08 00:06 CDT (History)
7 users (show)



Attachments
cpu_possible_map patch (509 bytes, patch)
2012-05-02 05:19 CDT, Adrien Dessemond
Details
Patch to fix compiling fglrx 12.4 with Linux kernel 3.4 (966 bytes, patch)
2012-05-26 22:20 CDT, Zenitur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien Dessemond 2012-05-01 07:02:24 CDT
The following happens with a Linux 3.4-rc kernel series (> rc2):

/var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c: In function ‘kasInitExecutionLevels’:
/var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:4157:5: error: ‘cpu_possible_map’ undeclared (first use in this function)
/var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:4157:5: note: each undeclared identifier is reported only once for each function it appears in
/var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.c:4157:5: warning: left-hand opercpu_possible_mapcpu_possible_mapand of comma expression has no effect [-Wunused-value]
make[2]: *** [/var/tmp/portage/x11-drivers/ati-drivers-12.4/work/common/lib/modules/fglrx/build_mod/2.6.x/firegl_public.o] Error 1

Seems to affect 12.3 as well.
Comment 1 Adrien Dessemond 2012-05-01 08:05:53 CDT
FYI: https://lkml.org/lkml/2012/4/10/485
Comment 2 SoftExpert 2012-05-02 03:45:55 CDT
Maybe this patch will help solve the problem ?

http://lkml.org/lkml/2012/3/10/97
Comment 3 Adrien Dessemond 2012-05-02 05:19:54 CDT
Created attachment 444 [details]
cpu_possible_map patch

patch to reintroduce two definitions
Comment 4 Adrien Dessemond 2012-05-02 05:22:28 CDT
With the above posted patch fglrx is buildable however if fails on modprobe:

[  378.039539] fglrx: Unknown symbol old_rsp (err 0)

I am on a 64 bits system...
Comment 5 SoftExpert 2012-05-17 04:13:04 CDT
(In reply to comment #4)
> With the above posted patch fglrx is buildable however if fails on modprobe:
> 
> [  378.039539] fglrx: Unknown symbol old_rsp (err 0)
> 
> I am on a 64 bits system...

Apparently the kernel patch was not good enough (see http://lkml.org/lkml/2012/3/13/30)

We are still waiting for a better approach ...
Comment 6 Zenitur 2012-05-26 22:20:14 CDT
Created attachment 464 [details]
Patch to fix compiling fglrx 12.4 with Linux kernel 3.4

Found there: http://forums.gentoo.org/viewtopic-p-7047942.html?sid=2e674e74fa6724abe47c5d488d227f89#7047942
Comment 7 Zenitur 2012-05-26 22:31:21 CDT
I'm sorry, it is not work on amd64. It compiles, but failed to load. "Unknown symbol old_rsp".
Comment 8 Zenitur 2012-05-27 00:37:06 CDT
I removed #ifndef and #endif in this patch, and it works on my AMD64 too. The reason may be in the next line: "CONFIG_X86_X32 enabled but no binutils support"

linux-athlon64:/home/zenitur # /usr/bin/fglrx-kernel-build.sh --force

Used CPUs/Cores for compilation  =>  [ 2 ]


********************************************************************************
*                                                                              *
*   Kernel:    3.4.0-0-desktop                                                 *
*   Source:    /lib/modules/3.4.0-0-desktop/build                              *
*   Include:   /lib/modules/3.4.0-0-desktop/source/include                     *
*                                                                              *
********************************************************************************



file /lib/modules/3.4.0-0-desktop/source/include/../arch/x86/include/asm/compat.h says:COMPAT_ALLOC_USER_SPACE=arch_compat_alloc_user_space
/usr/src/kernel-modules/fglrx/2.6.x /home/zenitur
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
make: Entering directory `/usr/src/linux-3.4.0-0-obj/x86_64/desktop'
/4/zenitur/rpmbuild/BUILD/kernel-desktop-3.4.0/linux-3.4/arch/x86/Makefile:96: CONFIG_X86_X32 enabled but no binutils support
  LD      /usr/src/kernel-modules/fglrx/2.6.x/built-in.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_acpi.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/firegl_public.o
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c: In function 'KCL_GetInitKerPte':
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c:2357:5: warning: return makes integer from pointer without a cast [enabled by default]
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c:2358:5: warning: return makes integer from pointer without a cast [enabled by default]
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c:2359:5: warning: return makes integer from pointer without a cast [enabled by default]
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c: In function 'KCL_GetPageTableByVirtAddr':
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c:2404:5: warning: return makes integer from pointer without a cast [enabled by default]
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c:2407:5: warning: return makes integer from pointer without a cast [enabled by default]
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c:2408:5: warning: return makes integer from pointer without a cast [enabled by default]
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c: In function 'KCL_TestAndClearPageDirtyFlag':
/usr/src/kernel-modules/fglrx/2.6.x/firegl_public.c:2582:5: warning: return makes integer from pointer without a cast [enabled by default]
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_agp.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_debug.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_ioctl.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_io.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_pci.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_str.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_iommu.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl.o
  CC [M]  /usr/src/kernel-modules/fglrx/2.6.x/kcl_wait.o
  LD [M]  /usr/src/kernel-modules/fglrx/2.6.x/fglrx.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/src/kernel-modules/fglrx/2.6.x/fglrx.mod.o
  LD [M]  /usr/src/kernel-modules/fglrx/2.6.x/fglrx.ko
make: Leaving directory `/usr/src/linux-3.4.0-0-obj/x86_64/desktop'
make: Entering directory `/usr/src/linux-3.4.0-0-obj/x86_64/desktop'
/4/zenitur/rpmbuild/BUILD/kernel-desktop-3.4.0/linux-3.4/arch/x86/Makefile:96: CONFIG_X86_X32 enabled but no binutils support
  INSTALL /usr/src/kernel-modules/fglrx/2.6.x/fglrx.ko
  DEPMOD  3.4.0-0-desktop
make: Leaving directory `/usr/src/linux-3.4.0-0-obj/x86_64/desktop'
rm -rf *.c *.h *.o *.ko *.a .??* *.symvers
/home/zenitur
Calling 'depmod -a 3.4.0-0-desktop' this may take a while...


Summary report:
================================================================================

   Kernel     => 3.4.0-0-desktop
   Detected   => RPM package
   Build      => [ OK ]
   Install    => [ OK ]
linux-athlon64:/home/zenitur #
Comment 9 SoftExpert 2012-05-30 13:00:20 CDT
With second patch it compiles and it loads as expected under Ubuntu 12.04 with kernel 3.4.0.
I used it for 2 full days and did not have a problem!

Thanks, Zenitur!
Comment 10 j.reitsma 2012-06-01 13:30:08 CDT
Om my syste, (OpenSuse 12.2 beta, kernel 3.4.0-2) I could comile with tis patch, but there was this
WARNING: "old_rsp" [/lib/modules/fglrx/build_mod/2.6.x/fglrx.ko] undefined!

Inserting the module failed because of this; dmesg reports:

[   11.717207] fglrx: Unknown symbol old_rsp (err 0)
Comment 11 Shabang 2012-07-10 12:35:51 CDT
Can you, guys, please write a step-by-step how to fix this problem?
I don't know how to apply this patch, neither where apply it.

Best Regards
Comment 12 Karel 2012-07-27 08:33:34 CDT
I have the same problem with the patch as j.reitsma@concepts.nl
fglrx.ko cannot be loaded

And the problem persists in Catalyst 12.6. Is AMD finally going to fix their driver to work with kernel 3.4.x ?
Comment 13 gbe54 2012-07-30 08:06:29 CDT
Or simply to work at all. I can't get it working with 3.4/3.5 and if I go down to 3.3 I have the marvelous advertisment from AMD : Hardware not supported on my screen. 

The bug was first reported 3 month ago and no sign of life from AMD... I guess this is a show stopper... It's been a long long time since I face such compatibility issues with hardware and linux. High five AMD for traveling 10y back in time !
Comment 14 Michael Cronenworth 2013-04-24 22:57:03 CDT
This message is a reminder that your bug is marked as Catalyst 12.4.

The current Catalyst version is 13.4.

Approximately 7 days from now the Bugzilla administrator will be removing the 12.4 version. At that time your bug will be CLOSED as WONTFIX.

Bug Reporter: Thank you for reporting this issue. However, the Bugzilla administrator provides this as a unofficial, free service to AMD customers, and I like to keep my systems neat and tidy. If you would like to keep your bug from being closed, please try a new Catalyst version and update the 'version' field if the issue still occurs.

If you are unable to update the version, please make a comment and someone will change it for you.
Comment 15 Michael Cronenworth 2013-05-08 00:03:52 CDT
This bug is being closed due to the 'version' being 12.4 after 14 days of the previous closure notice.

Thank you for your bug report.