Skip to contentSkip to conversation

pte_page

DISCUSSION [email protected] 1 participant 1 message May 31, 2001

lore
Share & tools
lore
#0 lore raw

I am doing a DMA from a card to system memory. The system memory "physical address" is '0x104000'. I am doing this on x86 with kernel version 2.4.2. Can this address be the address of a user space buffer?

Regards,
Daljeet.

|--------+----------------------->
|        |          Ingo Molnar  |
|        |          <[email protected]|
|        |          u>           |
|        |                       |
|        |          05/30/01     |
|        |          11:09 PM     |
|        |          Please       |
|        |          respond to   |
|        |          mingo        |
|        |                       |
|--------+----------------------->
Quoted 1 line

--------------------------------------------------------|

  |                                                        |
  |       To:     Pete Wyckoff <[email protected]>                |
  |       cc:     Daljeet Maini/India/IBM@IBMIN,           |
  |       [email protected]                     |
  |       Subject:     Re: pte_page                        |
  >--------------------------------------------------------|
Quoted 5 lines · Pete Wyckoff
Quoted 2 lines

__pa(page_address(pte_page(pte))) is the address you want. [or pte_val(*pte) & (PAGE_SIZE-1) on x86 but this is platform-dependent.]

Does this work on x86 non-kmapped highmem user pages too? (i.e. is page->virtual valid for every potential user page.)

you are right, the highmem-compatible solution is to use page-mem_map as the physical page index.

Ingo