mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: huang ying <huang.ying.caritas@gmail.com>
Cc: "Huang, Ying" <ying.huang@intel.com>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	Andi Kleen <ak@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] x86: add executable mapping support to ioremap
Date: Thu, 31 Jan 2008 17:28:11 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.1.00.0801311720280.9204@apollo.tec.linutronix.de> (raw)
In-Reply-To: <851fc09e0801310522s2d690c3ejef661e5ce6847f73@mail.gmail.com>

On Thu, 31 Jan 2008, huang ying wrote:

> On Jan 31, 2008 9:00 PM, Thomas Gleixner <tglx@linutronix.de> wrote:
> > On Thu, 31 Jan 2008, Huang, Ying wrote:
> >
> > > This patch makes ioremap() can be used to map pages as executable,
> > > this is needed by EFI support.
> >
> > > +extern void __iomem *__ioremap(unsigned long phys_addr, unsigned long size,
> > > +                            enum ioremap_mode mode,
> > > +                            enum ioremap_xmode xmode);
> > > +
> >
> > Why do you want to add a new API?
> >
> >     addr = ioremap(phys_addr, len);
> >     set_memory_x(addr);
> >
> > should do what you want already. I think Arjan was not very clear in
> > his reply yesterday.
> 
> In current implementation, change_page_attr() can be used to change
> identity map only.  At least I can find __pa() are used in
> change_page_attr_addr() to get physical address. So I think
> change_page_attr() should be fixed firstly.

There is nothing to fix. It works on virtual addresses. 

The __pa() in change_page_attr_addr() is only used to check for the
high alias mapping of the kernel, but the call to change_page_attr
uses the virtual address.

Thanks,

     tglx

  parent reply	other threads:[~2008-01-31 16:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-31  7:36 Huang, Ying
2008-01-31 13:00 ` Thomas Gleixner
2008-01-31 13:22   ` huang ying
2008-01-31 13:27     ` Andi Kleen
2008-01-31 16:30       ` Thomas Gleixner
2008-01-31 16:28     ` Thomas Gleixner [this message]
2008-01-31 16:30       ` Andi Kleen
2008-01-31 16:37         ` Thomas Gleixner
2008-01-31 16:44           ` Andi Kleen

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=alpine.LFD.1.00.0801311720280.9204@apollo.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=ak@suse.de \
    --cc=hpa@zytor.com \
    --cc=huang.ying.caritas@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ying.huang@intel.com \
    /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

all inboxes | Powered by JetHome®