linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] iommu/vt-d: Fix compile error [-Werror=implicit-function-declaration]
@ 2021-01-30 15:19 Lu Baolu
  2021-01-30 17:42 ` Randy Dunlap
  2021-02-02 13:44 ` Joerg Roedel
  0 siblings, 2 replies; 3+ messages in thread
From: Lu Baolu @ 2021-01-30 15:19 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Randy Dunlap, iommu, linux-kernel, Lu Baolu, kernel test robot

trace_qi_submit() could be used when interrupt remapping is supported,
but DMA remapping is not. In this case, the following compile error
occurs.

../drivers/iommu/intel/dmar.c: In function 'qi_submit_sync':
../drivers/iommu/intel/dmar.c:1311:3: error: implicit declaration of function 'trace_qi_submit';
  did you mean 'ftrace_nmi_exit'? [-Werror=implicit-function-declaration]
   trace_qi_submit(iommu, desc[i].qw0, desc[i].qw1,
   ^~~~~~~~~~~~~~~
   ftrace_nmi_exit

Fixes: f2dd871799ba5 ("iommu/vt-d: Add qi_submit trace event")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/iommu/intel/Makefile       | 2 +-
 drivers/iommu/intel/iommu.c        | 1 -
 include/trace/events/intel_iommu.h | 2 --
 3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/iommu/intel/Makefile b/drivers/iommu/intel/Makefile
index fb8e1e8c8029..ae570810a35e 100644
--- a/drivers/iommu/intel/Makefile
+++ b/drivers/iommu/intel/Makefile
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 obj-$(CONFIG_DMAR_TABLE) += dmar.o
 obj-$(CONFIG_INTEL_IOMMU) += iommu.o pasid.o
-obj-$(CONFIG_INTEL_IOMMU) += trace.o
+obj-$(CONFIG_DMAR_TABLE) += trace.o
 obj-$(CONFIG_INTEL_IOMMU_DEBUGFS) += debugfs.o
 obj-$(CONFIG_INTEL_IOMMU_SVM) += svm.o
 obj-$(CONFIG_IRQ_REMAP) += irq_remapping.o
diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c
index d7fecc109947..37da4caa67c9 100644
--- a/drivers/iommu/intel/iommu.c
+++ b/drivers/iommu/intel/iommu.c
@@ -44,7 +44,6 @@
 #include <asm/irq_remapping.h>
 #include <asm/cacheflush.h>
 #include <asm/iommu.h>
-#include <trace/events/intel_iommu.h>
 
 #include "../irq_remapping.h"
 #include "pasid.h"
diff --git a/include/trace/events/intel_iommu.h b/include/trace/events/intel_iommu.h
index aad2ff0c1e2e..e801f4910522 100644
--- a/include/trace/events/intel_iommu.h
+++ b/include/trace/events/intel_iommu.h
@@ -6,7 +6,6 @@
  *
  * Author: Lu Baolu <baolu.lu@linux.intel.com>
  */
-#ifdef CONFIG_INTEL_IOMMU
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM intel_iommu
 
@@ -176,4 +175,3 @@ TRACE_EVENT(qi_submit,
 
 /* This part must be outside protection */
 #include <trace/define_trace.h>
-#endif /* CONFIG_INTEL_IOMMU */
-- 
2.25.1


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

* Re: [PATCH 1/1] iommu/vt-d: Fix compile error [-Werror=implicit-function-declaration]
  2021-01-30 15:19 [PATCH 1/1] iommu/vt-d: Fix compile error [-Werror=implicit-function-declaration] Lu Baolu
@ 2021-01-30 17:42 ` Randy Dunlap
  2021-02-02 13:44 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2021-01-30 17:42 UTC (permalink / raw)
  To: Lu Baolu, Joerg Roedel; +Cc: iommu, linux-kernel, kernel test robot

On 1/30/21 7:19 AM, Lu Baolu wrote:
> trace_qi_submit() could be used when interrupt remapping is supported,
> but DMA remapping is not. In this case, the following compile error
> occurs.
> 
> ../drivers/iommu/intel/dmar.c: In function 'qi_submit_sync':
> ../drivers/iommu/intel/dmar.c:1311:3: error: implicit declaration of function 'trace_qi_submit';
>   did you mean 'ftrace_nmi_exit'? [-Werror=implicit-function-declaration]
>    trace_qi_submit(iommu, desc[i].qw0, desc[i].qw1,
>    ^~~~~~~~~~~~~~~
>    ftrace_nmi_exit
> 
> Fixes: f2dd871799ba5 ("iommu/vt-d: Add qi_submit trace event")
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
> ---
>  drivers/iommu/intel/Makefile       | 2 +-
>  drivers/iommu/intel/iommu.c        | 1 -
>  include/trace/events/intel_iommu.h | 2 --
>  3 files changed, 1 insertion(+), 4 deletions(-)

Acked-by: Randy Dunlap <rdunlap@infradead.org> # build-tested


Thanks.

-- 
~Randy


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

* Re: [PATCH 1/1] iommu/vt-d: Fix compile error [-Werror=implicit-function-declaration]
  2021-01-30 15:19 [PATCH 1/1] iommu/vt-d: Fix compile error [-Werror=implicit-function-declaration] Lu Baolu
  2021-01-30 17:42 ` Randy Dunlap
@ 2021-02-02 13:44 ` Joerg Roedel
  1 sibling, 0 replies; 3+ messages in thread
From: Joerg Roedel @ 2021-02-02 13:44 UTC (permalink / raw)
  To: Lu Baolu; +Cc: Randy Dunlap, iommu, linux-kernel, kernel test robot

On Sat, Jan 30, 2021 at 11:19:07PM +0800, Lu Baolu wrote:
>  drivers/iommu/intel/Makefile       | 2 +-
>  drivers/iommu/intel/iommu.c        | 1 -
>  include/trace/events/intel_iommu.h | 2 --
>  3 files changed, 1 insertion(+), 4 deletions(-)

Applied, thanks.

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

end of thread, other threads:[~2021-02-02 13:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-30 15:19 [PATCH 1/1] iommu/vt-d: Fix compile error [-Werror=implicit-function-declaration] Lu Baolu
2021-01-30 17:42 ` Randy Dunlap
2021-02-02 13:44 ` 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).