From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Russell King - ARM Linux <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
"Alexandre Courbot"
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Hiroshi Doyu" <hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
"Stephen Warren"
<swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
"Thierry Reding"
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"Heiko Stübner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
Subject: Re: [PATCH 00/18] Clean up exposure of arch-internal code
Date: Mon, 27 Jul 2015 15:13:13 +0200 [thread overview]
Message-ID: <20150727131313.GM10969@8bytes.org> (raw)
In-Reply-To: <20150727122824.GH7557-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
[+ Heiko for comment on Rockchip IOMMU]
On Mon, Jul 27, 2015 at 01:28:24PM +0100, Russell King - ARM Linux wrote:
> This series of patches attempts to clean up the use of architecture
> internal functions in drivers, and removes some functions from view
> in the asm/ headers. I'm also considering whether we need to add
> some linker magic to hide symbols when building the built-in.o files.
>
> This was triggered by 3rd party drivers "going under the covers" of
> the DMA API and calling the dmac_*() functions directly, a practice
> which I have always refused to allow. This also breaks module
> building (which is the big hint that they're doing something wrong.)
>
> However, it also came to light that various drivers are using
> __cpuc_* functions directly, which are non-portable, and is another
> instance of "going under the covers" and tinkering with what should
> be kept as architecture implementation details.
>
> This series addresses some of these points. It:
>
> (a) moves dmac_map_area() and dmac_unmap_area() prototypes out of
> asm/cacheflush.h and into arch/arm/mm.
> (b) provide a secure_flush() call for the Qualcomm secure monitor
> code.
> (c) stop tegra smmu driver(s) from using __cpuc_flush_dcache_area,
> something which necessitates additional complexity to deal with
> the ARM vs ARM64 differences. It should be using the DMA API.
> However, the Tegra SMMU driver is in really bad shape, and this
> isn't a simple conversion - it requires a lot of additional
> fixes to bring the code up to scratch.
>
> It leaves the Rockchip IOMMU driver for the time being, but that is also
> something which needs cleaning up in the same way as the Tegra SMMU
> driver.
>
> arch/arm/include/asm/cacheflush.h | 21 ++-
> arch/arm/include/asm/glue-cache.h | 2 -
> arch/arm/mm/dma-mapping.c | 1 +
> arch/arm/mm/dma.h | 32 ++++
> drivers/firmware/qcom_scm-32.c | 4 +-
> drivers/iommu/tegra-smmu.c | 297 ++++++++++++++++++++++++--------------
> drivers/memory/tegra/tegra114.c | 17 ---
> drivers/memory/tegra/tegra124.c | 30 ----
> drivers/memory/tegra/tegra30.c | 17 ---
> include/soc/tegra/mc.h | 7 -
> 10 files changed, 242 insertions(+), 186 deletions(-)
>
> --
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.
WARNING: multiple messages have this Message-ID (diff)
From: joro@8bytes.org (Joerg Roedel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/18] Clean up exposure of arch-internal code
Date: Mon, 27 Jul 2015 15:13:13 +0200 [thread overview]
Message-ID: <20150727131313.GM10969@8bytes.org> (raw)
In-Reply-To: <20150727122824.GH7557@n2100.arm.linux.org.uk>
[+ Heiko for comment on Rockchip IOMMU]
On Mon, Jul 27, 2015 at 01:28:24PM +0100, Russell King - ARM Linux wrote:
> This series of patches attempts to clean up the use of architecture
> internal functions in drivers, and removes some functions from view
> in the asm/ headers. I'm also considering whether we need to add
> some linker magic to hide symbols when building the built-in.o files.
>
> This was triggered by 3rd party drivers "going under the covers" of
> the DMA API and calling the dmac_*() functions directly, a practice
> which I have always refused to allow. This also breaks module
> building (which is the big hint that they're doing something wrong.)
>
> However, it also came to light that various drivers are using
> __cpuc_* functions directly, which are non-portable, and is another
> instance of "going under the covers" and tinkering with what should
> be kept as architecture implementation details.
>
> This series addresses some of these points. It:
>
> (a) moves dmac_map_area() and dmac_unmap_area() prototypes out of
> asm/cacheflush.h and into arch/arm/mm.
> (b) provide a secure_flush() call for the Qualcomm secure monitor
> code.
> (c) stop tegra smmu driver(s) from using __cpuc_flush_dcache_area,
> something which necessitates additional complexity to deal with
> the ARM vs ARM64 differences. It should be using the DMA API.
> However, the Tegra SMMU driver is in really bad shape, and this
> isn't a simple conversion - it requires a lot of additional
> fixes to bring the code up to scratch.
>
> It leaves the Rockchip IOMMU driver for the time being, but that is also
> something which needs cleaning up in the same way as the Tegra SMMU
> driver.
>
> arch/arm/include/asm/cacheflush.h | 21 ++-
> arch/arm/include/asm/glue-cache.h | 2 -
> arch/arm/mm/dma-mapping.c | 1 +
> arch/arm/mm/dma.h | 32 ++++
> drivers/firmware/qcom_scm-32.c | 4 +-
> drivers/iommu/tegra-smmu.c | 297 ++++++++++++++++++++++++--------------
> drivers/memory/tegra/tegra114.c | 17 ---
> drivers/memory/tegra/tegra124.c | 30 ----
> drivers/memory/tegra/tegra30.c | 17 ---
> include/soc/tegra/mc.h | 7 -
> 10 files changed, 242 insertions(+), 186 deletions(-)
>
> --
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.
next prev parent reply other threads:[~2015-07-27 13:13 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-27 12:28 [PATCH 00/18] Clean up exposure of arch-internal code Russell King - ARM Linux
2015-07-27 12:28 ` Russell King - ARM Linux
2015-07-27 12:28 ` [PATCH 02/18] firmware: qcom_scm-32: replace open-coded call to __cpuc_flush_dcache_area() Russell King
2015-07-27 12:28 ` Russell King
[not found] ` <E1ZJhWZ-00043Z-Ft-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2015-08-04 18:48 ` Andy Gross
2015-08-04 18:48 ` Andy Gross
2015-08-04 18:50 ` Stephen Boyd
2015-08-04 18:50 ` Stephen Boyd
2015-07-27 12:29 ` [PATCH 03/18] iommu: tegra-smmu: fix iova_to_phys() method Russell King
2015-07-27 12:29 ` Russell King
[not found] ` <20150727122824.GH7557-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-07-27 12:28 ` [PATCH 01/18] ARM: reduce visibility of dmac_* functions Russell King
2015-07-27 12:28 ` Russell King
2015-07-27 12:29 ` [PATCH 04/18] iommu: tegra-smmu: fix unmap() method Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 05/18] iommu: tegra-smmu: factor out common pte setting Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 06/18] iommu: tegra-smmu: add iova_pd_index() and iova_pt_index() helpers Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 07/18] iommu: tegra-smmu: fix page table lookup in unmap/iova_to_phys methods Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 08/18] iommu: tegra-smmu: store struct page pointer for page tables Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 09/18] iommu: tegra-smmu: use kcalloc() to allocate counter array Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 10/18] iommu: tegra-smmu: move flush_dcache to tegra-smmu.c Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 11/18] iommu: tegra-smmu: split smmu_flush_ptc() Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 12/18] iommu: tegra-smmu: smmu_flush_ptc() wants device address Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 13/18] iommu: tegra-smmu: convert to use DMA API Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:29 ` [PATCH 14/18] iommu: tegra-smmu: remove PageReserved manipulation Russell King
2015-07-27 12:29 ` Russell King
2015-07-27 12:30 ` [PATCH 15/18] iommu: tegra-smmu: use __GFP_ZERO to allocate zeroed pages Russell King
2015-07-27 12:30 ` Russell King
2015-07-27 12:30 ` [PATCH 16/18] iommu: tegra-smmu: get_use Russell King
2015-07-27 12:30 ` Russell King
[not found] ` <E1ZJhXj-0004CY-DQ-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2015-07-27 14:11 ` Thierry Reding
2015-07-27 14:11 ` Thierry Reding
2015-07-27 12:30 ` [PATCH 17/18] iommu: tegra-smmu: more cleanups Russell King
2015-07-27 12:30 ` Russell King
[not found] ` <E1ZJhXo-0004Ce-Hq-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2015-07-27 14:12 ` Thierry Reding
2015-07-27 14:12 ` Thierry Reding
2015-07-27 12:30 ` [PATCH 18/18] iommu: tegra-smmu: remove cacheflush.h Russell King
2015-07-27 12:30 ` Russell King
[not found] ` <E1ZJhXt-0004Ck-LR-eh5Bv4kxaXIANfyc6IWni62ZND6+EDdj@public.gmane.org>
2015-07-27 14:13 ` Thierry Reding
2015-07-27 14:13 ` Thierry Reding
2015-07-27 13:13 ` Joerg Roedel [this message]
2015-07-27 13:13 ` [PATCH 00/18] Clean up exposure of arch-internal code Joerg Roedel
[not found] ` <20150727131313.GM10969-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2015-07-27 14:45 ` Heiko Stübner
2015-07-27 14:45 ` Heiko Stübner
2015-07-27 14:09 ` Thierry Reding
2015-07-27 14:09 ` Thierry Reding
[not found] ` <20150727140905.GA16858-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2015-07-27 14:16 ` Russell King - ARM Linux
2015-07-27 14:16 ` Russell King - ARM Linux
[not found] ` <20150727141654.GI7557-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-07-27 14:31 ` Thierry Reding
2015-07-27 14:31 ` Thierry Reding
2015-08-03 11:33 ` Joerg Roedel
2015-08-03 11:33 ` Joerg Roedel
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=20150727131313.GM10969@8bytes.org \
--to=joro-zlv9swrftaidnm+yrofe0a@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.