ia64/xen-unstable

changeset 8722:f081663ba941

Define gnttab_shared_gpfn() for use in common code.

Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Feb 01 00:48:17 2006 +0100 (2006-02-01)
parents 80890ad194b1
children 61e7afb7344b
files xen/common/grant_table.c xen/include/asm-ia64/grant_table.h xen/include/asm-x86/grant_table.h
line diff
     1.1 --- a/xen/common/grant_table.c	Wed Feb 01 00:20:29 2006 +0100
     1.2 +++ b/xen/common/grant_table.c	Wed Feb 01 00:48:17 2006 +0100
     1.3 @@ -481,7 +481,7 @@ gnttab_setup_table(
     1.4      gnttab_setup_table_t  op;
     1.5      struct domain        *d;
     1.6      int                   i;
     1.7 -    unsigned long         mfn;
     1.8 +    unsigned long         gpfn;
     1.9  
    1.10      if ( count != 1 )
    1.11          return -EINVAL;
    1.12 @@ -523,8 +523,8 @@ gnttab_setup_table(
    1.13          (void)put_user(GNTST_okay, &uop->status);
    1.14          for ( i = 0; i < op.nr_frames; i++ )
    1.15          {
    1.16 -            mfn = __mfn_to_gpfn(d, gnttab_shared_mfn(d, d->grant_table, i));
    1.17 -            (void)put_user(mfn, &op.frame_list[i]);
    1.18 +            gpfn = gnttab_shared_gpfn(d, d->grant_table, i);
    1.19 +            (void)put_user(gpfn, &op.frame_list[i]);
    1.20          }
    1.21      }
    1.22  
     2.1 --- a/xen/include/asm-ia64/grant_table.h	Wed Feb 01 00:20:29 2006 +0100
     2.2 +++ b/xen/include/asm-ia64/grant_table.h	Wed Feb 01 00:48:17 2006 +0100
     2.3 @@ -14,7 +14,7 @@
     2.4  
     2.5  #define gnttab_create_shared_mfn(d, t, i) ((void)0)
     2.6  
     2.7 -#define gnttab_shared_mfn(d, t, i)                                      \
     2.8 +#define gnttab_shared_gpfn(d, t, i)                                     \
     2.9      ( ((d) == dom0) ?                                                   \
    2.10        ((virt_to_phys((t)->shared) >> PAGE_SHIFT) + (i)) :               \
    2.11        (map_domain_page((d), 1UL<<40, virt_to_phys((t)->shared)),        \
     3.1 --- a/xen/include/asm-x86/grant_table.h	Wed Feb 01 00:20:29 2006 +0100
     3.2 +++ b/xen/include/asm-x86/grant_table.h	Wed Feb 01 00:48:17 2006 +0100
     3.3 @@ -33,6 +33,9 @@ int steal_page_for_grant_transfer(
     3.4  #define gnttab_shared_mfn(d, t, i)                      \
     3.5      ((virt_to_phys((t)->shared) >> PAGE_SHIFT) + (i))
     3.6  
     3.7 +#define gnttab_shared_gpfn(d, t, i)                     \
     3.8 +    (__mfn_to_gpfn(d, gnttab_shared_mfn(d, t, i)))
     3.9 +
    3.10  #define gnttab_log_dirty(d, f) mark_dirty((d), (f))
    3.11  
    3.12  #endif /* __ASM_GRANT_TABLE_H__ */