From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
To: Tejun Heo <tj@kernel.org>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
peterhuewe@gmx.de, gregkh@linuxfoundation.org,
Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
Guenter Roeck <linux@roeck-us.net>, NeilBrown <neilb@suse.de>
Subject: Re: [PATCH v7 1/3] sysfs: added sysfs_link_entry_to_kobj()
Date: Tue, 23 Jun 2015 10:19:32 -0600 [thread overview]
Message-ID: <20150623161932.GA20922@obsidianresearch.com> (raw)
In-Reply-To: <20150622180154.GC3710@mtj.duckdns.org>
On Mon, Jun 22, 2015 at 02:01:54PM -0400, Tejun Heo wrote:
> > TPM is undergoing a migration of core attributes from the
> > platform_device to the core's struct device.
> >
> > The only purpose of the symlink was to provide userspace
> > compatability with the old location.
>
> Ah, yeah, that's painful. Can you please briefly explain why it
> wasn't necessary before? Are you merging multiple devices into one?
Prior to the clean up work starting each and every driver was adding
sysfs files on its own to the platform_device and we had no core
struct tpm.struct device all.
The first cleanup moved all the sysfs creation into core code, but
kept the use of the platform device. A second cleanup added the struct
device and removed the misc_device abuse.
The next round was hoped to bring the core code into alignment with
everything else in the kernel:
- Create sysfs files at the right time so userspace isn't racey
- Don't stomp the drvdata of the platform_device in core code
- Have the understandable lifetime model that most of the rest
of the kernel has
The concept was to move the sysfs files to the natural location on the
core's struct tpm.struct device and leave a symlink behind on the
platform_device for compat.
We could also just move the sysfs file and ignore the compat symlink,
but it is not clear to me if that is an OK UAPI break for sysfs?
Jason
next prev parent reply other threads:[~2015-06-23 16:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 17:24 [PATCH v7 0/3] Enable PPI sysfs interface for TPM 2.0 Jarkko Sakkinen
2015-06-22 17:24 ` [PATCH v7 1/3] sysfs: added sysfs_link_entry_to_kobj() Jarkko Sakkinen
2015-06-22 17:30 ` Tejun Heo
2015-06-22 17:52 ` Jason Gunthorpe
2015-06-22 18:01 ` Tejun Heo
2015-06-23 12:43 ` Jarkko Sakkinen
2015-06-23 16:19 ` Jason Gunthorpe [this message]
2015-07-02 17:04 ` Tejun Heo
2015-07-03 11:12 ` Jarkko Sakkinen
2015-06-22 17:24 ` [PATCH v7 2/3] tpm: move the PPI attributes to character device directory Jarkko Sakkinen
2015-06-22 17:24 ` [PATCH v7 3/3] tpm: update PPI documentation to address the location change 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=20150623161932.GA20922@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch.com \
--cc=gregkh@linuxfoundation.org \
--cc=jarkko.sakkinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=neilb@suse.de \
--cc=peterhuewe@gmx.de \
--cc=tj@kernel.org \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=vivien.didelot@savoirfairelinux.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