All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC 0/3] How to pass IOMMU map attr via DMA API?
@ 2013-06-20  5:49 ` Hiroshi Doyu
  0 siblings, 0 replies; 43+ messages in thread
From: Hiroshi Doyu @ 2013-06-20  5:49 UTC (permalink / raw)
  To: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linaro-mm-sig-cunTk1MwBs8s++Sfvej+rw,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

In Tegra SoC, IOMMU can set some mapping attribute for each page, for
exmaple, READable, and WRITEable. We'd like to use this feature
*newly* for robustness, where read-only pages can be protected from
being overwritten by wrong operation. We have been using IOMMU via DMA
mapping API(ARM). DMA mapping API currently doesn't use "prot"
parameter when calling IOMMU API. So this series tries to pass "struct
dma_attrs *attrs" via "int prot" in IOMMU API. I'm not so sure if this
implementation is right or not because:

- Casting (struct dma_attrs *) to (int) in DMA API doesn't look nice.
- IOMMU layer needs to cast (int) back to (struct dma_attrs *) again,
  which can be considered as violation of layers.

If you have any implementations/suggestions, it would be really helpful.

This series isn't applied cleanly but this is posted to request for
comments.

Hiroshi Doyu (3):
  common: DMA-mapping: add DMA_ATTR_READ_ONLY attribute
  ARM: dma-mapping: Pass DMA attrs as IOMMU prot
  iommu/tegra: smmu: Support read-only mapping

 arch/arm/mm/dma-mapping.c  | 34 +++++++++++++++++++++-------------
 drivers/iommu/tegra-smmu.c | 41 +++++++++++++++++++++++++++++------------
 include/linux/dma-attrs.h  |  1 +
 3 files changed, 51 insertions(+), 25 deletions(-)

-- 
1.8.1.5

^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2013-06-24  7:21 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-20  5:49 [RFC 0/3] How to pass IOMMU map attr via DMA API? Hiroshi Doyu
2013-06-20  5:49 ` Hiroshi Doyu
     [not found] ` <1371707384-30037-1-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-20  5:49   ` [RFC 1/3] common: DMA-mapping: add DMA_ATTR_READ_ONLY attribute Hiroshi Doyu
2013-06-20  5:49   ` [RFC 2/3] ARM: dma-mapping: Pass DMA attrs as IOMMU prot Hiroshi Doyu
     [not found]     ` <1371707384-30037-3-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-20  8:07       ` [Linaro-mm-sig] " Nishanth Peethambaran
2013-06-20  8:07         ` Nishanth Peethambaran
     [not found]         ` <CAMcxFTRnnCnPnvMi89r7rUsN4xeYzZGqy9s5v5ukm_fJ_d_RGg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-20  8:24           ` Hiroshi Doyu
2013-06-20  8:24             ` Hiroshi Doyu
     [not found]             ` <20130620.112439.1330557591655135630.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-20  8:55               ` Nishanth Peethambaran
2013-06-20  8:55                 ` Nishanth Peethambaran
     [not found]                 ` <CAMcxFTS0dUUEfGj-=-cb_rdfy+qWvtsaoR6Tv+-x05XX0mZmmw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-20  9:54                   ` Hiroshi Doyu
2013-06-20  9:54                     ` Hiroshi Doyu
     [not found]                     ` <20130620.125431.1161068035083905855.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-20 10:13                       ` Arnd Bergmann
2013-06-20 10:13                         ` Arnd Bergmann
     [not found]                         ` <201306201213.13644.arnd-r2nGTMty4D4@public.gmane.org>
2013-06-20 10:34                           ` Hiroshi Doyu
2013-06-20 10:34                             ` Hiroshi Doyu
     [not found]                             ` <20130620.133407.798194318297047071.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-20 10:57                               ` Arnd Bergmann
2013-06-20 10:57                                 ` Arnd Bergmann
     [not found]                                 ` <201306201257.58419.arnd-r2nGTMty4D4@public.gmane.org>
2013-06-20 12:49                                   ` Nishanth Peethambaran
2013-06-20 12:49                                     ` Nishanth Peethambaran
2013-06-20  5:49   ` [RFC 3/3] iommu/tegra: smmu: Support read-only mapping Hiroshi Doyu
     [not found]     ` <1371707384-30037-4-git-send-email-hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-20  6:50       ` [Linaro-mm-sig] " Kyungmin Park
2013-06-20  6:50         ` Kyungmin Park
     [not found]         ` <CAH9JG2VUCJErBNwT0_u_9niaSWUza5gJ-+q8OOJhrrdw5D-hUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-06-20  7:27           ` Hiroshi Doyu
2013-06-20  7:27             ` Hiroshi Doyu
2013-06-20  9:31   ` [RFC 0/3] How to pass IOMMU map attr via DMA API? Will Deacon
2013-06-20  9:31     ` Will Deacon
     [not found]     ` <20130620093152.GE2842-MRww78TxoiP5vMa5CHWGZ34zcgK1vI+I0E9HWUfgJXw@public.gmane.org>
2013-06-20  9:59       ` Hiroshi Doyu
2013-06-20  9:59         ` Hiroshi Doyu
     [not found]         ` <20130620.125929.2250094502232662356.hdoyu-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-20 10:11           ` Catalin Marinas
2013-06-20 10:11             ` Catalin Marinas
     [not found]             ` <20130620101110.GB18536-5wv7dgnIgG8@public.gmane.org>
2013-06-20 11:00               ` Hiroshi Doyu
2013-06-20 11:00                 ` Hiroshi Doyu
2013-06-20 10:12           ` Will Deacon
2013-06-20 10:12             ` Will Deacon
2013-06-21  7:17   ` Marek Szyprowski
2013-06-21  7:17     ` Marek Szyprowski
     [not found]     ` <51C3FE27.5070702-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2013-06-21 16:03       ` Joerg Roedel
2013-06-21 16:03         ` Joerg Roedel
     [not found]         ` <20130621160344.GM11309-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2013-06-24  5:17           ` Hiroshi Doyu
2013-06-24  5:17             ` Hiroshi Doyu
     [not found]             ` <20130624081759.76e66d42bbf7c2c54ed1975c-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2013-06-24  7:21               ` Joerg Roedel
2013-06-24  7:21                 ` Joerg Roedel

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.