ia64/xen-unstable

view xen/include/asm-x86/io.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 cab326925ea6
children
line source
1 #ifndef _ASM_IO_H
2 #define _ASM_IO_H
4 #include <xen/config.h>
5 #include <xen/types.h>
6 #include <asm/page.h>
8 /* We don't need real ioremap() on Xen/x86. */
9 #define ioremap(x,l) (__va(x))
10 #define iounmap(p) ((void)0)
12 #define readb(x) (*(volatile char *)(x))
13 #define readw(x) (*(volatile short *)(x))
14 #define readl(x) (*(volatile int *)(x))
15 #define writeb(d,x) (*(volatile char *)(x) = (d))
16 #define writew(d,x) (*(volatile short *)(x) = (d))
17 #define writel(d,x) (*(volatile int *)(x) = (d))
19 #define __OUT1(s,x) \
20 static inline void out##s(unsigned x value, unsigned short port) {
22 #define __OUT2(s,s1,s2) \
23 __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
25 #define __OUT(s,s1,x) \
26 __OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "Nd" (port)); } \
27 __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a" (value), "Nd" (port));}
29 #define __IN1(s) \
30 static inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v;
32 #define __IN2(s,s1,s2) \
33 __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
35 #define __IN(s,s1,i...) \
36 __IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \
37 __IN1(s##_p) __IN2(s,s1,"w") : "=a" (_v) : "Nd" (port) ,##i ); return _v; }
39 #define RETURN_TYPE unsigned char
40 __IN(b,"")
41 #undef RETURN_TYPE
42 #define RETURN_TYPE unsigned short
43 __IN(w,"")
44 #undef RETURN_TYPE
45 #define RETURN_TYPE unsigned int
46 __IN(l,"")
47 #undef RETURN_TYPE
49 __OUT(b,"b",char)
50 __OUT(w,"w",short)
51 __OUT(l,,int)
53 extern void (*pv_post_outb_hook)(unsigned int port, u8 value);
55 #endif