From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Nicholas Piggin <npiggin@gmail.com>, linuxppc-dev@lists.ozlabs.org
Cc: "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: Sat, 22 Apr 2017 18:02:10 +1000 [thread overview]
Message-ID: <1492848130.25766.185.camel@kernel.crashing.org> (raw)
In-Reply-To: <20170422005854.17128-2-npiggin@gmail.com>
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 :-)
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.
Cheers,
Ben.
next prev parent reply other threads:[~2017-04-22 8:02 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 ` Benjamin Herrenschmidt [this message]
2017-04-22 23:14 ` [PATCH] powerpc/64s: use ibm,tlbiel-congruence-classes-(hash|radix) " Nicholas Piggin
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=1492848130.25766.185.camel@kernel.crashing.org \
--to=benh@kernel.crashing.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.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).