linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] alpha: fix sg_page breakage
@ 2007-11-19 15:00 FUJITA Tomonori
  2007-11-19 15:05 ` FUJITA Tomonori
  2007-11-21 11:26 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: FUJITA Tomonori @ 2007-11-19 15:00 UTC (permalink / raw)
  To: jens.axboe; +Cc: fujita.tomonori, linux-kernel

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 arch/alpha/kernel/pci-noop.c |   14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/alpha/kernel/pci-noop.c b/arch/alpha/kernel/pci-noop.c
index 174b729..468b76c 100644
--- a/arch/alpha/kernel/pci-noop.c
+++ b/arch/alpha/kernel/pci-noop.c
@@ -12,6 +12,7 @@
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/dma-mapping.h>
+#include <linux/scatterlist.h>
 
 #include "proto.h"
 
@@ -172,18 +173,19 @@ dma_alloc_coherent(struct device *dev, size_t size,
 EXPORT_SYMBOL(dma_alloc_coherent);
 
 int
-dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+dma_map_sg(struct device *dev, struct scatterlist *sgl, int nents,
 	   enum dma_data_direction direction)
 {
 	int i;
+	struct scatterlist *sg;
 
-	for (i = 0; i < nents; i++ ) {
+	for_each_sg(sgl, sg, nents, i) {
 		void *va;
 
-		BUG_ON(!sg[i].page);
-		va = page_address(sg[i].page) + sg[i].offset;
-		sg_dma_address(sg + i) = (dma_addr_t)virt_to_bus(va);
-		sg_dma_len(sg + i) = sg[i].length;
+		BUG_ON(!sg_page(sg));
+		va = sg_virt(sg);
+		sg_dma_address(sg) = (dma_addr_t)virt_to_bus(va);
+		sg_dma_len(sg) = sg->length;
 	}
 
 	return nents;
-- 
1.5.3.4


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

* Re: [PATCH] alpha: fix sg_page breakage
  2007-11-19 15:00 [PATCH] alpha: fix sg_page breakage FUJITA Tomonori
@ 2007-11-19 15:05 ` FUJITA Tomonori
  2007-11-21 11:26 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: FUJITA Tomonori @ 2007-11-19 15:05 UTC (permalink / raw)
  To: jens.axboe; +Cc: fujita.tomonori, linux-kernel

On Tue, 20 Nov 2007 00:00:41 +0900
FUJITA Tomonori <tomof@acm.org> wrote:

> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
>  arch/alpha/kernel/pci-noop.c |   14 ++++++++------
>  1 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/alpha/kernel/pci-noop.c b/arch/alpha/kernel/pci-noop.c

Oops, this should have been [PATCH 1/2] and 'kill deprecated
virt_to_bus' should have been [PATCH 2/2].

Thanks,

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

* Re: [PATCH] alpha: fix sg_page breakage
  2007-11-19 15:00 [PATCH] alpha: fix sg_page breakage FUJITA Tomonori
  2007-11-19 15:05 ` FUJITA Tomonori
@ 2007-11-21 11:26 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2007-11-21 11:26 UTC (permalink / raw)
  To: FUJITA Tomonori; +Cc: fujita.tomonori, linux-kernel

On Tue, Nov 20 2007, FUJITA Tomonori wrote:
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>

applied

-- 
Jens Axboe


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

end of thread, other threads:[~2007-11-21 11:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-19 15:00 [PATCH] alpha: fix sg_page breakage FUJITA Tomonori
2007-11-19 15:05 ` FUJITA Tomonori
2007-11-21 11:26 ` Jens Axboe

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).