With PAE enable, how to get page physical address from page struct

Submitted by merajul
on July 23, 2007 - 3:29pm

Hi

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?

Thanks,
M

physical address?

strcmp
on
July 24, 2007 - 12:04am

since page_to_pfn(page) does not return a physical address, there is no problem. are you confused?

there can't be more (struct page)s than (struct page *)es, and unsigned long always is long enough for (void *).

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.