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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
> 






[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux