From: Nicholas Piggin <npiggin@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@lists.ozlabs.org,
"Aneesh Kumar K . V" <aneesh.kumar@linux.vnet.ibm.com>
Subject: Re: [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) dt property
Date: Sun, 23 Apr 2017 09:14:28 +1000 [thread overview]
Message-ID: <20170423091428.16fc298f@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <1492848130.25766.185.camel@kernel.crashing.org>
On Sat, 22 Apr 2017 18:02:10 +1000
Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> On Sat, 2017-04-22 at 10:58 +1000, Nicholas Piggin wrote:
> > +static void __init init_mmu_tlb_sets_hash(unsigned long node)
> > +{
> > + const __be32 *ptr;
> > +
> > + ptr = of_get_flat_dt_prop(node, "ibm,tlbiel-congruence-classes-hash", NULL);
> > + if (ptr)
> > + cur_cpu_spec->tlb_sets_hash = be32_to_cpup(ptr);
> > +}
> > +
> > +static void __init init_mmu_tlb_sets_radix(unsigned long node)
> > +{
> > + const __be32 *ptr;
> > +
> > + ptr = of_get_flat_dt_prop(node, "ibm,tlbiel-congruence-classes-radix", NULL);
> > + if (ptr)
> > + cur_cpu_spec->tlb_sets_radix = be32_to_cpup(ptr);
> > +}
> > #else
> > #define init_mmu_slb_size(node) do { } while(0)
> > +#define init_mmu_hash_sets(node) do { } while(0)
> > +#define init_mmu_radix_sets(node) do { } while(0)
> > #endif
>
> Why 2 functions ? I would have done one checking both props :-)
Probably mindless copy paste. I'll consolidate.
> Anothe thing to do is remove the assembly TLB flush from cpu_setup_power.S.
>
> That happens too early anyway and do it later, at MMU init.
>
> In fact, I wonder ... a lot of the stuff in there still requires us to more
> or less know the PVR of the CPU. We could move the call to after we've done
> the early DT parsing I reckon.
>
> That way we can use arch level to set things like LPCR appropriately.
I think we were going to take another look at moving the setup code later,
but I think that might wait until 4.13.
next prev parent reply other threads:[~2017-04-22 23:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170422005854.17128-1-npiggin@gmail.com>
2017-04-22 0:58 ` [PATCH] powerpc/64s: use ibm, tlbiel-congruence-classes-(hash|radix) dt property Nicholas Piggin
2017-04-22 8:02 ` [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) " Benjamin Herrenschmidt
2017-04-22 23:14 ` Nicholas Piggin [this message]
2017-04-23 0:39 ` Benjamin Herrenschmidt
2017-04-23 9:57 ` Nicholas Piggin
2017-04-24 0:13 ` Benjamin Herrenschmidt
2017-04-24 4:22 ` Nicholas Piggin
2017-04-30 10:59 ` Nicholas Piggin
2017-04-22 10:34 ` [PATCH] powerpc/64s: use ibm, tlbiel-congruence-classes-(hash|radix) " kbuild test robot
2017-04-24 8:23 ` Aneesh Kumar K.V
2017-04-24 9:17 ` Michael Ellerman
2017-04-24 9:22 ` Aneesh Kumar K.V
2017-04-26 8:29 ` [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) " Nicholas Piggin
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=20170423091428.16fc298f@roar.ozlabs.ibm.com \
--to=npiggin@gmail.com \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--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).