From: Blaisorblade <blaisorblade@yahoo.it>
To: user-mode-linux-devel@lists.sourceforge.net
Cc: Majid Salame <msalame@nortel.com>, Jeff Dike <jdike@addtoit.com>
Subject: Re: [uml-devel] prot |= _PAGE_PCD | _PAGE_PWT;
Date: Mon, 18 Jul 2005 18:07:33 +0200 [thread overview]
Message-ID: <200507181807.33907.blaisorblade@yahoo.it> (raw)
In-Reply-To: <29D15BBCA340DA4D8146D38B4924FC7A105113@zcarhxm0.corp.nortel.com>
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
prev parent reply other threads:[~2005-07-18 15:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200507181807.33907.blaisorblade@yahoo.it \
--to=blaisorblade@yahoo.it \
--cc=jdike@addtoit.com \
--cc=msalame@nortel.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox