* [PATCH] iommu: export iommu_set_default_translated function
@ 2023-06-15 9:33 Anvesh Jain P
2023-06-15 9:39 ` Robin Murphy
2023-06-16 2:14 ` Baolu Lu
0 siblings, 2 replies; 3+ messages in thread
From: Anvesh Jain P @ 2023-06-15 9:33 UTC (permalink / raw)
To: Joerg Roedel, Will Deacon, Robin Murphy
Cc: iommu, linux-kernel, Anvesh Jain P, Venkata Rao Kakani,
Vagdhan Kumar
export iommu_set_default_translated function to be used by other modules.
Signed-off-by: Anvesh Jain P <quic_ajainp@quicinc.com>
Signed-off-by: Venkata Rao Kakani <quic_vkakani@quicinc.com>
Signed-off-by: Vagdhan Kumar <quic_vagdhank@quicinc.com>
---
drivers/iommu/iommu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index f1dcfa3f1a1b..1b4a5db58d66 100644
--- a/drivers/iommu/iommu.c
+++ b/drivers/iommu/iommu.c
@@ -2730,6 +2730,7 @@ void iommu_set_default_translated(bool cmd_line)
iommu_cmd_line |= IOMMU_CMD_LINE_DMA_API;
iommu_def_domain_type = IOMMU_DOMAIN_DMA;
}
+EXPORT_SYMBOL_GPL(iommu_set_default_translated);
bool iommu_default_passthrough(void)
{
base-commit: b6dad5178ceaf23f369c3711062ce1f2afc33644
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] iommu: export iommu_set_default_translated function
2023-06-15 9:33 [PATCH] iommu: export iommu_set_default_translated function Anvesh Jain P
@ 2023-06-15 9:39 ` Robin Murphy
2023-06-16 2:14 ` Baolu Lu
1 sibling, 0 replies; 3+ messages in thread
From: Robin Murphy @ 2023-06-15 9:39 UTC (permalink / raw)
To: Anvesh Jain P, Joerg Roedel, Will Deacon
Cc: iommu, linux-kernel, Venkata Rao Kakani, Vagdhan Kumar
On 2023-06-15 10:33, Anvesh Jain P wrote:
> export iommu_set_default_translated function to be used by other modules.
Which modules? The only reason these functions are public at all is to
support the legacy x86 command-line options. No *new* code outside the
core API should have any reason to be messing with core API policy. If
an IOMMU driver needs to special-case particular devices we have
.def_domain_type for that.
Thanks,
Robin.
> Signed-off-by: Anvesh Jain P <quic_ajainp@quicinc.com>
> Signed-off-by: Venkata Rao Kakani <quic_vkakani@quicinc.com>
> Signed-off-by: Vagdhan Kumar <quic_vagdhank@quicinc.com>
> ---
> drivers/iommu/iommu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index f1dcfa3f1a1b..1b4a5db58d66 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -2730,6 +2730,7 @@ void iommu_set_default_translated(bool cmd_line)
> iommu_cmd_line |= IOMMU_CMD_LINE_DMA_API;
> iommu_def_domain_type = IOMMU_DOMAIN_DMA;
> }
> +EXPORT_SYMBOL_GPL(iommu_set_default_translated);
>
> bool iommu_default_passthrough(void)
> {
>
> base-commit: b6dad5178ceaf23f369c3711062ce1f2afc33644
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] iommu: export iommu_set_default_translated function
2023-06-15 9:33 [PATCH] iommu: export iommu_set_default_translated function Anvesh Jain P
2023-06-15 9:39 ` Robin Murphy
@ 2023-06-16 2:14 ` Baolu Lu
1 sibling, 0 replies; 3+ messages in thread
From: Baolu Lu @ 2023-06-16 2:14 UTC (permalink / raw)
To: Anvesh Jain P, Joerg Roedel, Will Deacon, Robin Murphy
Cc: baolu.lu, iommu, linux-kernel, Venkata Rao Kakani, Vagdhan Kumar
On 6/15/23 5:33 PM, Anvesh Jain P wrote:
> export iommu_set_default_translated function to be used by other modules.
>
> Signed-off-by: Anvesh Jain P <quic_ajainp@quicinc.com>
> Signed-off-by: Venkata Rao Kakani <quic_vkakani@quicinc.com>
> Signed-off-by: Vagdhan Kumar <quic_vagdhank@quicinc.com>
> ---
> drivers/iommu/iommu.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
> index f1dcfa3f1a1b..1b4a5db58d66 100644
> --- a/drivers/iommu/iommu.c
> +++ b/drivers/iommu/iommu.c
> @@ -2730,6 +2730,7 @@ void iommu_set_default_translated(bool cmd_line)
> iommu_cmd_line |= IOMMU_CMD_LINE_DMA_API;
> iommu_def_domain_type = IOMMU_DOMAIN_DMA;
> }
> +EXPORT_SYMBOL_GPL(iommu_set_default_translated);
Exporting a symbol without using it is meaningless. It is better to
export and use it in a single series.
Additionally, there is a restriction on the use of this helper. Calling
it after the iommu probe has no effect.
>
> bool iommu_default_passthrough(void)
> {
>
> base-commit: b6dad5178ceaf23f369c3711062ce1f2afc33644
Best regards,
baolu
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-16 2:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-15 9:33 [PATCH] iommu: export iommu_set_default_translated function Anvesh Jain P
2023-06-15 9:39 ` Robin Murphy
2023-06-16 2:14 ` Baolu Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox