public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: robin.murphy@arm•com (Robin Murphy)
To: linux-arm-kernel@lists•infradead.org
Subject: [RFC PATCH v2 3/3] arm64: hook up IOMMU dma_ops
Date: Tue, 03 Mar 2015 13:10:34 +0000	[thread overview]
Message-ID: <54F5B2CA.9050907@arm.com> (raw)
In-Reply-To: <54F59565.7000807@huawei.com>

On 03/03/15 11:05, leizhen wrote:
> On 2015/2/6 22:55, Robin Murphy wrote:
>> With iommu_dma_ops in place, hook them up to the configuration code, so
>> IOMMU-fronted devices will get them automatically.
>>
>> Signed-off-by: Robin Murphy <robin.murphy@arm•com>
>> ---
>>   arch/arm64/Kconfig                   |  1 +
>>   arch/arm64/include/asm/dma-mapping.h | 11 ++++++-----
>>   arch/arm64/mm/dma-mapping.c          | 15 +++++++++++++++
>>   3 files changed, 22 insertions(+), 5 deletions(-)
>>
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index b1f9a20..e2abcdc 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -66,6 +66,7 @@ config ARM64
>>   	select HAVE_PERF_USER_STACK_DUMP
>>   	select HAVE_RCU_TABLE_FREE
>>   	select HAVE_SYSCALL_TRACEPOINTS
>> +	select IOMMU_DMA if IOMMU_SUPPORT
>
> IOMMU_SUPPORT is selected above, so "if IOMMU_SUPPORT" can be omitted.
> And I suggest putting "select IOMMU_DMA" next to "select IOMMU_SUPPORT".

Not in this patch set it isn't ;)

Omitting the "if IOMMU_SUPPORT" at this point results in this for me:

*** Default configuration is based on 'defconfig'
warning: (ARM64) selects IOMMU_DMA which has unmet direct dependencies 
(IOMMU_SUPPORT && NEED_SG_DMA_LENGTH)

Furthermore, if IOMMU_SUPPORT is selected anywhere I think it should be 
in defconfig, rather than here - if the user wants to leave out all the 
IOMMU drivers, then they should be able to turn off IOMMU_SUPPORT as 
well (since it makes no sense on its own), at which point the 
architecture then needs to make sure that IOMMU_DMA is deselected. 
Unless there's a more elegant way to enforce that, I think this 
"select...if..." needs to stay as it is.

Robin.

      reply	other threads:[~2015-03-03 13:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 14:55 [RFC PATCH v2 0/3] arm64: IOMMU-backed DMA mapping Robin Murphy
2015-02-06 14:55 ` [RFC PATCH v2 1/3] iommu: implement common IOMMU ops for " Robin Murphy
2015-02-09  4:05   ` Will Deacon
2015-02-10 15:11     ` Robin Murphy
2015-03-12 12:45   ` Marek Szyprowski
2015-02-06 14:55 ` [RFC PATCH v2 2/3] arm64: add IOMMU dma_ops Robin Murphy
2015-02-09  6:02   ` Will Deacon
2015-02-10 15:40     ` Robin Murphy
2015-02-10  4:39   ` Yingjoe Chen
2015-02-10 12:07     ` Robin Murphy
2015-02-14  8:03       ` Yong Wu
2015-02-16 20:04         ` Robin Murphy
2015-03-03  3:38           ` Yong Wu
2015-03-03 12:15             ` Robin Murphy
2015-03-05  0:19               ` Laura Abbott
2015-03-05 11:16                 ` Robin Murphy
2015-03-09 17:59                   ` Russell King - ARM Linux
2015-03-09 20:09                     ` Robin Murphy
2015-03-10 10:16                       ` Robin Murphy
2015-03-12 12:50   ` Marek Szyprowski
2015-02-06 14:55 ` [RFC PATCH v2 3/3] arm64: hook up " Robin Murphy
2015-03-03 11:05   ` leizhen
2015-03-03 13:10     ` Robin Murphy [this message]

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=54F5B2CA.9050907@arm.com \
    --to=robin.murphy@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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