Re: [PATCH] split contig and discontig paging_init functions

From: Christoph Hellwig <hch_at_infradead.org>
Date: 2003-10-09 00:31:47
On Mon, Oct 06, 2003 at 02:34:23PM -0700, Jesse Barnes wrote:
>  #include <asm/pgtable.h>
>  #include <asm/sections.h>
>  
> +#ifdef CONFIG_VIRTUAL_MEM_MAP
> +static unsigned long num_dma_physpages;
> +#endif

Shouldn't this move down to the ifdef block where it's actually used?

> +	if (max_gap < LARGE_GAP) {
> +		vmem_map = (struct page *) 0;
> +		free_area_init_node(0, &contig_page_data, NULL, zones_size, 0,
> +				    zholes_size);
> +		mem_map = contig_page_data.node_mem_map;
> +	}
> +	else {
> +		unsigned long map_size;
> +
> +		/* allocate virtual_mem_map */
> +
> +		map_size = PAGE_ALIGN(max_low_pfn * sizeof(struct page));
> +		vmalloc_end -= map_size;
> +		vmem_map = (struct page *) vmalloc_end;
> +		efi_memmap_walk(create_mem_map_page_table, 0);
> +
> +		free_area_init_node(0, &contig_page_data, vmem_map, zones_size,
> +				    0, zholes_size);
> +
> +		mem_map = contig_page_data.node_mem_map;
> +		printk("Virtual mem_map starts at 0x%p\n", mem_map);
> +	}

what about:

	if (max_gap >= LARGE_GAP) {
		vmalloc_end -= PAGE_ALIGN(max_low_pfn * sizeof(struct page));
		vmem_map = (struct page *)vmalloc_end;
		efi_memmap_walk(create_mem_map_page_table, 0);
	}

	free_area_init_node(0, &contig_page_data, vmem_map, zones_size, 0,
				    zholes_size);
	mem_map = contig_page_data.node_mem_map;

(vmem_map is in .bss and thus implicitly NULL)
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Wed Oct 8 10:36:34 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:19 EST