# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 6d9b7a0ba238786008e0e96323180eff7a61c468
# Parent aeaa1f0dedd8cf247aa6cac302c0421457241956
Get ia64 working again on xen-unstable after cset 8736.
Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
[
I manually applied a failed chunk and removed hard tabs
from the file while I was editing it.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
]
diff -r aeaa1f0dedd8 -r 6d9b7a0ba238 xen/arch/ia64/xen/dom0_ops.c
--- a/xen/arch/ia64/xen/dom0_ops.c Fri Feb 3 10:00:15 2006
+++ b/xen/arch/ia64/xen/dom0_ops.c Fri Feb 3 10:51:39 2006
@@ -30,17 +30,17 @@
case DOM0_GETPAGEFRAMEINFO:
{
struct page_info *page;
- unsigned long pfn = op->u.getpageframeinfo.pfn;
+ unsigned long mfn = op->u.getpageframeinfo.mfn;
domid_t dom = op->u.getpageframeinfo.domain;
struct domain *d;
ret = -EINVAL;
- if ( unlikely(pfn >= max_page) ||
+ if ( unlikely(!mfn_valid(mfn)) ||
unlikely((d = find_domain_by_id(dom)) == NULL) )
break;
- page = &frame_table[pfn];
+ page = &frame_table[mfn];
if ( likely(get_page(page, d)) )
{
@@ -52,8 +52,8 @@
{
switch ( page->u.inuse.type_info & PGT_type_mask )
{
- default:
- panic("No such page type\n");
+ default:
+ panic("No such page type\n");
break;
}
}
@@ -116,9 +116,9 @@
switch( page->u.inuse.type_info & PGT_type_mask )
{
- default:
- panic("No such page type\n");
- break;
+ default:
+ panic("No such page type\n");
+ break;
}
if ( page->u.inuse.type_info & PGT_pinned )
@@ -158,7 +158,7 @@
struct domain *d = find_domain_by_id(op->u.getmemlist.domain);
unsigned long start_page = op->u.getmemlist.max_pfns >> 32;
unsigned long nr_pages = op->u.getmemlist.max_pfns & 0xffffffff;
- unsigned long pfn;
+ unsigned long mfn;
unsigned long *buffer = op->u.getmemlist.buffer;
struct page *page;
@@ -167,19 +167,20 @@
{
ret = 0;
- /* A temp trick here. When max_pfns == -1, we assume
- * the request is for machine contiguous pages, so request
- * all pages at first query
- */
- if ((op->u.getmemlist.max_pfns == -1UL) &&
- !test_bit(ARCH_VMX_CONTIG_MEM,&d->vcpu[0]->arch.arch_vmx.flags))
- return vmx_alloc_contig_pages(d) ? (-ENOMEM) : 0;
+ /* A temp trick here. When max_pfns == -1, we assume
+ * the request is for machine contiguous pages, so request
+ * all pages at first query
+ */
+ if ( (op->u.getmemlist.max_pfns == -1UL) &&
+ !test_bit(ARCH_VMX_CONTIG_MEM,
+ &d->vcpu[0]->arch.arch_vmx.flags) )
+ return vmx_alloc_contig_pages(d) ? (-ENOMEM) : 0;
for ( i = start_page; i < (start_page + nr_pages); i++ )
{
- pfn = gmfn_to_mfn_foreign(d, i);
-
- if ( put_user(pfn, buffer) )
+ mfn = gmfn_to_mfn_foreign(d, i);
+
+ if ( put_user(mfn, buffer) )
{
ret = -EFAULT;
break;
@@ -211,15 +212,25 @@
//memcpy(pi->hw_cap, boot_cpu_data.x86_capability, NCAPINTS*4);
ret = 0;
if ( copy_to_user(u_dom0_op, op, sizeof(*op)) )
- ret = -EFAULT;
+ ret = -EFAULT;
}
break;
default:
-printf("arch_do_dom0_op: unrecognized dom0 op: %d!!!\n",op->cmd);
+ printf("arch_do_dom0_op: unrecognized dom0 op: %d!!!\n",op->cmd);
ret = -ENOSYS;
}
return ret;
}
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|