Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1606589 > unrolled thread

driver compilation problem / rdtsc error

Started byworkspace linuxkernel <wslkml@gmail.com>
First post2017-03-22 15:40 +0100
Last post2017-03-22 15:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  driver compilation problem / rdtsc error workspace linuxkernel <wslkml@gmail.com> - 2017-03-22 15:40 +0100

#1606589 — driver compilation problem / rdtsc error

Fromworkspace linuxkernel <wslkml@gmail.com>
Date2017-03-22 15:40 +0100
Subjectdriver compilation problem / rdtsc error
Message-ID<tnPAC-3OD-7@gated-at.bofh.it>
I'm trying to compile a device driver on newer kernel and either the
interface to rdtsc has changed is some way
since I was updated my kernel or I've got some other problem, anyway
baffled by this and hopefully there is some
obvious numpty error someone can point out:

CC [M]  pi_stage.o
In file included from ./arch/x86/include/asm/processor.h:20:0,
                 from ./arch/x86/include/asm/cpufeature.h:4,
                 from ./arch/x86/include/asm/thread_info.h:52,
                 from include/linux/thread_info.h:54,
                 from ./arch/x86/include/asm/preempt.h:6,
                 from include/linux/preempt.h:59,
                 from include/linux/spinlock.h:50,
                 from include/linux/seqlock.h:35,
                 from include/linux/time.h:5,
                 from include/linux/stat.h:18,
                 from include/linux/module.h:10,
                 from
/home/scan/source/dev/pi_pci/driver_3.xx_v1.0/driver/pi_stage.h:53,
                 from
/home/scan/source/dev/pi_pci/driver_3.xx_v1.0/driver/pi_stage.c:31:
./arch/x86/include/asm/msr.h:120:53: error: macro "rdtsc" requires 2
arguments, but only 1 given
 static __always_inline unsigned long long rdtsc(void)
                                                     ^
./arch/x86/include/asm/msr.h:121:1: error: expected ‘=’, ‘,’, ‘;’,
‘asm’ or ‘__attribute__’ before ‘{’ token
 {
 ^
./arch/x86/include/asm/msr.h: In function ‘rdtsc_ordered’:
./arch/x86/include/asm/msr.h:152:15: error: macro "rdtsc" requires 2
arguments, but only 1 given
  return rdtsc();
               ^
./arch/x86/include/asm/msr.h:152:9: error: ‘rdtsc’ undeclared (first
use in this function)
  return rdtsc();

I'm not using rdtsc in my driver. To me this looks like the code is
msr.h is choking something
else in the kernel headers and that it has sfa to do with my driver.

Problem occurs for kernel > 4.4.0-32 possibly older
No problem on k<=3.13.0.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web