public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Limonciello, Mario" <mario.limonciello@amd.com>
Cc: "Jarkko Nikula" <jarkko.nikula@linux.intel.com>,
	"Jan Dąbroś" <jsd@semihalf.com>,
	"Grzegorz Bernacki" <gjb@semihalf.com>,
	"Thomas Rijo-john" <Rijo-john.Thomas@amd.com>,
	"Lendacky Thomas" <Thomas.Lendacky@amd.com>,
	herbert@gondor.apana.org.au,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	linux-i2c@vger.kernel.org, linux-crypto@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] i2c: designware: Use PCI PSP driver for communication
Date: Fri, 17 Feb 2023 13:05:03 +0200	[thread overview]
Message-ID: <Y+9fXzby07f6mY59@smile.fi.intel.com> (raw)
In-Reply-To: <ba2ce999-5cc2-be73-6212-a5db903b294f@amd.com>

On Thu, Feb 16, 2023 at 03:27:35PM -0600, Limonciello, Mario wrote:
> On 2/16/2023 15:16, Andy Shevchenko wrote:
> > On Thu, Feb 16, 2023 at 03:01:35PM -0600, Limonciello, Mario wrote:
> > > On 2/16/2023 14:59, Andy Shevchenko wrote:
> > > > On Thu, Feb 16, 2023 at 02:55:07PM -0600, Limonciello, Mario wrote:
> > > > > On 2/16/2023 08:56, Andy Shevchenko wrote:
> > > > > > On Thu, Feb 16, 2023 at 07:29:53AM -0600, Mario Limonciello wrote:
> > > > > > > On 2/16/23 07:27, Jarkko Nikula wrote:
> > > > > > > > On 2/10/23 00:38, Mario Limonciello wrote:

...

> > > > > > > > Would this look better if split? I.e.
> > > > > > > > 
> > > > > > > >        depends on CRYPTO_DEV_SP_PSP
> > > > > > > >        depends on !(I2C_DESIGNWARE_PLATFORM=y && CRYPTO_DEV_CCP_DD=m)
> > > > > > > Yes, thanks I'll change that for next version.
> > > > > > 
> > > > > > I'm wondering if this is homegrown implementation of 'imply' keyword?
> > > > > 
> > > > > Like this?
> > > > > 
> > > > > config I2C_DESIGNWARE_AMDPSP
> > > > >      depends on CRYPTO_DEV_SP_PSP
> > > > >      depends on CRYPTO_DEV_CCP_DD
> > > > > 
> > > > > config CRYPTO_DEV_CCP_DD
> > > > >      imply I2C_DESIGNWARE_PLATFORM
> > > > 
> > > > Looks okay, but I'm not familiar with this code. The documentation about
> > > > 'imply' can be found here:
> > > > 
> > > > https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html#menu-attributes
> > > 
> > > Yeah I found that, but this was my first time using imply, so I was hoping
> > > someone who has used it could validate I interpreted it correctly.
> > > 
> > > Following the example CRYPTO_DEV_CCP_DD would be FOO and
> > > I2C_DESIGNWARE_PLATFORM would be BAZ so I thought so.
> > 
> > 'imply' == weak 'select', it means that the target option may or may not be
> > selected. I.o.w. "optional" dependency.
> > 
> > Does CRYPTO_DEV_CCP_DD use I2C DesignWare code?
> > 
> > If I understand correctly the "depends on !(I2C_DESIGNWARE_PLATFORM=y &&
> > CRYPTO_DEV_CCP_DD=m)" you want to have IS_REACHABLE() in your code and actually
> > "imply CRYPTO_DEV_CCP_DD" in the I2C_DESIGNWARE_AMDPSP.
> 
> Allowing that combination and using IS_REACHABLE means that it's going to
> actually load earlier that expected, so I suppose it needs to be something
> like this then in the probe code for i2c-designware-amdpsp.c:
> 
> if (!IS_REACHABLE()
> 	return -EPROBE_DEFER;
> 
> Right?

Hmm... I'm not sure. IS_REACHABLE() should be done with a compilation
dependencies. What you put here is functional dependency, moreover since
you mentioned the boot / load ordering doesn't it mean that the architecture
of all of this is not good enough and requires some redesign?

Perhaps you need to use component framework actually?

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-02-17 11:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09 22:38 [PATCH 0/6] Export platform features from ccp driver Mario Limonciello
2023-02-09 22:38 ` [PATCH 1/6] crypto: ccp: Drop TEE support for IRQ handler Mario Limonciello
2023-02-09 22:38 ` [PATCH 2/6] crypto: ccp: Add a header for multiple drivers to use `__psp_pa` Mario Limonciello
2023-02-14  8:40   ` Jan Dąbroś
2023-02-15 11:13     ` Jarkko Nikula
2023-02-15 11:13   ` Sumit Garg
2023-02-09 22:38 ` [PATCH 3/6] crypto: ccp: Move some PSP mailbox bit definitions into common header Mario Limonciello
2023-02-14  9:04   ` Jan Dąbroś
2023-02-14 22:05     ` Limonciello, Mario
2023-02-16 14:23       ` Tom Lendacky
2023-02-09 22:38 ` [PATCH 4/6] crypto: ccp: Add support for an interface for platform features Mario Limonciello
2023-02-09 22:38 ` [PATCH 5/6] crypto: ccp: Enable platform access interface on client PSP parts Mario Limonciello
2023-02-09 22:38 ` [PATCH 6/6] i2c: designware: Use PCI PSP driver for communication Mario Limonciello
2023-02-10 10:43   ` Andy Shevchenko
2023-02-16 13:27   ` Jarkko Nikula
2023-02-16 13:29     ` Mario Limonciello
2023-02-16 14:56       ` Andy Shevchenko
2023-02-16 20:55         ` Limonciello, Mario
2023-02-16 20:59           ` Andy Shevchenko
2023-02-16 21:01             ` Limonciello, Mario
2023-02-16 21:16               ` Andy Shevchenko
2023-02-16 21:27                 ` Limonciello, Mario
2023-02-17 11:05                   ` Andy Shevchenko [this message]
2023-02-17 11:05                     ` Andy Shevchenko

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=Y+9fXzby07f6mY59@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Rijo-john.Thomas@amd.com \
    --cc=Thomas.Lendacky@amd.com \
    --cc=gjb@semihalf.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jarkko.nikula@linux.intel.com \
    --cc=jsd@semihalf.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=mika.westerberg@linux.intel.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