page table questions

From: meng chen
Date: Wed Jun 07 2017 - 01:24:20 EST


hello ,how to know wheather a pmd maps a 2M physical page or not??
if(pmd_trans_huge(*pmd)){
if(pte_present(*pmd)){
/*page is in ram?*/
}
}

can I judge it according the above codes??
thanks a lot!!