On Thu, Dec 27, 2007 at 03:40:32AM +0200, Tzafrir Cohen wrote:
> 
> Some progress: after much debugging, David Rowe noticed that at least 
> one source of problems is the following code from oslec/oslec_wrap.c:
> 
> static __inline__ uint64_t cycles(void) {
>   uint64_t x;
>   __asm__ volatile ("rdtsc\n\t" : "=A" (x));
>   return x;
> }
> 
> 
> This seems to cause harm on amd64. Is this a problem with AMD? with x86_64?

Could you please try the attaced patch?

-- 
               Tzafrir Cohen
icq#16849755              jabber:[EMAIL PROTECTED]
+972-50-7952406           mailto:[EMAIL PROTECTED]
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir
Index: oslec/oslec_wrap.c
===================================================================
--- oslec/oslec_wrap.c	(revision 5125)
+++ oslec/oslec_wrap.c	(working copy)
@@ -86,6 +86,12 @@
 
    return ret;
 }
+#elif defined(CONFIG_X86_64)
+/* The inline assembly below seems to be broken on amd64. So 
+ * for now this will just be a nop there: */
+static __inline__ uint64_t cycles(void) {
+       return 0;
+}
 #else
 static __inline__ uint64_t cycles(void) {
   uint64_t x;

Reply via email to