Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933527AbbFWQTs (ORCPT ); Tue, 23 Jun 2015 12:19:48 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:34374 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932270AbbFWQTk (ORCPT ); Tue, 23 Jun 2015 12:19:40 -0400 Date: Tue, 23 Jun 2015 10:19:32 -0600 From: Jason Gunthorpe To: Tejun Heo Cc: Jarkko Sakkinen , tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, peterhuewe@gmx.de, gregkh@linuxfoundation.org, Vivien Didelot , Guenter Roeck , NeilBrown Subject: Re: [PATCH v7 1/3] sysfs: added sysfs_link_entry_to_kobj() Message-ID: <20150623161932.GA20922@obsidianresearch.com> References: <1434993894-5911-1-git-send-email-jarkko.sakkinen@linux.intel.com> <1434993894-5911-2-git-send-email-jarkko.sakkinen@linux.intel.com> <20150622173039.GA3710@mtj.duckdns.org> <20150622175253.GA28080@obsidianresearch.com> <20150622180154.GC3710@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150622180154.GC3710@mtj.duckdns.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.192 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1631 Lines: 38 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/