From: Albert Herranz <albert_herranz@yahoo.es>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC PATCH v2 3/4] powerpc: allow ioremap within reserved memory regions
Date: Sat, 12 Dec 2009 01:33:15 +0100 [thread overview]
Message-ID: <4B22E4CB.2040509@yahoo.es> (raw)
In-Reply-To: <1260569600.16132.375.camel@pasglop>
Benjamin Herrenschmidt wrote:
> On Tue, 2009-12-08 at 19:43 +0100, Albert Herranz wrote:
>> Signed-off-by: Albert Herranz <albert_herranz@yahoo.es>
>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>
>> ---
>> v1 -> v2
>> - use a run-time flag to allow/disallow remapping reserved regions
>> - use lmbs to determine reserved regions
>
> We won't need that once we fix proper discontig mem.
>
> BTW. Question: Why do we need that fixup of yours to fold the 2 LMBs
> into one ?
>
> Wouldn't it be easier just to keep the 2 LMBs ? You already fix the
> mapin_ram thingy, so you could easily fix it up to just iterate over the
> LMBs instead no ? For now, it could only BAT map the first LMB to
> simplify things and we can fix the BAT mapping for the second one in a
> second step too.
>
> Wouldn't that work with simpler code ? An in the case of ioremap, the
> test becomes simply to check if it's RAM by checking if it's in the LMB
> rather than if it's reserved, which should be easier and wouldn't
> require your flag to "enable" the tweak since it could perfectly be kept
> as standard behaviour
>
> Also the code in arch/powerpc/mm/mem.c will already deal with holes
> just fine and will pass the hole size information to the VM which should
> make it behave properly.
>
> Thus I have the feeling that keeping the 2 LMBs rather than coalescing
> would simplify the code basically by only requiring a small fixup of the
> maping RAM bit.
>
> I'm acking the patches for now, so you can always come up with a fixup
> on top of them and we can merge the current ones.
>
I'll look into this.
I used a single lmb range just as the current code does to avoid any unwanted side effects as I didn't audit all the mm code.
Thanks,
Albert
next prev parent reply other threads:[~2009-12-12 0:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 18:43 [RFC PATCH v2 0/4] powerpc: wii: mem2 as ram support Albert Herranz
2009-12-08 18:43 ` [RFC PATCH v2 1/4] wii: bootwrapper: add fixup to calc useable mem2 Albert Herranz
2009-12-11 22:03 ` Benjamin Herrenschmidt
2009-12-08 18:43 ` [RFC PATCH v2 2/4] wii: use both mem1 and mem2 as ram Albert Herranz
2009-12-11 22:05 ` Benjamin Herrenschmidt
2009-12-08 18:43 ` [RFC PATCH v2 3/4] powerpc: allow ioremap within reserved memory regions Albert Herranz
2009-12-11 22:13 ` Benjamin Herrenschmidt
2009-12-12 0:33 ` Albert Herranz [this message]
2009-12-12 4:24 ` Benjamin Herrenschmidt
2009-12-08 18:43 ` [RFC PATCH v2 4/4] powerpc: wii: allow ioremap within the memory hole Albert Herranz
2009-12-11 22:13 ` Benjamin Herrenschmidt
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=4B22E4CB.2040509@yahoo.es \
--to=albert_herranz@yahoo.es \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
/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).