WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Make cpuid() less fussy about the type of its pointer pa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Make cpuid() less fussy about the type of its pointer parameters.
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Sat, 28 May 2005 09:23:56 +0000
Delivery-date: Sat, 28 May 2005 10:03:13 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: Xen Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1582, 2005/05/28 10:23:56+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        Make cpuid() less fussy about the type of its pointer parameters.
        This fixes the build with gcc4.
        Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>



 processor.h |   18 +++++++-----------
 1 files changed, 7 insertions(+), 11 deletions(-)


diff -Nru a/xen/include/asm-x86/processor.h b/xen/include/asm-x86/processor.h
--- a/xen/include/asm-x86/processor.h   2005-05-28 06:04:02 -04:00
+++ b/xen/include/asm-x86/processor.h   2005-05-28 06:04:02 -04:00
@@ -199,17 +199,13 @@
  * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx
  * resulting in stale register contents being returned.
  */
-static inline void cpuid(
-    int op, unsigned int *eax, unsigned int *ebx,
-    unsigned int *ecx, unsigned int *edx)
-{
-    __asm__("cpuid"
-            : "=a" (*eax),
-              "=b" (*ebx),
-              "=c" (*ecx),
-              "=d" (*edx)
-            : "0" (op), "2" (0));
-}
+#define cpuid(_op,_eax,_ebx,_ecx,_edx)          \
+    __asm__("cpuid"                             \
+            : "=a" (*(int *)(_eax)),            \
+              "=b" (*(int *)(_ebx)),            \
+              "=c" (*(int *)(_ecx)),            \
+              "=d" (*(int *)(_edx))             \
+            : "0" (_op), "2" (0))
 
 /*
  * CPUID functions returning a single datum

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Make cpuid() less fussy about the type of its pointer parameters., BitKeeper Bot <=