ia64/xen-unstable

changeset 19092:beba88f6f90d

x86: Clean up pickle_domptr().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Jan 26 16:34:16 2009 +0000 (2009-01-26)
parents fa5887d90110
children 90909b81b3b9
files xen/include/asm-x86/mm.h
line diff
     1.1 --- a/xen/include/asm-x86/mm.h	Mon Jan 26 16:21:21 2009 +0000
     1.2 +++ b/xen/include/asm-x86/mm.h	Mon Jan 26 16:34:16 2009 +0000
     1.3 @@ -166,13 +166,8 @@ struct page_info
     1.4  #endif
     1.5  
     1.6  #if defined(__i386__)
     1.7 -#define pickle_domptr(_d)   ((u32)(unsigned long)(_d))
     1.8 -static inline struct domain *unpickle_domptr(u32 _domain)
     1.9 -{ return (_domain & 1) ? NULL : (void *)_domain; }
    1.10  #define PRtype_info "08lx" /* should only be used for printk's */
    1.11  #elif defined(__x86_64__)
    1.12 -#define unpickle_domptr(d) ((struct domain *)(d))
    1.13 -#define pickle_domptr(d) ((unsigned long)(d))
    1.14  #define PRtype_info "016lx"/* should only be used for printk's */
    1.15  #endif
    1.16  
    1.17 @@ -185,8 +180,8 @@ static inline struct domain *unpickle_do
    1.18  /* OOS fixup entries */
    1.19  #define SHADOW_OOS_FIXUPS 2
    1.20  
    1.21 -#define page_get_owner(_p)    (unpickle_domptr((_p)->u.inuse._domain))
    1.22 -#define page_set_owner(_p,_d) ((_p)->u.inuse._domain = pickle_domptr(_d))
    1.23 +#define page_get_owner(_p)    ((struct domain *)(_p)->u.inuse._domain)
    1.24 +#define page_set_owner(_p,_d) ((_p)->u.inuse._domain = (unsigned long)(_d))
    1.25  
    1.26  #define maddr_get_owner(ma)   (page_get_owner(maddr_to_page((ma))))
    1.27  #define vaddr_get_owner(va)   (page_get_owner(virt_to_page((va))))