[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Wed, 08 Aug 2007 08:11:34 -0700
From: Dave Hansen <haveblue@...ibm.com>
To: Christian Ehrhardt <Christian_Ehrhardt@...ua.de>
Cc: linux-kernel@...r.kernel.org, serue@...ibm.com
Subject: Re: [RFC][PATCH 2/5] pagemap: use PAGE_MASK/PAGE_ALIGN()
On Wed, 2007-08-08 at 09:38 +0200, Christian Ehrhardt wrote:
>
> > ret = -ENOMEM;
> > - uaddr = (unsigned long)buf & ~(PAGE_SIZE-1);
> > + uaddr = (unsigned long)buf & PAGE_MASK;
> > uend = (unsigned long)(buf + count);
> > - pagecount = (uend - uaddr + PAGE_SIZE-1) / PAGE_SIZE;
> > + pagecount = (uend - PAGE_ALIGN(uaddr)) / PAGE_SIZE;
>
> Unless I'm missing something the PAGE_ALIGN as ist stands is now a NOP
> because uaddr is already page aligned. You probably wanted to
> PAGE_ALIGN(uend). However, this will likely add an additional instruction
> to the generated code.
Yeah, I aligned the wrong thing. I'll fix that up.
-- Dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists