ia64/xen-unstable

changeset 9490:55e8f512fed5

[IA64] fix gnttab_shared_gmfn()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Wed Apr 05 12:15:10 2006 -0600 (2006-04-05)
parents 827c65c06a66
children 2d28f31aae8b
files xen/include/asm-ia64/grant_table.h
line diff
     1.1 --- a/xen/include/asm-ia64/grant_table.h	Tue Apr 04 09:43:41 2006 -0600
     1.2 +++ b/xen/include/asm-ia64/grant_table.h	Wed Apr 05 12:15:10 2006 -0600
     1.3 @@ -17,12 +17,16 @@
     1.4  /* Guest physical address of the grant table.  */
     1.5  #define IA64_GRANT_TABLE_PADDR (1UL << 40)
     1.6  
     1.7 -#define gnttab_shared_gmfn(d, t, i)                                     \
     1.8 -    ( ((d) == dom0) ?                                                   \
     1.9 -      ((virt_to_maddr((t)->shared) >> PAGE_SHIFT) + (i)) :              \
    1.10 -      (assign_domain_page((d), IA64_GRANT_TABLE_PADDR, 			\
    1.11 -       virt_to_maddr((t)->shared)), IA64_GRANT_TABLE_PADDR >> PAGE_SHIFT) \
    1.12 -    )
    1.13 +#define gnttab_shared_maddr(d, t, i)                        \
    1.14 +    virt_to_maddr((char*)(t)->shared + ((i) << PAGE_SHIFT))
    1.15 +
    1.16 +#define gnttab_shared_gmfn(d, t, i)                                          \
    1.17 +    ({ ((d) == dom0) ?                                                       \
    1.18 +            (virt_to_maddr((t)->shared) >> PAGE_SHIFT) + (i):                \
    1.19 +            assign_domain_page((d),                                          \
    1.20 +                               IA64_GRANT_TABLE_PADDR + ((i) << PAGE_SHIFT), \
    1.21 +                               gnttab_shared_maddr(d, t, i)),                \
    1.22 +            (IA64_GRANT_TABLE_PADDR >> PAGE_SHIFT) + (i);})
    1.23  
    1.24  #define gnttab_log_dirty(d, f) ((void)0)
    1.25