Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 548102 - app-emulation/virtualbox-modules-4.3.26 VBoxPci-linux.c uses deprecated "IRQF_DISABLED" which is removed now from linux kernel
Summary: app-emulation/virtualbox-modules-4.3.26 VBoxPci-linux.c uses deprecated "IRQF...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-04-29 06:50 UTC by jospezial
Modified: 2017-08-31 17:38 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
virtualbox-modules-4.3.26_VBoxPci_linux_4.1.patch (virtualbox-modules-4.3.26_VBoxPci_linux_4.1.patch,558 bytes, patch)
2015-05-01 12:31 UTC, jospezial
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jospezial 2015-04-29 06:50:57 UTC
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=8954672d86d036643e3ce7ce3b2422c336db66d0
Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
 Core code:
   - final removal of IRQF_DISABLED


make[2]: Entering directory '/usr/src/linux-4.1-rc1'
  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/linux/VBoxPci-linux.o
  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/VBoxPci.o
  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/SUPR0IdcClient.o
  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/SUPR0IdcClientComponent.o
  CC [M]  /var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/linux/SUPR0IdcClient-linux.o
/var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/linux/VBoxPci-linux.c: In function ‘vboxPciOsDevRegisterIrqHandler’:
/var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/linux/VBoxPci-linux.c:889:22: error: ‘IRQF_DISABLED’ undeclared (first use in this function)
                      IRQF_DISABLED, /* keep irqs disabled when calling the action handler */
                      ^
/var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/linux/VBoxPci-linux.c:889:22: note: each undeclared identifier is reported only once for each function it appears in
scripts/Makefile.build:258: recipe for target '/var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/linux/VBoxPci-linux.o' failed
make[3]: *** [/var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci/linux/VBoxPci-linux.o] Error 1
Makefile:1383: recipe for target '_module_/var/tmp/portage/app-emulation/virtualbox-modules-4.3.26/work/vboxpci' failed



This is the part of virtualbox-modules-4.3.26/work/vboxpci/linux/VBoxPci-linux.c:

    rc = request_irq(iIrq,
                     vboxPciOsIrqHandler,
#ifdef VBOX_WITH_SHARED_PCI_INTERRUPTS
                     /* Allow interrupts sharing. */
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
                     IRQF_SHARED,
# else
                     SA_SHIRQ,
# endif

#else

                     /* We don't allow interrupts sharing */
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
                     IRQF_DISABLED, /* keep irqs disabled when calling the action handler */
# else
                     0,
# endif
#endif
                     DRIVER_NAME,
                     pIns);
Comment 1 jospezial 2015-05-01 12:04:16 UTC
https://www.virtualbox.org/changeset/55508/vbox/trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c

HostDrivers/VBoxPci: Linux 4.1 compile fix

--- a/trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
+++ b/trunk/src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c
@@ -924,5 +924,6 @@
 
                      /* We don't allow interrupts sharing */
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
+                     /* XXX overhaul */
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
                      IRQF_DISABLED, /* keep irqs disabled when calling the action handler */
 # else
Comment 2 jospezial 2015-05-01 12:31:08 UTC
Created attachment 402386 [details, diff]
virtualbox-modules-4.3.26_VBoxPci_linux_4.1.patch

this is adapted for virtualbox-modules-4.3.26

--- vboxpci/linux/VBoxPci-linux.c.orig  2014-10-10 10:00:57.000000000 +0200
+++ vboxpci/linux/VBoxPci-linux.c       2015-05-01 14:11:11.795455862 +0200
@@ -885,7 +885,8 @@
 #else
 
                      /* We don't allow interrupts sharing */
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
+                     /* XXX overhaul */
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0)
                      IRQF_DISABLED, /* keep irqs disabled when calling the action handler */
 # else
                      0,
Comment 3 jospezial 2015-05-01 12:32:49 UTC
diff -u virtualbox-modules-4.3.26.ebuild.orig virtualbox-modules-4.3.26.ebuild
--- virtualbox-modules-4.3.26.ebuild.orig       2015-03-17 08:59:31.000000000 +0100
+++ virtualbox-modules-4.3.26.ebuild    2015-05-01 14:22:15.085454812 +0200
@@ -43,6 +43,7 @@
        if use pax_kernel && kernel_is -ge 3 0 0 ; then
                epatch "${FILESDIR}"/${PN}-4.1.4-pax-const.patch
        fi
+               epatch "${FILESDIR}"/${PN}-4.3.26_VBoxPci_linux_4.1.patch
 }
 
 src_install() {