From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: [PATCH v2] kvm-kmod: x86: Drop duplicate external-module-compat objects Date: Mon, 25 May 2009 08:56:46 +0200 Message-ID: <4A1A412E.2090106@web.de> References: <4A170535.3090007@web.de> <4A19021E.8080205@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig45A5A19BA2C0A574E83935F4" Cc: kvm-devel To: Avi Kivity Return-path: Received: from fmmailgate01.web.de ([217.72.192.221]:34279 "EHLO fmmailgate01.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751156AbZEYG4r (ORCPT ); Mon, 25 May 2009 02:56:47 -0400 In-Reply-To: <4A19021E.8080205@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig45A5A19BA2C0A574E83935F4 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Avi Kivity wrote: > Jan Kiszka wrote: >> This redundancy breaks subtly when building against recent OpenSUSE >> kernels. >> >> Signed-off-by: Jan Kiszka >> --- >> >> x86/Kbuild | 4 ++-- >> 1 files changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/x86/Kbuild b/x86/Kbuild >> index e304c79..ade87fc 100644 >> --- a/x86/Kbuild >> +++ b/x86/Kbuild >> @@ -13,7 +13,7 @@ endif >> ifeq ($(CONFIG_IOMMU_API),y) >> kvm-objs +=3D iommu.o >> endif >> -kvm-intel-objs :=3D vmx.o vmx-debug.o ../external-module-compat.o >> -kvm-amd-objs :=3D svm.o ../external-module-compat.o >> +kvm-intel-objs :=3D vmx.o vmx-debug.o >> +kvm-amd-objs :=3D svm.o >> =20 >> =20 >=20 > IIRC, for really old kernels, some symbols are defined in > external-module-compat.c and needed by kvm-$arch.ko. So we'll have to > export those symbols if we drop the double link (which is a good idea > regardless of the build problem). >=20 Checked against 2.6.18 (2.6.16 doesn't build build with my gcc-4.3 and x86/x86_emulate.o sends my gcc-3.3 into some stack overflow): We only need to export kvm_smp_call_function_single. More patches to fix various old kernel build breakages are now also in my queue... ------------> This redundancy breaks subtly when building against recent OpenSUSE kernels. Somehow scripts/basic/hash gets called with multiple modname arguments, causing it to fail and produce invalid output. Changes in v2: - export kvm_smp_call_function_single required by vendor module Signed-off-by: Jan Kiszka --- external-module-compat.c | 3 +++ x86/Kbuild | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/external-module-compat.c b/external-module-compat.c index f6013f3..6b69127 100644 --- a/external-module-compat.c +++ b/external-module-compat.c @@ -46,6 +46,7 @@ int kvm_smp_call_function_single(int cpu, void (*func)(= void *info), put_cpu(); return r; } +EXPORT_SYMBOL_GPL(kvm_smp_call_function_single); =20 #define smp_call_function_single kvm_smp_call_function_single =20 @@ -75,6 +76,7 @@ int kvm_smp_call_function_single(int cpu, void (*func)(= void *info), put_cpu(); return r; } +EXPORT_SYMBOL_GPL(kvm_smp_call_function_single); =20 #define smp_call_function_single kvm_smp_call_function_single =20 @@ -104,6 +106,7 @@ int kvm_smp_call_function_single(int cpu, void (*func= )(void *info), =20 } #endif /* !CONFIG_SMP */ +EXPORT_SYMBOL_GPL(kvm_smp_call_function_single); =20 #define smp_call_function_single kvm_smp_call_function_single =20 diff --git a/x86/Kbuild b/x86/Kbuild index e304c79..ade87fc 100644 --- a/x86/Kbuild +++ b/x86/Kbuild @@ -13,7 +13,7 @@ endif ifeq ($(CONFIG_IOMMU_API),y) kvm-objs +=3D iommu.o endif -kvm-intel-objs :=3D vmx.o vmx-debug.o ../external-module-compat.o -kvm-amd-objs :=3D svm.o ../external-module-compat.o +kvm-intel-objs :=3D vmx.o vmx-debug.o +kvm-amd-objs :=3D svm.o =20 CFLAGS_kvm_main.o =3D -DKVM_MAIN --------------enig45A5A19BA2C0A574E83935F4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iEYEARECAAYFAkoaQS4ACgkQniDOoMHTA+lF7ACdHnJ9XqB51ZanxY5gw+JWBftq FlAAnRIjp2TBJ1Ge8utFfrA2vhMDXp1x =QK+S -----END PGP SIGNATURE----- --------------enig45A5A19BA2C0A574E83935F4--