All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Cristian Marussi <cristian.marussi@arm.com>
Cc: Jean Delvare <jdelvare@suse.de>,
	arm-scmi@vger.kernel.org, Shawn Guo <shawnguo@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>
Subject: Re: Odd dependency on ARM_SCMI_PROTOCOL
Date: Tue, 22 Oct 2024 16:01:28 +0100	[thread overview]
Message-ID: <Zxe-SBfVUEiYBkes@bogus> (raw)
In-Reply-To: <ZxeY9VhAOLp8qSkF@pluto>

On Tue, Oct 22, 2024 at 01:22:13PM +0100, Cristian Marussi wrote:
> On Tue, Oct 22, 2024 at 01:55:37PM +0200, Jean Delvare wrote:
> > Hi all,
> >
>
> Hi,
>
> this pre-dates me, so take this with a grain of salt, and Sudeep may
> have a better explanation...

Indeed, I had to dig a bit and found a patch from 2016.

> > I noticed that the following dependency construct is used several times
> > throughout the kernel tree:
> >
> > depends on ARM_SCMI_PROTOCOL || (COMPILE_TEST && OF)
> >
> > Maybe I'm just missing something as I'm not familiar with SCMI, but I
> > can't really make sense of this. Considering that ARM_SCMI_PROTOCOL
> > does not depend on OF, I do not understand why it would be OK to build
> > these drivers under ARM_SCMI_PROTOCOL without OF, but if test-building
> > under COMPILE_TEST instead, then OF would suddenly be needed. Can
> > anyone explain the logic?
> >
> > Considering that ARM_SCMI_PROTOCOL can be enabled through COMPILE_TEST,
> > and OF is now available on architectures, I think this dependency is
> > needlessly complex and these drivers could simply use:
>
> ... my guess is that ARM_SCMI_PROTOCOL does NOT explicitly depends on OF
> simply because it depends on ARM|ARM64 which have an implicit OF dependency...
> ....indeed in order to use the SCMI stack you need OF...
>
> ...not saying that this is right....just trying to interpret here...
> ...on the other side for these reasons, if you dont have OF implicitly from
> the arch, you cannot COMPILE_TEST the SCMI stack without OF, so the
> complex dependency
>
> Probably this should be done better in Kconfig...but lets see if Sudeep
> can correct me...
>

Commit e517dfe67480 ("firmware: scpi: add CONFIG_OF dependency") is the
one that I copied to SCMI as well as we wanted  COMPILE_TEST coverage on
SCMI as well. As per the commit, !OF will give some warnings for COMPILE_TEST
which the above commit addresses. It is just copy of that you see in SCMI
as SCMI replaced the old SCPI and is used more widely and had more framework
support, hence you will find it at more places than SCPI.

Hope that explains, happy to take a deeper look if you have or find issues
with the way it exists today.

--
Regards,
Sudeep

  reply	other threads:[~2024-10-22 15:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-22 11:55 Odd dependency on ARM_SCMI_PROTOCOL Jean Delvare
2024-10-22 12:22 ` Cristian Marussi
2024-10-22 15:01   ` Sudeep Holla [this message]
2024-10-22 16:13     ` Jean Delvare
2024-10-23  9:50       ` Sudeep Holla

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=Zxe-SBfVUEiYBkes@bogus \
    --to=sudeep.holla@arm.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=festevam@gmail.com \
    --cc=jdelvare@suse.de \
    --cc=kernel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.