On Mon, 2007-04-23 at 22:45 +0200, Guennadi Liakhovetski wrote:
> On Mon, 23 Apr 2007, James Bottomley wrote:
>
> > On Mon, 2007-04-23 at 00:45 +0200, Guennadi Liakhovetski wrote:
> > > Right, thinko. How about using his:
> > >
> > > + int pages = DIV_ROUND_UP(size, PAGE_SIZE);
> >
> >
On Mon, 2007-04-23 at 22:45 +0200, Guennadi Liakhovetski wrote:
On Mon, 23 Apr 2007, James Bottomley wrote:
On Mon, 2007-04-23 at 00:45 +0200, Guennadi Liakhovetski wrote:
Right, thinko. How about using his:
+ int pages = DIV_ROUND_UP(size, PAGE_SIZE);
Actually, no ... this has
On Mon, 23 Apr 2007, James Bottomley wrote:
> On Mon, 2007-04-23 at 00:45 +0200, Guennadi Liakhovetski wrote:
> > Right, thinko. How about using his:
> >
> > + int pages = DIV_ROUND_UP(size, PAGE_SIZE);
>
> Actually, no ... this has to be size >> PAGE_SHIFT. The reason being
> that the
On Mon, 2007-04-23 at 00:45 +0200, Guennadi Liakhovetski wrote:
> Right, thinko. How about using his:
>
> + int pages = DIV_ROUND_UP(size, PAGE_SIZE);
Actually, no ... this has to be size >> PAGE_SHIFT. The reason being
that the allocator is designed to allocate pages out of a device
On Mon, 2007-04-23 at 00:45 +0200, Guennadi Liakhovetski wrote:
Right, thinko. How about using his:
+ int pages = DIV_ROUND_UP(size, PAGE_SIZE);
Actually, no ... this has to be size PAGE_SHIFT. The reason being
that the allocator is designed to allocate pages out of a device memory
On Mon, 23 Apr 2007, James Bottomley wrote:
On Mon, 2007-04-23 at 00:45 +0200, Guennadi Liakhovetski wrote:
Right, thinko. How about using his:
+ int pages = DIV_ROUND_UP(size, PAGE_SIZE);
Actually, no ... this has to be size PAGE_SHIFT. The reason being
that the allocator is
On Mon, 23 Apr 2007, Guennadi Liakhovetski wrote:
> to also allow for size not an integer number of pages as Andrew noticed?
> This could be done in 2 patches:
patch 2:
---
Fix bitmap allocation and size non-multiple of PAGE_SIZE in
dma_declare_coherent_memory implementations. i386
On Sun, 22 Apr 2007, James Bottomley wrote:
> On Fri, 2007-04-13 at 20:08 +0200, Guennadi Liakhovetski wrote:
> > - int bitmap_size = (pages + 31)/32;
> > + int bitmap_size = DIV_ROUND_UP(pages, 8);
>
> This isn't quite right. Bitmaps are arrays of longs, not arrays of
> bytes. The bug is
On Fri, 2007-04-13 at 20:08 +0200, Guennadi Liakhovetski wrote:
> Either I've finally gone blind on this Friday 13th or... Looks like this
> almost 3 year old function has a bug. Patch below compile-tested... in a
> way.
No, it's a longstanding bug in the x86 implementation, thanks for
finding
On Fri, 2007-04-13 at 20:08 +0200, Guennadi Liakhovetski wrote:
Either I've finally gone blind on this Friday 13th or... Looks like this
almost 3 year old function has a bug. Patch below compile-tested... in a
way.
No, it's a longstanding bug in the x86 implementation, thanks for
finding it.
On Sun, 22 Apr 2007, James Bottomley wrote:
On Fri, 2007-04-13 at 20:08 +0200, Guennadi Liakhovetski wrote:
- int bitmap_size = (pages + 31)/32;
+ int bitmap_size = DIV_ROUND_UP(pages, 8);
This isn't quite right. Bitmaps are arrays of longs, not arrays of
bytes. The bug is
On Mon, 23 Apr 2007, Guennadi Liakhovetski wrote:
to also allow for size not an integer number of pages as Andrew noticed?
This could be done in 2 patches:
patch 2:
---
Fix bitmap allocation and size non-multiple of PAGE_SIZE in
dma_declare_coherent_memory implementations. i386
On Sat, 21 Apr 2007, Andrew Morton wrote:
> On Fri, 13 Apr 2007 20:08:28 +0200 (CEST) Guennadi Liakhovetski <[EMAIL
> PROTECTED]> wrote:
>
> > Hi
> >
> > Either I've finally gone blind on this Friday 13th or... Looks like this
> > almost 3 year old function has a bug. Patch below
On Fri, 13 Apr 2007 20:08:28 +0200 (CEST) Guennadi Liakhovetski <[EMAIL
PROTECTED]> wrote:
> Hi
>
> Either I've finally gone blind on this Friday 13th or... Looks like this
> almost 3 year old function has a bug. Patch below compile-tested... in a
> way.
>
> Thanks
> Guennadi
> ---
>
On Fri, 13 Apr 2007 20:08:28 +0200 (CEST) Guennadi Liakhovetski [EMAIL
PROTECTED] wrote:
Hi
Either I've finally gone blind on this Friday 13th or... Looks like this
almost 3 year old function has a bug. Patch below compile-tested... in a
way.
Thanks
Guennadi
---
Guennadi
On Sat, 21 Apr 2007, Andrew Morton wrote:
On Fri, 13 Apr 2007 20:08:28 +0200 (CEST) Guennadi Liakhovetski [EMAIL
PROTECTED] wrote:
Hi
Either I've finally gone blind on this Friday 13th or... Looks like this
almost 3 year old function has a bug. Patch below compile-tested... in a
Hi
Either I've finally gone blind on this Friday 13th or... Looks like this
almost 3 year old function has a bug. Patch below compile-tested... in a
way.
Thanks
Guennadi
---
Guennadi Liakhovetski
dma_declare_coherent_memory() allocates a bitmap 1 bit per page, it
calculates the bitmap size
Hi
Either I've finally gone blind on this Friday 13th or... Looks like this
almost 3 year old function has a bug. Patch below compile-tested... in a
way.
Thanks
Guennadi
---
Guennadi Liakhovetski
dma_declare_coherent_memory() allocates a bitmap 1 bit per page, it
calculates the bitmap size
18 matches
Mail list logo