All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask
@ 2009-05-14 10:12 Patrick Colp
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick Colp @ 2009-05-14 10:12 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User Patrick Colp <Patrick.Colp@citrix.com>
# Date 1242295647 -3600
# Node ID c5098f5c5caf4174bd2e46d49d7b65109203f7c5
# Parent  2522cc95efd2f3fadf7342d18fe86e8f37f89c2a
Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask.

Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>

diff -r 2522cc95efd2 -r c5098f5c5caf xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Mon May 11 13:52:04 2009 +0100
+++ b/xen/arch/x86/mm.c	Thu May 14 11:07:27 2009 +0100
@@ -766,7 +766,7 @@
         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 @@
             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 @@
 
 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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask
@ 2009-05-15  8:09 Patrick Colp
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick Colp @ 2009-05-15  8:09 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User Patrick Colp <Patrick.Colp@citrix.com>
# Date 1242295647 -3600
# Node ID c5098f5c5caf4174bd2e46d49d7b65109203f7c5
# Parent  2522cc95efd2f3fadf7342d18fe86e8f37f89c2a
Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask.

Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>

diff -r 2522cc95efd2 -r c5098f5c5caf xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Mon May 11 13:52:04 2009 +0100
+++ b/xen/arch/x86/mm.c	Thu May 14 11:07:27 2009 +0100
@@ -766,7 +766,7 @@
         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 @@
             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 @@
 
 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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask
@ 2009-05-15  8:37 Patrick Colp
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick Colp @ 2009-05-15  8:37 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User Patrick Colp <Patrick.Colp@citrix.com>
# Date 1242295647 -3600
# Node ID c5098f5c5caf4174bd2e46d49d7b65109203f7c5
# Parent  2522cc95efd2f3fadf7342d18fe86e8f37f89c2a
Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask.

Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>

diff -r 2522cc95efd2 -r c5098f5c5caf xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Mon May 11 13:52:04 2009 +0100
+++ b/xen/arch/x86/mm.c	Thu May 14 11:07:27 2009 +0100
@@ -766,7 +766,7 @@
          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 @@
              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 @@

  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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask
@ 2009-05-15  9:01 Patrick Colp
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick Colp @ 2009-05-15  9:01 UTC (permalink / raw)
  To: xen-devel

# HG changeset patch
# User Patrick Colp <Patrick.Colp@citrix.com>
# Date 1242295647 -3600
# Node ID c5098f5c5caf4174bd2e46d49d7b65109203f7c5
# Parent  2522cc95efd2f3fadf7342d18fe86e8f37f89c2a
Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask.

Signed-off-by: Patrick Colp <Patrick.Colp@citrix.com>

diff -r 2522cc95efd2 -r c5098f5c5caf xen/arch/x86/mm.c
--- a/xen/arch/x86/mm.c	Mon May 11 13:52:04 2009 +0100
+++ b/xen/arch/x86/mm.c	Thu May 14 11:07:27 2009 +0100
@@ -766,7 +766,7 @@
         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 @@
             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 @@
 
 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;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-15  9:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-15  8:37 [PATCH] Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask Patrick Colp
  -- strict thread matches above, loose matches on Subject: below --
2009-05-15  9:01 Patrick Colp
2009-05-15  8:09 Patrick Colp
2009-05-14 10:12 Patrick Colp

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.