All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: "Ian Campbell" <Ian.Campbell@citrix.com>, 杜琪 <duqi_2009@163.com>,
	"Stefano Stabellini" <stefano.stabellini@citrix.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	"bjzhang@suse.com" <bjzhang@suse.com>
Subject: Re: cubieboard2's sd/mmc driver on xen about DMA read data error
Date: Wed, 02 Apr 2014 10:44:23 +0100	[thread overview]
Message-ID: <533BDBF7.5000309@linaro.org> (raw)
In-Reply-To: <1396423235.26869.60.camel@dagon.hellion.org.uk>



On 02/04/14 08:20, Ian Campbell wrote:
> On Wed, 2014-04-02 at 00:10 +0800, 杜琪 wrote:
>> Hi all,

Hello,

>>       I have got this kernel with mmc driver on cubieboard2 from :
>> https://github.com/jwrdegoede/linux-sunxi.git  (test branch) .
>>       I  have made the Xen's Dom0 configuration according
>> this :http://wiki.xenproject.org/wiki/Mainline_Linux_Kernel_Configs.
>> and the kernel can be booted by Xen4.4.
>>       The question we met is that some CMD can be
>> accepted(CMD7,CMD0 ....) and but some can't(CMD52,CMD5,CMD51).
>>       We have found that the CMD51 is attempted to read the data from
>> SD card to memory through DMA , so we replaced all the dma_ops with
>> xen_dma_ops , where it is in struct "dma_map_ops xen_swiotlb_dma_ops"
>> in arch/arm/xen/mm.c.

Can you give more input? (Xen log, ...) DOM0 has a 1:1 mapping layout, 
so the swiotlb should not change anything.

With the 1:1 mapping, the driver can safely use DMA, can you try to see 
which address is used by the DMA request?

> Do I understand correctly that you have solved the issue by doing this?
> If so then please could you send a patch. The process for submitting a
> patch to Linux is described in Documentation/SubmittingPatches.

Using swiotlb everywhere is just too slow. That's why Stefano took an 
hybrid approach (1:1 mapping + bouncing for foreign pages).

Regards,

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2014-04-02  9:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 16:10 cubieboard2's sd/mmc driver on xen about DMA read data error 杜琪
2014-04-02  7:20 ` Ian Campbell
2014-04-02  9:44   ` Julien Grall [this message]
     [not found]     ` <3bdbc8fa.25a26.14522d200a4.Coremail.duqi_2009@163.com>
2014-04-02 14:26       ` Julien Grall
2014-04-02 14:59     ` 杜琪
2014-04-03 10:17     ` Stefano Stabellini
2014-04-03 10:56   ` Stefano Stabellini
2014-04-03 11:45     ` Ian Campbell
2014-04-03 17:18       ` Stefano Stabellini
2014-04-04  7:16     ` 杜琪
2014-04-04  7:37     ` duqi
2014-04-04 11:19       ` Stefano Stabellini
2014-04-02  9:52 ` Ian Campbell
2014-04-03  3:08   ` 杜琪
2014-04-03  3:09   ` 杜琪
2014-04-03  9:34     ` Ian Campbell
2014-04-04  7:28       ` 杜琪
2014-04-04  8:20         ` Julien Grall
2014-04-04  7:36       ` duqi

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=533BDBF7.5000309@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=Ian.Campbell@citrix.com \
    --cc=bjzhang@suse.com \
    --cc=duqi_2009@163.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.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.