summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2011-12-03 17:36:18 +0000
committerLars Wendler <polynomial-c@gentoo.org>2011-12-03 17:36:18 +0000
commit30f3541b3dfcdc47a28ee0f60793dff614b9ff40 (patch)
tree8a481f691c0a5a456cbdcb1d859314f589673b35 /app-emulation
parentalpha/ia64/m68k/s390/sh/sparc stable wrt #389981 (diff)
downloadgentoo-2-30f3541b3dfcdc47a28ee0f60793dff614b9ff40.tar.gz
gentoo-2-30f3541b3dfcdc47a28ee0f60793dff614b9ff40.tar.bz2
gentoo-2-30f3541b3dfcdc47a28ee0f60793dff614b9ff40.zip
Fixed compilation with kernel-3.2 (bug #389953)
(Portage version: 2.2.0_alpha79/cvs/Linux x86_64)
Diffstat (limited to 'app-emulation')
-rw-r--r--app-emulation/virtualbox-modules/ChangeLog8
-rw-r--r--app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.6-kernel-3.2-vboxpci.patch56
-rw-r--r--app-emulation/virtualbox-modules/virtualbox-modules-4.1.6.ebuild5
3 files changed, 67 insertions, 2 deletions
diff --git a/app-emulation/virtualbox-modules/ChangeLog b/app-emulation/virtualbox-modules/ChangeLog
index 71fa00e7d369..f5c06ff2a19a 100644
--- a/app-emulation/virtualbox-modules/ChangeLog
+++ b/app-emulation/virtualbox-modules/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-emulation/virtualbox-modules
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/ChangeLog,v 1.94 2011/11/06 13:16:19 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/ChangeLog,v 1.95 2011/12/03 17:36:18 polynomial-c Exp $
+
+ 03 Dec 2011; Lars Wendler <polynomial-c@gentoo.org>
+ virtualbox-modules-4.1.6.ebuild,
+ +files/virtualbox-modules-4.1.6-kernel-3.2-vboxpci.patch:
+ Fixed compilation with kernel-3.2 (bug #389953). Thanks to Fabio Rossi for
+ providing a patch.
06 Nov 2011; Lars Wendler <polynomial-c@gentoo.org>
virtualbox-modules-4.1.4.ebuild, virtualbox-modules-4.1.6.ebuild:
diff --git a/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.6-kernel-3.2-vboxpci.patch b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.6-kernel-3.2-vboxpci.patch
new file mode 100644
index 000000000000..172f0d6cd456
--- /dev/null
+++ b/app-emulation/virtualbox-modules/files/virtualbox-modules-4.1.6-kernel-3.2-vboxpci.patch
@@ -0,0 +1,56 @@
+https://bugs.gentoo.org/389953
+
+--- vboxpci/linux/VBoxPci-linux.c
++++ vboxpci/linux/VBoxPci-linux.c
+@@ -33,14 +33,22 @@
+ #include "VBoxPciInternal.h"
+
+ #ifdef VBOX_WITH_IOMMU
+-#include <linux/dmar.h>
+-#include <linux/intel-iommu.h>
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
+-# include <asm/amd_iommu.h>
+-#else
+-# include <linux/amd-iommu.h>
+-#endif
+-#endif
++# include <linux/dmar.h>
++# include <linux/intel-iommu.h>
++# include <linux/pci.h>
++# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0)
++# include <asm/amd_iommu.h>
++# else
++# include <linux/amd-iommu.h>
++# endif
++# if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
++# define IOMMU_PRESENT() iommu_found()
++# define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc()
++# else
++# define IOMMU_PRESENT() iommu_present(&pci_bus_type)
++# define IOMMU_DOMAIN_ALLOC() iommu_domain_alloc(&pci_bus_type)
++# endif
++#endif /* VBOX_WITH_IOMMU */
+
+
+ /*******************************************************************************
+@@ -146,7 +154,7 @@
+ #endif
+
+ #ifdef VBOX_WITH_IOMMU
+- if (iommu_found())
++ if (IOMMU_PRESENT())
+ printk(KERN_INFO "vboxpci: IOMMU found\n");
+ else
+ printk(KERN_INFO "vboxpci: IOMMU not found (not registered)\n");
+@@ -984,9 +992,9 @@
+ printk(KERN_DEBUG "vboxPciOsInitVm: %p\n", pThis);
+ #endif
+ #ifdef VBOX_WITH_IOMMU
+- if (iommu_found())
++ if (IOMMU_PRESENT())
+ {
+- pThis->pIommuDomain = iommu_domain_alloc();
++ pThis->pIommuDomain = IOMMU_DOMAIN_ALLOC();
+ if (!pThis->pIommuDomain)
+ {
+ printk(KERN_DEBUG "cannot allocate IOMMU domain\n");
diff --git a/app-emulation/virtualbox-modules/virtualbox-modules-4.1.6.ebuild b/app-emulation/virtualbox-modules/virtualbox-modules-4.1.6.ebuild
index e0bf972fd60a..72a076337c0f 100644
--- a/app-emulation/virtualbox-modules/virtualbox-modules-4.1.6.ebuild
+++ b/app-emulation/virtualbox-modules/virtualbox-modules-4.1.6.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-4.1.6.ebuild,v 1.2 2011/11/06 13:16:19 polynomial-c Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-emulation/virtualbox-modules/virtualbox-modules-4.1.6.ebuild,v 1.3 2011/12/03 17:36:18 polynomial-c Exp $
# XXX: the tarball here is just the kernel modules split out of the binary
# package that comes from virtualbox-bin
@@ -35,6 +35,9 @@ pkg_setup() {
}
src_prepare() {
+ # bug #389953
+ epatch "${FILESDIR}"/${PN}-4.1.6-kernel-3.2-vboxpci.patch
+
if kernel_is -ge 2 6 33 ; then
# evil patch for new kernels - header moved
grep -lR linux/autoconf.h * | xargs sed -i -e 's:<linux/autoconf.h>:<generated/autoconf.h>:'