From: Bjorn Helgaas <helgaas@kernel.org> To: "liuqi (BA)" <liuqi115@huawei.com> Cc: "Krzysztof Wilczyński" <kw@linux.com>, Linuxarm <linuxarm@huawei.com>, will@kernel.org, mark.rutland@arm.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, zhangshaokun@hisilicon.com Subject: Re: [PATCH v6 2/2] drivers/perf: hisi: Add driver for HiSilicon PCIe PMU Date: Wed, 16 Jun 2021 10:23:43 -0500 [thread overview] Message-ID: <20210616152343.GA2977964@bjorn-Precision-5520> (raw) In-Reply-To: <d2524d34-648a-8667-dde9-3686bd4fd096@huawei.com> On Wed, Jun 16, 2021 at 09:09:40AM +0800, liuqi (BA) wrote: > On 2021/6/12 7:33, Krzysztof Wilczyński wrote: > > > +static ssize_t hisi_pcie_event_sysfs_show(struct device *dev, > > > + struct device_attribute *attr, char *buf) > > > +{ > > > + struct dev_ext_attribute *eattr; > > > + > > > + eattr = container_of(attr, struct dev_ext_attribute, attr); > > > + > > > + return sysfs_emit(buf, "config=0x%lx\n", (unsigned long)eattr->var); > > > +} > > > > I am not that familiar with the perf drivers, thus I might be completely > > wrong here, but usually for sysfs objects a single value is preferred, > > so that this "config=" technically would not be needed, unless this is > > somewhat essential to the consumers of this attribute to know what the > > value is? What do you think? > > "config=" is a supported for userspace tool, it is a kind of alias, so > cannot be remover here, thanks. I don't understand this part. This is brand-new functionality for the kernel, so there's no requirement to maintain compatibility for existing userspace tools. If there's a similar sysfs show function for other perf drivers, and you need to be compatible with *that*, fine. But if this is merely about being compatible with userspace that uses out-of-tree kernel functionality, that's not a real factor. Bjorn
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Helgaas <helgaas@kernel.org> To: "liuqi (BA)" <liuqi115@huawei.com> Cc: "Krzysztof Wilczyński" <kw@linux.com>, Linuxarm <linuxarm@huawei.com>, will@kernel.org, mark.rutland@arm.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, zhangshaokun@hisilicon.com Subject: Re: [PATCH v6 2/2] drivers/perf: hisi: Add driver for HiSilicon PCIe PMU Date: Wed, 16 Jun 2021 10:23:43 -0500 [thread overview] Message-ID: <20210616152343.GA2977964@bjorn-Precision-5520> (raw) In-Reply-To: <d2524d34-648a-8667-dde9-3686bd4fd096@huawei.com> On Wed, Jun 16, 2021 at 09:09:40AM +0800, liuqi (BA) wrote: > On 2021/6/12 7:33, Krzysztof Wilczyński wrote: > > > +static ssize_t hisi_pcie_event_sysfs_show(struct device *dev, > > > + struct device_attribute *attr, char *buf) > > > +{ > > > + struct dev_ext_attribute *eattr; > > > + > > > + eattr = container_of(attr, struct dev_ext_attribute, attr); > > > + > > > + return sysfs_emit(buf, "config=0x%lx\n", (unsigned long)eattr->var); > > > +} > > > > I am not that familiar with the perf drivers, thus I might be completely > > wrong here, but usually for sysfs objects a single value is preferred, > > so that this "config=" technically would not be needed, unless this is > > somewhat essential to the consumers of this attribute to know what the > > value is? What do you think? > > "config=" is a supported for userspace tool, it is a kind of alias, so > cannot be remover here, thanks. I don't understand this part. This is brand-new functionality for the kernel, so there's no requirement to maintain compatibility for existing userspace tools. If there's a similar sysfs show function for other perf drivers, and you need to be compatible with *that*, fine. But if this is merely about being compatible with userspace that uses out-of-tree kernel functionality, that's not a real factor. Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-06-16 15:23 UTC|newest] Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-31 13:32 [PATCH v6 0/2] drivers/perf: hisi: Add support for PCIe PMU Qi Liu 2021-05-31 13:32 ` Qi Liu 2021-05-31 13:32 ` [PATCH v6 1/2] docs: perf: Add description for HiSilicon PCIe PMU driver Qi Liu 2021-05-31 13:32 ` Qi Liu 2021-05-31 13:32 ` [PATCH v6 2/2] drivers/perf: hisi: Add driver for HiSilicon PCIe PMU Qi Liu 2021-05-31 13:32 ` Qi Liu 2021-06-11 16:23 ` Will Deacon 2021-06-11 16:23 ` Will Deacon 2021-06-14 9:20 ` Jonathan Cameron 2021-06-14 9:20 ` Jonathan Cameron 2021-06-15 9:26 ` Will Deacon 2021-06-15 9:26 ` Will Deacon 2021-06-15 8:57 ` liuqi (BA) 2021-06-15 8:57 ` liuqi (BA) 2021-06-15 9:35 ` Will Deacon 2021-06-15 9:35 ` Will Deacon 2021-06-16 1:54 ` liuqi (BA) 2021-06-16 1:54 ` liuqi (BA) 2021-06-16 13:42 ` Will Deacon 2021-06-16 13:42 ` Will Deacon 2021-06-17 11:00 ` liuqi (BA) 2021-06-17 11:00 ` liuqi (BA) 2021-06-17 17:57 ` Will Deacon 2021-06-17 17:57 ` Will Deacon 2021-06-18 9:32 ` liuqi (BA) 2021-06-18 9:32 ` liuqi (BA) 2021-06-21 17:59 ` Will Deacon 2021-06-21 17:59 ` Will Deacon 2021-06-23 9:59 ` liuqi (BA) 2021-06-23 9:59 ` liuqi (BA) 2021-06-11 23:33 ` Krzysztof Wilczyński 2021-06-11 23:33 ` Krzysztof Wilczyński 2021-06-16 1:09 ` liuqi (BA) 2021-06-16 1:09 ` liuqi (BA) 2021-06-16 15:23 ` Bjorn Helgaas [this message] 2021-06-16 15:23 ` Bjorn Helgaas 2021-06-16 17:27 ` Will Deacon 2021-06-16 17:27 ` Will Deacon 2021-06-16 14:14 ` Bjorn Helgaas 2021-06-16 14:14 ` Bjorn Helgaas 2021-06-11 10:04 ` [PATCH v6 0/2] drivers/perf: hisi: Add support for " liuqi (BA) 2021-06-11 10:04 ` liuqi (BA)
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=20210616152343.GA2977964@bjorn-Precision-5520 \ --to=helgaas@kernel.org \ --cc=bhelgaas@google.com \ --cc=kw@linux.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pci@vger.kernel.org \ --cc=linuxarm@huawei.com \ --cc=liuqi115@huawei.com \ --cc=mark.rutland@arm.com \ --cc=will@kernel.org \ --cc=zhangshaokun@hisilicon.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: linkBe 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.