提交 dd135ebb 编写于 作者: C Christian Borntraeger 提交者: Linus Torvalds

kvm: provide kvm.h for all architecture: fixes headers_install

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 fb56dbb3
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: NAvi 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: NChristian Borntraeger <borntraeger@de.ibm.com>
Acked-by: NAvi 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8eb224cd
#ifndef __LINUX_KVM_ALPHA_H
#define __LINUX_KVM_ALPHA_H
/* alpha does not support KVM */
#endif
#ifndef __LINUX_KVM_ARM_H
#define __LINUX_KVM_ARM_H
/* arm does not support KVM */
#endif
#ifndef __LINUX_KVM_AVR32_H
#define __LINUX_KVM_AVR32_H
/* avr32 does not support KVM */
#endif
#ifndef __LINUX_KVM_BLACKFIN_H
#define __LINUX_KVM_BLACKFIN_H
/* blackfin does not support KVM */
#endif
#ifndef __LINUX_KVM_CRIS_H
#define __LINUX_KVM_CRIS_H
/* cris does not support KVM */
#endif
#ifndef __LINUX_KVM_FRV_H
#define __LINUX_KVM_FRV_H
/* frv does not support KVM */
#endif
header-y += kvm.h
ifeq ($(wildcard include/asm-$(SRCARCH)/a.out.h),include/asm-$(SRCARCH)/a.out.h)
unifdef-y += a.out.h
endif
......
#ifndef __LINUX_KVM_H8300_H
#define __LINUX_KVM_H8300_H
/* h8300 does not support KVM */
#endif
#ifndef __LINUX_KVM_IA64_H
#define __LINUX_KVM_IA64_H
/* ia64 does not support KVM */
#endif
#ifndef __LINUX_KVM_M32R_H
#define __LINUX_KVM_M32R_H
/* m32r does not support KVM */
#endif
#ifndef __LINUX_KVM_M68K_H
#define __LINUX_KVM_M68K_H
/* m68k does not support KVM */
#endif
#ifndef __LINUX_KVM_M68KNOMMU_H
#define __LINUX_KVM_M68KNOMMU_H
/* m68knommu does not support KVM */
#endif
#ifndef __LINUX_KVM_MIPS_H
#define __LINUX_KVM_MIPS_H
/* mips does not support KVM */
#endif
#ifndef __LINUX_KVM_MN10300_H
#define __LINUX_KVM_MN10300_H
/* mn10300 does not support KVM */
#endif
#ifndef __LINUX_KVM_PARISC_H
#define __LINUX_KVM_PARISC_H
/* parisc does not support KVM */
#endif
#ifndef __LINUX_KVM_POWERPC_H
#define __LINUX_KVM_POWERPC_H
/* powerpc does not support KVM */
#endif
#ifndef __LINUX_KVM_S390_H
#define __LINUX_KVM_S390_H
/* s390 does not support KVM */
#endif
#ifndef __LINUX_KVM_SH_H
#define __LINUX_KVM_SH_H
/* sh does not support KVM */
#endif
#ifndef __LINUX_KVM_SPARC_H
#define __LINUX_KVM_SPARC_H
/* sparc does not support KVM */
#endif
#ifndef __LINUX_KVM_SPARC64_H
#define __LINUX_KVM_SPARC64_H
/* sparc64 does not support KVM */
#endif
#ifndef __LINUX_KVM_UM_H
#define __LINUX_KVM_UM_H
/* um does not support KVM */
#endif
#ifndef __LINUX_KVM_V850_H
#define __LINUX_KVM_V850_H
/* v850 does not support KVM */
#endif
#ifndef __LINUX_KVM_XTENSA_H
#define __LINUX_KVM_XTENSA_H
/* xtensa does not support KVM */
#endif
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册