All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Dickgreber <tanzy@gmx.de>
To: Kumba <kumba@gentoo.org>
Cc: Linux MIPS List <linux-mips@linux-mips.org>
Subject: Re: [PATCH/RFC]: SGI Octane (IP30) Patches, Part two, Octane core
Date: Mon, 04 Aug 2008 22:29:47 +0200	[thread overview]
Message-ID: <489766BB.5090607@gmx.de> (raw)
In-Reply-To: <48914C74.6090309@gentoo.org>

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
> 

  reply	other threads:[~2008-08-04 20:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31  5:24 [PATCH/RFC]: SGI Octane (IP30) Patches, Part two, Octane core Kumba
2008-08-04 20:29 ` Johannes Dickgreber [this message]
2008-08-04 20:54 ` Johannes Dickgreber
2008-08-04 21:26 ` Johannes Dickgreber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=489766BB.5090607@gmx.de \
    --to=tanzy@gmx.de \
    --cc=kumba@gentoo.org \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.