Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 232381 - x11-drivers/ati-drivers-8.501: allow compiling with realtime RCU preemption enabled in kernel >= 2.6.25
Summary: x11-drivers/ati-drivers-8.501: allow compiling with realtime RCU preemption e...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor
Assignee: Luca Barbato
URL:
Whiteboard:
Keywords:
: 232385 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-19 23:35 UTC by Andrey Vul
Modified: 2008-07-23 09:19 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fixed ebuild (ati-drivers-8.501-r1.ebuild,14.33 KB, text/plain)
2008-07-19 23:37 UTC, Andrey Vul
Details
fixed ebuild (version 2) (ati-drivers-8.501-r1.ebuild,14.33 KB, text/plain)
2008-07-20 02:00 UTC, Andrey Vul
Details
fixed ebuild (version 2) (ati-drivers-8.501-r1.ebuild,14.33 KB, text/plain)
2008-07-20 02:01 UTC, Andrey Vul
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Vul 2008-07-19 23:35:15 UTC
This is a one-liner fix to the x11-drivers/ati-drivers-8.501 ebuild to allow the driver to be compiled against a kernel with realtime RCU preemption.
Diff follows:
--- /usr/portage/x11-drivers/ati-drivers/ati-drivers-8.501.ebuild       2008-07-19 17:19:24.102859737 -0400
+++ /usr/portage/x11-drivers/ati-drivers/ati-drivers-8.501-r1.ebuild    2008-07-19 16:46:01.345860800 -0400
@@ -75,7 +75,7 @@
        fi

        if kernel_is ge 2 6 25 && linux_chkconfig_present PREEMPT_RCU; then
-               die "${P} is not compatible RCU Preemption, please disable it"
+               sed '/EXPORT_SYMBOL/s/GPL//g' -i /usr/src/linux/kernel/rcupreempt.c
        fi

        if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then


Reproducible: Always

Steps to Reproduce:
Original bug:
1) Make sure /usr/src/linux is rt-patched and rt-enabled
2) run "emerge -1 x11-drivers/ati-drivers"

Actual Results:  
ati-drivers-8.501: die message:
"ati-drivers-8.501 is not compatible RCU Preemption, please disable it"
< ati-drivers-8.501: compile failure: __rcu_read_(un)lock is GPL-only, some incompatibility (I forgot the details after un-GPLONLY-ing __rcu_read_lock and __rcu_ead_unclock)



only required for -rt kernels >= 2.6.25
Comment 1 Andrey Vul 2008-07-19 23:37:45 UTC
Created attachment 160885 [details]
fixed ebuild
Comment 2 Andrey Vul 2008-07-20 02:00:50 UTC
Created attachment 160893 [details]
fixed ebuild (version 2)

The original ebuild that I uploaded had one missing "_" in the //s///, which caused kernels to miscompile (D'oh!). I was unable to detect this since I patched kernel/rcupreempt.c by hand.
In short, original -r1 ebuild i.e., attachment 1 [details], breaks unpatched rt- kernels.
Comment 3 Andrey Vul 2008-07-20 02:01:05 UTC
Created attachment 160894 [details]
fixed ebuild (version 2)
Comment 4 Andrey Vul 2008-07-20 02:02:12 UTC
Rebised diff:
--- /usr/portage/x11-drivers/ati-drivers/ati-drivers-8.501.ebuild      
2008-07-19 17:19:24.102859737 -0400
+++ /usr/portage/x11-drivers/ati-drivers/ati-drivers-8.501-r1.ebuild   
2008-07-19 16:46:01.345860800 -0400
@@ -75,7 +75,7 @@
        fi

        if kernel_is ge 2 6 25 && linux_chkconfig_present PREEMPT_RCU; then
-               die "${P} is not compatible RCU Preemption, please disable it"
+               sed '/EXPORT_SYMBOL/s/_GPL//g' -i
/usr/src/linux/kernel/rcupreempt.c
        fi

        if kernel_is ge 2 6 24 && ! linux_chkconfig_present PCI_LEGACY; then
Comment 5 Andrey Vul 2008-07-20 03:50:19 UTC
fix is kinda buggy
more help would be nice :)
Comment 6 Carsten Lohrke (RETIRED) gentoo-dev 2008-07-20 13:22:53 UTC
*** Bug 232385 has been marked as a duplicate of this bug. ***
Comment 7 Mart Raudsepp gentoo-dev 2008-07-20 13:27:55 UTC
The x11 herd does not maintain binary blobs that call themselves drivers
Comment 8 Luca Barbato gentoo-dev 2008-07-23 09:19:56 UTC
Upstream will workaround in other ways, what you want to do is fine for single users but illegal otherwise.