linux-mips
[Top] [All Lists]

Re: [PATCH/RFC]: SGI Octane (IP30) Patches, Part two, Octane core

To: Kumba <kumba@gentoo.org>
Subject: Re: [PATCH/RFC]: SGI Octane (IP30) Patches, Part two, Octane core
From: Johannes Dickgreber <tanzy@gmx.de>
Date: Mon, 04 Aug 2008 22:29:47 +0200
Cc: Linux MIPS List <linux-mips@linux-mips.org>
In-reply-to: <48914C74.6090309@gentoo.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <48914C74.6090309@gentoo.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Thunderbird 2.0.0.6 (X11/20070801)
Kumba schrieb:
> 
> The second part is the actual IP30 Patch that makes these beasts boot. 
> Assuming you've already lit incense candles and sacrificed a PC to the
> MIPS Gods above.
> 
> There's one change that probably needs good scrutiny, as it changes a
> value in dma-default.c, and this'll affect other systems:
> 
> diff -Naurp linux-2.6.26.orig/arch/mips/mm/dma-default.c
> linux-2.6.26/arch/mips/mm/dma-default.c
> --- linux-2.6.26.orig/arch/mips/mm/dma-default.c        2008-07-13
> 17:51:29.000000000 -0400
> +++ linux-2.6.26/arch/mips/mm/dma-default.c     2008-07-25
> 03:14:40.000000000 -0400
> @@ -209,7 +209,7 @@ dma_addr_t dma_map_page(struct device *d
>                 dma_cache_wback_inv(addr, size);
>         }
> 
> -       return plat_map_dma_mem_page(dev, page) + offset;
> +       return plat_map_dma_mem_page(dev, page, size) + offset;
>  }
> 
I dont think that is needed.
IMHO This function schould map a whole page,
offset and size are only used for a part of that page. 
So i am using PAGE_SIZE in plat_map_dma_mem_page.

your version 
+static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page,
+                                       size_t size)
+{
+       dma_addr_t pa = dev_to_baddr(dev, page_to_phys(page), 0, size);
+
+       return pa;
+}
+

my version
+static dma_addr_t plat_map_dma_mem_page(struct device *dev, struct page *page,
+                                       size_t size)
+{
+       dma_addr_t pa = dev_to_baddr(dev, page_to_phys(page), 0, PAGE_SIZE);
+
+       return pa;
+}

Maybe it is only working, because the function dma_map_page is never used in my 
kernel.

> Thanks!,
> 
> 
> --Kumba
> 





<Prev in Thread] Current Thread [Next in Thread>