提交 f63ce993 编写于 作者: O openharmony_ci 提交者: Gitee

!692 chore: 修复内存模块的一些不规范用语

Merge pull request !692 from kenneth/mmu_fix
...@@ -71,5 +71,5 @@ VADDR_T *OsGFirstTableGet(VOID); ...@@ -71,5 +71,5 @@ VADDR_T *OsGFirstTableGet(VOID);
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __cplusplus */ #endif /* __cplusplus */
#endif /* __LOS_VM_PAGE_H__ */ #endif /* __LOS_ARCH_MMU_H__ */
...@@ -618,7 +618,7 @@ STATIC UINT32 OsCvtPte2FlagsToAttrs(UINT32 flags) ...@@ -618,7 +618,7 @@ STATIC UINT32 OsCvtPte2FlagsToAttrs(UINT32 flags)
return mmuFlags; return mmuFlags;
} }
STATIC UINT32 OsMapL2PageContinous(PTE_T pte1, UINT32 flags, VADDR_T *vaddr, PADDR_T *paddr, UINT32 *count) STATIC UINT32 OsMapL2PageContinuous(PTE_T pte1, UINT32 flags, VADDR_T *vaddr, PADDR_T *paddr, UINT32 *count)
{ {
PTE_T *pte2BasePtr = NULL; PTE_T *pte2BasePtr = NULL;
UINT32 archFlags; UINT32 archFlags;
...@@ -662,9 +662,9 @@ status_t LOS_ArchMmuMap(LosArchMmu *archMmu, VADDR_T vaddr, PADDR_T paddr, size_ ...@@ -662,9 +662,9 @@ status_t LOS_ArchMmuMap(LosArchMmu *archMmu, VADDR_T vaddr, PADDR_T paddr, size_
l1Entry = OsGetPte1(archMmu->virtTtb, vaddr); l1Entry = OsGetPte1(archMmu->virtTtb, vaddr);
if (OsIsPte1Invalid(l1Entry)) { if (OsIsPte1Invalid(l1Entry)) {
OsMapL1PTE(archMmu, &l1Entry, vaddr, flags); OsMapL1PTE(archMmu, &l1Entry, vaddr, flags);
saveCounts = OsMapL2PageContinous(l1Entry, flags, &vaddr, &paddr, &count); saveCounts = OsMapL2PageContinuous(l1Entry, flags, &vaddr, &paddr, &count);
} else if (OsIsPte1PageTable(l1Entry)) { } else if (OsIsPte1PageTable(l1Entry)) {
saveCounts = OsMapL2PageContinous(l1Entry, flags, &vaddr, &paddr, &count); saveCounts = OsMapL2PageContinuous(l1Entry, flags, &vaddr, &paddr, &count);
} else { } else {
LOS_Panic("%s %d, unimplemented tt_entry %x\n", __FUNCTION__, __LINE__, l1Entry); LOS_Panic("%s %d, unimplemented tt_entry %x\n", __FUNCTION__, __LINE__, l1Entry);
} }
...@@ -716,7 +716,7 @@ STATUS_T LOS_ArchMmuMove(LosArchMmu *archMmu, VADDR_T oldVaddr, VADDR_T newVaddr ...@@ -716,7 +716,7 @@ STATUS_T LOS_ArchMmuMove(LosArchMmu *archMmu, VADDR_T oldVaddr, VADDR_T newVaddr
PADDR_T paddr = 0; PADDR_T paddr = 0;
if ((archMmu == NULL) || (oldVaddr == 0) || (newVaddr == 0) || (count == 0)) { if ((archMmu == NULL) || (oldVaddr == 0) || (newVaddr == 0) || (count == 0)) {
VM_ERR("invalid args: archMmu %p, oldVaddr %p, newVddr %p, count %d", VM_ERR("invalid args: archMmu %p, oldVaddr %p, newVaddr %p, count %d",
archMmu, oldVaddr, newVaddr, count); archMmu, oldVaddr, newVaddr, count);
return LOS_NOK; return LOS_NOK;
} }
......
...@@ -97,7 +97,7 @@ INT32 OsRegionOverlapCheckUnlock(LosVmSpace *space, LosVmMapRegion *region) ...@@ -97,7 +97,7 @@ INT32 OsRegionOverlapCheckUnlock(LosVmSpace *space, LosVmMapRegion *region)
if (((region->range.base + region->range.size) > regionTemp->range.base) && if (((region->range.base + region->range.size) > regionTemp->range.base) &&
(region->range.base < (regionTemp->range.base + regionTemp->range.size))) { (region->range.base < (regionTemp->range.base + regionTemp->range.size))) {
VM_ERR("overlap between regions:\n" VM_ERR("overlap between regions:\n"
"flals:%#x base:%p size:%08x space:%p\n" "flags:%#x base:%p size:%08x space:%p\n"
"flags:%#x base:%p size:%08x space:%p", "flags:%#x base:%p size:%08x space:%p",
region->regionFlags, region->range.base, region->range.size, region->space, region->regionFlags, region->range.base, region->range.size, region->space,
regionTemp->regionFlags, regionTemp->range.base, regionTemp->range.size, regionTemp->space); regionTemp->regionFlags, regionTemp->range.base, regionTemp->range.size, regionTemp->space);
...@@ -521,7 +521,7 @@ VOID OsVmPhysDump(VOID) ...@@ -521,7 +521,7 @@ VOID OsVmPhysDump(VOID)
PRINTK("active anon %d\n", seg->lruSize[VM_LRU_ACTIVE_ANON]); PRINTK("active anon %d\n", seg->lruSize[VM_LRU_ACTIVE_ANON]);
PRINTK("inactive anon %d\n", seg->lruSize[VM_LRU_INACTIVE_ANON]); PRINTK("inactive anon %d\n", seg->lruSize[VM_LRU_INACTIVE_ANON]);
PRINTK("active file %d\n", seg->lruSize[VM_LRU_ACTIVE_FILE]); PRINTK("active file %d\n", seg->lruSize[VM_LRU_ACTIVE_FILE]);
PRINTK("inactice file %d\n", seg->lruSize[VM_LRU_INACTIVE_FILE]); PRINTK("inactive file %d\n", seg->lruSize[VM_LRU_INACTIVE_FILE]);
} }
} }
PRINTK("\n\rpmm pages: total = %u, used = %u, free = %u\n", PRINTK("\n\rpmm pages: total = %u, used = %u, free = %u\n",
......
...@@ -140,7 +140,7 @@ STATIC STATUS_T OsDoReadFault(LosVmMapRegion *region, LosVmPgFault *vmPgFault) ...@@ -140,7 +140,7 @@ STATIC STATUS_T OsDoReadFault(LosVmMapRegion *region, LosVmPgFault *vmPgFault)
return LOS_ERRNO_VM_NO_MEMORY; return LOS_ERRNO_VM_NO_MEMORY;
} }
/* numap a page when cow happend only */ /* unmap a page when cow happend only */
STATIC LosVmPage *OsCowUnmapOrg(LosArchMmu *archMmu, LosVmMapRegion *region, LosVmPgFault *vmf) STATIC LosVmPage *OsCowUnmapOrg(LosArchMmu *archMmu, LosVmMapRegion *region, LosVmPgFault *vmf)
{ {
UINT32 intSave; UINT32 intSave;
......
...@@ -77,7 +77,7 @@ VOID OsLruCacheAdd(LosFilePage *fpage, enum OsLruList lruType) ...@@ -77,7 +77,7 @@ VOID OsLruCacheAdd(LosFilePage *fpage, enum OsLruList lruType)
LOS_SpinUnlockRestore(&physSeg->lruLock, intSave); LOS_SpinUnlockRestore(&physSeg->lruLock, intSave);
} }
/* dellete a lru node, caller need hold lru_lock */ /* delete a lru node, caller need hold lru_lock */
VOID OsLruCacheDel(LosFilePage *fpage) VOID OsLruCacheDel(LosFilePage *fpage)
{ {
LosVmPhysSeg *physSeg = fpage->physSeg; LosVmPhysSeg *physSeg = fpage->physSeg;
...@@ -175,7 +175,7 @@ VOID OsPageRefIncLocked(LosFilePage *fpage) ...@@ -175,7 +175,7 @@ VOID OsPageRefIncLocked(LosFilePage *fpage)
LOS_SpinUnlockRestore(&fpage->physSeg->lruLock, intSave); LOS_SpinUnlockRestore(&fpage->physSeg->lruLock, intSave);
} }
/* page referced dec: (call by thrinker) /* page referced dec: (call by shrinker)
----------inactive----------|----------active------------ ----------inactive----------|----------active------------
[ref:0,act:0], [ref:1,act:0]|[ref:0,act:1], [ref:1,act:1] [ref:0,act:0], [ref:1,act:0]|[ref:0,act:1], [ref:1,act:1]
ref:1, act:1 --> ref:0, act:1 ref:1, act:1 --> ref:0, act:1
......
...@@ -230,7 +230,7 @@ extern VOID LOS_ShowBox(VOID *pool); ...@@ -230,7 +230,7 @@ extern VOID LOS_ShowBox(VOID *pool);
* *
* @param boxMem [IN] Type #VOID* Pointer to the calculate membox. * @param boxMem [IN] Type #VOID* Pointer to the calculate membox.
* @param maxBlk [OUT] Type #UINT32* Record membox max block. * @param maxBlk [OUT] Type #UINT32* Record membox max block.
* @param blkCnt [OUT] Type #UINT32* Record membox block count alreay allocated. * @param blkCnt [OUT] Type #UINT32* Record membox block count already allocated.
* @param blkSize [OUT] Type #UINT32* Record membox block size. * @param blkSize [OUT] Type #UINT32* Record membox block size.
* *
* @retval #LOS_OK The heap status calculate success. * @retval #LOS_OK The heap status calculate success.
......
...@@ -59,7 +59,7 @@ extern "C" { ...@@ -59,7 +59,7 @@ extern "C" {
/** /**
* @ingroup los_memory * @ingroup los_memory
* The recored layes of function call. * The recored layers of function call.
*/ */
#define LOS_RECORD_LR_CNT 3 #define LOS_RECORD_LR_CNT 3
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册