From: Federico Vaga <federico.vaga@vaga.pv.it>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Tejun Heo <tj@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: kernFS/sysfs: mmap and vm_operations close
Date: Wed, 27 Sep 2017 11:38:47 +0200 [thread overview]
Message-ID: <2000464.hOpqYtiy7z@number-5> (raw)
In-Reply-To: <20170927074551.GA13742@kroah.com>
On Wednesday, 27 September 2017 09:45:51 CEST Greg Kroah-Hartman wrote:
> On Wed, Sep 27, 2017 at 08:41:12AM +0200, Federico Vaga wrote:
> > On Tuesday, 26 September 2017 23:31:29 CEST Greg Kroah-Hartman wrote:
> > > On Tue, Sep 26, 2017 at 05:50:55PM +0200, Federico Vaga wrote:
[...]
> > I want to make our VME interface "as PCI as possible", so I want to
> > re-create resources that users can `mmap` to access the device memory.
>
> Have you looked at the UIO interface?
Yes, but I do not see many differences (user prospective) in doing my mmap
with UIO, debugfs, sysfs, or char-device. I would have used a char-device, but
I wanted to offer a "PCI like" interface so I did as PCI does. Is the PCI
approach obsolete and it should not be taken as example?
I chose sysfs only for this reason, not because sysfs gives me something more;
actually it does not, and that's why we are here :D
> > This abstraction will allow us to write utilities that works on PCI and
> > VME
> > devices without dealing with the peculiarity of each interface. This is
> > particularly useful when you have FPGAs that can run the "same" code on
> > different buses, but it is true as well when you have the same hardware
> > (the same memory map) installed on VME cards or PCI cards.
> >
> > That's why a sysfs VME resource seems to me the easiest and clean way to
> > achieve this. I do not want to create yet another layer that hides the
> > differences between the two buses when mmap is so straight forward and
> > easy to implement. Another point is that adding a new layer add
> > complexity in the architecture and for the developers; they have to learn
> > yet another non- standard interface that I invent, while the concept of
> > resource is something that everybody know.
>
> Or if you use the VME kernel interface, everything will "just work"...
(in private explanation about why we cannot use the VME kernel)
> > > sysfs binary attributes are for dumping binary data that the kernel
> > > doesn't touch/parse, through to hardware. Why use mmap for this? Do
> > > you have a pointer to your code somewhere?
> >
> > No pointer :S
>
> Sorry, I can't help out much then.
>
> Best of luck!
No problem, thank you for your time.
--
Federico Vaga
http://www.federicovaga.it
prev parent reply other threads:[~2017-09-27 9:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 15:50 kernFS/sysfs: mmap and vm_operations close Federico Vaga
2017-09-26 21:31 ` Greg Kroah-Hartman
2017-09-27 6:41 ` Federico Vaga
2017-09-27 7:45 ` Greg Kroah-Hartman
2017-09-27 9:38 ` Federico Vaga [this message]
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=2000464.hOpqYtiy7z@number-5 \
--to=federico.vaga@vaga.pv.it \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@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.