lkml.org 
[lkml]   [2021]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] iommu: Print default strict or lazy mode at init time
From
Date
On 2021-05-28 14:37, John Garry wrote:
> As well as the default domain type, it's useful to know whether strict
> or lazy mode is default for DMA domains, so add this info in a separate
> print.
>
> Signed-off-by: John Garry <john.garry@huawei.com>
>
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index 808ab70d5df5..f25fae62f077 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -138,6 +138,11 @@ static int __init iommu_subsys_init(void)
> (iommu_cmd_line & IOMMU_CMD_LINE_DMA_API) ?
> "(set via kernel command line)" : "");
>
> + pr_info("Default DMA domain mode: %s %s\n",

Nit: I think this might be a little unclear for end-users - *I'm* not
even sure whether "Default" here is meant to refer to the mode setting
itself or to default domains (of DMA type). Maybe something like "DMA
domain TLB invalidation policy"? Certainly it seems like a good idea to
explicitly mention invalidation to correlate with the documentation of
the "iommu.strict" parameter.

Ack to the general idea though.

Thanks,
Robin.

> + iommu_dma_strict ? "strict" : "lazy",
> + (iommu_cmd_line & IOMMU_CMD_LINE_STRICT) ?
> + "(set via kernel command line)" : "");
> +
> return 0;
> }
> subsys_initcall(iommu_subsys_init);
>

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