linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bugfix to commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15
@ 2007-10-23 15:20 Grant Likely
  2007-10-23 15:27 ` Josh Boyer
  2007-10-23 15:35 ` Grant Likely
  0 siblings, 2 replies; 3+ messages in thread
From: Grant Likely @ 2007-10-23 15:20 UTC (permalink / raw)
  To: linux-kernel, Jens, Axboe <jens.axboe, linuxppc-dev,
	Linus Torvalds, paulus

From: Grant Likely <grant.likely@secretlab.ca>

Fixup for commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15.  Changes to
dma_map_sg where done in asm-x86/dma-mapping_32.h, but were not mirrored
in include/asm-powerpc/dma-mapping.h

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

Linus, I cannot build an arch/powerpc kernel without this patch.

Cheers,
g.

 include/asm-powerpc/dma-mapping.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h
index 65be95d..fd33ce4 100644
--- a/include/asm-powerpc/dma-mapping.h
+++ b/include/asm-powerpc/dma-mapping.h
@@ -285,9 +285,9 @@ dma_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
 	BUG_ON(direction == DMA_NONE);
 
 	for_each_sg(sgl, sg, nents, i) {
-		BUG_ON(!sg->page);
+		BUG_ON(!sg_page(sg));
 		__dma_sync_page(sg->page, sg->offset, sg->length, direction);
-		sg->dma_address = page_to_bus(sg->page) + sg->offset;
+		sg->dma_address = sg_phys(sg);
 	}
 
 	return nents;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bugfix to commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15
  2007-10-23 15:20 [PATCH] Bugfix to commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15 Grant Likely
@ 2007-10-23 15:27 ` Josh Boyer
  2007-10-23 15:35 ` Grant Likely
  1 sibling, 0 replies; 3+ messages in thread
From: Josh Boyer @ 2007-10-23 15:27 UTC (permalink / raw)
  To: Grant Likely
  Cc: linux-kernel, Jens, Axboe <jens.axboe, linuxppc-dev,
	Linus Torvalds, paulus

On Tue, 23 Oct 2007 09:20:25 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:

> From: Grant Likely <grant.likely@secretlab.ca>
> 
> Fixup for commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15.  Changes to
> dma_map_sg where done in asm-x86/dma-mapping_32.h, but were not mirrored
> in include/asm-powerpc/dma-mapping.h
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
> 
> Linus, I cannot build an arch/powerpc kernel without this patch.

Olof Johansson already sent a patch out for this that had some other
fixes in it.  I think Jens already applied it to his tree.

josh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bugfix to commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15
  2007-10-23 15:20 [PATCH] Bugfix to commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15 Grant Likely
  2007-10-23 15:27 ` Josh Boyer
@ 2007-10-23 15:35 ` Grant Likely
  1 sibling, 0 replies; 3+ messages in thread
From: Grant Likely @ 2007-10-23 15:35 UTC (permalink / raw)
  To: linux-kernel, Jens Axboe, linuxppc-dev, Linus Torvalds, paulus

On 10/23/07, Grant Likely <grant.likely@secretlab.ca> wrote:
> From: Grant Likely <grant.likely@secretlab.ca>
>
> Fixup for commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15.  Changes to
> dma_map_sg where done in asm-x86/dma-mapping_32.h, but were not mirrored
> in include/asm-powerpc/dma-mapping.h
>
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> ---
>
> Linus, I cannot build an arch/powerpc kernel without this patch.

Oops, ignore this patch.  It's doesn't change all the references, it
uses the wrong method for calculating dma_address and 2 other people
have already sent the fix for this.

/me puts on a paper bag
g.

>
> Cheers,
> g.
>
>  include/asm-powerpc/dma-mapping.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/asm-powerpc/dma-mapping.h b/include/asm-powerpc/dma-mapping.h
> index 65be95d..fd33ce4 100644
> --- a/include/asm-powerpc/dma-mapping.h
> +++ b/include/asm-powerpc/dma-mapping.h
> @@ -285,9 +285,9 @@ dma_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
>         BUG_ON(direction == DMA_NONE);
>
>         for_each_sg(sgl, sg, nents, i) {
> -               BUG_ON(!sg->page);
> +               BUG_ON(!sg_page(sg));
>                 __dma_sync_page(sg->page, sg->offset, sg->length, direction);
> -               sg->dma_address = page_to_bus(sg->page) + sg->offset;
> +               sg->dma_address = sg_phys(sg);
>         }
>
>         return nents;
>
>


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-10-23 15:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-23 15:20 [PATCH] Bugfix to commit 18dabf473e15850c0dbc8ff13ac1e2806d542c15 Grant Likely
2007-10-23 15:27 ` Josh Boyer
2007-10-23 15:35 ` Grant Likely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).