public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* pte_page
@ 2001-05-30  8:01 mdaljeet
  2001-05-30 12:26 ` pte_page Brian Gerst
  2001-05-30 14:09 ` pte_page Ingo Molnar
  0 siblings, 2 replies; 7+ messages in thread
From: mdaljeet @ 2001-05-30  8:01 UTC (permalink / raw)
  To: linux-kernel

I use the 'pgt_offset', 'pmd_offset', 'pte_offset' and 'pte_page' inside a
module to get the physical address of a user space virtual address. The
physical address returned by 'pte_page' is not page aligned whereas the
virtual address was page aligned. Can somebody tell me the reason?

Also, can i use these functions to get the physical address of a kernel
virtual address using init_mm?

regards,
Daljeet.



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: pte_page
@ 2001-05-31  9:57 mdaljeet
  0 siblings, 0 replies; 7+ messages in thread
From: mdaljeet @ 2001-05-31  9:57 UTC (permalink / raw)
  To: mingo; +Cc: linux-kernel, Pete Wyckoff

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  |
|        |          <mingo@elte.h|
|        |          u>           |
|        |                       |
|        |          05/30/01     |
|        |          11:09 PM     |
|        |          Please       |
|        |          respond to   |
|        |          mingo        |
|        |                       |
|--------+----------------------->
  >--------------------------------------------------------|
  |                                                        |
  |       To:     Pete Wyckoff <pw@osc.edu>                |
  |       cc:     Daljeet Maini/India/IBM@IBMIN,           |
  |       linux-kernel@vger.kernel.org                     |
  |       Subject:     Re: pte_page                        |
  >--------------------------------------------------------|






On Wed, 30 May 2001, Pete Wyckoff wrote:

> > __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





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2001-05-31 10:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-30  8:01 pte_page mdaljeet
2001-05-30 12:26 ` pte_page Brian Gerst
2001-05-30 12:38   ` pte_page Brian Gerst
2001-05-30 14:09 ` pte_page Ingo Molnar
2001-05-30 17:08   ` pte_page Pete Wyckoff
2001-05-30 17:39     ` pte_page Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2001-05-31  9:57 pte_page mdaljeet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox