On Mon, 28 May 2007 21:16:32 +0200
Geert Uytterhoeven <[EMAIL PROTECTED]> wrote:
> -#define __page_address(page) (PAGE_OFFSET + (((page) - mem_map) <<
> PAGE_SHIFT))
> -#define page_to_phys(page) virt_to_phys((void *)__page_address(page))
> +#ifdef CONFIG_SINGLE_MEMORY_CHUNK
> +#define page_to_phys(page) \
> + __pa(PAGE_OFFSET + (((page) - pg_data_map[0].node_mem_map) <<
> PAGE_SHIFT))
> +#else
> +#define page_to_phys(page) ({
> \
> + struct pglist_data *pgdat; \
> + pgdat = pg_data_table[page_to_nid(page)]; \
> + page_to_pfn(page) << PAGE_SHIFT; \
> +})
> +#endif
macros which evaluate their args more than once are dangerous.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/