Skip to contentSkip to conversation

Issue with rdmsr_on_cpu

DISCUSSION Rafał Bilski 2 participants 2 messages Apr 23, 2007

lore
Share & tools
lore
#0 lore raw

Hi!

Some time ago I have written hwmon driver for Centaur C7 processors. Nobody was interested in testing it, so it spend long time on my harddisk. Recently one person wanted to test it with 2.6.21-rc7. Unfortunatly compile fails. I don't understand why. I'm not using rdmsr_on_cpu functions. Code is assuming that only one CPU is present and using rdmsr function direcly. Is this no longer possible? Do I have to #include something? Build log attached. I'm not attaching code because error isn't reported in my source file, but in Linux includes. My compiler is GCC 4.1.2 and kernel isn't SMP.

Please CC me.

Thanks
Rafał

  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC [M]  drivers/hwmon/c7temp.o

In file included from drivers/hwmon/c7temp.c:19:
include/asm/msr.h:90: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h:90: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h:90: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h: In function 'rdmsr_on_cpu':
include/asm/msr.h:92: error: 'l' undeclared (first use in this function) include/asm/msr.h:92: error: (Each undeclared identifier is reported only once include/asm/msr.h:92: error: for each function it appears in.) include/asm/msr.h:92: error: 'h' undeclared (first use in this function) include/asm/msr.h:92: error: 'msr_no' undeclared (first use in this function) include/asm/msr.h:92: error: invalid lvalue in asm output 0 include/asm/msr.h:92: error: invalid lvalue in asm output 1 include/asm/msr.h: At top level:
include/asm/msr.h:94: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h:94: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h:94: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h: In function 'wrmsr_on_cpu':
include/asm/msr.h:96: error: 'msr_no' undeclared (first use in this function) include/asm/msr.h:96: error: 'l' undeclared (first use in this function) include/asm/msr.h:96: error: 'h' undeclared (first use in this function) [...]
make[2]: *** [drivers/hwmon/c7temp.o] Błąd 1
make[1]: *** [drivers/hwmon] Błąd 2
make: *** [drivers] Błąd 2

----------------------------------------------------------------------
Kasia Cichopek eksponuje biust

Quoted 1 line
Quoted 1 line
Quoted 1 line

http://link.interia.pl/f1a6f

#1 lore raw
Quoted 8 lines · Rafał Bilski

Some time ago I have written hwmon driver for Centaur C7 processors. Nobody was interested in testing it, so it spend long time on my harddisk. Recently one person wanted to test it with 2.6.21-rc7. Unfortunatly compile fails. I don't understand why. I'm not using rdmsr_on_cpu functions. Code is assuming that only one CPU is present and using rdmsr function direcly. Is this no longer possible? Do I have to #include something?

asm/types.h in the beginning of asm/msr.h should do the trick.

Quoted 33 lines

Build log attached.
I'm not attaching code because error isn't reported in my source file, but in Linux includes. My compiler is GCC 4.1.2 and kernel isn't SMP.

Please CC me.

Thanks
Rafał

  CHK     include/linux/version.h
  CHK     include/linux/utsrelease.h
  CC [M]  drivers/hwmon/c7temp.o

In file included from drivers/hwmon/c7temp.c:19:
include/asm/msr.h:90: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h:90: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h:90: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h: In function 'rdmsr_on_cpu':
include/asm/msr.h:92: error: 'l' undeclared (first use in this function) include/asm/msr.h:92: error: (Each undeclared identifier is reported only once include/asm/msr.h:92: error: for each function it appears in.) include/asm/msr.h:92: error: 'h' undeclared (first use in this function) include/asm/msr.h:92: error: 'msr_no' undeclared (first use in this function) include/asm/msr.h:92: error: invalid lvalue in asm output 0 include/asm/msr.h:92: error: invalid lvalue in asm output 1 include/asm/msr.h: At top level:
include/asm/msr.h:94: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h:94: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h:94: error: expected declaration specifiers or '...' before 'u32' include/asm/msr.h: In function 'wrmsr_on_cpu':
include/asm/msr.h:96: error: 'msr_no' undeclared (first use in this function) include/asm/msr.h:96: error: 'l' undeclared (first use in this function) include/asm/msr.h:96: error: 'h' undeclared (first use in this function)