From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: delicious quinoa <delicious.quinoa@gmail.com>
Cc: Alan Tull <atull@altera.com>, "H. Peter Anvin" <hpa@zytor.com>,
monstr@monstr.eu, Pavel Machek <pavel@denx.de>,
Michal Simek <michal.simek@xilinx.com>,
linux-kernel@vger.kernel.org, Dinh Nguyen <dinguyen@altera.com>,
Philip Balister <philip@balister.org>,
Alessandro Rubini <rubini@gnudd.com>,
Steffen Trumtrar <s.trumtrar@pengutronix.de>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
Jason Cooper <jason@lakedaemon.net>,
Yves Vandervennet <rocket.yvanderv@gmail.com>,
Kyle Teske <kyle.teske@ni.com>,
Josh Cartwright <joshc@eso.teric.us>,
Nicolas Pitre <nico@linaro.org>,
Mark Langsdorf <mark.langsdorf@calxeda.com>,
Felipe Balbi <balbi@ti.com>,
linux-doc@vger.kernel.org,
Mauro Carvalho Chehab <m.chehab@samsung.com>,
David Brown <davidb@codeaurora.org>,
Rob Landley <rob@landley.net>,
"David S. Miller" <davem@davemloft.net>,
Joe Perches <joe@perches.com>,
Cesar Eduardo Barros <cesarb@cesarb.net>,
Samuel Ortiz <sameo@linux.intel.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC PATCH v2 0/1] FPGA subsystem core
Date: Tue, 8 Oct 2013 18:41:44 -0700 [thread overview]
Message-ID: <20131009014144.GB17066@kroah.com> (raw)
In-Reply-To: <CANk1AXTLW_-eZgUjEh8ENK2vC4ckNhaGBMbQycy+-h9x-t1BoQ@mail.gmail.com>
On Tue, Oct 08, 2013 at 06:47:41PM -0500, delicious quinoa wrote:
> On Tue, Oct 8, 2013 at 4:44 PM, Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> > On Tue, Oct 08, 2013 at 12:00:14PM -0500, Alan Tull wrote:
> >> On Fri, 2013-10-04 at 16:33 -0700, Greg Kroah-Hartman wrote:
> >> > On Fri, Oct 04, 2013 at 11:12:13AM -0700, H. Peter Anvin wrote:
> >> > > On 10/04/2013 10:44 AM, Michal Simek wrote:
> >> > > >
> >> > > > If you look at it in general I believe that there is wide range of
> >> > > > applications which just contain one bitstream per fpga and the
> >> > > > bitstream is replaced by newer version in upgrade. For them
> >> > > > firmware interface should be pretty useful. Just setup firmware
> >> > > > name with bitstream and it will be automatically loaded in startup
> >> > > > phase.
> >> > > >
> >> > > > Then there is another set of applications especially in connection
> >> > > > to partial reconfiguration where this can be done statically by
> >> > > > pregenerated partial bitstreams or automatically generated on
> >> > > > target cpu. For doing everything on the target firmware interface
> >> > > > is not the best because everything can be handled by user
> >> > > > application and it is easier just to push this bitstream to do
> >> > > > device and not to save it to the fs.
> >> > > >
> >> > > > I think the question here is if this subsystem could have several
> >> > > > interfaces. For example Alan is asking for adding char support.
> >> > > > Does it even make sense to have more interfaces with the same
> >> > > > backend driver? When this is answered then we can talk which one
> >> > > > make sense to have. In v2 is sysfs and firmware one. Adding char
> >> > > > is also easy to do.
> >> > > >
> >> > >
> >> > > Greg, what do you think?
> >> > >
> >> > > I agree that the firmware interface makes sense when the use of the
> >> > > FPGA is an implementation detail in a fixed hardware configuration,
> >> > > but that is a fairly restricted use case all things considered.
> >> >
> >> > Ideally I thought this would be just like "firmware", you dump the file
> >> > to the FPGA, it validates it and away you go with a new image running in
> >> > the chip.
> >> >
> >> > But, it sounds like this is much more complicated, so much so that
> >> > configfs might be the correct interface for it, as you can do lots of
> >> > things there, and it is very flexible (some say too flexible...)
> >> >
> >> > A char device, with a zillion different custom ioctls is also a way to
> >> > do it, but one that I really want to avoid as that gets messy really
> >> > quickly.
> >>
> >> Hi Greg,
> >>
> >> We are discussing a char device that has very few interfaces:
> >> - a way of writing the image to fpga
> >> - a way of getting fpga manager status
> >> - a way of setting fpga manager state
> >>
> >> This all looks like standard char driver interface to me. Writing the
> >> image could be writing to the devnode (cat image.bin > /dev/fpga0). The
> >> status stuff would be sysfs attributes. All normal stuff any char
> >> driver in the kernel would do. Why not just go with that?
> >
> > Because we really hate to add new ioctls to the kernel if at all
> > possible.
>
> I don't see any need for adding any ioctls.
>
> > Using sysfs (and it's one-value-per-file rule), makes
> > userspace tools easier, and managing the different devices in the system
> > easier (you know _exactly_ which device you are talking to, you don't
> > have to guess based on minor number).
>
> That's cool. The interface we could use is writing the raw fpga data
> to /sys/class/fpga_manager/fpga0/fpga_config_data
>
> Reading or setting the fpga state could be from
> /sys/class/fpga_manager/fpga0/fpga_config_state
Ok, that's fine, I don't object to that, but you are giving up the
notification and loading ability of the kernel for the image files by
doing this, which will require you to use/write/maintain userspace
tools. If you use the firmware interface, no userspace tool is needed
at all, which I can see some people really wanting, right?
> Or do I misunderstand? Do you include sysfs attributes when you
> are talking about ioctls?
You can't do ioctls on sysfs files, so no.
greg k-h
next prev parent reply other threads:[~2013-10-09 1:43 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-02 15:35 Michal Simek
2013-10-02 15:35 ` [RFC PATCH v2] fpga: Introduce new fpga subsystem Michal Simek
2013-10-02 16:06 ` Joe Perches
2013-10-04 16:15 ` Michal Simek
2013-10-04 16:26 ` Greg Kroah-Hartman
2013-10-02 17:46 ` Jason Gunthorpe
2013-10-04 16:28 ` Michal Simek
2013-10-04 17:05 ` Jason Gunthorpe
2013-10-04 18:50 ` Alan Tull
2013-10-02 19:00 ` [RFC PATCH v2 0/1] FPGA subsystem core H. Peter Anvin
2013-10-03 6:49 ` Pavel Machek
2013-10-04 13:57 ` Michal Simek
2013-10-04 14:16 ` Greg Kroah-Hartman
2013-10-04 14:21 ` H. Peter Anvin
2013-10-04 14:28 ` Michal Simek
2013-10-04 16:46 ` H. Peter Anvin
2013-10-04 17:44 ` Michal Simek
2013-10-04 18:12 ` H. Peter Anvin
2013-10-04 23:33 ` Greg Kroah-Hartman
2013-10-04 23:49 ` Jason Gunthorpe
2013-10-05 4:00 ` H. Peter Anvin
2013-10-05 5:10 ` Jason Gunthorpe
2013-10-05 5:34 ` H. Peter Anvin
2013-10-05 6:53 ` Michal Simek
[not found] ` <c59c68b8-2565-45c5-bfe9-574b76f3f9bc@email.android.com>
2013-10-07 13:11 ` Michal Simek
2013-10-07 14:55 ` H. Peter Anvin
2013-10-07 15:03 ` Michal Simek
2013-10-07 15:07 ` H. Peter Anvin
2013-10-08 13:00 ` Michal Simek
2013-10-08 16:49 ` Alan Tull
2013-10-08 21:42 ` Greg Kroah-Hartman
[not found] ` <CANk1AXS9fpypVVWgvvUCZjKXDvLPpB7=kCNucwFcktgBHmV37w@mail.gmail.com>
[not found] ` <20131009014027.GA17066@kroah.com>
[not found] ` <5254EC8A.8060609@monstr.eu>
[not found] ` <20131009055332.GA4510@kroah.com>
[not found] ` <52550638.2080301@monstr.eu>
[not found] ` <52556585.3050603@zytor.com>
[not found] ` <20131009192439.GC18611@kroah.com>
[not found] ` <5255BE71.8010801@zytor.com>
2013-10-09 21:07 ` Jason Gunthorpe
2013-10-09 22:21 ` H. Peter Anvin
2013-10-05 17:33 ` Jason Gunthorpe
2013-10-05 6:56 ` Michal Simek
2013-10-04 23:50 ` H. Peter Anvin
2013-10-05 6:49 ` Michal Simek
2013-10-08 17:00 ` Alan Tull
2013-10-08 21:44 ` Greg Kroah-Hartman
2013-10-08 23:47 ` delicious quinoa
2013-10-09 1:41 ` Greg Kroah-Hartman [this message]
2013-10-04 18:26 ` Alan Tull
2013-10-03 21:46 ` Alan Tull
2013-10-04 15:27 ` Michal Simek
2013-10-04 18:30 ` Alan Tull
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=20131009014144.GB17066@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=atull@altera.com \
--cc=balbi@ti.com \
--cc=cesarb@cesarb.net \
--cc=davem@davemloft.net \
--cc=davidb@codeaurora.org \
--cc=delicious.quinoa@gmail.com \
--cc=dinguyen@altera.com \
--cc=hpa@zytor.com \
--cc=jason@lakedaemon.net \
--cc=jgunthorpe@obsidianresearch.com \
--cc=joe@perches.com \
--cc=joshc@eso.teric.us \
--cc=kyle.teske@ni.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.chehab@samsung.com \
--cc=mark.langsdorf@calxeda.com \
--cc=michal.simek@xilinx.com \
--cc=monstr@monstr.eu \
--cc=nico@linaro.org \
--cc=pavel@denx.de \
--cc=philip@balister.org \
--cc=rob@landley.net \
--cc=rocket.yvanderv@gmail.com \
--cc=rubini@gnudd.com \
--cc=s.trumtrar@pengutronix.de \
--cc=sameo@linux.intel.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
Powered by JetHome