Skip to content

Commit

Permalink
kvm: provide kvm.h for all architecture: fixes headers_install
Browse files Browse the repository at this point in the history
Currently include/linux/kvm.h is not considered by make headers_install,
because Kbuild cannot handle " unifdef-$(CONFIG_FOO) += foo.h.  This problem
was introduced by

commit fb56dbb
Author: Avi Kivity <avi@qumranet.com>
Date:   Sun Dec 2 10:50:06 2007 +0200

    KVM: Export include/linux/kvm.h only if $ARCH actually supports KVM

    Currently, make headers_check barfs due to <asm/kvm.h>, which <linux/kvm.h>
    includes, not existing.  Rather than add a zillion <asm/kvm.h>s, export kvm.
    only if the arch actually supports it.

    Signed-off-by: Avi Kivity <avi@qumranet.com>

which makes this an 2.6.25 regression.

One way of solving the issue is to enhance Kbuild, but Avi and David conviced
me, that changing headers_install is not the way to go.  This patch changes
the definition for linux/kvm.h to unifdef-y.

If  unifdef-y is used for linux/kvm.h "make headers_check" will fail on all
architectures without asm/kvm.h.  Therefore, this patch also provides
asm/kvm.h on all architectures.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Avi Kivity <avi@qumranet.com>
Cc: Sam Ravnborg <sam@ravnborg.org
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
borntraeger authored and torvalds committed Apr 2, 2008
1 parent 8eb224c commit dd135eb
Show file tree
Hide file tree
Showing 24 changed files with 135 additions and 1 deletion.
6 changes: 6 additions & 0 deletions include/asm-alpha/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_ALPHA_H
#define __LINUX_KVM_ALPHA_H

/* alpha does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-arm/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_ARM_H
#define __LINUX_KVM_ARM_H

/* arm does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-avr32/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_AVR32_H
#define __LINUX_KVM_AVR32_H

/* avr32 does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-blackfin/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_BLACKFIN_H
#define __LINUX_KVM_BLACKFIN_H

/* blackfin does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-cris/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_CRIS_H
#define __LINUX_KVM_CRIS_H

/* cris does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-frv/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_FRV_H
#define __LINUX_KVM_FRV_H

/* frv does not support KVM */

#endif
2 changes: 2 additions & 0 deletions include/asm-generic/Kbuild.asm
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
header-y += kvm.h

ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h)
unifdef-y += a.out.h
endif
Expand Down
6 changes: 6 additions & 0 deletions include/asm-h8300/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_H8300_H
#define __LINUX_KVM_H8300_H

/* h8300 does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-ia64/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_IA64_H
#define __LINUX_KVM_IA64_H

/* ia64 does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-m32r/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_M32R_H
#define __LINUX_KVM_M32R_H

/* m32r does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-m68k/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_M68K_H
#define __LINUX_KVM_M68K_H

/* m68k does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-m68knommu/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_M68KNOMMU_H
#define __LINUX_KVM_M68KNOMMU_H

/* m68knommu does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-mips/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_MIPS_H
#define __LINUX_KVM_MIPS_H

/* mips does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-mn10300/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_MN10300_H
#define __LINUX_KVM_MN10300_H

/* mn10300 does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-parisc/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_PARISC_H
#define __LINUX_KVM_PARISC_H

/* parisc does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-powerpc/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_POWERPC_H
#define __LINUX_KVM_POWERPC_H

/* powerpc does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-s390/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_S390_H
#define __LINUX_KVM_S390_H

/* s390 does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-sh/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_SH_H
#define __LINUX_KVM_SH_H

/* sh does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-sparc/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_SPARC_H
#define __LINUX_KVM_SPARC_H

/* sparc does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-sparc64/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_SPARC64_H
#define __LINUX_KVM_SPARC64_H

/* sparc64 does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-um/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_UM_H
#define __LINUX_KVM_UM_H

/* um does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-v850/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_V850_H
#define __LINUX_KVM_V850_H

/* v850 does not support KVM */

#endif
6 changes: 6 additions & 0 deletions include/asm-xtensa/kvm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef __LINUX_KVM_XTENSA_H
#define __LINUX_KVM_XTENSA_H

/* xtensa does not support KVM */

#endif
2 changes: 1 addition & 1 deletion include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ unifdef-y += kd.h
unifdef-y += kernelcapi.h
unifdef-y += kernel.h
unifdef-y += keyboard.h
unifdef-$(CONFIG_HAVE_KVM) += kvm.h
unifdef-y += kvm.h
unifdef-y += llc.h
unifdef-y += loop.h
unifdef-y += lp.h
Expand Down

0 comments on commit dd135eb

Please sign in to comment.