From: John Hubbard <jhubbard@nvidia.com>
To: "A. Samy" <f.fallen45@gmail.com>, linux-mm@kvack.org
Cc: zhongjiang@huawei.com
Subject: Re: ioremap_page_range: remapping of physical RAM ranges
Date: Wed, 25 Jan 2017 14:27:27 -0800 [thread overview]
Message-ID: <072b4406-16ef-cdf6-e968-711a60ca9a3f@nvidia.com> (raw)
In-Reply-To: <CADY3hbEy+oReL=DePFz5ZNsnvWpm55Q8=mRTxCGivSL64gAMMA@mail.gmail.com>
On 01/25/2017 11:55 AM, A. Samy wrote:
> Hi,
>
> Commit 3277953de2f31 un-exported ioremap_page_range(), what is an
> alternative method of remapping a physical ram range... This function
> was very useful, examples here:
> https://github.com/asamy/ksm/blob/master/mm.c#L38 and here:
> https://github.com/asamy/ksm/blob/master/ksm.c#L410 etc...
>
> So, you're forcing me to either reimplement it on my own (which is
> merely copy-pasting the kernel function), unless you have a suggestion
> on what else to use (which I could never find other)?
Hi A. Samy,
I'm sorry this caught you by surprise, let's try get your use case covered.
My thinking on this was: the exported ioremap* family of functions was clearly intended to provide
just what the name says: mapping of IO (non-RAM) memory. If normal RAM is to be re-mapped, then it
should not be done "casually" in a driver, as a (possibly unintended) side effect of a function that
implies otherwise. Either it should be done within the core mm code, or perhaps a new, better-named
wrapper could be provided, for cases such as yours.
After a very quick peek at your github code, it seems that your mm_remap() routine already has some
code in common with __ioremap_caller(), so I'm thinking that we could basically promote your
mm_remap to the in-tree kernel and EXPORT it, and maybe factor out the common parts (or not--it's
small, after all). Thoughts? If you like it, I'll put something together here.
thanks
john h
>
> Thanks,
>
> --
> asamy
>
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@kvack.org. For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2017-01-25 22:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-25 19:55 ioremap_page_range: remapping of physical RAM ranges A. Samy
2017-01-25 22:27 ` John Hubbard [this message]
2017-01-25 23:15 ` Ahmed Samy
2017-01-26 8:33 ` John Hubbard
2017-01-26 18:24 ` Ahmed Samy
2017-01-28 21:11 ` Ahmed Samy
2017-01-28 21:48 ` John Hubbard
2017-01-28 21:55 ` Ahmed Samy
2017-01-28 22:12 ` Ahmed Samy
2017-01-28 22:16 ` John Hubbard
2017-01-28 22:13 ` John Hubbard
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=072b4406-16ef-cdf6-e968-711a60ca9a3f@nvidia.com \
--to=jhubbard@nvidia.com \
--cc=f.fallen45@gmail.com \
--cc=linux-mm@kvack.org \
--cc=zhongjiang@huawei.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;
as well as URLs for NNTP newsgroup(s).