Fix for PAGE_SIZE / PAGE_MASK magic number.

Change-Id: Icc00594d84a33495af774096ae13f830e29be39f
Fujitsu: POSTK_DEBUG_ARCH_DEP_116
This commit is contained in:
Shiratori, Takehiro
2018-11-29 16:00:59 +09:00
committed by Dominique Martinet
parent 516ab87ab9
commit 9e5472bb94
3 changed files with 10 additions and 6 deletions

View File

@ -619,7 +619,8 @@ static void *mckernel_allocate_aligned_pages_node(int npages, int p2align,
}
else {
#ifdef PROFILE_ENABLE
profile_event_add(PROFILE_mpol_alloc_missed, npages * 4096);
profile_event_add(PROFILE_mpol_alloc_missed,
npages * PAGE_SIZE);
#endif
dkprintf("%s: couldn't fulfill explicit NUMA request for %d pages\n",
__FUNCTION__, npages);
@ -711,7 +712,8 @@ static void *mckernel_allocate_aligned_pages_node(int npages, int p2align,
}
else {
#ifdef PROFILE_ENABLE
profile_event_add(PROFILE_mpol_alloc_missed, npages * 4096);
profile_event_add(PROFILE_mpol_alloc_missed,
npages * PAGE_SIZE);
#endif
dkprintf("%s: couldn't fulfill user policy for %d pages\n",
__FUNCTION__, npages);
@ -1163,7 +1165,7 @@ static void page_fault_handler(void *fault_addr, uint64_t reason, void *regs)
cpu_enable_interrupt();
if ((uintptr_t)fault_addr < 4096) {
if ((uintptr_t)fault_addr < PAGE_SIZE) {
error = -EINVAL;
} else {
error = page_fault_process_vm(thread->vm, fault_addr, reason);