tpmdd-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
To: Christophe Ricard
	<christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: jean-luc.blanc-qxv4g6HH51o@public.gmane.org,
	ashley-fm2HMyfA2y6tG0bUXCXiUA@public.gmane.org,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	christophe-h.ricard-qxv4g6HH51o@public.gmane.org,
	benoit.houyere-qxv4g6HH51o@public.gmane.org
Subject: Re: [PATCH v3 00/12] Rework of tpm_tis to share common logic accross phy's (lpc/spi/-i2c-)
Date: Tue, 19 Apr 2016 11:59:06 -0600	[thread overview]
Message-ID: <20160419175906.GB26460@obsidianresearch.com> (raw)
In-Reply-To: <5715BDFF.5000702-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Tue, Apr 19, 2016 at 07:11:27AM +0200, Christophe Ricard wrote:
> Please have a look to:
> https://github.com/cricard13/linux-tpmdd

Okay, looking at how everything ended up..

The indentation in tpm_tis_core.h should be fixed up.

These:

 static inline int tpm_read_bytes(struct tpm_chip *chip, u32 addr, u16 len,
 				  u8 *result)

Should not take a 'chip' as an argument, they only work with tpm_tis
devices, so they should take tpm_tis_data as an argument. Same with
the ops. Typesafety for correctness..

Why is release_localtity exported but request_locality is not? There
is something really wonky looking with how that locality stuff works.

I wonder if the itpm detection routine should move to the core code?
It uses so many internal functions it isn't all that nice to have them
exported just for that. A phy could have a flag TPM_TIS_ITPM_POSSIBLE
to turn it on.

No to stuff like this:

	/* Check SPI platform functionnalities */
	if (!dev) {
		pr_err("%s: dev is NULL. Device is not accessible.\n",
				__func__);
		return -ENODEV;
	}


The core has a tpm_tis_remove function, but the spi driver doesn't
call it, that looks wrong.

Use inlines functions:
 #define to_tpm_tis_spi_phy(data) container_of(data, struct tpm_tis_spi_phy,\

Review all the EXPORT'd symbols and see if they are really necessary..
eg tpm_tis_ready(chip); is just chip->ops->cancel(chip)

Make sure you put the new obj-XX lines in Makefile in the correct
sorted position. Ditto for kconfig

Jason

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z

  parent reply	other threads:[~2016-04-19 17:59 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-16  6:35 [PATCH v3 00/12] Rework of tpm_tis to share common logic accross phy's (lpc/spi/-i2c-) Christophe Ricard
     [not found] ` <1460788542-2455-1-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2016-04-16  6:35   ` [PATCH v3 01/12] tpm: Add include guards in tpm.h Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 02/12] tpm: tpm_tis: Share common data between phys Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 03/12] tpm: tpm_tis: Rename priv_data structure tpm_tis_data Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 04/12] tpm_tis: Introduce intermediate layer for TPM access Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 05/12] tpm_tis: Extend low-level interface to support proper return codes Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 06/12] tpm: Use read/write_bytes for drivers without more specialized methods Christophe Ricard
     [not found]     ` <1460788542-2455-7-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2016-04-18 17:01       ` Jason Gunthorpe
2016-04-16  6:35   ` [PATCH v3 07/12] tpm: Manage itpm workaround with tis specific data_expect bit Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 08/12] tpm: tpm_tis: Add post_probe phy handler Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 09/12] devicetree: Add infineon to vendor-prefix.txt Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 10/12] devicetree: Add Trusted Computing Group " Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 11/12] tpm/tpm_tis: Split tpm_tis driver into a core and TCG TIS compliant phy Christophe Ricard
2016-04-16  6:35   ` [PATCH v3 12/12] tpm/tpm_tis_spi: Add support for spi phy Christophe Ricard
2016-04-18 17:23   ` [PATCH v3 00/12] Rework of tpm_tis to share common logic accross phy's (lpc/spi/-i2c-) Jason Gunthorpe
     [not found]     ` <20160418172352.GB13979-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-19  5:11       ` Christophe Ricard
     [not found]         ` <5715BDFF.5000702-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-19 17:59           ` Jason Gunthorpe [this message]
     [not found]             ` <20160419175906.GB26460-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-04-20  6:52               ` Christophe Ricard

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=20160419175906.GB26460@obsidianresearch.com \
    --to=jgunthorpe-epgobjl8dl3ta4ec/59zmfatqe2ktcn/@public.gmane.org \
    --cc=ashley-fm2HMyfA2y6tG0bUXCXiUA@public.gmane.org \
    --cc=benoit.houyere-qxv4g6HH51o@public.gmane.org \
    --cc=christophe-h.ricard-qxv4g6HH51o@public.gmane.org \
    --cc=christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jean-luc.blanc-qxv4g6HH51o@public.gmane.org \
    --cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 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).