ia64/xen-unstable

changeset 8750:6d9b7a0ba238

Get ia64 working again on xen-unstable after cset 8736.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>

[
I manually applied a failed chunk and removed hard tabs
from the file while I was editing it.
Signed-off-by: Keir Fraser <keir@xensource.com>
]
author kaf24@firebug.cl.cam.ac.uk
date Fri Feb 03 11:51:39 2006 +0100 (2006-02-03)
parents aeaa1f0dedd8
children 0bd023cf351e
files xen/arch/ia64/xen/dom0_ops.c
line diff
     1.1 --- a/xen/arch/ia64/xen/dom0_ops.c	Fri Feb 03 10:00:15 2006 +0000
     1.2 +++ b/xen/arch/ia64/xen/dom0_ops.c	Fri Feb 03 11:51:39 2006 +0100
     1.3 @@ -30,17 +30,17 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
     1.4      case DOM0_GETPAGEFRAMEINFO:
     1.5      {
     1.6          struct page_info *page;
     1.7 -        unsigned long pfn = op->u.getpageframeinfo.pfn;
     1.8 +        unsigned long mfn = op->u.getpageframeinfo.mfn;
     1.9          domid_t dom = op->u.getpageframeinfo.domain;
    1.10          struct domain *d;
    1.11  
    1.12          ret = -EINVAL;
    1.13  
    1.14 -        if ( unlikely(pfn >= max_page) || 
    1.15 +        if ( unlikely(!mfn_valid(mfn)) || 
    1.16               unlikely((d = find_domain_by_id(dom)) == NULL) )
    1.17              break;
    1.18  
    1.19 -        page = &frame_table[pfn];
    1.20 +        page = &frame_table[mfn];
    1.21  
    1.22          if ( likely(get_page(page, d)) )
    1.23          {
    1.24 @@ -52,8 +52,8 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
    1.25              {
    1.26                  switch ( page->u.inuse.type_info & PGT_type_mask )
    1.27                  {
    1.28 -		default:
    1.29 -		    panic("No such page type\n");
    1.30 +                default:
    1.31 +                    panic("No such page type\n");
    1.32                      break;
    1.33                  }
    1.34              }
    1.35 @@ -116,9 +116,9 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
    1.36  
    1.37                      switch( page->u.inuse.type_info & PGT_type_mask )
    1.38                      {
    1.39 -		    default:
    1.40 -			panic("No such page type\n");
    1.41 -			break;
    1.42 +                    default:
    1.43 +                        panic("No such page type\n");
    1.44 +                        break;
    1.45                      }
    1.46  
    1.47                      if ( page->u.inuse.type_info & PGT_pinned )
    1.48 @@ -158,7 +158,7 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
    1.49          struct domain *d = find_domain_by_id(op->u.getmemlist.domain);
    1.50          unsigned long start_page = op->u.getmemlist.max_pfns >> 32;
    1.51          unsigned long nr_pages = op->u.getmemlist.max_pfns & 0xffffffff;
    1.52 -        unsigned long pfn;
    1.53 +        unsigned long mfn;
    1.54          unsigned long *buffer = op->u.getmemlist.buffer;
    1.55          struct page *page;
    1.56  
    1.57 @@ -167,19 +167,20 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
    1.58          {
    1.59              ret = 0;
    1.60  
    1.61 -	    /* A temp trick here. When max_pfns == -1, we assume
    1.62 -	     * the request is for  machine contiguous pages, so request
    1.63 -	     * all pages at first query
    1.64 -	     */
    1.65 -	    if ((op->u.getmemlist.max_pfns == -1UL) &&
    1.66 -		!test_bit(ARCH_VMX_CONTIG_MEM,&d->vcpu[0]->arch.arch_vmx.flags))
    1.67 -		return vmx_alloc_contig_pages(d) ? (-ENOMEM) : 0;
    1.68 +            /* A temp trick here. When max_pfns == -1, we assume
    1.69 +             * the request is for  machine contiguous pages, so request
    1.70 +             * all pages at first query
    1.71 +             */
    1.72 +            if ( (op->u.getmemlist.max_pfns == -1UL) &&
    1.73 +                 !test_bit(ARCH_VMX_CONTIG_MEM,
    1.74 +                           &d->vcpu[0]->arch.arch_vmx.flags) )
    1.75 +                return vmx_alloc_contig_pages(d) ? (-ENOMEM) : 0;
    1.76  
    1.77              for ( i = start_page; i < (start_page + nr_pages); i++ )
    1.78              {
    1.79 -		pfn = gmfn_to_mfn_foreign(d, i);
    1.80 +                mfn = gmfn_to_mfn_foreign(d, i);
    1.81  
    1.82 -                if ( put_user(pfn, buffer) )
    1.83 +                if ( put_user(mfn, buffer) )
    1.84                  {
    1.85                      ret = -EFAULT;
    1.86                      break;
    1.87 @@ -211,15 +212,25 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
    1.88          //memcpy(pi->hw_cap, boot_cpu_data.x86_capability, NCAPINTS*4);
    1.89          ret = 0;
    1.90          if ( copy_to_user(u_dom0_op, op, sizeof(*op)) )
    1.91 -	    ret = -EFAULT;
    1.92 +            ret = -EFAULT;
    1.93      }
    1.94      break;
    1.95  
    1.96      default:
    1.97 -printf("arch_do_dom0_op: unrecognized dom0 op: %d!!!\n",op->cmd);
    1.98 +        printf("arch_do_dom0_op: unrecognized dom0 op: %d!!!\n",op->cmd);
    1.99          ret = -ENOSYS;
   1.100  
   1.101      }
   1.102  
   1.103      return ret;
   1.104  }
   1.105 +
   1.106 +/*
   1.107 + * Local variables:
   1.108 + * mode: C
   1.109 + * c-set-style: "BSD"
   1.110 + * c-basic-offset: 4
   1.111 + * tab-width: 4
   1.112 + * indent-tabs-mode: nil
   1.113 + * End:
   1.114 + */