!211 Delete redundant code
Merge pull request !211 from Harylee/update_osal
This commit is contained in:
commit
78f1de69f4
|
@ -893,7 +893,7 @@ STATIC VOID OsSetKSectionAttr(UINTPTR virtAddr, BOOL uncached)
|
||||||
for (i = 0; i < length; i++) {
|
for (i = 0; i < length; i++) {
|
||||||
kernelMap = &mmuKernelMappings[i];
|
kernelMap = &mmuKernelMappings[i];
|
||||||
if (uncached) {
|
if (uncached) {
|
||||||
flags |= VM_MAP_REGION_FLAG_UNCACHED;
|
kernelMap->flags |= VM_MAP_REGION_FLAG_UNCACHED;
|
||||||
}
|
}
|
||||||
status = LOS_ArchMmuMap(&kSpace->archMmu, kernelMap->virt, kernelMap->phys,
|
status = LOS_ArchMmuMap(&kSpace->archMmu, kernelMap->virt, kernelMap->phys,
|
||||||
kernelMap->size >> MMU_DESCRIPTOR_L2_SMALL_SHIFT, kernelMap->flags);
|
kernelMap->size >> MMU_DESCRIPTOR_L2_SMALL_SHIFT, kernelMap->flags);
|
||||||
|
|
|
@ -238,34 +238,6 @@ STATIC BOOL OsVmSpaceParamCheck(LosVmSpace *vmSpace)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
LosVmMapRegion *OsShareRegionClone(LosVmMapRegion *oldRegion)
|
|
||||||
{
|
|
||||||
/* no need to create vm object */
|
|
||||||
LosVmMapRegion *newRegion = LOS_MemAlloc(m_aucSysMem0, sizeof(LosVmMapRegion));
|
|
||||||
if (newRegion == NULL) {
|
|
||||||
VM_ERR("malloc new region struct failed.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* todo: */
|
|
||||||
*newRegion = *oldRegion;
|
|
||||||
return newRegion;
|
|
||||||
}
|
|
||||||
|
|
||||||
LosVmMapRegion *OsPrivateRegionClone(LosVmMapRegion *oldRegion)
|
|
||||||
{
|
|
||||||
/* need to create vm object */
|
|
||||||
LosVmMapRegion *newRegion = LOS_MemAlloc(m_aucSysMem0, sizeof(LosVmMapRegion));
|
|
||||||
if (newRegion == NULL) {
|
|
||||||
VM_ERR("malloc new region struct failed.");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* todo: */
|
|
||||||
*newRegion = *oldRegion;
|
|
||||||
return newRegion;
|
|
||||||
}
|
|
||||||
|
|
||||||
STATUS_T LOS_VmSpaceClone(LosVmSpace *oldVmSpace, LosVmSpace *newVmSpace)
|
STATUS_T LOS_VmSpaceClone(LosVmSpace *oldVmSpace, LosVmSpace *newVmSpace)
|
||||||
{
|
{
|
||||||
LosVmMapRegion *oldRegion = NULL;
|
LosVmMapRegion *oldRegion = NULL;
|
||||||
|
@ -840,11 +812,6 @@ STATUS_T OsIsRegionCanExpand(LosVmSpace *space, LosVmMapRegion *region, size_t s
|
||||||
return LOS_NOK;
|
return LOS_NOK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if next node is head, then we can expand */
|
|
||||||
if (OsIsVmRegionEmpty(space) == TRUE) {
|
|
||||||
return LOS_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
nextRegion = (LosVmMapRegion *)LOS_RbSuccessorNode(&space->regionRbTree, ®ion->rbNode);
|
nextRegion = (LosVmMapRegion *)LOS_RbSuccessorNode(&space->regionRbTree, ®ion->rbNode);
|
||||||
/* if the gap is larger than size, then we can expand */
|
/* if the gap is larger than size, then we can expand */
|
||||||
if ((nextRegion != NULL) && ((nextRegion->range.base - region->range.base) >= size)) {
|
if ((nextRegion != NULL) && ((nextRegion->range.base - region->range.base) >= size)) {
|
||||||
|
|
Loading…
Reference in New Issue