linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xen: move xen_setup_callback_vector() definition to include/xen/hvm.h
@ 2020-05-20 16:16 Vitaly Kuznetsov
  2020-05-26  8:51 ` Jürgen Groß
  2020-05-28 13:42 ` [tip: x86/entry] xen: Move " tip-bot2 for Vitaly Kuznetsov
  0 siblings, 2 replies; 3+ messages in thread
From: Vitaly Kuznetsov @ 2020-05-20 16:16 UTC (permalink / raw)
  To: x86
  Cc: linux-kernel, Boris Ostrovsky, Juergen Gross, Stefano Stabellini,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin

Kbuild test robot reports the following problem on ARM:

>> drivers/xen/events/events_base.c:1664:6: warning: no previous prototype
  for 'xen_setup_callback_vector' [-Wmissing-prototypes]
1664 | void xen_setup_callback_vector(void) {}
|      ^~~~~~~~~~~~~~~~~~~~~~~~~
The problem is that xen_setup_callback_vector is a x86 only thing, its
definition is present in arch/x86/xen/xen-ops.h but not on ARM. In
events_base.c we have a stub for !CONFIG_XEN_PVHVM but it is not
declared as 'static'.

On x86 the situation is hardly better: drivers/xen/events/events_base.c
doesn't include 'xen-ops.h' from arch/x86/xen/, it includes its namesake
from include/xen/ so we also get the 'no previous prototype' warning.

Currently, xen_setup_callback_vector() has two call sites: one in
drivers/xen/events_base.c and another in arch/x86/xen/suspend_hvm.c. The
former is placed under #ifdef CONFIG_X86 and the later is only compiled
in when CONFIG_XEN_PVHVM.

Resolve the issue by moving xen_setup_callback_vector() declaration to
arch neutral 'include/xen/hvm.h' as the implementation lives in arch
neutral drivers/xen/events/events_base.c.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
- The patch needs to be applied on top of 'x86/xen: Split HVM vector callback
 setup and interrupt gate allocation' ('tip/entry' branch currently). This
 patch doesn't introduce the issue (and that's why I don't add 'Fixes:' tag)
 but it renames xen_callback_vector() -> xen_setup_callback_vector().
---
 arch/x86/xen/suspend_hvm.c | 1 +
 arch/x86/xen/xen-ops.h     | 1 -
 include/xen/hvm.h          | 2 ++
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/xen/suspend_hvm.c b/arch/x86/xen/suspend_hvm.c
index 5152afe16876..9d548b0c772f 100644
--- a/arch/x86/xen/suspend_hvm.c
+++ b/arch/x86/xen/suspend_hvm.c
@@ -2,6 +2,7 @@
 #include <linux/types.h>
 
 #include <xen/xen.h>
+#include <xen/hvm.h>
 #include <xen/features.h>
 #include <xen/interface/features.h>
 
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index 1cc1568bfe04..937a53e73ea5 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -55,7 +55,6 @@ void xen_enable_sysenter(void);
 void xen_enable_syscall(void);
 void xen_vcpu_restore(void);
 
-void xen_setup_callback_vector(void);
 void xen_hvm_init_shared_info(void);
 void xen_unplug_emulated_devices(void);
 
diff --git a/include/xen/hvm.h b/include/xen/hvm.h
index 0b15f8cb17fc..b7fd7fc9ad41 100644
--- a/include/xen/hvm.h
+++ b/include/xen/hvm.h
@@ -58,4 +58,6 @@ static inline int hvm_get_parameter(int idx, uint64_t *value)
 #define HVM_CALLBACK_VECTOR(x) (((uint64_t)HVM_CALLBACK_VIA_TYPE_VECTOR)<<\
 		HVM_CALLBACK_VIA_TYPE_SHIFT | (x))
 
+void xen_setup_callback_vector(void);
+
 #endif /* XEN_HVM_H__ */
-- 
2.25.4


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

* Re: [PATCH] xen: move xen_setup_callback_vector() definition to include/xen/hvm.h
  2020-05-20 16:16 [PATCH] xen: move xen_setup_callback_vector() definition to include/xen/hvm.h Vitaly Kuznetsov
@ 2020-05-26  8:51 ` Jürgen Groß
  2020-05-28 13:42 ` [tip: x86/entry] xen: Move " tip-bot2 for Vitaly Kuznetsov
  1 sibling, 0 replies; 3+ messages in thread
From: Jürgen Groß @ 2020-05-26  8:51 UTC (permalink / raw)
  To: Vitaly Kuznetsov, x86
  Cc: linux-kernel, Boris Ostrovsky, Stefano Stabellini,
	Thomas Gleixner, Ingo Molnar, Borislav Petkov, H. Peter Anvin

On 20.05.20 18:16, Vitaly Kuznetsov wrote:
> Kbuild test robot reports the following problem on ARM:
> 
>>> drivers/xen/events/events_base.c:1664:6: warning: no previous prototype
>    for 'xen_setup_callback_vector' [-Wmissing-prototypes]
> 1664 | void xen_setup_callback_vector(void) {}
> |      ^~~~~~~~~~~~~~~~~~~~~~~~~
> The problem is that xen_setup_callback_vector is a x86 only thing, its
> definition is present in arch/x86/xen/xen-ops.h but not on ARM. In
> events_base.c we have a stub for !CONFIG_XEN_PVHVM but it is not
> declared as 'static'.
> 
> On x86 the situation is hardly better: drivers/xen/events/events_base.c
> doesn't include 'xen-ops.h' from arch/x86/xen/, it includes its namesake
> from include/xen/ so we also get the 'no previous prototype' warning.
> 
> Currently, xen_setup_callback_vector() has two call sites: one in
> drivers/xen/events_base.c and another in arch/x86/xen/suspend_hvm.c. The
> former is placed under #ifdef CONFIG_X86 and the later is only compiled
> in when CONFIG_XEN_PVHVM.
> 
> Resolve the issue by moving xen_setup_callback_vector() declaration to
> arch neutral 'include/xen/hvm.h' as the implementation lives in arch
> neutral drivers/xen/events/events_base.c.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

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

* [tip: x86/entry] xen: Move xen_setup_callback_vector() definition to include/xen/hvm.h
  2020-05-20 16:16 [PATCH] xen: move xen_setup_callback_vector() definition to include/xen/hvm.h Vitaly Kuznetsov
  2020-05-26  8:51 ` Jürgen Groß
@ 2020-05-28 13:42 ` tip-bot2 for Vitaly Kuznetsov
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Vitaly Kuznetsov @ 2020-05-28 13:42 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: kbuild test robot, Vitaly Kuznetsov, Thomas Gleixner,
	Juergen Gross, x86, LKML

The following commit has been merged into the x86/entry branch of tip:

Commit-ID:     28447ea4154239025044381144f849ff749ee9ef
Gitweb:        https://git.kernel.org/tip/28447ea4154239025044381144f849ff749ee9ef
Author:        Vitaly Kuznetsov <vkuznets@redhat.com>
AuthorDate:    Wed, 20 May 2020 18:16:00 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Thu, 28 May 2020 15:39:18 +02:00

xen: Move xen_setup_callback_vector() definition to include/xen/hvm.h

Kbuild test robot reports the following problem on ARM:

  for 'xen_setup_callback_vector' [-Wmissing-prototypes]
1664 | void xen_setup_callback_vector(void) {}
|      ^~~~~~~~~~~~~~~~~~~~~~~~~

The problem is that xen_setup_callback_vector is a x86 only thing, its
definition is present in arch/x86/xen/xen-ops.h but not on ARM. In
events_base.c there is a stub for !CONFIG_XEN_PVHVM but it is not declared
as 'static'.

On x86 the situation is hardly better: drivers/xen/events/events_base.c
doesn't include 'xen-ops.h' from arch/x86/xen/, it includes its namesake
from include/xen/ which also results in a 'no previous prototype' warning.

Currently, xen_setup_callback_vector() has two call sites: one in
drivers/xen/events_base.c and another in arch/x86/xen/suspend_hvm.c. The
former is placed under #ifdef CONFIG_X86 and the later is only compiled
in when CONFIG_XEN_PVHVM.

Resolve the issue by moving xen_setup_callback_vector() declaration to
arch neutral 'include/xen/hvm.h' as the implementation lives in arch
neutral drivers/xen/events/events_base.c.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lkml.kernel.org/r/20200520161600.361895-1-vkuznets@redhat.com

---
 arch/x86/xen/suspend_hvm.c | 1 +
 arch/x86/xen/xen-ops.h     | 1 -
 include/xen/hvm.h          | 2 ++
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/x86/xen/suspend_hvm.c b/arch/x86/xen/suspend_hvm.c
index 5152afe..9d548b0 100644
--- a/arch/x86/xen/suspend_hvm.c
+++ b/arch/x86/xen/suspend_hvm.c
@@ -2,6 +2,7 @@
 #include <linux/types.h>
 
 #include <xen/xen.h>
+#include <xen/hvm.h>
 #include <xen/features.h>
 #include <xen/interface/features.h>
 
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index ad05d05..53b224f 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -54,7 +54,6 @@ void xen_enable_sysenter(void);
 void xen_enable_syscall(void);
 void xen_vcpu_restore(void);
 
-void xen_setup_callback_vector(void);
 void xen_hvm_init_shared_info(void);
 void xen_unplug_emulated_devices(void);
 
diff --git a/include/xen/hvm.h b/include/xen/hvm.h
index 0b15f8c..b7fd7fc 100644
--- a/include/xen/hvm.h
+++ b/include/xen/hvm.h
@@ -58,4 +58,6 @@ static inline int hvm_get_parameter(int idx, uint64_t *value)
 #define HVM_CALLBACK_VECTOR(x) (((uint64_t)HVM_CALLBACK_VIA_TYPE_VECTOR)<<\
 		HVM_CALLBACK_VIA_TYPE_SHIFT | (x))
 
+void xen_setup_callback_vector(void);
+
 #endif /* XEN_HVM_H__ */

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

end of thread, other threads:[~2020-05-28 13:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-20 16:16 [PATCH] xen: move xen_setup_callback_vector() definition to include/xen/hvm.h Vitaly Kuznetsov
2020-05-26  8:51 ` Jürgen Groß
2020-05-28 13:42 ` [tip: x86/entry] xen: Move " tip-bot2 for Vitaly Kuznetsov

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).