Patrick Colp
2009-May-14 10:12 UTC
[Xen-devel] [PATCH] Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask
# 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;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Patrick Colp
2009-May-15 08:09 UTC
[Xen-devel] [PATCH] Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask
# 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;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Patrick Colp
2009-May-15 08:37 UTC
[Xen-devel] [PATCH] Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask
# 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;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Patrick Colp
2009-May-15 09:01 UTC
[Xen-devel] [PATCH] Fix get_page_from_l1e and cleanup_page_cacheattr to use PGC_cacheattr_mask
# 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;
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Jan Beulich
2009-May-15 09:31 UTC
Re: [Xen-devel] [PATCH] Fix get_page_from_l1e andcleanup_page_cacheattr to use PGC_cacheattr_mask
>>> Patrick Colp <Patrick.Colp@citrix.com> 15.05.09 11:01 >>> ># 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.Could you indicate what it is that you fix here? Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Patrick Colp
2009-May-15 09:40 UTC
Re: [Xen-devel] [PATCH] Fix get_page_from_l1e andcleanup_page_cacheattr to use PGC_cacheattr_mask
Keir Fraser wrote:> On 15/05/2009 10:31, "Jan Beulich" <JBeulich@novell.com> wrote: > >>>>> Patrick Colp <Patrick.Colp@citrix.com> 15.05.09 11:01 >>> >>> # 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. >> Could you indicate what it is that you fix here? > > I assume it''s just getting rid of the open-coded 7. > > -- KeirYes, exactly. Patrick _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2009-May-15 09:40 UTC
Re: [Xen-devel] [PATCH] Fix get_page_from_l1e andcleanup_page_cacheattr to use PGC_cacheattr_mask
On 15/05/2009 10:31, "Jan Beulich" <JBeulich@novell.com> wrote:>>>> Patrick Colp <Patrick.Colp@citrix.com> 15.05.09 11:01 >>> >> # 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. > > Could you indicate what it is that you fix here?I assume it''s just getting rid of the open-coded 7. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2009-May-15 09:54 UTC
Re: [Xen-devel] [PATCH] Fix get_page_from_l1eandcleanup_page_cacheattr to use PGC_cacheattr_mask
>>> Keir Fraser <keir.fraser@eu.citrix.com> 15.05.09 11:40 >>> >On 15/05/2009 10:31, "Jan Beulich" <JBeulich@novell.com> wrote: > >>>>> Patrick Colp <Patrick.Colp@citrix.com> 15.05.09 11:01 >>> >>> # 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. >> >> Could you indicate what it is that you fix here? > >I assume it''s just getting rid of the open-coded 7.So would I have thought by looking at the patch, but the word ''fix'' in the subject made me thing there was something more subtle that I didn''t spot... Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Patrick Colp
2009-May-15 09:56 UTC
Re: [Xen-devel] [PATCH] Fix get_page_from_l1eandcleanup_page_cacheattr to use PGC_cacheattr_mask
Jan Beulich wrote:>>>> Keir Fraser <keir.fraser@eu.citrix.com> 15.05.09 11:40 >>> >> On 15/05/2009 10:31, "Jan Beulich" <JBeulich@novell.com> wrote: >> >>>>>> Patrick Colp <Patrick.Colp@citrix.com> 15.05.09 11:01 >>> >>>> # 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. >>> Could you indicate what it is that you fix here? >> I assume it''s just getting rid of the open-coded 7. > > So would I have thought by looking at the patch, but the word ''fix'' in the subject > made me thing there was something more subtle that I didn''t spot... > > JanNah, just a poor word choice. "Changed" would probably have been better. Patrick _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel