direct-io.hg

changeset 10382:6a49e02dc169

[IA64] remove xenia64_init.c

Relocate the few bits left to ia64 specific parts of the tree.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Tue Jun 06 09:06:19 2006 -0600 (2006-06-06)
parents 0fff4c07af18
children 4e78528e3480
files linux-2.6-xen-sparse/arch/ia64/kernel/setup.c linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile linux-2.6-xen-sparse/arch/ia64/xen/drivers/xenia64_init.c linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c linux-2.6-xen-sparse/arch/ia64/xen/util.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Tue Jun 06 09:01:38 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/kernel/setup.c	Tue Jun 06 09:06:19 2006 -0600
     1.3 @@ -519,14 +519,18 @@ setup_arch (char **cmdline_p)
     1.4  	}
     1.5  #ifdef CONFIG_XEN
     1.6  	if (is_running_on_xen()) {
     1.7 -		extern shared_info_t *HYPERVISOR_shared_info;
     1.8 -		extern int xen_init (void);
     1.9 +		shared_info_t *s = HYPERVISOR_shared_info;
    1.10  
    1.11 -		xen_init ();
    1.12 +		xen_start_info = __va(s->arch.start_info_pfn << PAGE_SHIFT);
    1.13 +		xen_start_info->flags = s->arch.flags;
    1.14 +
    1.15 +		printk("Running on Xen! start_info_pfn=0x%lx nr_pages=%ld "
    1.16 +		       "flags=0x%x\n", s->arch.start_info_pfn,
    1.17 +		       xen_start_info->nr_pages, xen_start_info->flags);
    1.18  
    1.19  		/* xen_start_info isn't setup yet, get the flags manually */
    1.20 -		if (HYPERVISOR_shared_info->arch.flags & SIF_INITDOMAIN) {
    1.21 -			if (!(HYPERVISOR_shared_info->arch.flags & SIF_PRIVILEGED))
    1.22 +		if (s->arch.flags & SIF_INITDOMAIN) {
    1.23 +			if (!(s->arch.flags & SIF_PRIVILEGED))
    1.24  				panic("Xen granted us console access "
    1.25  				      "but not privileged status");
    1.26  		} else {
     2.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre	Tue Jun 06 09:01:38 2006 -0600
     2.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen-mkbuildtree-pre	Tue Jun 06 09:06:19 2006 -0600
     2.3 @@ -16,9 +16,6 @@ ln -sf ../../../../xen/include/asm-ia64/
     2.4  ln -sf ../../arch/ia64/xen/drivers/Makefile drivers/xen/Makefile
     2.5  ln -sf ../../../arch/ia64/xen/drivers/coreMakefile drivers/xen/core/Makefile
     2.6  
     2.7 -#not sure where these ia64-specific files will end up in the future
     2.8 -ln -sf ../../../arch/ia64/xen/drivers/xenia64_init.c drivers/xen/core
     2.9 -
    2.10  #still a few x86-ism's in various drivers/xen files, patch them
    2.11  #cd drivers/xen
    2.12  #if [ ! -e ia64.patch.semaphore ]
     3.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile	Tue Jun 06 09:01:38 2006 -0600
     3.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/drivers/coreMakefile	Tue Jun 06 09:06:19 2006 -0600
     3.3 @@ -7,7 +7,6 @@ obj-$(CONFIG_PROC_FS) += xen_proc.o
     3.4  
     3.5  ifeq ($(ARCH),ia64)
     3.6  obj-y   += evtchn.o
     3.7 -obj-y   += xenia64_init.o
     3.8  ifeq ($(CONFIG_XEN_IA64_DOM0_VP),y)
     3.9  obj-$(CONFIG_NET)     += skbuff.o
    3.10  endif
     4.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/drivers/xenia64_init.c	Tue Jun 06 09:01:38 2006 -0600
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,60 +0,0 @@
     4.4 -#ifdef __ia64__
     4.5 -#include <linux/config.h>
     4.6 -#include <linux/module.h>
     4.7 -#include <linux/efi.h>
     4.8 -#include <asm/sal.h>
     4.9 -#include <asm/hypervisor.h>
    4.10 -/* #include <asm-xen/evtchn.h> */
    4.11 -#include <xen/interface/arch-ia64.h>
    4.12 -#include <linux/vmalloc.h>
    4.13 -
    4.14 -shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)XSI_BASE;
    4.15 -EXPORT_SYMBOL(HYPERVISOR_shared_info);
    4.16 -
    4.17 -start_info_t *xen_start_info;
    4.18 -
    4.19 -int running_on_xen;
    4.20 -EXPORT_SYMBOL(running_on_xen);
    4.21 -
    4.22 -int xen_init(void)
    4.23 -{
    4.24 -	static int initialized;
    4.25 -	shared_info_t *s = HYPERVISOR_shared_info;
    4.26 -
    4.27 -	if (initialized)
    4.28 -		return running_on_xen ? 0 : -1;
    4.29 -
    4.30 -	if (!is_running_on_xen())
    4.31 -		return -1;
    4.32 -
    4.33 -	xen_start_info = __va(s->arch.start_info_pfn << PAGE_SHIFT);
    4.34 -	xen_start_info->flags = s->arch.flags;
    4.35 -	printk("Running on Xen! start_info_pfn=0x%lx nr_pages=%ld flags=0x%x\n",
    4.36 -		s->arch.start_info_pfn, xen_start_info->nr_pages,
    4.37 -		xen_start_info->flags);
    4.38 -
    4.39 -	initialized = 1;
    4.40 -	return 0;
    4.41 -}
    4.42 -
    4.43 -#ifndef CONFIG_XEN_IA64_DOM0_VP
    4.44 -/* We just need a range of legal va here, though finally identity
    4.45 - * mapped one is instead used for gnttab mapping.
    4.46 - */
    4.47 -unsigned long alloc_empty_foreign_map_page_range(unsigned long pages)
    4.48 -{
    4.49 -	struct vm_struct *vma;
    4.50 -
    4.51 -	if ( (vma = get_vm_area(PAGE_SIZE * pages, VM_ALLOC)) == NULL )
    4.52 -		return NULL;
    4.53 -
    4.54 -	return (unsigned long)vma->addr;
    4.55 -}
    4.56 -#endif
    4.57 -
    4.58 -#if 0
    4.59 -/* These should be define'd but some drivers use them without
    4.60 - * a convenient arch include */
    4.61 -unsigned long mfn_to_pfn(unsigned long mfn) { return mfn; }
    4.62 -#endif
    4.63 -#endif
     5.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c	Tue Jun 06 09:01:38 2006 -0600
     5.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c	Tue Jun 06 09:06:19 2006 -0600
     5.3 @@ -23,6 +23,7 @@
     5.4  //#include <linux/kernel.h>
     5.5  #include <linux/spinlock.h>
     5.6  #include <linux/bootmem.h>
     5.7 +#include <linux/module.h>
     5.8  #include <linux/vmalloc.h>
     5.9  #include <asm/page.h>
    5.10  #include <asm/hypervisor.h>
    5.11 @@ -30,6 +31,14 @@
    5.12  #include <xen/interface/memory.h>
    5.13  #include <xen/balloon.h>
    5.14  
    5.15 +shared_info_t *HYPERVISOR_shared_info = (shared_info_t *)XSI_BASE;
    5.16 +EXPORT_SYMBOL(HYPERVISOR_shared_info);
    5.17 +
    5.18 +start_info_t *xen_start_info;
    5.19 +
    5.20 +int running_on_xen;
    5.21 +EXPORT_SYMBOL(running_on_xen);
    5.22 +
    5.23  //XXX xen/ia64 copy_from_guest() is broken.
    5.24  //    This is a temporal work around until it is fixed.
    5.25  //    used by balloon.c netfront.c
     6.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/util.c	Tue Jun 06 09:01:38 2006 -0600
     6.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/util.c	Tue Jun 06 09:06:19 2006 -0600
     6.3 @@ -104,6 +104,21 @@ void unlock_vm_area(struct vm_struct *ar
     6.4  }
     6.5  EXPORT_SYMBOL_GPL(unlock_vm_area);
     6.6  
     6.7 +#ifndef CONFIG_XEN_IA64_DOM0_VP
     6.8 +/* We just need a range of legal va here, though finally identity
     6.9 + * mapped one is instead used for gnttab mapping.
    6.10 + */
    6.11 +unsigned long alloc_empty_foreign_map_page_range(unsigned long pages)
    6.12 +{
    6.13 +	struct vm_struct *vma;
    6.14 +
    6.15 +	if ( (vma = get_vm_area(PAGE_SIZE * pages, VM_ALLOC)) == NULL )
    6.16 +		return NULL;
    6.17 +
    6.18 +	return (unsigned long)vma->addr;
    6.19 +}
    6.20 +#endif
    6.21 +
    6.22  /*
    6.23   * Local variables:
    6.24   *  c-file-style: "linux"