Skip to contentSkip to conversation

x86/cpu: Move prototype for get_umwait_control_msr() to global location

PATCH Applied Benjamin Thiel 2 participants 2 messages Jan 23, 2020 – Feb 17, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 x86/cpu: Move prototype for get_umwait_control_msr() to global location

.. in order to fix a -Wmissing-prototype warning.

No functional change.

---
 arch/x86/include/asm/mwait.h | 2 ++
 arch/x86/kernel/cpu/umwait.c | 1 +
 arch/x86/kvm/vmx/vmx.c       | 1 +
 arch/x86/kvm/vmx/vmx.h       | 2 --
 4 files changed, 4 insertions(+), 2 deletions(-)
arch/x86/include/asm/mwait.h +2 -0
index 9d5252c9685c..b809f117f3f4 100644
@@ -23,6 +23,8 @@
 #define MWAITX_MAX_LOOPS		((u32)-1)
 #define MWAITX_DISABLE_CSTATES		0xf0
 
+u32 get_umwait_control_msr(void);
+
 static inline void __monitor(const void *eax, unsigned long ecx,
 			     unsigned long edx)
 {
arch/x86/kernel/cpu/umwait.c +1 -0
index c222f283b456..300e3fd5ade3 100644
@@ -4,6 +4,7 @@
 #include <linux/cpu.h>
 
 #include <asm/msr.h>
+#include <asm/mwait.h>
 
 #define UMWAIT_C02_ENABLE	0
 
arch/x86/kvm/vmx/vmx.c +1 -0
index e3394c839dea..11cd0242479b 100644
@@ -41,6 +41,7 @@
 #include <asm/mce.h>
 #include <asm/mmu_context.h>
 #include <asm/mshyperv.h>
+#include <asm/mwait.h>
 #include <asm/spec-ctrl.h>
 #include <asm/virtext.h>
 #include <asm/vmx.h>
arch/x86/kvm/vmx/vmx.h +0 -2
index a4f7f737c5d4..db947076bf68 100644
@@ -14,8 +14,6 @@
 extern const u32 vmx_msr_index[];
 extern u64 host_efer;
 
-extern u32 get_umwait_control_msr(void);
-
 #define MSR_TYPE_R	1
 #define MSR_TYPE_W	2
 #define MSR_TYPE_RW	3
Signature · 1 line
2.17.1
merge bot Applied
#1 lore raw

[tip: x86/cleanups] x86/cpu: Move prototype for get_umwait_control_msr() to a global location

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

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

Commit-ID:     b10c307f6f314c068814d0e23c86f06d5d57004b
Gitweb:        https://git.kernel.org/tip/b10c307f6f314c068814d0e23c86f06d5d57004b
Author:        Benjamin Thiel <[email protected]>
AuthorDate:    Thu, 23 Jan 2020 18:29:45 +01:00
Committer:     Borislav Petkov <[email protected]>
CommitterDate: Mon, 17 Feb 2020 19:32:45 +01:00

x86/cpu: Move prototype for get_umwait_control_msr() to a global location

.. in order to fix a -Wmissing-prototypes warning.

No functional change.

---
 arch/x86/include/asm/mwait.h | 2 ++
 arch/x86/kernel/cpu/umwait.c | 1 +
 arch/x86/kvm/vmx/vmx.c       | 1 +
 arch/x86/kvm/vmx/vmx.h       | 2 --
 4 files changed, 4 insertions(+), 2 deletions(-)
arch/x86/include/asm/mwait.h +2 -0
index 9d5252c..b809f11 100644
@@ -23,6 +23,8 @@
 #define MWAITX_MAX_LOOPS		((u32)-1)
 #define MWAITX_DISABLE_CSTATES		0xf0
 
+u32 get_umwait_control_msr(void);
+
 static inline void __monitor(const void *eax, unsigned long ecx,
 			     unsigned long edx)
 {
arch/x86/kernel/cpu/umwait.c +1 -0
index c222f28..300e3fd 100644
@@ -4,6 +4,7 @@
 #include <linux/cpu.h>
 
 #include <asm/msr.h>
+#include <asm/mwait.h>
 
 #define UMWAIT_C02_ENABLE	0
 
arch/x86/kvm/vmx/vmx.c +1 -0
index 9a66648..2068cda 100644
@@ -41,6 +41,7 @@
 #include <asm/mce.h>
 #include <asm/mmu_context.h>
 #include <asm/mshyperv.h>
+#include <asm/mwait.h>
 #include <asm/spec-ctrl.h>
 #include <asm/virtext.h>
 #include <asm/vmx.h>
arch/x86/kvm/vmx/vmx.h +0 -2
index 7f42cf3..b4e14ed 100644
@@ -14,8 +14,6 @@
 extern const u32 vmx_msr_index[];
 extern u64 host_efer;
 
-extern u32 get_umwait_control_msr(void);
-
 #define MSR_TYPE_R	1
 #define MSR_TYPE_W	2
 #define MSR_TYPE_RW	3