Re: [PATCH] mm/nommu.c:Dynamic alloc/free percpu area for nommu

From: graff yang
Date: Mon Mar 22 2010 - 22:33:55 EST


On Mon, Mar 22, 2010 at 7:50 PM, David Howells <dhowells@xxxxxxxxxx> wrote:
> <graff.yang@xxxxxxxxx> wrote:
>
>> - Â Â return virt_to_page(addr);
>> + Â Â return (struct page *)
>> + Â Â Â Â Â Â Â Â Â Â (virt_to_page(addr)->index) ? : virt_to_page(addr);
>
> Can the extra conditional operator be made subject to CONFIG_SMP?

OK.
Tejun is looking into the up layer percpu code. So I expecting there
is better way
to hook nommu in.


>
>> - Â Â return page_to_pfn(virt_to_page(addr));
>> + Â Â return page_to_pfn((struct page *)
>> + Â Â Â Â Â Â Â Â Â Â (virt_to_page(addr)->index) ? : virt_to_page(addr));
>
> Ditto.
>
>> +#ifdef CONFIG_SMP
>> ...
>> +#endif
>
> Can this be put into a separate file? ÂThere's rather a lot in mm/nommu.c
> these days.
>
> David
>



--
-Graff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/