ia64/xen-unstable

view xen/include/asm-x86/byteorder.h @ 19848:5839491bbf20

[IA64] replace MAX_VCPUS with d->max_vcpus where necessary.

don't use MAX_VCPUS, and use vcpu::max_vcpus.
The changeset of 2f9e1348aa98 introduced max_vcpus to allow more vcpus
per guest. This patch is ia64 counter part.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Isaku Yamahata <yamahata@valinux.co.jp>
date Mon Jun 29 11:26:05 2009 +0900 (2009-06-29)
parents 5ccf8bbf8628
children
line source
1 #ifndef __ASM_X86_BYTEORDER_H__
2 #define __ASM_X86_BYTEORDER_H__
4 #include <asm/types.h>
5 #include <xen/compiler.h>
7 static inline __attribute_const__ __u32 ___arch__swab32(__u32 x)
8 {
9 asm("bswap %0" : "=r" (x) : "0" (x));
10 return x;
11 }
13 static inline __attribute_const__ __u64 ___arch__swab64(__u64 val)
14 {
15 union {
16 struct { __u32 a,b; } s;
17 __u64 u;
18 } v;
19 v.u = val;
20 asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
21 : "=r" (v.s.a), "=r" (v.s.b)
22 : "0" (v.s.a), "1" (v.s.b));
23 return v.u;
24 }
26 /* Do not define swab16. Gcc is smart enough to recognize "C" version and
27 convert it into rotation or exhange. */
29 #define __arch__swab64(x) ___arch__swab64(x)
30 #define __arch__swab32(x) ___arch__swab32(x)
32 #define __BYTEORDER_HAS_U64__
34 #include <xen/byteorder/little_endian.h>
36 #endif /* __ASM_X86_BYTEORDER_H__ */