Sorry for the late response,

On Mon, 11 Feb 2008 21:40:36 -0800 (PST)
David Miller <[EMAIL PROTECTED]> wrote:

> From: FUJITA Tomonori <[EMAIL PROTECTED]>
> Date: Thu, 07 Feb 2008 10:38:01 +0900
> 
> > Great, thanks! SPARC IOMMUs use bitmap for the free area management
> > like POWER IOMMUs so it could use lib/iommu-helper as POWER does.
> 
> Please look at Linus's current tree, I believe I have things
> in a working state, and the DMA mask portions should be easier
> to add now.

Thanks! It looks great.

iommu->page_table_map_base is on IO_PAGE_SIZE boundary? If so, the
following patch works, I think (sorry, it's only compile tested
again).

Thanks,

=
>From 91af83802c30d071f98444846e85310a8d58ab3d Mon Sep 17 00:00:00 2001
From: FUJITA Tomonori <[EMAIL PROTECTED]>
Date: Sat, 16 Feb 2008 14:29:02 +0900
Subject: [PATCH] sparc64: make IOMMU code respect the segment boundary limits

Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
---
 arch/sparc64/kernel/iommu.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c
index d3276eb..ffefbf7 100644
--- a/arch/sparc64/kernel/iommu.c
+++ b/arch/sparc64/kernel/iommu.c
@@ -134,7 +134,8 @@ unsigned long iommu_range_alloc(struct device *dev,
        else
                boundary_size = ALIGN(1UL << 32, 1 << IO_PAGE_SHIFT);
 
-       n = iommu_area_alloc(arena->map, limit, start, npages, 0,
+       n = iommu_area_alloc(arena->map, limit, start, npages,
+                            iommu->page_table_map_base >> IO_PAGE_SHIFT,
                             boundary_size >> IO_PAGE_SHIFT, 0);
        if (n == -1) {
                if (likely(pass < 1)) {
-- 
1.5.3.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to