Revert "fix REQ-37: remap_one_page: remove to check page size"

This reverts commit 6790126a23.

- reverted commit should remove a 'pgsize' check in remap_one_page()
  instead of a 'pgsize' check in pte_make_fileoff().
- In IA-32e, PTE format varies with page size. Therefore 'pgsize'
  parameter of pte_make_fileoff() is preferable.
This commit is contained in:
NAKAMURA Gou
2016-04-21 22:55:57 +09:00
parent e2e0fad849
commit 328175547f
2 changed files with 3 additions and 7 deletions

View File

@ -242,13 +242,12 @@ static inline void pte_make_null(pte_t *ptep, size_t pgsize)
}
static inline void pte_make_fileoff(off_t off,
enum ihk_mc_pt_attribute ptattr, pte_t *ptep)
enum ihk_mc_pt_attribute ptattr, size_t pgsize, pte_t *ptep)
{
uint64_t attr;
attr = ptattr & ~PAGE_MASK;
#if 0
switch (pgsize) {
case PTL1_SIZE: attr |= PFL1_FILEOFF; break;
case PTL2_SIZE: attr |= PFL2_FILEOFF | PFL2_SIZE; break;
@ -261,9 +260,6 @@ static inline void pte_make_fileoff(off_t off,
#endif
break;
}
#else
attr |= PFL1_FILEOFF;
#endif
*ptep = (off & PAGE_MASK) | attr;
}