VirtualBox

Ticket #19312: fixes_for_5.6.patch

File fixes_for_5.6.patch, 2.0 KB (added by Larry998, 5 years ago)

This patch file will fix that problem.

  • src/VBox/HostDrivers/VBoxPci/linux/VBoxPci-linux.c

    old new DECLHIDDEN(int) vboxPciOsDevMapRegion(PV  
    843843        if (!rcLnx)
    844844        {
    845845            /* For now no caching, try to optimize later. */
     846#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
     847            RTR0PTR R0PtrMapping = ioremap(pci_resource_start(pPciDev, iRegion),
     848                                           pci_resource_len(pPciDev, iRegion));
     849#else
    846850            RTR0PTR R0PtrMapping = ioremap_nocache(pci_resource_start(pPciDev, iRegion),
    847851                                                   pci_resource_len(pPciDev, iRegion));
    848 
     852#endif
    849853            if (R0PtrMapping != NIL_RTR0PTR)
    850854                pIns->aRegionR0Mapping[iRegion] = R0PtrMapping;
    851855            else
  • src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    old new DECLHIDDEN(int) rtR0MemObjNativeMapKerne  
    14611461             * MMIO / physical memory.
    14621462             */
    14631463            Assert(pMemLnxToMap->Core.enmType == RTR0MEMOBJTYPE_PHYS && !pMemLnxToMap->Core.u.Phys.fAllocated);
     1464#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
     1465            pMemLnx->Core.pv = ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub);
     1466#else
    14641467            pMemLnx->Core.pv = pMemLnxToMap->Core.u.Phys.uCachePolicy == RTMEM_CACHE_POLICY_MMIO
    14651468                             ? ioremap_nocache(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub)
    14661469                             : ioremap(pMemLnxToMap->Core.u.Phys.PhysBase + offSub, cbSub);
     1470#endif
    14671471            if (pMemLnx->Core.pv)
    14681472            {
    14691473                /** @todo fix protection. */

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy