From: Arnd Bergmann <arnd@arndb.de>
To: Greg KH <gregkh@suse.de>
Cc: Chris Metcalf <cmetcalf@tilera.com>,
Eric Biederman <ebiederm@aristanetworks.com>,
linux-kernel@vger.kernel.org, Chris Wright <chrisw@sous-sol.org>,
Benjamin Thery <benjamin.thery@bull.net>,
Phil Carmody <ext-phil.2.carmody@nokia.com>
Subject: Re: [PATCH] arch/tile: add arch/tile/drivers/ directory with SROM driver
Date: Sat, 21 May 2011 11:33:50 +0200 [thread overview]
Message-ID: <201105211133.50238.arnd@arndb.de> (raw)
In-Reply-To: <20110521032102.GD19907@suse.de>
On Saturday 21 May 2011 05:21:02 Greg KH wrote:
> On Fri, May 20, 2011 at 07:39:10PM -0400, Chris Metcalf wrote:
> > On 5/20/2011 6:40 PM, Eric Biederman wrote:
> >
> > > You are vastly exceeding the one value per file rule of sysfs.
> >
> > True, but bin_attribute has always been an exception to that rule anyway.
>
> No it hasn't. A bin attribute is for something that is "one" value, it
> is a binary file that the kernel doesn't know anything about, nor does
> it intrepret it.
>
> It sounds like you want this binary attribute file to be a bit different
> than the "normal" one, and because of that you are wanting to modify the
> sysfs file, which proves that you are doing things differently here.
I initially argued that the file is the same as all the other ones
in drivers/misc/eeprom/*.c. None of them care what the data is and
they pass it through to the user. It would also be possible to
always flush after each write, which makes the interface act more
like you would expect it to, at the cost of lower performance in
case the user writes it in small blocks.
> > Originally I proposed a straightforward character device for this
> > role.
>
> Ah, ok, I think you should do that.
>
> > Arnd Bergmann encouraged me to look at kernel precedents like
> > drivers/char/eeprom/, which is why I converted this driver to sysfs.
> > The first post in this thread is here:
> > https://lkml.org/lkml/2011/5/4/415 . Since then I've come around to
> > believing that it's more valuable to group this driver with the other
> > eeprom drivers, rather than with the other paravirtualized tile
> > drivers.
>
> See above why I don't think that is so.
What I only now noticed is that the other eeprom drivers only support
reading the eeprom, not writing it, so there is a significant difference.
Using the bin_attribute doesn't sound completely wrong to me, especially
if you put it in your /sys/hypervisor/* direcory together with the
regular attributes we talked about. The character device would also
be an option (better than /proc/ppc/update_flash that is used on pSeries),
but if we do that, I would group it together with the other similar
files (ps3flash, nwflash, ...) in a new subdirectory.
Arnd
next prev parent reply other threads:[~2011-05-21 9:34 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 19:10 [PATCH] arch/tile: add arch/tile/drivers/ directory with SROM driver Chris Metcalf
2011-05-05 6:41 ` Arnd Bergmann
2011-05-06 19:37 ` Chris Metcalf
2011-05-20 18:05 ` Chris Metcalf
2011-05-20 18:46 ` Arnd Bergmann
2011-05-20 22:40 ` Eric Biederman
2011-05-20 23:39 ` Chris Metcalf
2011-05-21 3:21 ` Greg KH
2011-05-21 9:33 ` Arnd Bergmann [this message]
2011-05-21 13:52 ` Chris Metcalf
2011-05-21 15:02 ` Arnd Bergmann
2011-05-21 15:31 ` Chris Metcalf
2011-05-21 15:50 ` Eric Biederman
2011-05-23 20:10 ` Chris Metcalf
2011-05-21 7:46 ` Eric Biederman
2011-05-21 8:32 ` Arnd Bergmann
2011-05-22 0:54 ` Mike Frysinger
2011-05-28 15:13 ` [PATCH v2] arch/tile: add hypervisor-based character driver for SPI flash ROM Chris Metcalf
2011-05-28 21:23 ` Greg KH
2011-05-29 0:32 ` Chris Metcalf
2011-05-29 11:45 ` Greg KH
2011-05-29 12:18 ` Chris Metcalf
2011-05-29 13:47 ` Greg KH
2011-05-29 15:45 ` Arnd Bergmann
2011-05-29 18:23 ` Chris Metcalf
2011-06-02 15:04 ` [PATCH v3] " Chris Metcalf
2011-06-10 16:41 ` Arnd Bergmann
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=201105211133.50238.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=benjamin.thery@bull.net \
--cc=chrisw@sous-sol.org \
--cc=cmetcalf@tilera.com \
--cc=ebiederm@aristanetworks.com \
--cc=ext-phil.2.carmody@nokia.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.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.