ia64/xen-unstable

changeset 5191:b9f77360e9fc

bitkeeper revision 1.1582 (429838acDJZ12SHZ0oEfuJwBD4FoqQ)

Make cpuid() less fussy about the type of its pointer parameters.
This fixes the build with gcc4.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Sat May 28 09:23:56 2005 +0000 (2005-05-28)
parents ef94e64d3896
children 2df0e546014d
files xen/include/asm-x86/processor.h
line diff
     1.1 --- a/xen/include/asm-x86/processor.h	Sat May 28 09:08:54 2005 +0000
     1.2 +++ b/xen/include/asm-x86/processor.h	Sat May 28 09:23:56 2005 +0000
     1.3 @@ -199,17 +199,13 @@ static inline void detect_ht(struct cpui
     1.4   * clear %ecx since some cpus (Cyrix MII) do not set or clear %ecx
     1.5   * resulting in stale register contents being returned.
     1.6   */
     1.7 -static inline void cpuid(
     1.8 -    int op, unsigned int *eax, unsigned int *ebx,
     1.9 -    unsigned int *ecx, unsigned int *edx)
    1.10 -{
    1.11 -    __asm__("cpuid"
    1.12 -            : "=a" (*eax),
    1.13 -              "=b" (*ebx),
    1.14 -              "=c" (*ecx),
    1.15 -              "=d" (*edx)
    1.16 -            : "0" (op), "2" (0));
    1.17 -}
    1.18 +#define cpuid(_op,_eax,_ebx,_ecx,_edx)          \
    1.19 +    __asm__("cpuid"                             \
    1.20 +            : "=a" (*(int *)(_eax)),            \
    1.21 +              "=b" (*(int *)(_ebx)),            \
    1.22 +              "=c" (*(int *)(_ecx)),            \
    1.23 +              "=d" (*(int *)(_edx))             \
    1.24 +            : "0" (_op), "2" (0))
    1.25  
    1.26  /*
    1.27   * CPUID functions returning a single datum