WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: Use PGC_cacheattr_mask rather than a

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Use PGC_cacheattr_mask rather than a hardcoded constant.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 19 May 2009 09:30:21 -0700
Delivery-date: Tue, 19 May 2009 09:30:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Use PGC_cacheattr_mask rather than a hardcoded constant., Xen patchbot-unstable <=