From: Earl Chew <echew@ixiacom.com>
To: Greg KH <greg@kroah.com>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: RFC: UIO null parent for __uio_register_device and uio_device_name()
Date: Wed, 19 Jan 2011 09:07:01 -0800 [thread overview]
Message-ID: <4D371A35.5000009@ixiacom.com> (raw)
In-Reply-To: <20110119163005.GA12979@kroah.com>
On 19/01/2011 8:30 AM, Greg KH wrote:
>> No probing is required in this scenario.
>
> Great, then create a platform device for your "hardware device" and you
> should be fine, right?
Greg,
I suppose so. I don't understand the need to enforce !parent
since device_create() seems to be fine with a NULL parent.
Would you explain what is to be gained by requiring !parent
at the Linux UIO level ?
>> Working on the implementation of our new system last night I realise
>> that our new configuration runs very lean, and I now do not have the
>> use of udev to populate /dev/uio[0-9].
>
> Then what populates your other device nodes?
I believe they are fixed in the root file system (ie the major numbers
are fixed). It is also possible that /etc/rcS script does the rest with
judicious mknod invocations.
>> This new configuration runs so lean that I don't have access to sysfs.
>
> I really find this hard to believe. Why would you not configure sysfs
> in your system?
The needs of our hardware and application are such that one of the key system
designers told me:
For the record, sysfs affects interface scalability in two ways: adds a
significant memory overhead (IIRC 300-500 bytes per interface) and slows down
device registration and de-registration.
>> The result is that I need to figure out the major/minor device number in
>> order to access the Linux UIO device. I will advertise this through /proc/
>> entries specific to the UIO client driver. We can then use this information
>> to mknod /dev/uio[0-9].
>
> Heh, you have /proc/ but not /sys/? Someone needs to move out of the
> 90's :)
LOL Yes, I see your point.
>> I've added uio_device_chrdev() alongside uio_device_name() to allow
>> us to figure out the coordinates of the Linux UIO device.
>
> Ick, no, please use the sysfs files that are alredy present for such a
> thing, don't reinvent the wheel, I will not accept such a change.
I think you're telling me you won't accept either of:
a. uio_device_name()
b. uio_device_chrdev()
It is not my intention to reinvent the wheel. The problem I have
is that the wheel in question won't fit my application context.
I'm trying to figure out how to get this done without a kernel
change, but I don't have many options left.
I think I can do the following:
o Use device_create() to make a parent before calling uio_register_device.
o Have the application search through /proc/devices to yield the major number
of the uio driver.
With no sysfs, I cannot think of a way to get hold of the minor number allocated
to this instance of the Linux UIO device, and without that I can't open() the
device driver.
Earl
next prev parent reply other threads:[~2011-01-19 17:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-19 3:56 RFC: UIO null parent for __uio_register_device and uio_device_name() Earl Chew
2011-01-19 14:56 ` Hans J. Koch
2011-01-19 15:42 ` Earl Chew
2011-01-19 16:30 ` Greg KH
2011-01-19 17:07 ` Earl Chew [this message]
2011-01-19 17:11 ` Earl Chew
2011-01-19 17:24 ` Greg KH
2011-01-19 17:22 ` Greg KH
2011-01-19 20:52 ` Hans J. Koch
2011-01-19 22:06 ` Earl Chew
2011-01-19 22:41 ` Greg KH
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=4D371A35.5000009@ixiacom.com \
--to=echew@ixiacom.com \
--cc=greg@kroah.com \
--cc=hjk@hansjkoch.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.