* [PATCH 3/4] vmm: Use proper macros
@ 2006-10-12 19:18 Christoph Lameter
0 siblings, 0 replies; only message in thread
From: Christoph Lameter @ 2006-10-12 19:18 UTC (permalink / raw)
To: linux-ia64
IA64: Use proper macros for vmem_map calculations
There are some expressions in init.c that manually do what pfn_to_page
and virt_to_page do.
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Index: linux-2.6.18-mm3/arch/ia64/mm/init.c
=================================--- linux-2.6.18-mm3.orig/arch/ia64/mm/init.c 2006-10-06 18:21:12.881827880 -0700
+++ linux-2.6.18-mm3/arch/ia64/mm/init.c 2006-10-06 18:30:37.376338346 -0700
@@ -421,11 +421,11 @@ int vmemmap_find_next_valid_pfn(int node
unsigned long stop_address;
pg_data_t *pgdat = NODE_DATA(node);
- end_address = (unsigned long) &vmem_map[pgdat->node_start_pfn + i];
+ end_address = (unsigned long)pfn_to_page(pgdat->node_start_pfn + i);
end_address = PAGE_ALIGN(end_address);
- stop_address = (unsigned long) &vmem_map[
- pgdat->node_start_pfn + pgdat->node_spanned_pages];
+ stop_address = (unsigned long)pfn_to_page(pgdat->node_start_pfn +
+ pgdat->node_spanned_pages);
do {
pgd_t *pgd;
@@ -482,8 +482,8 @@ create_mem_map_page_table (u64 start, u6
pmd_t *pmd;
pte_t *pte;
- map_start = vmem_map + (__pa(start) >> PAGE_SHIFT);
- map_end = vmem_map + (__pa(end) >> PAGE_SHIFT);
+ map_start = virt_to_page(start);
+ map_end = virt_to_page(end);
start_page = (unsigned long) map_start & PAGE_MASK;
end_page = PAGE_ALIGN((unsigned long) map_end);
@@ -524,8 +524,8 @@ virtual_memmap_init (u64 start, u64 end,
struct page *map_start, *map_end;
args = (struct memmap_init_callback_data *) arg;
- map_start = vmem_map + (__pa(start) >> PAGE_SHIFT);
- map_end = vmem_map + (__pa(end) >> PAGE_SHIFT);
+ map_start = virt_to_page(start);
+ map_end = virt_to_page(end);
if (map_start < args->start)
map_start = args->start;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-12 19:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-12 19:18 [PATCH 3/4] vmm: Use proper macros Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox