public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: rabin@rab.in (Rabin Vincent)
To: linux-arm-kernel@lists.infradead.org
Subject: [Bug] VCHIQ functional test broken
Date: Thu, 20 Apr 2017 21:58:40 +0200	[thread overview]
Message-ID: <20170420195822.GA22677@laptop> (raw)
In-Reply-To: <87pog7x7c5.fsf@eliezer.anholt.net>

On Thu, Apr 20, 2017 at 11:27:38AM -0700, Eric Anholt wrote:
> I'm confused by what you're saying here.  The driver has already been
> converted to not use dmac_map_area (commit
> cf9caf1929882b66922aee698e99e6c8f357bee5), and uses dma_map_sg instead,
> matching the radeon driver you give as a model as far as I can see.
> That commit is in v4.11-rc6 from Stefan's regression report.

Right.  Sorry.  I must have had an old tag checked out when I looked at
the driver earlier.  The DMA API usage in the driver in v4.11-rc6 and
current master looks fine, except for one thing:

The flush in flush_dcache_page() (from get_user_pages()) was done with a
v6_flush_kern_dcache_page() which always did a clean+invalidate while
the DMA API only does what is required by the direction, which is only a
invalidate for DMA_FROM_DEVICE.  Since the driver calls dma_from_sg() on
the entire page, even if userspace sent in an offset into the page,
unrelated data in userspace may be thrown away.

Does changing the dma API calls to always use DMA_BIDIRECTIONAL make the
test pass?

  reply	other threads:[~2017-04-20 19:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <331235003.222371.1491934205807@email.1und1.de>
2017-04-13 17:41 ` [Bug] VCHIQ functional test broken Stefan Wahren
2017-04-13 22:29   ` Russell King - ARM Linux
2017-04-14  7:41     ` Rabin Vincent
2017-04-14  8:32       ` Stefan Wahren
2017-04-20 18:27       ` Eric Anholt
2017-04-20 19:58         ` Rabin Vincent [this message]
2017-04-20 21:20           ` Eric Anholt
2017-04-24 16:12           ` Stefan Wahren
2017-04-24 16:40             ` Russell King - ARM Linux
2017-04-24 17:42               ` Stefan Wahren
2017-04-24 18:59                 ` Russell King - ARM Linux
2017-04-24 19:35                   ` Stefan Wahren
2017-05-13  9:07                     ` Stefan Wahren
2017-05-13  9:30                       ` Russell King - ARM Linux
2017-05-15 14:29                         ` Phil Elwell
2017-05-15 14:54                           ` Stefan Wahren
2017-05-15 15:05                             ` Phil Elwell

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=20170420195822.GA22677@laptop \
    --to=rabin@rab.in \
    --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