linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* driver compilation problem / rdtsc error
@ 2017-03-22 14:31 workspace linuxkernel
  2019-12-16 13:47 ` Will Hardiman
  0 siblings, 1 reply; 2+ messages in thread
From: workspace linuxkernel @ 2017-03-22 14:31 UTC (permalink / raw)
  To: linux-kernel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: driver compilation problem / rdtsc error
  2017-03-22 14:31 driver compilation problem / rdtsc error workspace linuxkernel
@ 2019-12-16 13:47 ` Will Hardiman
  0 siblings, 0 replies; 2+ messages in thread
From: Will Hardiman @ 2019-12-16 13:47 UTC (permalink / raw)
  To: wslkml; +Cc: linux-kernel

Hi,

I am having the same problem with the pi_stage kernel module, using 
kernel v5.0.0-37, how did you solve your problem?

Thanks,

Will

-- 
Will Hardiman

PhD student in Bio Optics, Optics and Photonics Group,
Faculty of Engineering,
University of Nottingham




This message and any attachment are intended solely for the addressee
and may contain confidential information. If you have received this
message in error, please contact the sender and delete the email and
attachment. 

Any views or opinions expressed by the author of this email do not
necessarily reflect the views of the University of Nottingham. Email
communications with the University of Nottingham may be monitored 
where permitted by law.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-16 13:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-22 14:31 driver compilation problem / rdtsc error workspace linuxkernel
2019-12-16 13:47 ` Will Hardiman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).