public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: wsa@the-dreams.de (Wolfram Sang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/3] i2c: Add helper to ease DMA handling
Date: Thu, 9 Aug 2018 11:23:40 +0200	[thread overview]
Message-ID: <20180809092340.rm4ywre543hpejne@katana> (raw)
In-Reply-To: <1533806000.3347.6.camel@mtksdaap41>

Hi,

> I believe the reason for these api is because some arch changed to can
> not do DMA on stack recently. Maybe we should have dma_mapping to bounce

It is not only arch dependent. You can enable virtual stacks in Kconfig,
too.

> buffer like it bounce un-dma-able address for those arch? or we should
> have a common driver API for this, not just for i2c?

I gave a talk about this problem recently and everyone in the room
agreed the best thing would be to have annotated buffers which can be
used kernel-wide. Someone mentioned DMABUF could be a candidate, but I
haven't looked further into that.

So, yes, a bigger solution is needed but I don't see that coming soon,
so I implemented the I2C part for better safety now. I'd be happy to
remove all that again once we have the annotated buffers. But it is an
effort...

Regards,

   Wolfram

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20180809/c58411fe/attachment.sig>

  reply	other threads:[~2018-08-09  9:23 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-07  9:29 [PATCH v2 0/3] Register i2c adapter driver earlier and use DMA safe buffers Jun Gao
2018-07-07  9:29 ` [PATCH v2 1/3] i2c: mediatek: Register i2c adapter driver earlier Jun Gao
2018-08-08 20:40   ` Wolfram Sang
2018-07-07  9:29 ` [PATCH v2 2/3] i2c: Add helper to ease DMA handling Jun Gao
2018-07-08 11:58   ` Peter Rosin
2018-07-08 12:46     ` Peter Rosin
2018-08-08 20:57   ` Wolfram Sang
2018-08-09  9:13     ` Yingjoe Chen
2018-08-09  9:23       ` Wolfram Sang [this message]
2018-07-07  9:29 ` [PATCH v2 3/3] i2c: mediatek: Use DMA safe buffers for i2c transactions Jun Gao

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=20180809092340.rm4ywre543hpejne@katana \
    --to=wsa@the-dreams.de \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox