ia64/xen-unstable

changeset 5483:7f51ede19020

bitkeeper revision 1.1713.2.4 (42b2eeaaw19NBOX3B2LRrIub6Vg5Lg)

New defines for misc get/put_page macros

Signed-off-by Kevin Tian <Kevin.tian@intel.com>
author djm@kirby.fc.hp.com
date Fri Jun 17 15:39:22 2005 +0000 (2005-06-17)
parents efc42f95dc7f
children 764d98ff8c26
files xen/include/asm-ia64/mm.h
line diff
     1.1 --- a/xen/include/asm-ia64/mm.h	Fri Jun 17 15:34:00 2005 +0000
     1.2 +++ b/xen/include/asm-ia64/mm.h	Fri Jun 17 15:39:22 2005 +0000
     1.3 @@ -169,8 +169,29 @@ static inline int get_page(struct pfn_in
     1.4  }
     1.5  
     1.6  /* No type info now */
     1.7 -#define put_page_and_type(page) put_page((page))
     1.8 -#define get_page_and_type(page, domain, type) get_page((page))
     1.9 +#define put_page_type(page)
    1.10 +#define get_page_type(page, type) 1
    1.11 +static inline void put_page_and_type(struct pfn_info *page)
    1.12 +{
    1.13 +    put_page_type(page);
    1.14 +    put_page(page);
    1.15 +}
    1.16 +
    1.17 +
    1.18 +static inline int get_page_and_type(struct pfn_info *page,
    1.19 +                                    struct domain *domain,
    1.20 +                                    u32 type)
    1.21 +{
    1.22 +    int rc = get_page(page, domain);
    1.23 +
    1.24 +    if ( likely(rc) && unlikely(!get_page_type(page, type)) )
    1.25 +    {
    1.26 +        put_page(page);
    1.27 +        rc = 0;
    1.28 +    }
    1.29 +
    1.30 +    return rc;
    1.31 +}
    1.32  
    1.33  #define	set_machinetophys(_mfn, _pfn) do { } while(0);
    1.34