# HG changeset patch
# User awilliam@xxxxxxxxxxxx
# Date 1173886574 21600
# Node ID a862200c572a4e9c80b52509f5ef30600fcdd8c1
# Parent c0cdb349a11ac4b401a12b46593cb9d6605f8f66
[IA64] Fix get_page_type() and put_page_type()
type_info is unsigned long = u64
Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
xen/arch/ia64/xen/mm.c | 6 +++---
xen/include/asm-ia64/mm.h | 24 ++++++++++++------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff -r c0cdb349a11a -r a862200c572a xen/arch/ia64/xen/mm.c
--- a/xen/arch/ia64/xen/mm.c Wed Mar 14 09:33:40 2007 -0600
+++ b/xen/arch/ia64/xen/mm.c Wed Mar 14 09:36:14 2007 -0600
@@ -1933,7 +1933,7 @@ void pgtable_quicklist_free(void *pgtabl
void put_page_type(struct page_info *page)
{
- u32 nx, x, y = page->u.inuse.type_info;
+ u64 nx, x, y = page->u.inuse.type_info;
again:
do {
@@ -1981,7 +1981,7 @@ void put_page_type(struct page_info *pag
int get_page_type(struct page_info *page, u32 type)
{
- u32 nx, x, y = page->u.inuse.type_info;
+ u64 nx, x, y = page->u.inuse.type_info;
ASSERT(!(type & ~PGT_type_mask));
@@ -2027,7 +2027,7 @@ int get_page_type(struct page_info *page
{
if ( ((x & PGT_type_mask) != PGT_l2_page_table) ||
(type != PGT_l1_page_table) )
- MEM_LOG("Bad type (saw %08x != exp %08x) "
+ MEM_LOG("Bad type (saw %08lx != exp %08x) "
"for mfn %016lx (pfn %016lx)",
x, type, page_to_mfn(page),
get_gpfn_from_mfn(page_to_mfn(page)));
diff -r c0cdb349a11a -r a862200c572a xen/include/asm-ia64/mm.h
--- a/xen/include/asm-ia64/mm.h Wed Mar 14 09:33:40 2007 -0600
+++ b/xen/include/asm-ia64/mm.h Wed Mar 14 09:36:14 2007 -0600
@@ -87,33 +87,33 @@ struct page_info
* IA-64 should make it a definition same as x86_64.
*/
/* The following page types are MUTUALLY EXCLUSIVE. */
-#define PGT_none (0<<29) /* no special uses of this page */
-#define PGT_l1_page_table (1<<29) /* using this page as an L1 page table? */
-#define PGT_l2_page_table (2<<29) /* using this page as an L2 page table? */
-#define PGT_l3_page_table (3<<29) /* using this page as an L3 page table? */
-#define PGT_l4_page_table (4<<29) /* using this page as an L4 page table? */
+#define PGT_none (0UL<<29) /* no special uses of this page */
+#define PGT_l1_page_table (1UL<<29) /* using this page as an L1 page table?
*/
+#define PGT_l2_page_table (2UL<<29) /* using this page as an L2 page table?
*/
+#define PGT_l3_page_table (3UL<<29) /* using this page as an L3 page table?
*/
+#define PGT_l4_page_table (4UL<<29) /* using this page as an L4 page table?
*/
/* Value 5 reserved. See asm-x86/mm.h */
/* Value 6 reserved. See asm-x86/mm.h */
-#define PGT_writable_page (7<<29) /* has writable mappings of this page? */
-#define PGT_type_mask (7<<29) /* Bits 29-31. */
+#define PGT_writable_page (7UL<<29) /* has writable mappings of this page? */
+#define PGT_type_mask (7UL<<29) /* Bits 29-31. */
/* Has this page been validated for use as its current type? */
#define _PGT_validated 28
-#define PGT_validated (1<<_PGT_validated)
+#define PGT_validated (1UL<<_PGT_validated)
/* Owning guest has pinned this page to its current type? */
#define _PGT_pinned 27
-#define PGT_pinned (1U<<_PGT_pinned)
+#define PGT_pinned (1UL<<_PGT_pinned)
/* 16-bit count of uses of this frame as its current type. */
-#define PGT_count_mask ((1U<<16)-1)
+#define PGT_count_mask ((1UL<<16)-1)
/* Cleared when the owning guest 'frees' this page. */
#define _PGC_allocated 31
-#define PGC_allocated (1U<<_PGC_allocated)
+#define PGC_allocated (1UL<<_PGC_allocated)
/* Bit 30 reserved. See asm-x86/mm.h */
/* Bit 29 reserved. See asm-x86/mm.h */
/* 29-bit count of references to this frame. */
-#define PGC_count_mask ((1U<<29)-1)
+#define PGC_count_mask ((1UL<<29)-1)
#define IS_XEN_HEAP_FRAME(_pfn) ((page_to_maddr(_pfn) < xenheap_phys_end) \
&& (page_to_maddr(_pfn) >= xen_pstart))
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|