direct-io.hg

changeset 9389:f163677f8767

[IA64] cleanup in domain.c

Remove unused code.
More static added.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author awilliam@xenbuild.aw
date Tue Mar 21 09:55:44 2006 -0700 (2006-03-21)
parents 212eb6a2d8cd
children a9f5cf43451f
files xen/arch/ia64/xen/domain.c xen/arch/ia64/xen/xenmisc.c
line diff
     1.1 --- a/xen/arch/ia64/xen/domain.c	Tue Mar 21 09:55:04 2006 -0700
     1.2 +++ b/xen/arch/ia64/xen/domain.c	Tue Mar 21 09:55:44 2006 -0700
     1.3 @@ -480,7 +480,7 @@ static struct page_info * assign_new_dom
     1.4  }
     1.5  
     1.6  /* allocate new page for domain and map it to the specified metaphysical addr */
     1.7 -struct page_info * assign_new_domain_page(struct domain *d, unsigned long mpaddr)
     1.8 +static struct page_info * assign_new_domain_page(struct domain *d, unsigned long mpaddr)
     1.9  {
    1.10  	struct mm_struct *mm = d->arch.mm;
    1.11  	struct page_info *pt, *p = (struct page_info *)0;
    1.12 @@ -738,7 +738,7 @@ static void copy_memory(void *dst, void 
    1.13  	}
    1.14  }
    1.15  
    1.16 -void loaddomainelfimage(struct domain *d, unsigned long image_start)
    1.17 +static void loaddomainelfimage(struct domain *d, unsigned long image_start)
    1.18  {
    1.19  	char *elfbase = (char *) image_start;
    1.20  	//Elf_Ehdr *ehdr = (Elf_Ehdr *)image_start;
    1.21 @@ -797,46 +797,6 @@ void loaddomainelfimage(struct domain *d
    1.22  	}
    1.23  }
    1.24  
    1.25 -int
    1.26 -parsedomainelfimage(char *elfbase, unsigned long elfsize, unsigned long *entry)
    1.27 -{
    1.28 -	Elf_Ehdr ehdr;
    1.29 -
    1.30 -	copy_memory(&ehdr,elfbase,sizeof(Elf_Ehdr));
    1.31 -
    1.32 -	if ( !elf_sanity_check(&ehdr) ) {
    1.33 -		printk("ELF sanity check failed.\n");
    1.34 -		return -EINVAL;
    1.35 -	}
    1.36 -
    1.37 -	if ( (ehdr.e_phoff + (ehdr.e_phnum * ehdr.e_phentsize)) > elfsize )
    1.38 -	{
    1.39 -		printk("ELF program headers extend beyond end of image.\n");
    1.40 -		return -EINVAL;
    1.41 -	}
    1.42 -
    1.43 -	if ( (ehdr.e_shoff + (ehdr.e_shnum * ehdr.e_shentsize)) > elfsize )
    1.44 -	{
    1.45 -		printk("ELF section headers extend beyond end of image.\n");
    1.46 -		return -EINVAL;
    1.47 -	}
    1.48 -
    1.49 -#if 0
    1.50 -	/* Find the section-header strings table. */
    1.51 -	if ( ehdr.e_shstrndx == SHN_UNDEF )
    1.52 -	{
    1.53 -		printk("ELF image has no section-header strings table (shstrtab).\n");
    1.54 -		return -EINVAL;
    1.55 -	}
    1.56 -#endif
    1.57 -
    1.58 -	*entry = ehdr.e_entry;
    1.59 -	printf("parsedomainelfimage: entry point = 0x%lx\n", *entry);
    1.60 -
    1.61 -	return 0;
    1.62 -}
    1.63 -
    1.64 -
    1.65  void alloc_dom0(void)
    1.66  {
    1.67  #ifdef CONFIG_DOMAIN0_CONTIGUOUS
    1.68 @@ -871,7 +831,7 @@ void alloc_dom0(void)
    1.69   * handled with order > 0 request. Dom0 requires that bit set to
    1.70   * allocate memory for other domains.
    1.71   */
    1.72 -void physdev_init_dom0(struct domain *d)
    1.73 +static void physdev_init_dom0(struct domain *d)
    1.74  {
    1.75  	if (iomem_permit_access(d, 0UL, ~0UL))
    1.76  		BUG();
    1.77 @@ -879,7 +839,7 @@ void physdev_init_dom0(struct domain *d)
    1.78  		BUG();
    1.79  }
    1.80  
    1.81 -unsigned int vmx_dom0 = 0;
    1.82 +static unsigned int vmx_dom0 = 0;
    1.83  int construct_dom0(struct domain *d, 
    1.84  	               unsigned long image_start, unsigned long image_len, 
    1.85  	               unsigned long initrd_start, unsigned long initrd_len,
     2.1 --- a/xen/arch/ia64/xen/xenmisc.c	Tue Mar 21 09:55:04 2006 -0700
     2.2 +++ b/xen/arch/ia64/xen/xenmisc.c	Tue Mar 21 09:55:44 2006 -0700
     2.3 @@ -124,11 +124,6 @@ u32 tlbflush_time[NR_CPUS];
     2.4  // from arch/x86/memory.c
     2.5  ///////////////////////////////
     2.6  
     2.7 -void init_percpu_info(void)
     2.8 -{
     2.9 -	dummy();
    2.10 -    //memset(percpu_info, 0, sizeof(percpu_info));
    2.11 -}
    2.12  
    2.13  void free_page_type(struct page_info *page, u32 type)
    2.14  {
    2.15 @@ -202,8 +197,6 @@ void dump_pageframe_info(struct domain *
    2.16  	printk("dump_pageframe_info not implemented\n");
    2.17  }
    2.18  
    2.19 -int nmi_count(int x) { return x; }
    2.20 -
    2.21  ///////////////////////////////
    2.22  // called from arch/ia64/head.S
    2.23  ///////////////////////////////