iommu.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header
@ 2020-08-28 16:12 Andy Shevchenko
  2020-09-01  5:01 ` Lu Baolu
  2020-09-04 10:13 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2020-08-28 16:12 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, dri-devel, David Woodhouse,
	Lu Baolu, iommu, Joerg Roedel
  Cc: Andy Shevchenko

Static analyzer is not happy about intel_iommu_gfx_mapped declaration:

.../drivers/iommu/intel/iommu.c:364:5: warning: symbol 'intel_iommu_gfx_mapped' was not declared. Should it be static?

Move its declaration to Intel IOMMU header file.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/drm/intel-gtt.h     | 5 +----
 include/linux/intel-iommu.h | 1 +
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h
index 71d81923e6b0..abfefaaf897a 100644
--- a/include/drm/intel-gtt.h
+++ b/include/drm/intel-gtt.h
@@ -5,6 +5,7 @@
 #define	_DRM_INTEL_GTT_H
 
 #include <linux/agp_backend.h>
+#include <linux/intel-iommu.h>
 #include <linux/kernel.h>
 
 void intel_gtt_get(u64 *gtt_total,
@@ -33,8 +34,4 @@ void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);
 /* flag for GFDT type */
 #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3)
 
-#ifdef CONFIG_INTEL_IOMMU
-extern int intel_iommu_gfx_mapped;
-#endif
-
 #endif
diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
index 64fa5c56c825..fbd3bb64649b 100644
--- a/include/linux/intel-iommu.h
+++ b/include/linux/intel-iommu.h
@@ -794,6 +794,7 @@ extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
 extern int dmar_disabled;
 extern int intel_iommu_enabled;
 extern int intel_iommu_tboot_noforce;
+extern int intel_iommu_gfx_mapped;
 #else
 static inline int iommu_calculate_agaw(struct intel_iommu *iommu)
 {
-- 
2.28.0

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH v1] iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header
  2020-08-28 16:12 [PATCH v1] iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header Andy Shevchenko
@ 2020-09-01  5:01 ` Lu Baolu
  2020-09-04 10:13 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Lu Baolu @ 2020-09-01  5:01 UTC (permalink / raw)
  To: Andy Shevchenko, David Airlie, Daniel Vetter, dri-devel,
	David Woodhouse, iommu, Joerg Roedel

Hi Andy,

On 8/29/20 12:12 AM, Andy Shevchenko wrote:
> Static analyzer is not happy about intel_iommu_gfx_mapped declaration:
> 
> .../drivers/iommu/intel/iommu.c:364:5: warning: symbol 'intel_iommu_gfx_mapped' was not declared. Should it be static?
> 
> Move its declaration to Intel IOMMU header file.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>   include/drm/intel-gtt.h     | 5 +----
>   include/linux/intel-iommu.h | 1 +
>   2 files changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/include/drm/intel-gtt.h b/include/drm/intel-gtt.h
> index 71d81923e6b0..abfefaaf897a 100644
> --- a/include/drm/intel-gtt.h
> +++ b/include/drm/intel-gtt.h
> @@ -5,6 +5,7 @@
>   #define	_DRM_INTEL_GTT_H
>   
>   #include <linux/agp_backend.h>
> +#include <linux/intel-iommu.h>
>   #include <linux/kernel.h>
>   
>   void intel_gtt_get(u64 *gtt_total,
> @@ -33,8 +34,4 @@ void intel_gtt_clear_range(unsigned int first_entry, unsigned int num_entries);
>   /* flag for GFDT type */
>   #define AGP_USER_CACHED_MEMORY_GFDT (1 << 3)
>   
> -#ifdef CONFIG_INTEL_IOMMU
> -extern int intel_iommu_gfx_mapped;
> -#endif
> -
>   #endif
> diff --git a/include/linux/intel-iommu.h b/include/linux/intel-iommu.h
> index 64fa5c56c825..fbd3bb64649b 100644
> --- a/include/linux/intel-iommu.h
> +++ b/include/linux/intel-iommu.h
> @@ -794,6 +794,7 @@ extern int iommu_calculate_max_sagaw(struct intel_iommu *iommu);
>   extern int dmar_disabled;
>   extern int intel_iommu_enabled;
>   extern int intel_iommu_tboot_noforce;
> +extern int intel_iommu_gfx_mapped;
>   #else
>   static inline int iommu_calculate_agaw(struct intel_iommu *iommu)
>   {
> 

Looks good to me.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>

Best regards,
baolu
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

* Re: [PATCH v1] iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header
  2020-08-28 16:12 [PATCH v1] iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header Andy Shevchenko
  2020-09-01  5:01 ` Lu Baolu
@ 2020-09-04 10:13 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2020-09-04 10:13 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: David Airlie, dri-devel, iommu, Daniel Vetter, David Woodhouse

On Fri, Aug 28, 2020 at 07:12:11PM +0300, Andy Shevchenko wrote:
> Static analyzer is not happy about intel_iommu_gfx_mapped declaration:
> 
> .../drivers/iommu/intel/iommu.c:364:5: warning: symbol 'intel_iommu_gfx_mapped' was not declared. Should it be static?
> 
> Move its declaration to Intel IOMMU header file.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  include/drm/intel-gtt.h     | 5 +----
>  include/linux/intel-iommu.h | 1 +
>  2 files changed, 2 insertions(+), 4 deletions(-)

Applied, thanks.

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2020-09-04 10:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-28 16:12 [PATCH v1] iommu/vt-d: Move intel_iommu_gfx_mapped to Intel IOMMU header Andy Shevchenko
2020-09-01  5:01 ` Lu Baolu
2020-09-04 10:13 ` Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).