* [uml-devel] Re: prot |= _PAGE_PCD | _PAGE_PWT;
[not found] <29D15BBCA340DA4D8146D38B4924FC7A105113@zcarhxm0.corp.nortel.com>
@ 2005-07-15 21:51 ` Jeff Dike
2005-07-18 16:07 ` [uml-devel] " Blaisorblade
1 sibling, 0 replies; 2+ messages in thread
From: Jeff Dike @ 2005-07-15 21:51 UTC (permalink / raw)
To: Majid Salame; +Cc: user-mode-linux-devel
On Fri, Jul 15, 2005 at 03:26:54PM -0400, Majid Salame wrote:
> in asm-um/pgtable.h we do not have definitions and may be for good
> reason for PAGE_PCD and _PAGE_PWT.
>
> #define _PAGE_PWT 0x008
> #define _PAGE_PCD 0x010
>
> Can I in UML recode this statement in much same way drivers/char/mem.c
> prot |= _PAGE_PCD | _PAGE_PWT;
What do they mean?
Jeff
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [uml-devel] prot |= _PAGE_PCD | _PAGE_PWT;
[not found] <29D15BBCA340DA4D8146D38B4924FC7A105113@zcarhxm0.corp.nortel.com>
2005-07-15 21:51 ` [uml-devel] Re: prot |= _PAGE_PCD | _PAGE_PWT; Jeff Dike
@ 2005-07-18 16:07 ` Blaisorblade
1 sibling, 0 replies; 2+ messages in thread
From: Blaisorblade @ 2005-07-18 16:07 UTC (permalink / raw)
To: user-mode-linux-devel; +Cc: Majid Salame, Jeff Dike
On Friday 15 July 2005 21:26, Majid Salame wrote:
> in asm-um/pgtable.h we do not have definitions and may be for good
> reason for PAGE_PCD and _PAGE_PWT.
From what I see, they're about uncacheability of memory, which isn't probably
supportable at all in UML (we might go to using madvise but I don't think
it's worth).
And as done in drivers/char/mem.c, there an access macro to use it, i.e.
pgprot_noncached, to use only if defined (I guess on arch missing it it
should be defined as a no-op).
> #define _PAGE_PWT 0x008
> #define _PAGE_PCD 0x010
> Can I in UML recode this statement in much same way drivers/char/mem.c
> prot |= _PAGE_PCD | _PAGE_PWT;
So, what's the question? The answer is obviously yes. Note that I'm referring
to this version of the sources (taken from latest git snapshot):
static int mmap_mem(struct file * file, struct vm_area_struct * vma)
{
#if defined(__HAVE_PHYS_MEM_ACCESS_PROT)
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
vma->vm_page_prot = phys_mem_access_prot(file, offset,
vma->vm_end - vma->vm_start,
vma->vm_page_prot);
#elif defined(pgprot_noncached)
unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;
int uncached;
uncached = uncached_access(file, offset);
if (uncached)
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
#endif
--
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade
___________________________________
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB
http://mail.yahoo.it
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&opÌk
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-07-18 15:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <29D15BBCA340DA4D8146D38B4924FC7A105113@zcarhxm0.corp.nortel.com>
2005-07-15 21:51 ` [uml-devel] Re: prot |= _PAGE_PCD | _PAGE_PWT; Jeff Dike
2005-07-18 16:07 ` [uml-devel] " Blaisorblade
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox