ia64/xen-unstable

changeset 7443:b0f61c2c0746

Merge.
author emellor@leeni.uk.xensource.com
date Wed Oct 19 14:00:37 2005 +0100 (2005-10-19)
parents 4ba11726df73 41489189b19e
children b3e6901f4cdb 18eb059ae471
files
line diff
     1.1 --- a/buildconfigs/Rules.mk	Wed Oct 19 13:59:22 2005 +0100
     1.2 +++ b/buildconfigs/Rules.mk	Wed Oct 19 14:00:37 2005 +0100
     1.3 @@ -80,11 +80,12 @@ clean::
     1.4  	rm -f patches/*/.makedep
     1.5  
     1.6  ref-%/.valid-ref: pristine-%/.valid-pristine
     1.7 +	set -e
     1.8  	rm -rf $(@D)
     1.9  	cp -al $(<D) $(@D)
    1.10 -	which patch || exit 1
    1.11 -	([ -d patches/$* ] && \
    1.12 -	  for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || exit 1 ) ; done) || true
    1.13 +	if [ -d patches/$* ] ; then \
    1.14 +	    for i in patches/$*/*.patch ; do ( cd $(@D) ; patch -p1 <../$$i || exit 1 ) ; done ; \
    1.15 +	fi
    1.16  	touch $@ # update timestamp to avoid rebuild
    1.17  endif
    1.18  
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c	Wed Oct 19 13:59:22 2005 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/setup.c	Wed Oct 19 14:00:37 2005 +0100
     2.3 @@ -939,6 +939,8 @@ void __init find_max_pfn(void)
     2.4  	if ( xen_override_max_pfn < xen_start_info->nr_pages )
     2.5  		xen_override_max_pfn = xen_start_info->nr_pages;
     2.6  	max_pfn = xen_override_max_pfn;
     2.7 +	/* 8MB slack, to make up for address space allocations in backends. */
     2.8 +	max_pfn += 8 << (20 - PAGE_SHIFT);
     2.9  }
    2.10  #endif /* XEN */
    2.11  
    2.12 @@ -1638,39 +1640,17 @@ void __init setup_arch(char **cmdline_p)
    2.13  #endif
    2.14  
    2.15  	/* Make sure we have a correctly sized P->M table. */
    2.16 -	if (max_pfn != xen_start_info->nr_pages) {
    2.17 -		phys_to_machine_mapping = alloc_bootmem_low_pages(
    2.18 -			max_pfn * sizeof(unsigned long));
    2.19 -
    2.20 -		if (max_pfn > xen_start_info->nr_pages) {
    2.21 -			/* set to INVALID_P2M_ENTRY */
    2.22 -			memset(phys_to_machine_mapping, ~0,
    2.23 -				max_pfn * sizeof(unsigned long));
    2.24 -			memcpy(phys_to_machine_mapping,
    2.25 -				(unsigned long *)xen_start_info->mfn_list,
    2.26 -				xen_start_info->nr_pages * sizeof(unsigned long));
    2.27 -		} else {
    2.28 -			struct xen_memory_reservation reservation = {
    2.29 -				.extent_start = (unsigned long *)xen_start_info->mfn_list + max_pfn,
    2.30 -				.nr_extents   = xen_start_info->nr_pages - max_pfn,
    2.31 -				.extent_order = 0,
    2.32 -				.domid        = DOMID_SELF
    2.33 -			};
    2.34 -
    2.35 -			memcpy(phys_to_machine_mapping,
    2.36 -				(unsigned long *)xen_start_info->mfn_list,
    2.37 -				max_pfn * sizeof(unsigned long));
    2.38 -			BUG_ON(HYPERVISOR_memory_op(
    2.39 -				XENMEM_decrease_reservation,
    2.40 -				&reservation) !=
    2.41 -			    (xen_start_info->nr_pages - max_pfn));
    2.42 -		}
    2.43 -		free_bootmem(
    2.44 -			__pa(xen_start_info->mfn_list), 
    2.45 -			PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
    2.46 -			sizeof(unsigned long))));
    2.47 -	}
    2.48 -
    2.49 +	phys_to_machine_mapping = alloc_bootmem_low_pages(
    2.50 +		max_pfn * sizeof(unsigned long));
    2.51 +	memset(phys_to_machine_mapping, ~0,
    2.52 +		max_pfn * sizeof(unsigned long));
    2.53 +	memcpy(phys_to_machine_mapping,
    2.54 +		(unsigned long *)xen_start_info->mfn_list,
    2.55 +		xen_start_info->nr_pages * sizeof(unsigned long));
    2.56 +	free_bootmem(
    2.57 +		__pa(xen_start_info->mfn_list), 
    2.58 +		PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
    2.59 +		sizeof(unsigned long))));
    2.60  
    2.61  	/* 
    2.62  	 * Initialise the list of the frames that specify the list of 
     3.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c	Wed Oct 19 13:59:22 2005 +0100
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/e820.c	Wed Oct 19 14:00:37 2005 +0100
     3.3 @@ -528,10 +528,13 @@ unsigned long __init e820_end_of_ram(voi
     3.4  {
     3.5          unsigned long max_end_pfn = xen_start_info->nr_pages;
     3.6  
     3.7 -	if ( xen_override_max_pfn <  max_end_pfn)
     3.8 +	if ( xen_override_max_pfn < max_end_pfn)
     3.9  		xen_override_max_pfn = max_end_pfn;
    3.10 -	
    3.11 -        return xen_override_max_pfn;
    3.12 +
    3.13 +	/* 8MB slack, to make up for address space allocations in backends. */
    3.14 +	xen_override_max_pfn += 8 << (20 - PAGE_SHIFT);
    3.15 +
    3.16 +	return xen_override_max_pfn;
    3.17  }
    3.18  
    3.19  void __init e820_reserve_resources(void) 
     4.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Wed Oct 19 13:59:22 2005 +0100
     4.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c	Wed Oct 19 14:00:37 2005 +0100
     4.3 @@ -429,7 +429,7 @@ static __init void parse_cmdline_early (
     4.4  static void __init contig_initmem_init(void)
     4.5  {
     4.6          unsigned long bootmap_size = init_bootmem(start_pfn, end_pfn);
     4.7 -        free_bootmem(0, end_pfn << PAGE_SHIFT);   
     4.8 +        free_bootmem(0, xen_start_info->nr_pages << PAGE_SHIFT);
     4.9          reserve_bootmem(HIGH_MEMORY,
    4.10                          (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1)
    4.11                          - HIGH_MEMORY);
    4.12 @@ -734,19 +734,17 @@ void __init setup_arch(char **cmdline_p)
    4.13  	{
    4.14  		int i, j, k, fpp;
    4.15  		/* Make sure we have a large enough P->M table. */
    4.16 -		if (end_pfn > xen_start_info->nr_pages) {
    4.17 -			phys_to_machine_mapping = alloc_bootmem(
    4.18 -				end_pfn * sizeof(unsigned long));
    4.19 -			memset(phys_to_machine_mapping, ~0,
    4.20 -			       end_pfn * sizeof(unsigned long));
    4.21 -			memcpy(phys_to_machine_mapping,
    4.22 -			       (unsigned long *)xen_start_info->mfn_list,
    4.23 -			       xen_start_info->nr_pages * sizeof(unsigned long));
    4.24 -			free_bootmem(
    4.25 -				__pa(xen_start_info->mfn_list), 
    4.26 -				PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
    4.27 -						sizeof(unsigned long))));
    4.28 -		}
    4.29 +		phys_to_machine_mapping = alloc_bootmem(
    4.30 +			end_pfn * sizeof(unsigned long));
    4.31 +		memset(phys_to_machine_mapping, ~0,
    4.32 +		       end_pfn * sizeof(unsigned long));
    4.33 +		memcpy(phys_to_machine_mapping,
    4.34 +		       (unsigned long *)xen_start_info->mfn_list,
    4.35 +		       xen_start_info->nr_pages * sizeof(unsigned long));
    4.36 +		free_bootmem(
    4.37 +			__pa(xen_start_info->mfn_list), 
    4.38 +			PFN_PHYS(PFN_UP(xen_start_info->nr_pages *
    4.39 +					sizeof(unsigned long))));
    4.40  
    4.41  		/* 
    4.42  		 * Initialise the list of the frames that specify the list of 
     5.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Oct 19 13:59:22 2005 +0100
     5.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Oct 19 14:00:37 2005 +0100
     5.3 @@ -502,7 +502,7 @@ static int dealloc_pte_fn(
     5.4  		.extent_order = 0,
     5.5  		.domid        = DOMID_SELF
     5.6  	};
     5.7 -	set_pte(pte, __pte_ma(0));
     5.8 +	set_pte_at(&init_mm, addr, pte, __pte_ma(0));
     5.9  	phys_to_machine_mapping[__pa(addr) >> PAGE_SHIFT] =
    5.10  		INVALID_P2M_ENTRY;
    5.11  	BUG_ON(HYPERVISOR_memory_op(
    5.12 @@ -521,10 +521,9 @@ struct page *balloon_alloc_empty_page_ra
    5.13  
    5.14  	scrub_pages(vstart, 1 << order);
    5.15  
    5.16 +	balloon_lock(flags);
    5.17  	BUG_ON(generic_page_range(
    5.18  		&init_mm, vstart, PAGE_SIZE << order, dealloc_pte_fn, NULL));
    5.19 -
    5.20 -	balloon_lock(flags);
    5.21  	current_pages -= 1UL << order;
    5.22  	balloon_unlock(flags);
    5.23