Skip to contentSkip to conversation

kernel 2.4x - getting physical address for pages in HIGHMEM

DISCUSSION sumanesh samanta 1 participant 1 message Jul 22, 2003

lore
Share & tools
lore
#0 lore raw

Hi,

I am facing a lot of problems in trying to get the physical address(actually bus address) from of page.

The most obvious answer, virt_to_bus(kmap(page)) seems to work for pages that are NOT in high memory.

For pages in high memory, I have read up a lot of documentation, and mailing list questions, but the only thing that seems to work for me is, (page-mem_map)<<PAGE_SHIFT

Now, the mail i got this from says that this would work only when mem_map [] starts at zero.

I am pretty confused here, this seems to be a obvious problem, why does Linux not have a pretty macro or function that would work in all situations?

PS. please cc me in any answers, as I am not subscribed to this list.

Thanks
sumanesh

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963