[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86: Use PGC_cacheattr_mask rather than a hardcoded constant.
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1242692236 -3600 # Node ID eb66644da833fbb437c205b554813bbfbd5aa398 # Parent 9890a1e5b6ab95f3e837f3f68d823a3657a7f96d x86: Use PGC_cacheattr_mask rather than a hardcoded constant. Signed-off-by: Patrick Colp <Patrick.Colp@xxxxxxxxxx> --- xen/arch/x86/mm.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff -r 9890a1e5b6ab -r eb66644da833 xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c Mon May 18 13:53:55 2009 +0100 +++ b/xen/arch/x86/mm.c Tue May 19 01:17:16 2009 +0100 @@ -766,7 +766,7 @@ get_page_from_l1e( goto could_not_pin; if ( pte_flags_to_cacheattr(l1f) != - ((page->count_info >> PGC_cacheattr_base) & 7) ) + ((page->count_info & PGC_cacheattr_mask) >> PGC_cacheattr_base) ) { unsigned long x, nx, y = page->count_info; unsigned long cacheattr = pte_flags_to_cacheattr(l1f); @@ -782,7 +782,7 @@ get_page_from_l1e( return 0; } - while ( ((y >> PGC_cacheattr_base) & 7) != cacheattr ) + while ( ((y & PGC_cacheattr_mask) >> PGC_cacheattr_base) != cacheattr ) { x = y; nx = (x & ~PGC_cacheattr_mask) | (cacheattr << PGC_cacheattr_base); @@ -2389,7 +2389,8 @@ int get_page_type_preemptible(struct pag void cleanup_page_cacheattr(struct page_info *page) { - uint32_t cacheattr = (page->count_info >> PGC_cacheattr_base) & 7; + uint32_t cacheattr = + (page->count_info & PGC_cacheattr_mask) >> PGC_cacheattr_base; if ( likely(cacheattr == 0) ) return; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |