ron minnich wrote:
Any chance we can make a config variable called CONFIG_TSC and then #error if somebody tries to use a machine that doesn't have it?
There was already a CONFIG_ option for this feature but the code performing timestamping simply ignored that.
The committed fix solves the problem well.
I think your idea is great in order to protect against similar problems in the future, if TSC are expected to be used more and more.
All boards except bifferos/bifferboard and emulation/qemu-x86 have
select CPU_
in their Kconfig, so select TSC could be done in the CPU Kconfig files.
//Peter
It's a fine fix, but it is kind of mixing two things, whether someone wants a timestamping feature with whether that feature will work. So anyone who uses rdtsc for a different reason is going to get burned the same way.
thanks
ron