Skip to contentSkip to conversation

Physical to Page in 2.6

DISCUSSION Anil kumar 2 participants 2 messages Dec 7, 2005

lore
Share & tools
lore

Anil kumar

author
#0 lore raw

Hi,

How to get a page from a physical address for a x86_64 in 2.6 kernel.
I guess there are macros in 2.4 like phys_to_pfn( ) and pfn_to_page(). I don't see these macros in 2.6 for x86_64 arch.

These macros are defined only if CONFIG_DISCONTIGMEM for 2.6.

regards,
Anil

__________________________________________
Yahoo! DSL – Something to write home about.
Just $16.99/mo. or less.
dsl.yahoo.com

#1 lore raw
Quoted 10 lines · Anil kumar

How to get a page from a physical address for a x86_64 in 2.6 kernel.
I guess there are macros in 2.4 like phys_to_pfn( ) and pfn_to_page(). I don't see these macros in 2.6 for x86_64 arch.

These macros are defined only if CONFIG_DISCONTIGMEM for 2.6.

pfn_to_page is defined in include/asm-x86_64/page.h (see
http://sosdg.org/~coywolf/lxr/source/include/asm-x86_64/page.h#L114)
if the CONFIG_FLATMEM is defined and I think its defined by-default (although not sure)

--
Fawad Lateef