From: Rob Herring <robh@kernel.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Frank Rowand <frowand.list@gmail.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v1 3/4] powerpc/machdep: Define 'compatibles' property in ppc_md and use it
Date: Thu, 7 Dec 2023 14:15:16 -0600 [thread overview]
Message-ID: <20231207201516.GA3348285-robh@kernel.org> (raw)
In-Reply-To: <9da79892e7ff433095a7bf42e86aef02ab86b5c1.1701878821.git.christophe.leroy@csgroup.eu>
On Wed, Dec 06, 2023 at 05:13:34PM +0100, Christophe Leroy wrote:
> Most probe functions that do not use the 'compatible' string do
> nothing else than checking whether the machine is compatible with
> one of the strings in a NULL terminated table of strings.
>
> Define that table of strings in ppc_md structure and check it directly
> from probe_machine() instead of using ppc_md.probe() for that.
>
> Keep checking in ppc_md.probe() only for more complex probing.
>
> All .compatible could be replaced with a single element NULL
> terminated list but that's not worth the churn. Can be do incrementaly
> in follow-up patches.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> arch/powerpc/include/asm/machdep.h | 1 +
> arch/powerpc/kernel/setup-common.c | 2 ++
> arch/powerpc/platforms/40x/ppc40x_simple.c | 9 +++------
> arch/powerpc/platforms/512x/mpc512x_generic.c | 4 +---
> arch/powerpc/platforms/52xx/lite5200.c | 10 +---------
> arch/powerpc/platforms/52xx/mpc5200_simple.c | 10 +---------
> arch/powerpc/platforms/83xx/mpc830x_rdb.c | 10 +---------
> arch/powerpc/platforms/83xx/mpc831x_rdb.c | 10 +---------
> arch/powerpc/platforms/83xx/mpc837x_rdb.c | 10 +---------
> arch/powerpc/platforms/85xx/corenet_generic.c | 2 +-
> arch/powerpc/platforms/85xx/tqm85xx.c | 10 +---------
> 11 files changed, 14 insertions(+), 64 deletions(-)
> -/*
> - * Called very early, MMU is off, device-tree isn't unflattened
> - */
Certainly an out of date comment as the unflattened API was being
called.
Reviewed-by: Rob Herring <robh@kernel.org>
next prev parent reply other threads:[~2023-12-07 20:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 16:13 [PATCH v1 1/4] of: Add of_machine_compatible_match() Christophe Leroy
2023-12-06 16:13 ` [PATCH v1 2/4] of: Reimplement of_machine_is_compatible() using of_machine_compatible_match() Christophe Leroy
2023-12-07 20:26 ` Rob Herring
2023-12-06 16:13 ` [PATCH v1 3/4] powerpc/machdep: Define 'compatibles' property in ppc_md and use it Christophe Leroy
2023-12-07 20:15 ` Rob Herring [this message]
2023-12-06 16:13 ` [PATCH v1 4/4] powerpc: Stop using of_root Christophe Leroy
2023-12-07 20:15 ` Rob Herring
2023-12-07 20:16 ` [PATCH v1 1/4] of: Add of_machine_compatible_match() Rob Herring
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=20231207201516.GA3348285-robh@kernel.org \
--to=robh@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--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).