Re: [PATCH 3/6] powerpc: add memory map support to Freescale RapidIO block
From: Li Yang
Date: Thu May 21 2009 - 06:43:36 EST
On Wed, May 13, 2009 at 6:05 AM, Andrew Morton
<akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
> On Tue, 12 May 2009 16:36:00 +0800
> Li Yang <leoli@xxxxxxxxxxxxx> 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.
Will change to use ilog2().
_ALIGN_DOWN() gets a lower aligned address while ALIGN() gets a higher
address. It seems that we don't have a general helper to do the same.
- Leo
--
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/