ia64/xen-unstable

changeset 3645:1c55bbe02576

bitkeeper revision 1.1159.212.84 (42033fc2Q0eAAtQcKyCf8cXCt_Fgfg)

Common-code cleanups, for ia64.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Fri Feb 04 09:26:26 2005 +0000 (2005-02-04)
parents d3f0465c034e
children 33d462bea5cd
files .rootkeys xen/arch/x86/dom0_ops.c xen/common/Makefile xen/common/dom0_ops.c xen/drivers/char/console.c xen/drivers/char/serial.c xen/include/asm-x86/config.h xen/include/asm-x86/time.h xen/include/public/arch-x86_32.h xen/include/public/arch-x86_64.h xen/include/public/xen.h xen/include/xen/keyhandler.h xen/include/xen/time.h
line diff
     1.1 --- a/.rootkeys	Fri Feb 04 02:25:03 2005 +0000
     1.2 +++ b/.rootkeys	Fri Feb 04 09:26:26 2005 +0000
     1.3 @@ -1032,6 +1032,7 @@ 3ddb79c3jn8ALV_S9W5aeTYUQRKBpg xen/inclu
     1.4  3ddb79c3NiyQE2vQnyGiaBnNjBO1rA xen/include/asm-x86/spinlock.h
     1.5  40e1966akOHWvvunCED7x3HPv35QvQ xen/include/asm-x86/string.h
     1.6  3ddb79c3ezddh34MdelJpa5tNR00Dw xen/include/asm-x86/system.h
     1.7 +42033fc1Bb8ffTshBYFGouGkiAMoUQ xen/include/asm-x86/time.h
     1.8  3ddb79c4HugMq7IYGxcQKFBpKwKhzA xen/include/asm-x86/types.h
     1.9  40cf1596saFaHD5DC5zvrSn7CDCWGQ xen/include/asm-x86/uaccess.h
    1.10  41c0c412k6GHYF3cJtDdw37ee3TVaw xen/include/asm-x86/vmx.h
     2.1 --- a/xen/arch/x86/dom0_ops.c	Fri Feb 04 02:25:03 2005 +0000
     2.2 +++ b/xen/arch/x86/dom0_ops.c	Fri Feb 04 09:26:26 2005 +0000
     2.3 @@ -295,6 +295,44 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
     2.4      }
     2.5      break;
     2.6  
     2.7 +    case DOM0_GETMEMLIST:
     2.8 +    {
     2.9 +        int i;
    2.10 +        struct domain *d = find_domain_by_id(op->u.getmemlist.domain);
    2.11 +        unsigned long max_pfns = op->u.getmemlist.max_pfns;
    2.12 +        unsigned long pfn;
    2.13 +        unsigned long *buffer = op->u.getmemlist.buffer;
    2.14 +        struct list_head *list_ent;
    2.15 +
    2.16 +        ret = -EINVAL;
    2.17 +        if ( d != NULL )
    2.18 +        {
    2.19 +            ret = 0;
    2.20 +
    2.21 +            spin_lock(&d->page_alloc_lock);
    2.22 +            list_ent = d->page_list.next;
    2.23 +            for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ )
    2.24 +            {
    2.25 +                pfn = list_entry(list_ent, struct pfn_info, list) - 
    2.26 +                    frame_table;
    2.27 +                if ( put_user(pfn, buffer) )
    2.28 +                {
    2.29 +                    ret = -EFAULT;
    2.30 +                    break;
    2.31 +                }
    2.32 +                buffer++;
    2.33 +                list_ent = frame_table[pfn].list.next;
    2.34 +            }
    2.35 +            spin_unlock(&d->page_alloc_lock);
    2.36 +
    2.37 +            op->u.getmemlist.num_pfns = i;
    2.38 +            copy_to_user(u_dom0_op, op, sizeof(*op));
    2.39 +            
    2.40 +            put_domain(d);
    2.41 +        }
    2.42 +    }
    2.43 +    break;
    2.44 +
    2.45      default:
    2.46          ret = -ENOSYS;
    2.47  
     3.1 --- a/xen/common/Makefile	Fri Feb 04 02:25:03 2005 +0000
     3.2 +++ b/xen/common/Makefile	Fri Feb 04 09:26:26 2005 +0000
     3.3 @@ -5,6 +5,7 @@ ifeq ($(TARGET_ARCH),ia64)
     3.4  OBJS := $(subst dom_mem_ops.o,,$(OBJS))
     3.5  OBJS := $(subst grant_table.o,,$(OBJS))
     3.6  OBJS := $(subst page_alloc.o,,$(OBJS))
     3.7 +OBJS := $(subst physdev.o,,$(OBJS))
     3.8  OBJS := $(subst slab.o,,$(OBJS))
     3.9  endif
    3.10  
     4.1 --- a/xen/common/dom0_ops.c	Fri Feb 04 02:25:03 2005 +0000
     4.2 +++ b/xen/common/dom0_ops.c	Fri Feb 04 09:26:26 2005 +0000
     4.3 @@ -291,44 +291,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
     4.4      }
     4.5      break;
     4.6  
     4.7 -    case DOM0_GETMEMLIST:
     4.8 -    {
     4.9 -        int i;
    4.10 -        struct domain *d = find_domain_by_id(op->u.getmemlist.domain);
    4.11 -        unsigned long max_pfns = op->u.getmemlist.max_pfns;
    4.12 -        unsigned long pfn;
    4.13 -        unsigned long *buffer = op->u.getmemlist.buffer;
    4.14 -        struct list_head *list_ent;
    4.15 -
    4.16 -        ret = -EINVAL;
    4.17 -        if ( d != NULL )
    4.18 -        {
    4.19 -            ret = 0;
    4.20 -
    4.21 -            spin_lock(&d->page_alloc_lock);
    4.22 -            list_ent = d->page_list.next;
    4.23 -            for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ )
    4.24 -            {
    4.25 -                pfn = list_entry(list_ent, struct pfn_info, list) - 
    4.26 -                    frame_table;
    4.27 -                if ( put_user(pfn, buffer) )
    4.28 -                {
    4.29 -                    ret = -EFAULT;
    4.30 -                    break;
    4.31 -                }
    4.32 -                buffer++;
    4.33 -                list_ent = frame_table[pfn].list.next;
    4.34 -            }
    4.35 -            spin_unlock(&d->page_alloc_lock);
    4.36 -
    4.37 -            op->u.getmemlist.num_pfns = i;
    4.38 -            copy_to_user(u_dom0_op, op, sizeof(*op));
    4.39 -            
    4.40 -            put_domain(d);
    4.41 -        }
    4.42 -    }
    4.43 -    break;
    4.44 -
    4.45      case DOM0_GETDOMAININFO:
    4.46      { 
    4.47          full_execution_context_t *c;
     5.1 --- a/xen/drivers/char/console.c	Fri Feb 04 02:25:03 2005 +0000
     5.2 +++ b/xen/drivers/char/console.c	Fri Feb 04 09:26:26 2005 +0000
     5.3 @@ -21,7 +21,7 @@
     5.4  #include <asm/mm.h>
     5.5  
     5.6  /* opt_console: comma-separated list of console outputs. */
     5.7 -static unsigned char opt_console[30] = "com1,vga";
     5.8 +static unsigned char opt_console[30] = OPT_CONSOLE_STR;
     5.9  string_param("console", opt_console);
    5.10  
    5.11  /* opt_conswitch: a character pair controlling console switching. */
     6.1 --- a/xen/drivers/char/serial.c	Fri Feb 04 02:25:03 2005 +0000
     6.2 +++ b/xen/drivers/char/serial.c	Fri Feb 04 09:26:26 2005 +0000
     6.3 @@ -331,11 +331,13 @@ int parse_serial_handle(char *conf)
     6.4          goto fail;
     6.5      }
     6.6  
     6.7 +#ifndef NO_UART_CONFIG_OK
     6.8      if ( !UART_ENABLED(&com[handle]) )
     6.9      {
    6.10          printk("ERROR: cannot use unconfigured serial port COM%d\n", handle+1);
    6.11          return -1;
    6.12      }
    6.13 +#endif
    6.14  
    6.15      if ( conf[4] == 'H' )
    6.16          handle |= SERHND_HI;
     7.1 --- a/xen/include/asm-x86/config.h	Fri Feb 04 02:25:03 2005 +0000
     7.2 +++ b/xen/include/asm-x86/config.h	Fri Feb 04 09:26:26 2005 +0000
     7.3 @@ -52,6 +52,8 @@
     7.4  
     7.5  #define HZ 100
     7.6  
     7.7 +#define OPT_CONSOLE_STR "com1,vga"
     7.8 +
     7.9  /*
    7.10   * Just to keep compiler happy.
    7.11   * NB. DO NOT CHANGE SMP_CACHE_BYTES WITHOUT FIXING arch/i386/entry.S!!!
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/xen/include/asm-x86/time.h	Fri Feb 04 09:26:26 2005 +0000
     8.3 @@ -0,0 +1,7 @@
     8.4 +
     8.5 +#ifndef __X86_TIME_H__
     8.6 +#define __X86_TIME_H__
     8.7 +
     8.8 +/* nothing */
     8.9 +
    8.10 +#endif /* __X86_TIME_H__ */
     9.1 --- a/xen/include/public/arch-x86_32.h	Fri Feb 04 02:25:03 2005 +0000
     9.2 +++ b/xen/include/public/arch-x86_32.h	Fri Feb 04 09:26:26 2005 +0000
     9.3 @@ -141,6 +141,9 @@ typedef struct {
     9.4      u64 pfn_to_mfn_frame_list;
     9.5  } PACKED arch_shared_info_t;
     9.6  
     9.7 +typedef struct {
     9.8 +} PACKED arch_vcpu_info_t;
     9.9 +
    9.10  #define ARCH_HAS_FAST_TRAP
    9.11  
    9.12  #endif
    10.1 --- a/xen/include/public/arch-x86_64.h	Fri Feb 04 02:25:03 2005 +0000
    10.2 +++ b/xen/include/public/arch-x86_64.h	Fri Feb 04 09:26:26 2005 +0000
    10.3 @@ -148,6 +148,9 @@ typedef struct {
    10.4      u64 pfn_to_mfn_frame_list;
    10.5  } PACKED arch_shared_info_t;
    10.6  
    10.7 +typedef struct {
    10.8 +} PACKED arch_vcpu_info_t;
    10.9 +
   10.10  #endif /* !__ASSEMBLY__ */
   10.11  
   10.12  #endif
    11.1 --- a/xen/include/public/xen.h	Fri Feb 04 02:25:03 2005 +0000
    11.2 +++ b/xen/include/public/xen.h	Fri Feb 04 09:26:26 2005 +0000
    11.3 @@ -257,7 +257,7 @@ typedef struct
    11.4   * Per-VCPU information goes here. This will be cleaned up more when Xen 
    11.5   * actually supports multi-VCPU guests.
    11.6   */
    11.7 -typedef struct vcpu_info_st
    11.8 +typedef struct
    11.9  {
   11.10      /*
   11.11       * 'evtchn_upcall_pending' is written non-zero by Xen to indicate
   11.12 @@ -284,11 +284,12 @@ typedef struct vcpu_info_st
   11.13       * an upcall activation. The mask is cleared when the VCPU requests
   11.14       * to block: this avoids wakeup-waiting races.
   11.15       */
   11.16 -    u8 evtchn_upcall_pending;
   11.17 -    u8 evtchn_upcall_mask;
   11.18 +    u8 evtchn_upcall_pending;           /* 0 */
   11.19 +    u8 evtchn_upcall_mask;              /* 1 */
   11.20      u8 pad0, pad1;
   11.21      u32 evtchn_pending_sel;             /* 4 */
   11.22 -} PACKED vcpu_info_t;                   /* 8 */
   11.23 +    arch_vcpu_info_t arch;              /* 8 */
   11.24 +} PACKED vcpu_info_t;                   /* 8 + arch */
   11.25  
   11.26  /*
   11.27   * Xen/guestos shared data -- pointer provided in start_info.
    12.1 --- a/xen/include/xen/keyhandler.h	Fri Feb 04 02:25:03 2005 +0000
    12.2 +++ b/xen/include/xen/keyhandler.h	Fri Feb 04 09:26:26 2005 +0000
    12.3 @@ -10,7 +10,7 @@
    12.4  #ifndef __XEN_KEYHANDLER_H__
    12.5  #define __XEN_KEYHANDLER_H__
    12.6  
    12.7 -struct xen_regs;
    12.8 +#include <asm/regs.h>
    12.9  
   12.10  /*
   12.11   * Register a callback function for key @key. The callback occurs in
    13.1 --- a/xen/include/xen/time.h	Fri Feb 04 02:25:03 2005 +0000
    13.2 +++ b/xen/include/xen/time.h	Fri Feb 04 09:26:26 2005 +0000
    13.3 @@ -29,6 +29,7 @@
    13.4  
    13.5  #include <xen/types.h>
    13.6  #include <public/xen.h>
    13.7 +#include <asm/time.h>
    13.8  
    13.9  extern int init_xen_time();
   13.10