Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93658 - app-laptop/thinkpad build fix for kernel 2.6.11
Summary: app-laptop/thinkpad build fix for kernel 2.6.11
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Steev Klimaszewski (RETIRED)
URL:
Whiteboard:
Keywords:
: 96806 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-23 03:06 UTC by Patrik Karlsson
Modified: 2006-02-18 05:17 UTC (History)
5 users (show)

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


Attachments
thinkpad-5.8-cpu_ptr.patch (thinkpad-5.8-cpu_ptr.patch,723 bytes, patch)
2006-01-23 09:25 UTC, Tobias Sager
Details | Diff
thinkpad-5.8-pm_legacy.patch (thinkpad-5.8-pm_legacy.patch,389 bytes, patch)
2006-01-23 09:25 UTC, Tobias Sager
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Patrik Karlsson 2005-05-23 03:06:09 UTC
The thinkpad-5.8 application does not compile with kernels linux-2.6.11-gentoo-r*.
The following patch solves the problem;
https://www.redhat.com/archives/fedora-extras-commits/2005-April/msg00060.html

--- 2.6/drivers/thinkpadpm.c~	2004-09-19 12:32:57.000000000 +0300
+++ 2.6/drivers/thinkpadpm.c	2005-01-08 01:18:48.000000000 +0200
@@ -169,11 +169,11 @@
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
 #define get_gdt_table()	(cpu_gdt_table[get_cpu()])
-#define put_gdt_table()	put_cpu()
 #else
-#define get_gdt_table()	(get_cpu_ptr(cpu_gdt_table))
-#define put_gdt_table()	put_cpu_ptr(cpu_gdt_table)
+#include <linux/percpu.h>
+#define get_gdt_table()	(per_cpu(cpu_gdt_table, get_cpu()))
 #endif
+#define put_gdt_table()	put_cpu()
 
 /**
  *	apm_bios_call	-	Make an APM BIOS 32bit call




Reproducible: Always
Steps to Reproduce:
1. echo "app-laptop/thinkpad ~x86" >> /etc/portage/package.keywords
2. emerge thinkpad


Actual Results:  
compilation failure
Comment 1 Henrik Brix Andersen 2005-06-25 07:25:00 UTC
*** Bug 96806 has been marked as a duplicate of this bug. ***
Comment 2 Jonathan Smith (RETIRED) gentoo-dev 2005-07-13 12:34:59 UTC
works for me on vanilla-sources-2.6.13_rc3 and gentoo-sources-2.6.12-r5. perhaps
you should try one of those?
Comment 3 emory stuart taylor 2005-11-21 01:37:39 UTC
thinkpad doesn't work for me and doesn't work for anyone else i've talked to
gentoo-sources-2.6.14~.  i can't confirm yet if this patch alone makes it work,
but hopefully this will be looked at more closely please. i'll try to get back
with more info
Comment 4 Tobias Sager 2006-01-23 09:25:08 UTC
Created attachment 77917 [details, diff]
thinkpad-5.8-cpu_ptr.patch

Patch with the changes from comment 0.
Comment 5 Tobias Sager 2006-01-23 09:25:35 UTC
Created attachment 77918 [details, diff]
thinkpad-5.8-pm_legacy.patch

This patch was needed due to changes since 2.6.15.
Comment 6 Chris Bainbridge (RETIRED) gentoo-dev 2006-02-01 07:37:41 UTC
I can confirm that thinkpad fails to build on 2.6.15. Assigning to maintainer.
Comment 7 Steev Klimaszewski (RETIRED) gentoo-dev 2006-02-18 05:17:46 UTC
Upstream has released a new version, 5.9 which I have put into the tree, works here, please reopen if you continue to have any issues.  If I don't hear of any issues, will push for this to be stable next week.  It is currently marked ~x86.