mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* remap_page_range an caching
@ 2003-03-20 13:08 thomas joseph
  0 siblings, 0 replies; only message in thread
From: thomas joseph @ 2003-03-20 13:08 UTC (permalink / raw)
  To: linux-kernel


Hi All,

 I am using remap_page_range to map a memory region
 to user space. (This is a device memory mapped in 
 to kernel space by ioremap_nocache.)

 I am setting the page protection flags as
  _PAGE_PCD | _PAGE_PWT to disable caching as 
  specified in the  documentation. 

  But when I try to read these device registers in the
  user space it shows different values from
  those of driver. I declared the necessary
  members as volatile. But it still does not help.

  When I try to read the register twice I seem to be
getting the correct value. 

  Like,
   /* ulBWStatus is defined as volatile. */
   status = pRpRegs->ulBStatus;
   status = pRpRegs->ulBStatus;
This gives me the updated values. Could you
just help me if I am missing anything here.

 D0 I need to insert a memory barrier in the user
space
 before accessing these registers ?
 If I do so then it looks like giving correct values
too.


 Could somebody help to understand on what is
happening here.

Thanks in advance.

best regards,

 --thomas







 

http://mobile.yahoo.com.au - Yahoo! Mobile
- Check & compose your email via SMS on your Telstra or Vodafone mobile.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-20 12:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-20 13:08 remap_page_range an caching thomas joseph

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

all inboxes | Powered by JetHome®