* x86/mshyperv: Remove unneeded includes from mshyperv.h
@ 2017-06-23 8:50 Thomas Gleixner
2017-06-23 10:00 ` Thomas Gleixner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Gleixner @ 2017-06-23 8:50 UTC (permalink / raw)
To: LKML; +Cc: x86, Vitaly Kuznetsov, K. Y. Srinivasan, devel
A recent commit included linux/slab.h in linux/irq.h. This breaks the build
of vdso32 on a 64bit kernel.
The reason is that linux/irq.h gets included into the vdso code via
linux/interrupt.h which is included from asm/mshyperv.h. That makes the
32bit vdso compile fail, because slab.h includes the pgtable headers for
64bit on a 64bit build.
Neither linux/clocksource.h nor linux/interrupt.h are needed in the
mshyperv.h header file itself.
Remove the includes and unbreak the build.
Fixes: dee863b571b0 ("hv: export current Hyper-V clocksource")
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index fba100713924..2f4acbdbfc51 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -2,8 +2,6 @@
#define _ASM_X86_MSHYPER_H
#include <linux/types.h>
-#include <linux/interrupt.h>
-#include <linux/clocksource.h>
#include <asm/hyperv.h>
/*
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: x86/mshyperv: Remove unneeded includes from mshyperv.h
2017-06-23 8:50 x86/mshyperv: Remove unneeded includes from mshyperv.h Thomas Gleixner
@ 2017-06-23 10:00 ` Thomas Gleixner
2017-06-24 6:54 ` [tip:x86/urgent] x86/mshyperv: Remove excess #includes " tip-bot for Thomas Gleixner
2017-06-24 8:54 ` x86/mshyperv: Remove unneeded includes " kbuild test robot
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Gleixner @ 2017-06-23 10:00 UTC (permalink / raw)
To: LKML; +Cc: x86, Vitaly Kuznetsov, K. Y. Srinivasan, devel
On Fri, 23 Jun 2017, Thomas Gleixner wrote:
> A recent commit included linux/slab.h in linux/irq.h. This breaks the build
> of vdso32 on a 64bit kernel.
>
> The reason is that linux/irq.h gets included into the vdso code via
> linux/interrupt.h which is included from asm/mshyperv.h. That makes the
> 32bit vdso compile fail, because slab.h includes the pgtable headers for
> 64bit on a 64bit build.
>
> Neither linux/clocksource.h nor linux/interrupt.h are needed in the
> mshyperv.h header file itself.
>
> Remove the includes and unbreak the build.
>
> Fixes: dee863b571b0 ("hv: export current Hyper-V clocksource")
> Reported-by: Ingo Molnar <mingo@kernel.org>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> ---
>
> diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
> index fba100713924..2f4acbdbfc51 100644
> --- a/arch/x86/include/asm/mshyperv.h
> +++ b/arch/x86/include/asm/mshyperv.h
> @@ -2,8 +2,6 @@
> #define _ASM_X86_MSHYPER_H
>
> #include <linux/types.h>
> -#include <linux/interrupt.h>
> -#include <linux/clocksource.h>
> #include <asm/hyperv.h>
Bah. this needs the following delta fix:
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -2,6 +2,7 @@
#define _ASM_X86_MSHYPER_H
#include <linux/types.h>
+#include <linux/atomic.h>
#include <asm/hyperv.h>
/*
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:x86/urgent] x86/mshyperv: Remove excess #includes from mshyperv.h
2017-06-23 8:50 x86/mshyperv: Remove unneeded includes from mshyperv.h Thomas Gleixner
2017-06-23 10:00 ` Thomas Gleixner
@ 2017-06-24 6:54 ` tip-bot for Thomas Gleixner
2017-06-24 8:54 ` x86/mshyperv: Remove unneeded includes " kbuild test robot
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Thomas Gleixner @ 2017-06-24 6:54 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, mingo, tglx, hpa, torvalds, vkuznets, peterz, kys
Commit-ID: 26fcd952d5c977a94ac64bb44ed409e37607b2c9
Gitweb: http://git.kernel.org/tip/26fcd952d5c977a94ac64bb44ed409e37607b2c9
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Fri, 23 Jun 2017 10:50:38 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Sat, 24 Jun 2017 08:48:51 +0200
x86/mshyperv: Remove excess #includes from mshyperv.h
A recent commit included linux/slab.h in linux/irq.h. This breaks the build
of vdso32 on a 64-bit kernel.
The reason is that linux/irq.h gets included into the vdso code via
linux/interrupt.h which is included from asm/mshyperv.h. That makes the
32-bit vdso compile fail, because slab.h includes the pgtable headers for
64-bit on a 64-bit build.
Neither linux/clocksource.h nor linux/interrupt.h are needed in the
mshyperv.h header file itself - it has a dependency on <linux/atomic.h>.
Remove the includes and unbreak the build.
Reported-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: devel@linuxdriverproject.org
Fixes: dee863b571b0 ("hv: export current Hyper-V clocksource")
Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1706231038460.2647@nanos
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/include/asm/mshyperv.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
index fba1007..d5acc27 100644
--- a/arch/x86/include/asm/mshyperv.h
+++ b/arch/x86/include/asm/mshyperv.h
@@ -2,8 +2,7 @@
#define _ASM_X86_MSHYPER_H
#include <linux/types.h>
-#include <linux/interrupt.h>
-#include <linux/clocksource.h>
+#include <linux/atomic.h>
#include <asm/hyperv.h>
/*
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: x86/mshyperv: Remove unneeded includes from mshyperv.h
2017-06-23 8:50 x86/mshyperv: Remove unneeded includes from mshyperv.h Thomas Gleixner
2017-06-23 10:00 ` Thomas Gleixner
2017-06-24 6:54 ` [tip:x86/urgent] x86/mshyperv: Remove excess #includes " tip-bot for Thomas Gleixner
@ 2017-06-24 8:54 ` kbuild test robot
2 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2017-06-24 8:54 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: kbuild-all, LKML, devel, Vitaly Kuznetsov, x86
[-- Attachment #1: Type: text/plain, Size: 4392 bytes --]
Hi Thomas,
[auto build test ERROR on tip/auto-latest]
[also build test ERROR on v4.12-rc6 next-20170623]
[cannot apply to tip/x86/core]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Thomas-Gleixner/x86-mshyperv-Remove-unneeded-includes-from-mshyperv-h/20170624-121055
config: i386-randconfig-b0-06241558 (attached as .config)
compiler: gcc-5 (Debian 5.4.1-2) 5.4.1 20160904
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
In file included from arch/x86/hyperv/hv_init.c:23:0:
arch/x86/include/asm/mshyperv.h: In function 'vmbus_signal_eom':
>> arch/x86/include/asm/mshyperv.h:115:6: error: implicit declaration of function 'cmpxchg' [-Werror=implicit-function-declaration]
if (cmpxchg(&msg->header.message_type, old_msg_type,
^
Cyclomatic Complexity 1 arch/x86/include/asm/mshyperv.h:generate_guest_id
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_read_msr
Cyclomatic Complexity 1 arch/x86/hyperv/hv_init.c:read_hv_clock_msr
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_write_msr
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:wrmsrl
Cyclomatic Complexity 1 include/linux/clocksource.h:clocksource_register_hz
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:virt_to_phys
Cyclomatic Complexity 4 arch/x86/hyperv/hv_init.c:hyperv_init
Cyclomatic Complexity 1 arch/x86/hyperv/hv_init.c:hyperv_cleanup
Cyclomatic Complexity 4 arch/x86/hyperv/hv_init.c:hv_do_hypercall
Cyclomatic Complexity 2 arch/x86/hyperv/hv_init.c:hyperv_report_panic
Cyclomatic Complexity 2 arch/x86/hyperv/hv_init.c:hv_is_hypercall_page_setup
cc1: some warnings being treated as errors
--
In file included from arch/x86//hyperv/hv_init.c:23:0:
arch/x86/include/asm/mshyperv.h: In function 'vmbus_signal_eom':
>> arch/x86/include/asm/mshyperv.h:115:6: error: implicit declaration of function 'cmpxchg' [-Werror=implicit-function-declaration]
if (cmpxchg(&msg->header.message_type, old_msg_type,
^
Cyclomatic Complexity 1 arch/x86/include/asm/mshyperv.h:generate_guest_id
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_read_msr
Cyclomatic Complexity 1 arch/x86//hyperv/hv_init.c:read_hv_clock_msr
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:paravirt_write_msr
Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:wrmsrl
Cyclomatic Complexity 1 include/linux/clocksource.h:clocksource_register_hz
Cyclomatic Complexity 1 arch/x86/include/asm/io.h:virt_to_phys
Cyclomatic Complexity 4 arch/x86//hyperv/hv_init.c:hyperv_init
Cyclomatic Complexity 1 arch/x86//hyperv/hv_init.c:hyperv_cleanup
Cyclomatic Complexity 4 arch/x86//hyperv/hv_init.c:hv_do_hypercall
Cyclomatic Complexity 2 arch/x86//hyperv/hv_init.c:hyperv_report_panic
Cyclomatic Complexity 2 arch/x86//hyperv/hv_init.c:hv_is_hypercall_page_setup
cc1: some warnings being treated as errors
vim +/cmpxchg +115 arch/x86/include/asm/mshyperv.h
e810e48c K. Y. Srinivasan 2017-01-19 109 * In case we blindly write msg->header.message_type we're going
e810e48c K. Y. Srinivasan 2017-01-19 110 * to lose it. We can still lose a message of the same type but
e810e48c K. Y. Srinivasan 2017-01-19 111 * we count on the fact that there can only be one
e810e48c K. Y. Srinivasan 2017-01-19 112 * CHANNELMSG_UNLOAD_RESPONSE and we don't care about other messages
e810e48c K. Y. Srinivasan 2017-01-19 113 * on crash.
e810e48c K. Y. Srinivasan 2017-01-19 114 */
e810e48c K. Y. Srinivasan 2017-01-19 @115 if (cmpxchg(&msg->header.message_type, old_msg_type,
e810e48c K. Y. Srinivasan 2017-01-19 116 HVMSG_NONE) != old_msg_type)
e810e48c K. Y. Srinivasan 2017-01-19 117 return;
e810e48c K. Y. Srinivasan 2017-01-19 118
:::::: The code at line 115 was first introduced by commit
:::::: e810e48c0c9a1a1ebb90cfe966bce6dc80ce08e7 Drivers: hv: vmbus: Move the code to signal end of message
:::::: TO: K. Y. Srinivasan <kys@microsoft.com>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28035 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-24 8:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 8:50 x86/mshyperv: Remove unneeded includes from mshyperv.h Thomas Gleixner
2017-06-23 10:00 ` Thomas Gleixner
2017-06-24 6:54 ` [tip:x86/urgent] x86/mshyperv: Remove excess #includes " tip-bot for Thomas Gleixner
2017-06-24 8:54 ` x86/mshyperv: Remove unneeded includes " kbuild test robot
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).