[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [IA64] A small fix in mm.c. Use PAGE_MASK, not ~PAGE_MASK.



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1222310873 -32400
# Node ID 325904748847d17e8a6999da1a208b01ce9d90cf
# Parent  6055360dbfe4848682ee8c65bce19c57e1728034
[IA64] A small fix in mm.c. Use PAGE_MASK, not ~PAGE_MASK.

~PAGE_MASK was wrongly used to get page aligned address.
Use PAGE_MASK, not ~PAGE_MASK.

Signed-off-by: Anthony xu <anthony.xu@xxxxxxxxx>
---
 xen/arch/ia64/xen/mm.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -r 6055360dbfe4 -r 325904748847 xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c    Thu Sep 25 11:47:53 2008 +0900
+++ b/xen/arch/ia64/xen/mm.c    Thu Sep 25 11:47:53 2008 +0900
@@ -1016,10 +1016,10 @@ ioports_permit_access(struct domain *d, 
     lp = IO_SPACE_PORT(lp);
 
     if (space->sparse) {
-        mmio_start = IO_SPACE_SPARSE_ENCODING(fp) & ~PAGE_MASK;
+        mmio_start = IO_SPACE_SPARSE_ENCODING(fp) & PAGE_MASK;
         mmio_end = PAGE_ALIGN(IO_SPACE_SPARSE_ENCODING(lp));
     } else {
-        mmio_start = fp & ~PAGE_MASK;
+        mmio_start = fp & PAGE_MASK;
         mmio_end = PAGE_ALIGN(lp);
     }
 
@@ -1079,10 +1079,10 @@ ioports_deny_access(struct domain *d, un
     lp_base = IO_SPACE_PORT(lp);
 
     if (space->sparse) {
-        mmio_start = IO_SPACE_SPARSE_ENCODING(fp_base) & ~PAGE_MASK;
+        mmio_start = IO_SPACE_SPARSE_ENCODING(fp_base) & PAGE_MASK;
         mmio_end = PAGE_ALIGN(IO_SPACE_SPARSE_ENCODING(lp_base));
     } else {
-        mmio_start = fp_base & ~PAGE_MASK;
+        mmio_start = fp_base & PAGE_MASK;
         mmio_end = PAGE_ALIGN(lp_base);
     }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.