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
|