lkml.org 
[lkml]   [2021]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v12 3/5] iommu/vt-d: Add support for IOMMU default DMA mode build options
From
Date
On 2021-06-15 08:26, Lu Baolu wrote:
> Hi John,
>
> On 6/14/21 4:03 PM, John Garry wrote:
>> On 12/06/2021 03:14, Lu Baolu wrote:
>>> On 2021/6/11 20:20, John Garry wrote:
>>>> diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig
>>>> index 2a71347611d4..4467353f981b 100644
>>>> --- a/drivers/iommu/Kconfig
>>>> +++ b/drivers/iommu/Kconfig
>>>> @@ -94,6 +94,7 @@ choice
>>>>       prompt "IOMMU default DMA mode"
>>>>       depends on IOMMU_DMA
>>>> +    default IOMMU_DEFAULT_LAZY if INTEL_IOMMU
>>>>       default IOMMU_DEFAULT_STRICT
>>>
>>> If two default values are different. Which one will be overridden?
>>
>> If I understand your question correctly, I think you are asking if
>> both are set:
>> CONFIG_IOMMU_DEFAULT_LAZY=y
>> CONFIG_IOMMU_DEFAULT_STRICT=y
>>
>> If this happens, then make defconfig complains about both being set,
>> and selects the 2nd, whatever that is.
>
> On x86, Intel or AMD, this will be
>
>     prompt "IOMMU default DMA mode"
>       depends on IOMMU_DMA
>       default IOMMU_DEFAULT_LAZY
>       default IOMMU_DEFAULT_STRICT
>
> which will be default, LAZY or STRICT? Will it cause complains?

See Documentation/kbuild/kconfig-language.rst:

A config option can have any number of default values. If multiple
default values are visible, only the first defined one is active.


Robin.

\
 
 \ /
  Last update: 2021-06-15 10:26    [W:0.238 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site