From: Christoph Hellwig <hch@infradead.org>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] split contig and discontig paging_init functions
Date: Wed, 08 Oct 2003 14:31:47 +0000 [thread overview]
Message-ID: <marc-linux-ia64-106562379402836@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-106547645502436@msgid-missing>
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)
next prev parent reply other threads:[~2003-10-08 14:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-06 21:34 [PATCH] split contig and discontig paging_init functions Jesse Barnes
2003-10-08 14:31 ` Christoph Hellwig [this message]
2003-10-08 17:39 ` Jesse Barnes
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-ia64-106562379402836@msgid-missing \
--to=hch@infradead.org \
--cc=linux-ia64@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox