ia64/xen-unstable

changeset 4187:5b5ebfc03e24

bitkeeper revision 1.1236.25.28 (4238b8caN5-Wcray6utyGx0foIi-Ow)

Merge bk://xen.bkbits.net/xeno-unstable.bk
into bkbits.net:/repos/x/xen-ia64/xeno-unstable-ia64.bk
author xen-ia64.adm@bkbits.net
date Wed Mar 16 22:52:58 2005 +0000 (2005-03-16)
parents 7a5ec83c604e 77fce201bf8b
children 58f33dec606f
files linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c patches/linux-2.6.11/agpgart.patch xen/include/xen/softirq.h
line diff
     1.1 --- a/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c	Tue Mar 15 23:44:44 2005 +0000
     1.2 +++ b/linux-2.4.29-xen-sparse/arch/xen/kernel/setup.c	Wed Mar 16 22:52:58 2005 +0000
     1.3 @@ -377,15 +377,31 @@ void __init setup_arch(char **cmdline_p)
     1.4  
     1.5      paging_init();
     1.6  
     1.7 -    /* Make sure we have a large enough P->M table. */
     1.8 -    if ( max_pfn > xen_start_info.nr_pages )
     1.9 +    /* Make sure we have a correctly sized P->M table. */
    1.10 +    if ( max_pfn != xen_start_info.nr_pages )
    1.11      {
    1.12          phys_to_machine_mapping = alloc_bootmem_low_pages(
    1.13              max_pfn * sizeof(unsigned long));
    1.14 -        memset(phys_to_machine_mapping, ~0, max_pfn * sizeof(unsigned int));
    1.15 -        memcpy(phys_to_machine_mapping,
    1.16 -               (unsigned long *)xen_start_info.mfn_list,
    1.17 -               xen_start_info.nr_pages * sizeof(unsigned long));
    1.18 +        if ( max_pfn > xen_start_info.nr_pages )
    1.19 +        {
    1.20 +            memset(phys_to_machine_mapping, ~0,
    1.21 +                   max_pfn * sizeof(unsigned long));
    1.22 +            memcpy(phys_to_machine_mapping,
    1.23 +                   (unsigned long *)xen_start_info.mfn_list,
    1.24 +                   xen_start_info.nr_pages * sizeof(unsigned long));
    1.25 +        }
    1.26 +        else
    1.27 +        {
    1.28 +            memcpy(phys_to_machine_mapping,
    1.29 +                   (unsigned long *)xen_start_info.mfn_list,
    1.30 +                   max_pfn * sizeof(unsigned long));
    1.31 +            if (HYPERVISOR_dom_mem_op(
    1.32 +                MEMOP_decrease_reservation,
    1.33 +                (unsigned long *)xen_start_info.mfn_list + max_pfn,
    1.34 +                xen_start_info.nr_pages - max_pfn, 0) !=
    1.35 +                (xen_start_info.nr_pages - max_pfn))
    1.36 +                BUG();
    1.37 +        }
    1.38          free_bootmem(__pa(xen_start_info.mfn_list), 
    1.39                       PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
    1.40                                       sizeof(unsigned long))));
     2.1 --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c	Tue Mar 15 23:44:44 2005 +0000
     2.2 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c	Wed Mar 16 22:52:58 2005 +0000
     2.3 @@ -1505,15 +1505,26 @@ void __init setup_arch(char **cmdline_p)
     2.4  #endif
     2.5  	paging_init();
     2.6  
     2.7 -	/* Make sure we have a large enough P->M table. */
     2.8 -	if (max_pfn > xen_start_info.nr_pages) {
     2.9 +	/* Make sure we have a correctly sized P->M table. */
    2.10 +	if (max_pfn != xen_start_info.nr_pages) {
    2.11  		phys_to_machine_mapping = alloc_bootmem_low_pages(
    2.12  			max_pfn * sizeof(unsigned long));
    2.13 -		memset(phys_to_machine_mapping, ~0,
    2.14 -			max_pfn * sizeof(unsigned long));
    2.15 -		memcpy(phys_to_machine_mapping,
    2.16 -			(unsigned long *)xen_start_info.mfn_list,
    2.17 -			xen_start_info.nr_pages * sizeof(unsigned long));
    2.18 +		if (max_pfn > xen_start_info.nr_pages) {
    2.19 +			memset(phys_to_machine_mapping, ~0,
    2.20 +				max_pfn * sizeof(unsigned long));
    2.21 +			memcpy(phys_to_machine_mapping,
    2.22 +				(unsigned long *)xen_start_info.mfn_list,
    2.23 +				xen_start_info.nr_pages * sizeof(unsigned long));
    2.24 +		} else {
    2.25 +			memcpy(phys_to_machine_mapping,
    2.26 +				(unsigned long *)xen_start_info.mfn_list,
    2.27 +				max_pfn * sizeof(unsigned long));
    2.28 +			if (HYPERVISOR_dom_mem_op(
    2.29 +				MEMOP_decrease_reservation,
    2.30 +				(unsigned long *)xen_start_info.mfn_list + max_pfn,
    2.31 +				xen_start_info.nr_pages - max_pfn, 0) !=
    2.32 +			    (xen_start_info.nr_pages - max_pfn)) BUG();
    2.33 +		}
    2.34  		free_bootmem(
    2.35  			__pa(xen_start_info.mfn_list), 
    2.36  			PFN_PHYS(PFN_UP(xen_start_info.nr_pages *
     3.1 --- a/patches/linux-2.6.11/agpgart.patch	Tue Mar 15 23:44:44 2005 +0000
     3.2 +++ b/patches/linux-2.6.11/agpgart.patch	Wed Mar 16 22:52:58 2005 +0000
     3.3 @@ -350,22 +350,3 @@ diff -rup pristine-linux-2.6.11/drivers/
     3.4   
     3.5   	for (i = 0; i < num_entries; i++) {
     3.6   		agp_bridge->gatt_table[i] =
     3.7 -diff -rup pristine-linux-2.6.11/include/asm-i386/agp.h linux-2.6.11/include/asm-i386/agp.h
     3.8 ---- pristine-linux-2.6.11/include/asm-i386/agp.h	2005-03-02 07:37:31.000000000 +0000
     3.9 -+++ linux-2.6.11/include/asm-i386/agp.h	2005-03-11 00:35:21.331193069 +0000
    3.10 -@@ -3,6 +3,7 @@
    3.11 - 
    3.12 - #include <asm/pgtable.h>
    3.13 - #include <asm/cacheflush.h>
    3.14 -+#include <asm/system.h>
    3.15 - 
    3.16 - /* 
    3.17 -  * Functions to keep the agpgart mappings coherent with the MMU.
    3.18 -@@ -19,6 +20,6 @@ int unmap_page_from_agp(struct page *pag
    3.19 - /* Could use CLFLUSH here if the cpu supports it. But then it would
    3.20 -    need to be called for each cacheline of the whole page so it may not be 
    3.21 -    worth it. Would need a page for it. */
    3.22 --#define flush_agp_cache() asm volatile("wbinvd":::"memory")
    3.23 -+#define flush_agp_cache() wbinvd()
    3.24 - 
    3.25 - #endif
     4.1 --- a/xen/include/xen/softirq.h	Tue Mar 15 23:44:44 2005 +0000
     4.2 +++ b/xen/include/xen/softirq.h	Wed Mar 16 22:52:58 2005 +0000
     4.3 @@ -14,7 +14,6 @@
     4.4  #include <xen/config.h>
     4.5  #include <xen/lib.h>
     4.6  #include <xen/smp.h>
     4.7 -#include <xen/irq_cpustat.h>
     4.8  #include <asm/bitops.h>
     4.9  #include <asm/hardirq.h>
    4.10