[PATCH 3/6] powerpc: add memory map support to Freescale RapidIO block

Andrew Morton akpm at linux-foundation.org
Wed May 13 08:05:52 EST 2009


On Tue, 12 May 2009 16:36:00 +0800
Li Yang <leoli at freescale.com> wrote:

> +	align = (size < 0x1000) ? 0x1000 : 1 << (__ilog2(size - 1) + 1);
> +
> +	/* Align the size */
> +	if ((lstart + size) > (_ALIGN_DOWN(lstart, align) + align)) {

__ilog2() and _ALIGN_DOWN() are powerpc-specific functions.  It would
be preferable to use more general helpers if possible.  ALIGN() and ilog2()
might suit here.





More information about the Linuxppc-dev mailing list