Talk:Tpctl

From ThinkWiki
Revision as of 11:27, 11 January 2006 by Thinker (Talk | contribs) (Moved)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

"thinkpad" module kernel compatibility

Ajunge, how do you compile the "thinkpad" module compile on kernel >=2.6.9? The latest thinkpad version (5.8) still uses "get_cpu_ptr" and "set_cpu_ptr", which were removed in 2.6.9.

--Thinker 13:53, 10 Dec 2005 (CET)


The Debian thinkpad-source package in unstable (version 5.8-4) works just fine; I'm compiling it with 2.6.14 without any problems. And get_cpu_ptr is present; it's defined in include/linux/percpu.h.

--TedTso 18:56, 17 Dec 2005 (EDT)


Stock thinkpad_5.8.tar.gz doesn't #include percpu.h anyway, and doesn't compile on vanilla 2.6.14.3 or 2.6.15-rc5. Maybe Debian patched it? In that case the article page should ref the patch.

--Thinker 11:50, 18 Dec 2005 (CET)


Oops, my mistake. I forgot that I had patched my copy of thinkpadpm.c. I replaced the use of get_cpu_ptr and set_cpu_ptr with get_cpu_val() and set_cpu_val(). I just double checked, and it tpctl is working for me on 2.6.15-rc5.

--TedTso 14:45, 19 Dec 2005 (EDT)


Care to send a patch? It would be useful on the article page, and maybe we can get it into upstream.

--Thinker 23:11, 19 Dec 2005 (CET)