* [PATCH] Revert "KVM: Export asm-generic/kvm_para.h"
@ 2012-07-18 10:29 Will Deacon
2012-07-18 11:58 ` Arnd Bergmann
0 siblings, 1 reply; 6+ messages in thread
From: Will Deacon @ 2012-07-18 10:29 UTC (permalink / raw)
To: linux-kernel; +Cc: Will Deacon, Arnd Bergmann, Avi Kivity, Geert Uytterhoeven
This reverts commit 56457f38f212344fb38b250cfa7e7311c065022f.
For architectures without asm/kvm_para.h, asm-generic/Kbuild
unconditionally tries to export the non-existent header file, resulting
in failure to build the user headers. Since the logic in
asm-generic/Kbuild.asm will only export the file if it exists (which in
turn causes linux/kvm_para.h to be exported), we can just remove the
unconditional header export.
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Avi Kivity <avi@redhat.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
---
I'm not sure what specific problem the original commit was fixing, so we
may need to solve this another way if there's something I've missed.
include/asm-generic/Kbuild | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
index 2c85a0f..53f91b1 100644
--- a/include/asm-generic/Kbuild
+++ b/include/asm-generic/Kbuild
@@ -8,7 +8,6 @@ header-y += int-ll64.h
header-y += ioctl.h
header-y += ioctls.h
header-y += ipcbuf.h
-header-y += kvm_para.h
header-y += mman-common.h
header-y += mman.h
header-y += msgbuf.h
--
1.7.4.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "KVM: Export asm-generic/kvm_para.h"
2012-07-18 10:29 [PATCH] Revert "KVM: Export asm-generic/kvm_para.h" Will Deacon
@ 2012-07-18 11:58 ` Arnd Bergmann
2012-07-18 12:33 ` Geert Uytterhoeven
2012-07-18 12:38 ` Will Deacon
0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2012-07-18 11:58 UTC (permalink / raw)
To: Will Deacon; +Cc: linux-kernel, Avi Kivity, Geert Uytterhoeven
On Wednesday 18 July 2012, Will Deacon wrote:
> This reverts commit 56457f38f212344fb38b250cfa7e7311c065022f.
>
> For architectures without asm/kvm_para.h, asm-generic/Kbuild
> unconditionally tries to export the non-existent header file, resulting
> in failure to build the user headers. Since the logic in
> asm-generic/Kbuild.asm will only export the file if it exists (which in
> turn causes linux/kvm_para.h to be exported), we can just remove the
> unconditional header export.
This doesn't look right.
> I'm not sure what specific problem the original commit was fixing, so we
> may need to solve this another way if there's something I've missed.
>
> include/asm-generic/Kbuild | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
> index 2c85a0f..53f91b1 100644
> --- a/include/asm-generic/Kbuild
> +++ b/include/asm-generic/Kbuild
> @@ -8,7 +8,6 @@ header-y += int-ll64.h
> header-y += ioctl.h
> header-y += ioctls.h
> header-y += ipcbuf.h
> -header-y += kvm_para.h
> header-y += mman-common.h
> header-y += mman.h
> header-y += msgbuf.h
include/asm-generic/Kbuild lists the header files in the asm-generic
directory, and the asm-generic/kvm_para.h always exists, it's
not architecture specific.
arch/arm/include/asm/kvm_para.h also always exists, it was added
in 3b5d56b93 "kvmclock: Add functions to check if the host has
stopped the vm", although it should have added that to the generated
header files listed in arch/arm/include/asm/Kbuild.
I'm still not sure what you are actually trying to fix here.
Arnd
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "KVM: Export asm-generic/kvm_para.h"
2012-07-18 11:58 ` Arnd Bergmann
@ 2012-07-18 12:33 ` Geert Uytterhoeven
2012-07-19 9:37 ` Will Deacon
2012-07-18 12:38 ` Will Deacon
1 sibling, 1 reply; 6+ messages in thread
From: Geert Uytterhoeven @ 2012-07-18 12:33 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: Will Deacon, linux-kernel, Avi Kivity
On Wed, Jul 18, 2012 at 1:58 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Wednesday 18 July 2012, Will Deacon wrote:
>> This reverts commit 56457f38f212344fb38b250cfa7e7311c065022f.
>>
>> For architectures without asm/kvm_para.h, asm-generic/Kbuild
>> unconditionally tries to export the non-existent header file, resulting
>> in failure to build the user headers. Since the logic in
>> asm-generic/Kbuild.asm will only export the file if it exists (which in
>> turn causes linux/kvm_para.h to be exported), we can just remove the
>> unconditional header export.
>
> This doesn't look right.
>
>> I'm not sure what specific problem the original commit was fixing, so we
>> may need to solve this another way if there's something I've missed.
See below.
>> include/asm-generic/Kbuild | 1 -
>> 1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
>> index 2c85a0f..53f91b1 100644
>> --- a/include/asm-generic/Kbuild
>> +++ b/include/asm-generic/Kbuild
>> @@ -8,7 +8,6 @@ header-y += int-ll64.h
>> header-y += ioctl.h
>> header-y += ioctls.h
>> header-y += ipcbuf.h
>> -header-y += kvm_para.h
>> header-y += mman-common.h
>> header-y += mman.h
>> header-y += msgbuf.h
>
> include/asm-generic/Kbuild lists the header files in the asm-generic
> directory, and the asm-generic/kvm_para.h always exists, it's
> not architecture specific.
>
> arch/arm/include/asm/kvm_para.h also always exists, it was added
> in 3b5d56b93 "kvmclock: Add functions to check if the host has
> stopped the vm", although it should have added that to the generated
> header files listed in arch/arm/include/asm/Kbuild.
>
> I'm still not sure what you are actually trying to fix here.
m68k/allmodconfig http://kisskb.ellerman.id.au/kisskb/buildresult/6695245/
make[4]: *** No rule to make target
`/scratch/kisskb/build/linux-next_m68k-allmodconfig_m68k/usr/include/linux/kvm_para.h',
needed by `/scratch/kisskb/build/linux-next_m68k-allmodconfig_m68k/usr/include/linux/.check'.
make[3]: *** [linux] Error 2
make[2]: *** [headers_check] Error 2
Before 56457f38f212344fb38b250cfa7e7311c065022f, "make headers_check"
was broken on all architectures that do not support kvm (i.e. all but
ia64/powerpc/s390/x86).
After 56457f38f212344fb38b250cfa7e7311c065022f, it became broken on
all architectures that do not support kvm and converted from
#include <asm-generic/kvm_para.h>
in their arch/$arch/include/asm/kvm_para.h to
generic-y += kvm_para.h
in their arch/$arch/include/asm/Kbuild OR just don't have a
arch/$arch/include/asm/kvm_para.h.
So far the former case is limited to sh (mainline) and m68k (next), but I expect
more architectures to start using the "generic-y += ..." idiom.
The latter is limited to cris and m32r.
Hence just reverting 56457f38f212344fb38b250cfa7e7311c065022f is not the
right fix, as it will cause more breakage.
See also https://lkml.org/lkml/2012/6/13/226
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "KVM: Export asm-generic/kvm_para.h"
2012-07-18 11:58 ` Arnd Bergmann
2012-07-18 12:33 ` Geert Uytterhoeven
@ 2012-07-18 12:38 ` Will Deacon
1 sibling, 0 replies; 6+ messages in thread
From: Will Deacon @ 2012-07-18 12:38 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-kernel, Avi Kivity, Geert Uytterhoeven
Hi Arnd,
On Wed, Jul 18, 2012 at 12:58:06PM +0100, Arnd Bergmann wrote:
> On Wednesday 18 July 2012, Will Deacon wrote:
> > This reverts commit 56457f38f212344fb38b250cfa7e7311c065022f.
> >
> > For architectures without asm/kvm_para.h, asm-generic/Kbuild
> > unconditionally tries to export the non-existent header file, resulting
> > in failure to build the user headers. Since the logic in
> > asm-generic/Kbuild.asm will only export the file if it exists (which in
> > turn causes linux/kvm_para.h to be exported), we can just remove the
> > unconditional header export.
>
> This doesn't look right.
Ok, something's still amiss with my headers though (see below).
> > I'm not sure what specific problem the original commit was fixing, so we
> > may need to solve this another way if there's something I've missed.
> >
> > include/asm-generic/Kbuild | 1 -
> > 1 files changed, 0 insertions(+), 1 deletions(-)
> >
> > diff --git a/include/asm-generic/Kbuild b/include/asm-generic/Kbuild
> > index 2c85a0f..53f91b1 100644
> > --- a/include/asm-generic/Kbuild
> > +++ b/include/asm-generic/Kbuild
> > @@ -8,7 +8,6 @@ header-y += int-ll64.h
> > header-y += ioctl.h
> > header-y += ioctls.h
> > header-y += ipcbuf.h
> > -header-y += kvm_para.h
> > header-y += mman-common.h
> > header-y += mman.h
> > header-y += msgbuf.h
>
> include/asm-generic/Kbuild lists the header files in the asm-generic
> directory, and the asm-generic/kvm_para.h always exists, it's
> not architecture specific.
Right. Why do we have a conditional export of kvm_para.h in
include/linux/Kbuild if the asm-generic version always exists? Is it
permitted for an architecture to neither have it's own copy or use the
generic version?
> arch/arm/include/asm/kvm_para.h also always exists, it was added
> in 3b5d56b93 "kvmclock: Add functions to check if the host has
> stopped the vm", although it should have added that to the generated
> header files listed in arch/arm/include/asm/Kbuild.
Why does that have to be added to the list of generated files?
include/asm-generic/Kbuild.asm exports the header if it exists.
> I'm still not sure what you are actually trying to fix here.
Sorry, should've mentioned: this is for AArch64 as opposed to ARM. Trying
to build the headers_check target results in:
linux/usr/include/linux/kvm_para.h:26: included file 'asm-aarch64/kvm_para.h' is not exported
because the presence of asm-generic/kvm_para.h causes linux/kvm_para.h to
be exported. Ideally, we wouldn't need the header (if that's possible) but
if we have to have it, a generic-y += kvm_para.h would be better than
having a file just containing the line: #include <asm-generic/kvm_para.h>
Thanks,
Will
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "KVM: Export asm-generic/kvm_para.h"
2012-07-18 12:33 ` Geert Uytterhoeven
@ 2012-07-19 9:37 ` Will Deacon
2012-07-19 21:12 ` Geert Uytterhoeven
0 siblings, 1 reply; 6+ messages in thread
From: Will Deacon @ 2012-07-19 9:37 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: Arnd Bergmann, linux-kernel, Avi Kivity
Hi Geert,
On Wed, Jul 18, 2012 at 01:33:01PM +0100, Geert Uytterhoeven wrote:
> > On Wednesday 18 July 2012, Will Deacon wrote:
> >
> >> I'm not sure what specific problem the original commit was fixing, so we
> >> may need to solve this another way if there's something I've missed.
>
> See below.
[...]
> make[4]: *** No rule to make target
> `/scratch/kisskb/build/linux-next_m68k-allmodconfig_m68k/usr/include/linux/kvm_para.h',
> needed by `/scratch/kisskb/build/linux-next_m68k-allmodconfig_m68k/usr/include/linux/.check'.
> make[3]: *** [linux] Error 2
> make[2]: *** [headers_check] Error 2
[...]
> So far the former case is limited to sh (mainline) and m68k (next), but I expect
> more architectures to start using the "generic-y += ..." idiom.
>
> The latter is limited to cris and m32r.
>
> Hence just reverting 56457f38f212344fb38b250cfa7e7311c065022f is not the
> right fix, as it will cause more breakage.
Thanks for the explanation. Given that we have the asm-generic version of
kvm_para.h, I don't see why we can't just export linux/kvm_para.h
unconditionally and fix the few remaining architectures by adding generic-y
lines to their Kbuild files.
Something like below (I also removed what look like dead references to
asm-$(SRCARCH) in the srctree)...
Will
---8<---
diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild
index 04d02a5..2fde49c 100644
--- a/arch/cris/include/asm/Kbuild
+++ b/arch/cris/include/asm/Kbuild
@@ -7,3 +7,5 @@ header-y += ethernet.h
header-y += etraxgpio.h
header-y += rs485.h
header-y += sync_serial.h
+
+generic-y += kvm_para.h
diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild
index c68e168..78c505e 100644
--- a/arch/m32r/include/asm/Kbuild
+++ b/arch/m32r/include/asm/Kbuild
@@ -1 +1,3 @@
include include/asm-generic/Kbuild.asm
+
+generic-y += kvm_para.h
diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
index c5d2e5d..f180c99 100644
--- a/include/asm-generic/Kbuild.asm
+++ b/include/asm-generic/Kbuild.asm
@@ -1,15 +1,8 @@
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
- $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
+ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h),)
header-y += kvm.h
endif
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
- $(srctree)/include/asm-$(SRCARCH)/kvm_para.h),)
-header-y += kvm_para.h
-endif
-
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
- $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
+ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h),)
header-y += a.out.h
endif
@@ -21,6 +14,7 @@ header-y += fcntl.h
header-y += ioctl.h
header-y += ioctls.h
header-y += ipcbuf.h
+header-y += kvm_para.h
header-y += mman.h
header-y += msgbuf.h
header-y += param.h
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 8760be3..048abc6 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -23,20 +23,13 @@ header-y += wimax/
objhdr-y += version.h
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
- $(srctree)/include/asm-$(SRCARCH)/a.out.h \
$(INSTALL_HDR_PATH)/include/asm-*/a.out.h),)
header-y += a.out.h
endif
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
- $(srctree)/include/asm-$(SRCARCH)/kvm.h \
$(INSTALL_HDR_PATH)/include/asm-*/kvm.h),)
header-y += kvm.h
endif
-ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
- $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \
- $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),)
-header-y += kvm_para.h
-endif
header-y += acct.h
header-y += adb.h
@@ -229,6 +222,7 @@ header-y += kernel-page-flags.h
header-y += kexec.h
header-y += keyboard.h
header-y += keyctl.h
+header-y += kvm_para.h
header-y += l2tp.h
header-y += limits.h
header-y += llc.h
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Revert "KVM: Export asm-generic/kvm_para.h"
2012-07-19 9:37 ` Will Deacon
@ 2012-07-19 21:12 ` Geert Uytterhoeven
0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2012-07-19 21:12 UTC (permalink / raw)
To: Will Deacon; +Cc: Arnd Bergmann, linux-kernel, Avi Kivity
Hi Will,
On Thu, Jul 19, 2012 at 11:37 AM, Will Deacon <will.deacon@arm.com> wrote:
> On Wed, Jul 18, 2012 at 01:33:01PM +0100, Geert Uytterhoeven wrote:
>> > On Wednesday 18 July 2012, Will Deacon wrote:
>> >
>> >> I'm not sure what specific problem the original commit was fixing, so we
>> >> may need to solve this another way if there's something I've missed.
>>
>> See below.
>
> [...]
>
>> make[4]: *** No rule to make target
>> `/scratch/kisskb/build/linux-next_m68k-allmodconfig_m68k/usr/include/linux/kvm_para.h',
>> needed by `/scratch/kisskb/build/linux-next_m68k-allmodconfig_m68k/usr/include/linux/.check'.
>> make[3]: *** [linux] Error 2
>> make[2]: *** [headers_check] Error 2
>
> [...]
>
>> So far the former case is limited to sh (mainline) and m68k (next), but I expect
>> more architectures to start using the "generic-y += ..." idiom.
>>
>> The latter is limited to cris and m32r.
>>
>> Hence just reverting 56457f38f212344fb38b250cfa7e7311c065022f is not the
>> right fix, as it will cause more breakage.
>
> Thanks for the explanation. Given that we have the asm-generic version of
> kvm_para.h, I don't see why we can't just export linux/kvm_para.h
> unconditionally and fix the few remaining architectures by adding generic-y
> lines to their Kbuild files.
>
> Something like below (I also removed what look like dead references to
> asm-$(SRCARCH) in the srctree)...
I applied your patch on next-20120719 and ran "make ARCH=xxx headers_check"
for all architectures (this doesn't require any cross-compilers to be
installed).
It fixes the issue for m32r, m68k, and sh. Cris still fails for another reason.
It did not introduce any regressions for other architectures, so
Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---8<---
>
> diff --git a/arch/cris/include/asm/Kbuild b/arch/cris/include/asm/Kbuild
> index 04d02a5..2fde49c 100644
> --- a/arch/cris/include/asm/Kbuild
> +++ b/arch/cris/include/asm/Kbuild
> @@ -7,3 +7,5 @@ header-y += ethernet.h
> header-y += etraxgpio.h
> header-y += rs485.h
> header-y += sync_serial.h
> +
> +generic-y += kvm_para.h
> diff --git a/arch/m32r/include/asm/Kbuild b/arch/m32r/include/asm/Kbuild
> index c68e168..78c505e 100644
> --- a/arch/m32r/include/asm/Kbuild
> +++ b/arch/m32r/include/asm/Kbuild
> @@ -1 +1,3 @@
> include include/asm-generic/Kbuild.asm
> +
> +generic-y += kvm_para.h
> diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm
> index c5d2e5d..f180c99 100644
> --- a/include/asm-generic/Kbuild.asm
> +++ b/include/asm-generic/Kbuild.asm
> @@ -1,15 +1,8 @@
> -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
> - $(srctree)/include/asm-$(SRCARCH)/kvm.h),)
> +ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h),)
> header-y += kvm.h
> endif
>
> -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
> - $(srctree)/include/asm-$(SRCARCH)/kvm_para.h),)
> -header-y += kvm_para.h
> -endif
> -
> -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
> - $(srctree)/include/asm-$(SRCARCH)/a.out.h),)
> +ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h),)
> header-y += a.out.h
> endif
>
> @@ -21,6 +14,7 @@ header-y += fcntl.h
> header-y += ioctl.h
> header-y += ioctls.h
> header-y += ipcbuf.h
> +header-y += kvm_para.h
> header-y += mman.h
> header-y += msgbuf.h
> header-y += param.h
> diff --git a/include/linux/Kbuild b/include/linux/Kbuild
> index 8760be3..048abc6 100644
> --- a/include/linux/Kbuild
> +++ b/include/linux/Kbuild
> @@ -23,20 +23,13 @@ header-y += wimax/
> objhdr-y += version.h
>
> ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/a.out.h \
> - $(srctree)/include/asm-$(SRCARCH)/a.out.h \
> $(INSTALL_HDR_PATH)/include/asm-*/a.out.h),)
> header-y += a.out.h
> endif
> ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm.h \
> - $(srctree)/include/asm-$(SRCARCH)/kvm.h \
> $(INSTALL_HDR_PATH)/include/asm-*/kvm.h),)
> header-y += kvm.h
> endif
> -ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/include/asm/kvm_para.h \
> - $(srctree)/include/asm-$(SRCARCH)/kvm_para.h \
> - $(INSTALL_HDR_PATH)/include/asm-*/kvm_para.h),)
> -header-y += kvm_para.h
> -endif
>
> header-y += acct.h
> header-y += adb.h
> @@ -229,6 +222,7 @@ header-y += kernel-page-flags.h
> header-y += kexec.h
> header-y += keyboard.h
> header-y += keyctl.h
> +header-y += kvm_para.h
> header-y += l2tp.h
> header-y += limits.h
> header-y += llc.h
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-07-19 21:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-18 10:29 [PATCH] Revert "KVM: Export asm-generic/kvm_para.h" Will Deacon
2012-07-18 11:58 ` Arnd Bergmann
2012-07-18 12:33 ` Geert Uytterhoeven
2012-07-19 9:37 ` Will Deacon
2012-07-19 21:12 ` Geert Uytterhoeven
2012-07-18 12:38 ` Will Deacon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.