mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Liviu Dudau <Liviu.Dudau@arm.com>, Laura Abbott <labbott@redhat.com>
Cc: "Sumit Semwal" <sumit.semwal@linaro.org>,
	"John Stultz" <john.stultz@linaro.org>,
	"Arve Hjønnevåg" <arve@android.com>,
	"Riley Andrews" <riandrews@android.com>,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	linaro-mm-sig@lists.linaro.org, devel@driverdev.osuosl.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will.deacon@arm.com>,
	"Eun Taik Lee" <eun.taik.lee@samsung.com>,
	"Rohit kumar" <rohit.kr@samsung.com>,
	"Jon Medhurst" <tixy@linaro.org>,
	"Mitchel Humpherys" <mitchelh@codeaurora.org>,
	"Jeremy Gebben" <jgebben@codeaurora.org>,
	"Bryan Huntsman" <bryanh@codeaurora.org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Android Kernel Team" <kernel-team@android.com>
Subject: Re: [RFC][PATCH 1/3] staging: ion: Move away from the DMA APIs for cache flushing
Date: Thu, 26 May 2016 11:59:22 +0100	[thread overview]
Message-ID: <20160526105922.GH19428@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20160526095835.GT23566@e106497-lin.cambridge.arm.com>

On Thu, May 26, 2016 at 10:58:35AM +0100, Liviu Dudau wrote:
> On Wed, May 25, 2016 at 12:48:02PM -0700, Laura Abbott wrote:
> > 
> > Ion is currently using the DMA APIs in non-compliant ways for cache
> > maintaince. The issue is Ion needs to do cache operations outside of
> > the regular DMA model. The Ion model matches more closely with the
> > DRM model which calls cache APIs directly. Add an appropriate
> > abstraction layer for Ion to call cache operations outside of the
> > DMA API.

I _really_ hate seeing architecture internal functions being abused in
drivers - architecture internal functions are there to implement the
official kernel APIs and are not for drivers to poke about with.

I've had this happen several times, and each time it makes maintanence
of architecture code harder than it should be.

In any case, the functions you are using are probably not appropriate -
the way I've defined the architecture internal functions is for each
to have a specific purpose.  Eg, if caches need flushing when page tables
change, then the function gets implemented, otherwise it's a no-op.  Using
a function which _seems_ to do the right thing today in a way which is
against its purpose is a recipe for your code breaking.

If you need something from the architecture which isn't already provided,
then you need to talk to architecture people about proposing an official
interface to that functionality, rather than trying to bolt per-
architecture shims into drivers.

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.

  reply	other threads:[~2016-05-26 10:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-25 19:48 [RFC][PATCH 0/3] Clean up Ion mapping/caching Laura Abbott
2016-05-25 19:48 ` [RFC][PATCH 1/3] staging: ion: Move away from the DMA APIs for cache flushing Laura Abbott
2016-05-26  9:58   ` Liviu Dudau
2016-05-26 10:59     ` Russell King - ARM Linux [this message]
2016-05-26 12:06       ` Christoph Hellwig
2016-06-03  1:57   ` [Linaro-mm-sig] " Li, Xiaoquan
2016-05-25 19:48 ` [RFC][PATCH 2/3] staging: ion: Add support for syncing with DMA_BUF_IOCTL_SYNC Laura Abbott
2016-05-25 19:48 ` [RFC][PATCH 3/3] staging: ion: Add dma_map/dma_unmap calls to dma_buf calls Laura Abbott

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=20160526105922.GH19428@n2100.arm.linux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=Liviu.Dudau@arm.com \
    --cc=arve@android.com \
    --cc=bryanh@codeaurora.org \
    --cc=catalin.marinas@arm.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=devel@driverdev.osuosl.org \
    --cc=eun.taik.lee@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jgebben@codeaurora.org \
    --cc=john.stultz@linaro.org \
    --cc=kernel-team@android.com \
    --cc=labbott@redhat.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitchelh@codeaurora.org \
    --cc=riandrews@android.com \
    --cc=rohit.kr@samsung.com \
    --cc=sumit.semwal@linaro.org \
    --cc=tixy@linaro.org \
    --cc=will.deacon@arm.com \
    /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

all inboxes | Powered by JetHome®