From: Jarkko Sakkinen <jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Jason Gunthorpe
<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] tpm_crb: fix: associate to the correct device
Date: Thu, 18 Feb 2016 22:10:35 +0200 [thread overview]
Message-ID: <20160218201035.GA7033@intel.com> (raw)
In-Reply-To: <20160218180331.GA7191-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
On Thu, Feb 18, 2016 at 11:03:31AM -0700, Jason Gunthorpe wrote:
> On Wed, Feb 17, 2016 at 01:23:31PM +0200, Jarkko Sakkinen wrote:
> > At the moment for tpm_crb /proc/iomem shows the HW interface and not the
> > device using the memory range. This patch fixes the issue by associating
> > memory mappings to the TPM character device.
> >
> > The end result is this:
> >
> > $ cat /proc/iomem|grep MSFT -A2
> > dbfff000-dbffffff : MSFT0101:00
> > dbfff000-dbffffff : tpm0
>
> Hmmm... This large patch basically changes devm_ioremap so it uses the
> tpm chip dev not the acpi_dev - which seems reasonable - however I
> notice lots of drivers do use the parent device..
>
> However, it will change the unwind ordering on remove.. And when we
> check if tpm_crb is OK on that point I see this bug:
>
> static int crb_acpi_remove(struct acpi_device *device)
> {
> [..]
> tpm_chip_unregister(chip);
> if (chip->flags & TPM_CHIP_FLAG_TPM2)
> tpm2_shutdown(chip, TPM2_SU_CLEAR);
Good catch, thanks!
/Jarkko
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
WARNING: multiple messages have this Message-ID (diff)
From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Cc: Peter Huewe <peterhuewe@gmx.de>,
tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [tpmdd-devel] [PATCH] tpm_crb: fix: associate to the correct device
Date: Thu, 18 Feb 2016 22:10:35 +0200 [thread overview]
Message-ID: <20160218201035.GA7033@intel.com> (raw)
In-Reply-To: <20160218180331.GA7191@obsidianresearch.com>
On Thu, Feb 18, 2016 at 11:03:31AM -0700, Jason Gunthorpe wrote:
> On Wed, Feb 17, 2016 at 01:23:31PM +0200, Jarkko Sakkinen wrote:
> > At the moment for tpm_crb /proc/iomem shows the HW interface and not the
> > device using the memory range. This patch fixes the issue by associating
> > memory mappings to the TPM character device.
> >
> > The end result is this:
> >
> > $ cat /proc/iomem|grep MSFT -A2
> > dbfff000-dbffffff : MSFT0101:00
> > dbfff000-dbffffff : tpm0
>
> Hmmm... This large patch basically changes devm_ioremap so it uses the
> tpm chip dev not the acpi_dev - which seems reasonable - however I
> notice lots of drivers do use the parent device..
>
> However, it will change the unwind ordering on remove.. And when we
> check if tpm_crb is OK on that point I see this bug:
>
> static int crb_acpi_remove(struct acpi_device *device)
> {
> [..]
> tpm_chip_unregister(chip);
> if (chip->flags & TPM_CHIP_FLAG_TPM2)
> tpm2_shutdown(chip, TPM2_SU_CLEAR);
Good catch, thanks!
/Jarkko
next prev parent reply other threads:[~2016-02-18 20:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 11:23 [PATCH] tpm_crb: fix: associate to the correct device Jarkko Sakkinen
2016-02-17 11:23 ` Jarkko Sakkinen
[not found] ` <1455708211-9653-1-git-send-email-jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2016-02-18 18:03 ` Jason Gunthorpe
2016-02-18 18:03 ` [tpmdd-devel] " Jason Gunthorpe
[not found] ` <20160218180331.GA7191-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2016-02-18 20:10 ` Jarkko Sakkinen [this message]
2016-02-18 20:10 ` Jarkko Sakkinen
2016-03-04 23:32 ` Jarkko Sakkinen
2016-03-04 23:32 ` [tpmdd-devel] " Jarkko Sakkinen
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=20160218201035.GA7033@intel.com \
--to=jarkko.sakkinen-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@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 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.