From: Eyal Lebedinsky <eyal@eyal.emu.id.au>
To: list linux-kernel <linux-kernel@vger.kernel.org>,
valgrind-developers list
<valgrind-developers@lists.sourceforge.net>
Subject: 2.4.24 asm/timex.h
Date: Wed, 07 Jan 2004 09:49:14 +1100 [thread overview]
Message-ID: <3FFB3B6A.C294D7F3@eyal.emu.id.au> (raw)
This is part of the current patch:
--- linux-2.4.24/include/asm-i386/timex.h 2002-11-28
23:53:15.000000000 +0000
+++ linux-2.4.25-pre4/include/asm-i386/timex.h 2004-01-06
12:43:33.000000000 +0000
@@ -40,14 +40,10 @@
static inline cycles_t get_cycles (void)
{
-#ifndef CONFIG_X86_TSC
- return 0;
-#else
- unsigned long long ret;
-
- rdtscll(ret);
+ unsigned long long ret = 0;
+ if(cpu_has_tsc)
+ rdtscll(ret);
return ret;
-#endif
}
extern unsigned long cpu_khz;
Building valgrind, it includes <linux/timex.h> and then tries
to use the adjtimex syscall. This ends up with an undefined
error for 'cpu_has_tsc'. This did not happen with earlier
kernels.
In file included from /usr/include/linux/timex.h:152,
from vg_unsafe.h:66,
from vg_syscalls.c:35:
/usr/include/asm/timex.h: In function `get_cycles':
/usr/include/asm/timex.h:44: `cpu_has_tsc' undeclared (first use in this
function)
Is this a problem with 2.4-pre or is valgrind inappropriately
messing with kernel headers?
For the moment I hacked it badly in coregrind/vg_unsafe.h:
#define cpu_has_tsc 1
#include <linux/timex.h>
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
next reply other threads:[~2004-01-06 22:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-06 22:49 Eyal Lebedinsky [this message]
2004-01-06 23:29 Pawel Kot
2004-01-07 9:39 ` Eyal Lebedinsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3FFB3B6A.C294D7F3@eyal.emu.id.au \
--to=eyal@eyal.emu.id.au \
--cc=linux-kernel@vger.kernel.org \
--cc=valgrind-developers@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®