ia64/xen-unstable

changeset 15480:ba98732b44c7

[IA64] Rename NUM_MEM_DESC to NUM_EXTRA_MEM_DESC and reduce it.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author Alex Williamson <alex.williamson@hp.com>
date Mon Jul 09 08:33:02 2007 -0600 (2007-07-09)
parents 3ac39cae5948
children 87b0b6a08dbd
files xen/arch/ia64/xen/dom_fw_utils.c xen/include/asm-ia64/dom_fw_common.h
line diff
     1.1 --- a/xen/arch/ia64/xen/dom_fw_utils.c	Thu Jul 05 13:38:35 2007 -0600
     1.2 +++ b/xen/arch/ia64/xen/dom_fw_utils.c	Mon Jul 09 08:33:02 2007 -0600
     1.3 @@ -250,10 +250,28 @@ int dom_fw_setup(domain_t * d, unsigned 
     1.4  		imva_hypercall_base = (unsigned long)domain_mpa_to_imva
     1.5  		    (d, FW_HYPERCALL_BASE_PADDR);
     1.6  
     1.7 +		/*
     1.8 +		 * dom_fw_init()
     1.9 +		 *   - [FW_HYPERCALL_BASE_PADDR, FW_HYPERCALL_END_PADDR)
    1.10 +		 *   - [FW_ACPI_BASE_PADDR, FW_ACPI_END_PADDR)
    1.11 +		 *   - [FW_TABLES_BASE_PADDR, tables->fw_tables_end_paddr)
    1.12 +		 *
    1.13 +		 * complete_dom0_memmap() for dom0
    1.14 +		 *   - real machine memory map
    1.15 +		 *   - memmap_info by setup_dom0_memmap_info()
    1.16 +		 *
    1.17 +		 * complete_domu_memmap() for old domu builder
    1.18 +		 *   - I/O port
    1.19 +		 *   - conventional memory
    1.20 +		 *   - memmap_info
    1.21 +		 */
    1.22 +#define NUM_EXTRA_MEM_DESCS     4
    1.23 +
    1.24  		/* Estimate necessary efi memmap size and allocate memory */
    1.25  		fw_tables_size = sizeof(*fw_tables) +
    1.26  			(ia64_boot_param->efi_memmap_size /
    1.27 -			 ia64_boot_param->efi_memdesc_size + NUM_MEM_DESCS) *
    1.28 +			 ia64_boot_param->efi_memdesc_size +
    1.29 +			 NUM_EXTRA_MEM_DESCS) *
    1.30  			sizeof(fw_tables->efi_memmap[0]);
    1.31  		if (fw_tables_size <
    1.32  		    FW_TABLES_END_PADDR_MIN - FW_TABLES_BASE_PADDR)
    1.33 @@ -301,11 +319,12 @@ int dom_fw_setup(domain_t * d, unsigned 
    1.34  		if (sizeof(*fw_tables) +
    1.35  		    fw_tables->num_mds * sizeof(fw_tables->efi_memmap[0]) >
    1.36  		    fw_tables_size) {
    1.37 -			panic("EFI memmap too large. Increase NUM_MEM_DESCS.\n"
    1.38 +			panic("EFI memmap too large. "
    1.39 +			      "Increase NUM_EXTRA_MEM_DESCS.\n"
    1.40  			      "fw_table_size %ld > %ld num_mds %ld "
    1.41 -			      "NUM_MEM_DESCS %d.\n",
    1.42 +			      "NUM_EXTRA_MEM_DESCS %d.\n",
    1.43  			      fw_tables_size, fw_tables->fw_tables_size,
    1.44 -			      fw_tables->num_mds, NUM_MEM_DESCS);
    1.45 +			      fw_tables->num_mds, NUM_EXTRA_MEM_DESCS);
    1.46  		}
    1.47  		fw_tables_size = sizeof(*fw_tables) +
    1.48  			fw_tables->num_mds * sizeof(fw_tables->efi_memmap[0]);
     2.1 --- a/xen/include/asm-ia64/dom_fw_common.h	Thu Jul 05 13:38:35 2007 -0600
     2.2 +++ b/xen/include/asm-ia64/dom_fw_common.h	Mon Jul 09 08:33:02 2007 -0600
     2.3 @@ -51,7 +51,6 @@ typedef struct xc_dom_image domain_t;
     2.4  
     2.5  #define NFUNCPTRS               16
     2.6  #define NUM_EFI_SYS_TABLES      6
     2.7 -#define NUM_MEM_DESCS           64 //large enough
     2.8  
     2.9  struct fw_tables {
    2.10      efi_system_table_t                  efi_systab;