Skip to contentSkip to conversation

How to get the address of the page structure from the given virtual address?

DISCUSSION B.Vinai Kumar 1 participant 1 message Aug 11, 2009

lore
Share & tools
lore
#0 lore raw

Hi List,

1) I allocated 8 pages using alloc_pages(GFP_KERNEL, 3). This function returns the pointer to the first page's page structure.
How can I get the page structure address of the remaining 7 pages?

2) There is a function page_address() which takes the page structure as an argument and returns the virtual address of the
page that is pointed by that page structure. Is there any method which retrives the address of the page structure?

Thanks,
Vinai
--
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs