# HG changeset patch # User kaf24@scramble.cl.cam.ac.uk # Date 1107509186 0 # Node ID 1c55bbe02576ae4e8a8ce8299f05a5799d32788d # Parent d3f0465c034edf58dcf8424c74184cda495d57ac bitkeeper revision 1.1159.212.84 (42033fc2Q0eAAtQcKyCf8cXCt_Fgfg) Common-code cleanups, for ia64. Signed-off-by: keir.fraser@cl.cam.ac.uk diff -r d3f0465c034e -r 1c55bbe02576 .rootkeys --- a/.rootkeys Fri Feb 04 02:25:03 2005 +0000 +++ b/.rootkeys Fri Feb 04 09:26:26 2005 +0000 @@ -1032,6 +1032,7 @@ 3ddb79c3jn8ALV_S9W5aeTYUQRKBpg xen/inclu 3ddb79c3NiyQE2vQnyGiaBnNjBO1rA xen/include/asm-x86/spinlock.h 40e1966akOHWvvunCED7x3HPv35QvQ xen/include/asm-x86/string.h 3ddb79c3ezddh34MdelJpa5tNR00Dw xen/include/asm-x86/system.h +42033fc1Bb8ffTshBYFGouGkiAMoUQ xen/include/asm-x86/time.h 3ddb79c4HugMq7IYGxcQKFBpKwKhzA xen/include/asm-x86/types.h 40cf1596saFaHD5DC5zvrSn7CDCWGQ xen/include/asm-x86/uaccess.h 41c0c412k6GHYF3cJtDdw37ee3TVaw xen/include/asm-x86/vmx.h diff -r d3f0465c034e -r 1c55bbe02576 xen/arch/x86/dom0_ops.c --- a/xen/arch/x86/dom0_ops.c Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/arch/x86/dom0_ops.c Fri Feb 04 09:26:26 2005 +0000 @@ -295,6 +295,44 @@ long arch_do_dom0_op(dom0_op_t *op, dom0 } break; + case DOM0_GETMEMLIST: + { + int i; + struct domain *d = find_domain_by_id(op->u.getmemlist.domain); + unsigned long max_pfns = op->u.getmemlist.max_pfns; + unsigned long pfn; + unsigned long *buffer = op->u.getmemlist.buffer; + struct list_head *list_ent; + + ret = -EINVAL; + if ( d != NULL ) + { + ret = 0; + + spin_lock(&d->page_alloc_lock); + list_ent = d->page_list.next; + for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ ) + { + pfn = list_entry(list_ent, struct pfn_info, list) - + frame_table; + if ( put_user(pfn, buffer) ) + { + ret = -EFAULT; + break; + } + buffer++; + list_ent = frame_table[pfn].list.next; + } + spin_unlock(&d->page_alloc_lock); + + op->u.getmemlist.num_pfns = i; + copy_to_user(u_dom0_op, op, sizeof(*op)); + + put_domain(d); + } + } + break; + default: ret = -ENOSYS; diff -r d3f0465c034e -r 1c55bbe02576 xen/common/Makefile --- a/xen/common/Makefile Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/common/Makefile Fri Feb 04 09:26:26 2005 +0000 @@ -5,6 +5,7 @@ ifeq ($(TARGET_ARCH),ia64) OBJS := $(subst dom_mem_ops.o,,$(OBJS)) OBJS := $(subst grant_table.o,,$(OBJS)) OBJS := $(subst page_alloc.o,,$(OBJS)) +OBJS := $(subst physdev.o,,$(OBJS)) OBJS := $(subst slab.o,,$(OBJS)) endif diff -r d3f0465c034e -r 1c55bbe02576 xen/common/dom0_ops.c --- a/xen/common/dom0_ops.c Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/common/dom0_ops.c Fri Feb 04 09:26:26 2005 +0000 @@ -291,44 +291,6 @@ long do_dom0_op(dom0_op_t *u_dom0_op) } break; - case DOM0_GETMEMLIST: - { - int i; - struct domain *d = find_domain_by_id(op->u.getmemlist.domain); - unsigned long max_pfns = op->u.getmemlist.max_pfns; - unsigned long pfn; - unsigned long *buffer = op->u.getmemlist.buffer; - struct list_head *list_ent; - - ret = -EINVAL; - if ( d != NULL ) - { - ret = 0; - - spin_lock(&d->page_alloc_lock); - list_ent = d->page_list.next; - for ( i = 0; (i < max_pfns) && (list_ent != &d->page_list); i++ ) - { - pfn = list_entry(list_ent, struct pfn_info, list) - - frame_table; - if ( put_user(pfn, buffer) ) - { - ret = -EFAULT; - break; - } - buffer++; - list_ent = frame_table[pfn].list.next; - } - spin_unlock(&d->page_alloc_lock); - - op->u.getmemlist.num_pfns = i; - copy_to_user(u_dom0_op, op, sizeof(*op)); - - put_domain(d); - } - } - break; - case DOM0_GETDOMAININFO: { full_execution_context_t *c; diff -r d3f0465c034e -r 1c55bbe02576 xen/drivers/char/console.c --- a/xen/drivers/char/console.c Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/drivers/char/console.c Fri Feb 04 09:26:26 2005 +0000 @@ -21,7 +21,7 @@ #include /* opt_console: comma-separated list of console outputs. */ -static unsigned char opt_console[30] = "com1,vga"; +static unsigned char opt_console[30] = OPT_CONSOLE_STR; string_param("console", opt_console); /* opt_conswitch: a character pair controlling console switching. */ diff -r d3f0465c034e -r 1c55bbe02576 xen/drivers/char/serial.c --- a/xen/drivers/char/serial.c Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/drivers/char/serial.c Fri Feb 04 09:26:26 2005 +0000 @@ -331,11 +331,13 @@ int parse_serial_handle(char *conf) goto fail; } +#ifndef NO_UART_CONFIG_OK if ( !UART_ENABLED(&com[handle]) ) { printk("ERROR: cannot use unconfigured serial port COM%d\n", handle+1); return -1; } +#endif if ( conf[4] == 'H' ) handle |= SERHND_HI; diff -r d3f0465c034e -r 1c55bbe02576 xen/include/asm-x86/config.h --- a/xen/include/asm-x86/config.h Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/include/asm-x86/config.h Fri Feb 04 09:26:26 2005 +0000 @@ -52,6 +52,8 @@ #define HZ 100 +#define OPT_CONSOLE_STR "com1,vga" + /* * Just to keep compiler happy. * NB. DO NOT CHANGE SMP_CACHE_BYTES WITHOUT FIXING arch/i386/entry.S!!! diff -r d3f0465c034e -r 1c55bbe02576 xen/include/asm-x86/time.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/xen/include/asm-x86/time.h Fri Feb 04 09:26:26 2005 +0000 @@ -0,0 +1,7 @@ + +#ifndef __X86_TIME_H__ +#define __X86_TIME_H__ + +/* nothing */ + +#endif /* __X86_TIME_H__ */ diff -r d3f0465c034e -r 1c55bbe02576 xen/include/public/arch-x86_32.h --- a/xen/include/public/arch-x86_32.h Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/include/public/arch-x86_32.h Fri Feb 04 09:26:26 2005 +0000 @@ -141,6 +141,9 @@ typedef struct { u64 pfn_to_mfn_frame_list; } PACKED arch_shared_info_t; +typedef struct { +} PACKED arch_vcpu_info_t; + #define ARCH_HAS_FAST_TRAP #endif diff -r d3f0465c034e -r 1c55bbe02576 xen/include/public/arch-x86_64.h --- a/xen/include/public/arch-x86_64.h Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/include/public/arch-x86_64.h Fri Feb 04 09:26:26 2005 +0000 @@ -148,6 +148,9 @@ typedef struct { u64 pfn_to_mfn_frame_list; } PACKED arch_shared_info_t; +typedef struct { +} PACKED arch_vcpu_info_t; + #endif /* !__ASSEMBLY__ */ #endif diff -r d3f0465c034e -r 1c55bbe02576 xen/include/public/xen.h --- a/xen/include/public/xen.h Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/include/public/xen.h Fri Feb 04 09:26:26 2005 +0000 @@ -257,7 +257,7 @@ typedef struct * Per-VCPU information goes here. This will be cleaned up more when Xen * actually supports multi-VCPU guests. */ -typedef struct vcpu_info_st +typedef struct { /* * 'evtchn_upcall_pending' is written non-zero by Xen to indicate @@ -284,11 +284,12 @@ typedef struct vcpu_info_st * an upcall activation. The mask is cleared when the VCPU requests * to block: this avoids wakeup-waiting races. */ - u8 evtchn_upcall_pending; - u8 evtchn_upcall_mask; + u8 evtchn_upcall_pending; /* 0 */ + u8 evtchn_upcall_mask; /* 1 */ u8 pad0, pad1; u32 evtchn_pending_sel; /* 4 */ -} PACKED vcpu_info_t; /* 8 */ + arch_vcpu_info_t arch; /* 8 */ +} PACKED vcpu_info_t; /* 8 + arch */ /* * Xen/guestos shared data -- pointer provided in start_info. diff -r d3f0465c034e -r 1c55bbe02576 xen/include/xen/keyhandler.h --- a/xen/include/xen/keyhandler.h Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/include/xen/keyhandler.h Fri Feb 04 09:26:26 2005 +0000 @@ -10,7 +10,7 @@ #ifndef __XEN_KEYHANDLER_H__ #define __XEN_KEYHANDLER_H__ -struct xen_regs; +#include /* * Register a callback function for key @key. The callback occurs in diff -r d3f0465c034e -r 1c55bbe02576 xen/include/xen/time.h --- a/xen/include/xen/time.h Fri Feb 04 02:25:03 2005 +0000 +++ b/xen/include/xen/time.h Fri Feb 04 09:26:26 2005 +0000 @@ -29,6 +29,7 @@ #include #include +#include extern int init_xen_time();