I have configured my kernel with PAE support. I am wondering how kernel converts from page struct to page physical address when PAE is enabled. The usual function page_to_pfn(pages), typecasts to unsigend long. But with PAE the entries in PGD/PMD/PTE are of type unsigned long long. I don't see any other macro/function. Should not it truncated the address if we typecast to unsigned long?