VirtualBox

Ignore:
Timestamp:
Apr 26, 2010 7:45:16 PM (15 years ago)
Author:
vboxsync
Message:

iprt: added CachePolicy parameter to RTR0MemObjEnterPhys()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c

    r26869 r28777  
    747747
    748748
    749 int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb)
     749int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb, unsigned CachePolicy)
    750750{
    751751    /*
     
    763763    pMemLnx->Core.u.Phys.PhysBase = PhysAddr;
    764764    pMemLnx->Core.u.Phys.fAllocated = false;
     765    pMemLnx->Core.u.Phys.CachePolicy = CachePolicy;
    765766    Assert(!pMemLnx->cPages);
    766767    *ppMem = &pMemLnx->Core;
     
    11691170             */
    11701171            Assert(pMemLnxToMap->Core.enmType == RTR0MEMOBJTYPE_PHYS && !pMemLnxToMap->Core.u.Phys.fAllocated);
    1171             pMemLnx->Core.pv = ioremap(pMemLnxToMap->Core.u.Phys.PhysBase, pMemLnxToMap->Core.cb);
     1172            pMemLnx->Core.pv = (pMemLnx->Core.u.Phys.CachePolicy == RTMEM_CACHE_POLICY_MMIO)
     1173                                   ? ioremap_nocache(pMemLnxToMap->Core.u.Phys.PhysBase, pMemLnxToMap->Core.cb)
     1174                                   : ioremap(pMemLnxToMap->Core.u.Phys.PhysBase, pMemLnxToMap->Core.cb);
    11721175            if (pMemLnx->Core.pv)
    11731176            {
Note: See TracChangeset for help on using the changeset viewer.

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