check _PAGE_PWT and _PAGE_PCD directly instead of _PAGE_CACHE_WC

This commit is contained in:
Balazs Gerofi
2015-03-07 02:12:36 +09:00
parent b553de7435
commit 1f8265efbc

View File

@ -1239,8 +1239,9 @@ static int pager_req_pfn(ihk_os_t os, uintptr_t handle, off_t off, uintptr_t ppf
pfn |= PFN_VALID | PFN_PRESENT;
/* Check if mapping is write-combined */
if (pte_flags(*pte) & _PAGE_CACHE_WC) {
pfn |= _PAGE_CACHE_WC;
if ((pte_flags(*pte) & _PAGE_PWT) &&
!(pte_flags(*pte) & _PAGE_PCD)) {
pfn |= _PAGE_PWT;
}
}
pte_unmap(pte);