From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Pavel Tatashin <pasha.tatashin@soleen.com>
Cc: jmorris@namei.org, sashal@kernel.org, peterhuewe@gmx.de,
jgg@ziepe.ca, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-integrity@vger.kernel.org,
linux-kernel@microsoft.com, thiruan@microsoft.com,
bryankel@microsoft.com, tee-dev@lists.linaro.org,
ilias.apalodimas@linaro.org, sumit.garg@linaro.org,
rdunlap@infradead.org
Subject: Re: [PATCH] ftpm: add shutdown call back
Date: Mon, 14 Oct 2019 23:03:09 +0300 [thread overview]
Message-ID: <20191014200309.GM15552@linux.intel.com> (raw)
In-Reply-To: <20191011145721.59257-1-pasha.tatashin@soleen.com>
On Fri, Oct 11, 2019 at 10:57:21AM -0400, Pavel Tatashin wrote:
> From: thiruan <thiruan@microsoft.com>
>
> add shutdown call back to close existing session with fTPM TA
> to support kexec scenario.
>
> Signed-off-by: Thirupathaiah Annapureddy <thiruan@microsoft.com>
> Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com>
Use the correct tag in the short summary (tpm/tpm_ftpm_tee).
> ---
> drivers/char/tpm/tpm_ftpm_tee.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/drivers/char/tpm/tpm_ftpm_tee.c b/drivers/char/tpm/tpm_ftpm_tee.c
> index 6640a14dbe48..c245be6f4015 100644
> --- a/drivers/char/tpm/tpm_ftpm_tee.c
> +++ b/drivers/char/tpm/tpm_ftpm_tee.c
> @@ -328,6 +328,27 @@ static int ftpm_tee_remove(struct platform_device *pdev)
> return 0;
> }
>
> +/**
> + * ftpm_tee_shutdown - shutdown the TPM device
> + * @pdev: the platform_device description.
> + *
> + * Return:
> + * none.
Do not document return values for a void function. The last three lines
do not serve any purpose.
> + */
> +static void ftpm_tee_shutdown(struct platform_device *pdev)
> +{
> + struct ftpm_tee_private *pvt_data = dev_get_drvdata(&pdev->dev);
> +
> + /* Free the shared memory pool */
> + tee_shm_free(pvt_data->shm);
Is it unexpected that calling tee_shm_free() free's a shared memory
pool? A comment here implies exactly that.
> + /* close the existing session with fTPM TA*/
> + tee_client_close_session(pvt_data->ctx, pvt_data->session);
Ditto.
> +
> + /* close the context with TEE driver */
> + tee_client_close_context(pvt_data->ctx);
Ditto.
> +}
> +
> static const struct of_device_id of_ftpm_tee_ids[] = {
> { .compatible = "microsoft,ftpm" },
> { }
> @@ -341,6 +362,7 @@ static struct platform_driver ftpm_tee_driver = {
> },
> .probe = ftpm_tee_probe,
> .remove = ftpm_tee_remove,
> + .shutdown = ftpm_tee_shutdown,
> };
>
> module_platform_driver(ftpm_tee_driver);
> --
> 2.23.0
>
/Jarkko
next prev parent reply other threads:[~2019-10-14 20:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 14:57 [PATCH] ftpm: add shutdown call back Pavel Tatashin
2019-10-14 20:03 ` Jarkko Sakkinen [this message]
2019-10-14 20:17 ` Pavel Tatashin
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=20191014200309.GM15552@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=bryankel@microsoft.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jgg@ziepe.ca \
--cc=jmorris@namei.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pasha.tatashin@soleen.com \
--cc=peterhuewe@gmx.de \
--cc=rdunlap@infradead.org \
--cc=sashal@kernel.org \
--cc=sumit.garg@linaro.org \
--cc=tee-dev@lists.linaro.org \
--cc=thiruan@microsoft.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.