All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: Rob Herring <robh@kernel.org>,
	kexec@lists.infradead.org, devicetree@vger.kernel.org,
	linux-integrity@vger.kernel.org, nayna@linux.ibm.com,
	nasastry@in.ibm.com, Jason Gunthorpe <jgg@ziepe.ca>,
	Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH v2 1/3] tpm: of: Move of-tree specific code from tpm driver into of driver
Date: Wed, 29 Jun 2022 05:45:49 +0300	[thread overview]
Message-ID: <Yru83e4OLW7vH5/o@kernel.org> (raw)
In-Reply-To: <170c78f7-f0ba-c186-dacf-55759dae9b83@linux.ibm.com>

On Tue, Jun 28, 2022 at 09:29:48AM -0400, Stefan Berger wrote:
> 
> 
> On 6/27/22 18:43, Rob Herring wrote:
> > On Thu, Jun 16, 2022 at 11:41:28AM -0400, Stefan Berger wrote:
> > > Simplify tpm_read_log_of() by moving Openfirmware-specific code into
> > > the Openfirmware driver to make the code reusable. Call the new
> > 
> > There is no such 'Openfirmware driver'.
> > 
> > > of_tpm_get_sml_parameters() function from the TPM Openfirmware driver.
> > > 
> > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > Cc: Jarkko Sakkinen <jarkko@kernel.org>
> > > Cc: Jason Gunthorpe <jgg@ziepe.ca>
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: Frank Rowand <frowand.list@gmail.com>
> > > ---
> > >   drivers/char/tpm/eventlog/of.c | 31 +++++--------------------------
> > >   drivers/of/Makefile            |  2 +-
> > >   drivers/of/device_node.c       | 27 +++++++++++++++++++++++++++
> > 
> > Humm, definitely the wrong direction. Generally, code for specific
> > bindings does not go in drivers/of/. There used to be some, but we've
> > moved it to the appropriate subsystems. kexec was an exception to not
> > have 2 copies of the same code in arch/.
> 
> The function I am moving here is called by the TPM subsystem and also now by
> of/kexec.c. The latter is compiled under the following conditions:
> 
> ifdef CONFIG_KEXEC_FILE
> ifdef CONFIG_OF_FLATTREE
> obj-y	+= kexec.o
> endif
> endif
> 
> The code that current calls it is compiled under the following conditions:
> 
> tpm-$(CONFIG_OF) += eventlog/of.o
> 
> To make it available to both I could keep it in the TPM subsystem like this:
> 
> obj-$(CONFIG_OF) = tpm_of.o
> 
> 
> Jarrko, if you read this, any comment?
> 
> 
>    Stefan

Why can't you convert of_tpm_get_sml_parameters() to inline function?

BR, Jarkko

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Stefan Berger <stefanb@linux.ibm.com>
Cc: Rob Herring <robh@kernel.org>,
	kexec@lists.infradead.org, devicetree@vger.kernel.org,
	linux-integrity@vger.kernel.org, nayna@linux.ibm.com,
	nasastry@in.ibm.com, Jason Gunthorpe <jgg@ziepe.ca>,
	Frank Rowand <frowand.list@gmail.com>
Subject: Re: [PATCH v2 1/3] tpm: of: Move of-tree specific code from tpm driver into of driver
Date: Wed, 29 Jun 2022 05:45:49 +0300	[thread overview]
Message-ID: <Yru83e4OLW7vH5/o@kernel.org> (raw)
In-Reply-To: <170c78f7-f0ba-c186-dacf-55759dae9b83@linux.ibm.com>

On Tue, Jun 28, 2022 at 09:29:48AM -0400, Stefan Berger wrote:
> 
> 
> On 6/27/22 18:43, Rob Herring wrote:
> > On Thu, Jun 16, 2022 at 11:41:28AM -0400, Stefan Berger wrote:
> > > Simplify tpm_read_log_of() by moving Openfirmware-specific code into
> > > the Openfirmware driver to make the code reusable. Call the new
> > 
> > There is no such 'Openfirmware driver'.
> > 
> > > of_tpm_get_sml_parameters() function from the TPM Openfirmware driver.
> > > 
> > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > Cc: Jarkko Sakkinen <jarkko@kernel.org>
> > > Cc: Jason Gunthorpe <jgg@ziepe.ca>
> > > Cc: Rob Herring <robh+dt@kernel.org>
> > > Cc: Frank Rowand <frowand.list@gmail.com>
> > > ---
> > >   drivers/char/tpm/eventlog/of.c | 31 +++++--------------------------
> > >   drivers/of/Makefile            |  2 +-
> > >   drivers/of/device_node.c       | 27 +++++++++++++++++++++++++++
> > 
> > Humm, definitely the wrong direction. Generally, code for specific
> > bindings does not go in drivers/of/. There used to be some, but we've
> > moved it to the appropriate subsystems. kexec was an exception to not
> > have 2 copies of the same code in arch/.
> 
> The function I am moving here is called by the TPM subsystem and also now by
> of/kexec.c. The latter is compiled under the following conditions:
> 
> ifdef CONFIG_KEXEC_FILE
> ifdef CONFIG_OF_FLATTREE
> obj-y	+= kexec.o
> endif
> endif
> 
> The code that current calls it is compiled under the following conditions:
> 
> tpm-$(CONFIG_OF) += eventlog/of.o
> 
> To make it available to both I could keep it in the TPM subsystem like this:
> 
> obj-$(CONFIG_OF) = tpm_of.o
> 
> 
> Jarrko, if you read this, any comment?
> 
> 
>    Stefan

Why can't you convert of_tpm_get_sml_parameters() to inline function?

BR, Jarkko

  reply	other threads:[~2022-06-29  2:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 15:41 [PATCH v2 0/3] tpm: Preserve TPM measurement log across kexec Stefan Berger
2022-06-16 15:41 ` Stefan Berger
2022-06-16 15:41 ` [PATCH v2 1/3] tpm: of: Move of-tree specific code from tpm driver into of driver Stefan Berger
2022-06-16 15:41   ` Stefan Berger
2022-06-27 22:43   ` Rob Herring
2022-06-27 22:43     ` Rob Herring
2022-06-28 13:29     ` Stefan Berger
2022-06-28 13:29       ` Stefan Berger
2022-06-29  2:45       ` Jarkko Sakkinen [this message]
2022-06-29  2:45         ` Jarkko Sakkinen
2022-06-29 14:16         ` Stefan Berger
2022-06-29 14:16           ` Stefan Berger
2022-06-30 23:16           ` Jarkko Sakkinen
2022-06-30 23:16             ` Jarkko Sakkinen
2022-06-16 15:41 ` [PATCH v2 2/3] of: kexec: Refactor IMA buffer related functions to make them reusable Stefan Berger
2022-06-16 15:41   ` Stefan Berger
2022-06-16 15:41 ` [PATCH v2 3/3] tpm/kexec: Duplicate TPM measurement log in of-tree for kexec Stefan Berger
2022-06-16 15:41   ` Stefan Berger
2022-06-16 20:25   ` kernel test robot
2022-06-16 20:25     ` kernel test robot
2022-06-28 16:53   ` kernel test robot
2022-06-28 16:53     ` kernel test robot
2022-06-27 22:33 ` [PATCH v2 0/3] tpm: Preserve TPM measurement log across kexec Rob Herring
2022-06-27 22:33   ` Rob Herring
2022-06-28 12:45   ` Stefan Berger
2022-06-28 12:45     ` Stefan Berger

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=Yru83e4OLW7vH5/o@kernel.org \
    --to=jarkko@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=jgg@ziepe.ca \
    --cc=kexec@lists.infradead.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=nasastry@in.ibm.com \
    --cc=nayna@linux.ibm.com \
    --cc=robh@kernel.org \
    --cc=stefanb@linux.ibm.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 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.