xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] xenoprof: Make the escape code consistent across 32 and 64-bit xen
@ 2012-01-20 18:45 Marcus Granado
  2012-01-23  9:57 ` Jan Beulich
  0 siblings, 1 reply; 12+ messages in thread
From: Marcus Granado @ 2012-01-20 18:45 UTC (permalink / raw)
  To: xen-devel; +Cc: George Dunlap

[-- Attachment #1: Type: text/plain, Size: 1110 bytes --]

xenoprof: Make the escape code consistent across 32 and 64-bit xen

At the moment, the xenoprof escape code is defined as "~0UL".
Unfortunately, this expands to 0xffffffff on 32-bit systems
and 0xffffffffffffffff on 64-bit systems; with the result that
while 32-on-32 and 64-in-64 work fine, 32-on-64 (also known as
"compat mode") is broken.

This patch makes the definition consistent across architectures.
In so doing, it will break old-32-bit-on-new-Xen, and vice versa;
but this was seen as an acceptable thing to do.

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>


diff -r 870db1ebc0df -r bcd2c4f0c502 xen/include/public/xenoprof.h
--- a/xen/include/public/xenoprof.h    Wed Jan 18 17:39:19 2012 +0000
+++ b/xen/include/public/xenoprof.h    Wed Jan 18 17:46:28 2012 +0000
@@ -68,7 +68,7 @@ struct event_log {
  };

  /* PC value that indicates a special code */
-#define XENOPROF_ESCAPE_CODE ~0UL
+#define XENOPROF_ESCAPE_CODE (~0ULL)
  /* Transient events for the xenoprof->oprofile cpu buf */
  #define XENOPROF_TRACE_BEGIN 1



[-- Attachment #2: xenoprof-64bit-escape-code.diff --]
[-- Type: text/x-patch, Size: 1101 bytes --]

xenoprof: Make the escape code consistent across 32 and 64-bit xen

At the moment, the xenoprof escape code is defined as "~0UL".
Unfortunately, this expands to 0xffffffff on 32-bit systems
and 0xffffffffffffffff on 64-bit systems; with the result that
while 32-on-32 and 64-in-64 work fine, 32-on-64 (also known as
"compat mode") is broken.

This patch makes the definition consistent across architectures.
In so doing, it will break old-32-bit-on-new-Xen, and vice versa;
but this was seen as an acceptable thing to do.

Signed-off-by: Marcus Granado <marcus.granado@eu.citrix.com>
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>


diff -r 870db1ebc0df -r bcd2c4f0c502 xen/include/public/xenoprof.h
--- a/xen/include/public/xenoprof.h	Wed Jan 18 17:39:19 2012 +0000
+++ b/xen/include/public/xenoprof.h	Wed Jan 18 17:46:28 2012 +0000
@@ -68,7 +68,7 @@ struct event_log {
 };
 
 /* PC value that indicates a special code */
-#define XENOPROF_ESCAPE_CODE ~0UL
+#define XENOPROF_ESCAPE_CODE (~0ULL)
 /* Transient events for the xenoprof->oprofile cpu buf */
 #define XENOPROF_TRACE_BEGIN 1
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

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

end of thread, other threads:[~2012-01-24  8:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-20 18:45 [PATCH 3/3] xenoprof: Make the escape code consistent across 32 and 64-bit xen Marcus Granado
2012-01-23  9:57 ` Jan Beulich
2012-01-23 10:16   ` Ian Campbell
2012-01-23 10:47     ` Jan Beulich
2012-01-23 14:04       ` Jan Beulich
2012-01-23 16:01         ` George Dunlap
2012-01-23 16:30           ` Jan Beulich
2012-01-23 16:51             ` George Dunlap
2012-01-23 17:01               ` Jan Beulich
2012-01-23 17:31               ` Keir Fraser
2012-01-23 17:40                 ` George Dunlap
2012-01-24  8:50                   ` Jan Beulich

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).