Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1407515

Re: [RFC][PATCH 1/3] staging: ion: Move away from the DMA APIs for cache flushing

Path csiph.com!feeder.erje.net!1.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Russell King - ARM Linux <linux@armlinux.org.uk>
Newsgroups linux.kernel
Subject Re: [RFC][PATCH 1/3] staging: ion: Move away from the DMA APIs for cache flushing
Date Thu, 26 May 2016 13:00:01 +0200
Message-ID <rD1bb-5oe-3@gated-at.bofh.it> (permalink)
References <rCMYx-4Va-9@gated-at.bofh.it> <rCN8d-4Yr-3@gated-at.bofh.it> <rD0f8-4Ml-17@gated-at.bofh.it>
X-Original-To Liviu Dudau <Liviu.Dudau@arm.com>, Laura Abbott <labbott@redhat.com>
Dkim-Signature v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=E/t6I8Fbq9J9WfC268GThilUPv2cfxQTtR2zLydsYdM=; b=QDF+qnsI5sU9EXn6eQ/IkBGploWLvoKnQa5U0I0NWo3JZD6/Abt/corhQfFSuAfJ6oUy+OcdwkN+zRc4ZeLzakujckAo39voB4dVBsnamxBX7pyI0hzHMEJgMwzbuWdeAs/D/cNeZNVjB4xjR2OKMXsztE1q569RcC4It3mls98=;
MIME-Version 1.0
Content-Type text/plain; charset=us-ascii
Content-Disposition inline
User-Agent Mutt/1.5.23 (2014-03-12)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 33
Organization linux.* mail to news gateway
X-Original-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>
X-Original-Date Thu, 26 May 2016 11:59:22 +0100
X-Original-Message-ID <20160526105922.GH19428@n2100.arm.linux.org.uk>
X-Original-References <1464205684-5587-1-git-send-email-labbott@redhat.com> <1464205684-5587-2-git-send-email-labbott@redhat.com> <20160526095835.GT23566@e106497-lin.cambridge.arm.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1407515

Show key headers only | View raw


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.

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC][PATCH 1/3] staging: ion: Move away from the DMA APIs for cache flushing Laura Abbott <labbott@redhat.com> - 2016-05-25 22:00 +0200
  Re: [RFC][PATCH 1/3] staging: ion: Move away from the DMA APIs for  cache flushing Liviu Dudau <Liviu.Dudau@arm.com> - 2016-05-26 12:00 +0200
    Re: [RFC][PATCH 1/3] staging: ion: Move away from the DMA APIs for  cache flushing Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-05-26 13:00 +0200
      Re: [RFC][PATCH 1/3] staging: ion: Move away from the DMA APIs for  cache flushing Christoph Hellwig <hch@infradead.org> - 2016-05-26 14:10 +0200

csiph-web