From: Scott Wood <scottwood@freescale•com>
To: Benjamin Herrenschmidt <benh@kernel•crashing.org>
Cc: linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH 2/2] powerpc/nohash: Split __early_init_mmu() into boot and secondary
Date: Wed, 6 Aug 2014 15:09:14 -0500 [thread overview]
Message-ID: <1407355754.7427.36.camel@snotra.buserror.net> (raw)
In-Reply-To: <1407301138.3073.68.camel@pasglop>
On Wed, 2014-08-06 at 14:58 +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2014-08-05 at 19:48 -0500, Scott Wood wrote:
> > I'll do s/mmu_allcpus/this_mmu/ but early_init_mmu() needs to do things
> > both before and after early_init_mmu_common(). Do you want two new
> > functions (before and after) or is it OK to just rename
> > early_init_mmu_allcpus() and put a comment before early_init_mmu()
> > saying it's just for the boot cpu?
>
> Do we really need that before/after ? The "after" code is the linear
> mapping setup but does it rely on the MAS4 setting done above ?
No, but it relies on the call to map_mem_in_cams() to determine how much
memory was able to be mapped.
> Otherwise you can do before/after using a separate function
> mmu_set_linear_map()
OK.
> Always nicer to break down too large functions anyway.
Usually yes, but it doesn't necessarily help when it's an arbitrary
division of a function that is a list of simple things (as opposed to
e.g. factoring out the #ifdef CONFIG_PPC_FSL_BOOK3E block into its own
function).
BTW, is there a particular reason why we need to use
memblock_enforce_memory_limit() on FSL_BOOK3E, rather than relying on
memblock_set_current_limit()? I see that when
memblock_enforce_memory_limit() was added to __early_init_mmu(),
memblock_set_current_limit() did not exist. On 32-bit fsl booke uses
memblock_set_current_limit() for this.
-Scott
next prev parent reply other threads:[~2014-08-06 20:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-02 3:07 [PATCH 1/2] powerpc/64e: Add __ref to early_alloc_pgtable() Scott Wood
2014-08-02 3:07 ` [PATCH 2/2] powerpc/nohash: Split __early_init_mmu() into boot and secondary Scott Wood
2014-08-05 4:36 ` Benjamin Herrenschmidt
2014-08-06 0:48 ` Scott Wood
2014-08-06 4:58 ` Benjamin Herrenschmidt
2014-08-06 20:09 ` Scott Wood [this message]
2014-08-06 20:46 ` 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=1407355754.7427.36.camel@snotra.buserror.net \
--to=scottwood@freescale$(echo .)com \
--cc=benh@kernel$(echo .)crashing.org \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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