[PlanetCCRMA] building tp-smapi

andersvi at notam02.no andersvi at notam02.no
Sun Jan 2 13:11:39 PST 2011


fwiw i built a tp-smapi from latest source on a planetccrma rt-optimised
kernel.  It seems to work steadily, together with the customised hdaps
module.

Following the previous thread (on g.l.h.t) vs. use of SEMAPHORE instead
of MUTEX in newer kernels while compiling tp_smapi, and applying the
patch included below:

uname -r :

2.6.33.7-149.rt30.1.fc14.ccrma.i686.rtPAE

modinfo tp_smapi:

filename:       /lib/modules/2.6.33.7-149.rt30.1.fc14.ccrma.i686.rtPAE/extra/tp_smapi.ko
license:        GPL
version:        0.40
description:    ThinkPad SMAPI Support
author:         Shem Multinymous
srcversion:     B2BAF3B927E4548D1468AC4
depends:        thinkpad_ec
vermagic:       2.6.33.7-149.rt30.1.fc14.ccrma.i686.rtPAE SMP preempt mod_unload 686 
parm:           debug:Debug level (0=off, 1=on) (int)


*** /home/andersvi/privat/TP61P/tp_smapi-0.40/thinkpad_ec.c	2008-12-16 06:03:06.000000000 +0100
--- /home/andersvi/privat/TP61P/tp_smapi-0.40_lokal/thinkpad_ec.c	2011-01-02 15:41:52.000000000 +0100
***************
*** 88,94 ****
--- 88,98 ----
  #define TPC_PREFETCH_JUNK   (INITIAL_JIFFIES+1)   /*   Ignore prefetch */
  
  /* Locking: */
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
  static DECLARE_MUTEX(thinkpad_ec_mutex);
+ #else
+ static DEFINE_SEMAPHORE(thinkpad_ec_mutex, 1);
+ #endif
  
  /* Kludge in case the ACPI DSDT reserves the ports we need. */
  static int force_io;    /* Willing to do IO to ports we couldn't reserve? */

*** /home/andersvi/privat/TP61P/tp_smapi-0.40/tp_smapi.c	2008-12-16 06:03:06.000000000 +0100
--- /home/andersvi/privat/TP61P/tp_smapi-0.40_lokal/tp_smapi.c	2011-01-02 15:41:36.000000000 +0100
***************
*** 109,115 ****
--- 109,119 ----
  #define SMAPI_PORT2 0x4F           /* fixed port, meaning unclear */
  static unsigned short smapi_port;  /* APM control port, normally 0xB2 */
  
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
  static DECLARE_MUTEX(smapi_mutex);
+ #else
+ static DEFINE_SEMAPHORE(smapi_mutex, 1);
+ #endif
  
  /**
   * find_smapi_port - read SMAPI port from NVRAM




More information about the PlanetCCRMA mailing list