From: David Herrmann <dh.herrmann@googlemail.com>
To: linux-input@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-kernel@vger.kernel.org,
Bernie Thompson <bernie@plugable.com>,
David Herrmann <dh.herrmann@googlemail.com>
Subject: [PATCH v2 0/3] input: Dynamic Minor Numbers
Date: Thu, 20 Sep 2012 19:52:00 +0200 [thread overview]
Message-ID: <1348163523-2062-1-git-send-email-dh.herrmann@googlemail.com> (raw)
Hi
This is version 2 of the Dynamic Minor Numbers support for input devices.
Version 1 can be found here:
http://thread.gmane.org/gmane.linux.kernel.input/26842
For historical reasons, each input-handler (like evdev, joydev etc.) gets 32
minor numbers assigned statically. That means, if we have more than 32 input
devices, then there will not be any /dev/input/eventX device that user-space can
use to access the device.
While 32 devices were enough for a long time, multi-seat machines currently
cannot create more than 8 seats due to this restriction (assuming 3 devices per
seat plus some static devices).
This patchset allows input-handlers to allocate dynamic minor numbers if they
run out of static numbers. Patch #1 adds the infrastructure to the input core,
patch #2 makes sure we allow enough devices so we actually have room for dynamic
minor numbers and patch #3 converts evdev to use it.
Unused static minors numbers are never used for the dynamic minor numbers pool.
So existing user-space does not break. But old user-space (not using udev) will
not be able to use the new devices.
Existing user-space with udev support will be able to use it, but the xserver
currently crashes when more than 40 devices are added (which is unrelated to
this patch).
If you want to test it, you can use this tool which creates dummy input devices
via uinput:
https://gist.github.com/3756232
Example output for 'ls -la /dev/input':
https://gist.github.com/3755663
I fixed minor coding-style issues since version 1 and a NULL-dereference in
input_minor_alloc().
Regards
David
David Herrmann (3):
input: add dynamic-minor allocation helpers
input: increase INPUT_DEVICES to 512 to allow dynamic minors
input: evdev: use dynamic-minors if running out of static minors
drivers/input/evdev.c | 95 +++++++++++++++-------------
drivers/input/input.c | 167 +++++++++++++++++++++++++++++++++++++++++++++++++-
include/linux/input.h | 5 ++
3 files changed, 222 insertions(+), 45 deletions(-)
--
1.7.12
next reply other threads:[~2012-09-20 17:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-20 17:52 David Herrmann [this message]
2012-09-20 17:52 ` [PATCH v2 1/3] input: add dynamic-minor allocation helpers David Herrmann
2012-09-20 17:52 ` [PATCH v2 2/3] input: increase INPUT_DEVICES to 512 to allow dynamic minors David Herrmann
2012-09-20 17:52 ` [PATCH v2 3/3] input: evdev: use dynamic-minors if running out of static minors David Herrmann
2012-09-21 8:07 ` [PATCH v2 0/3] input: Dynamic Minor Numbers Dmitry Torokhov
2012-09-21 9:22 ` David Herrmann
2012-09-21 19:18 ` David Herrmann
2012-09-21 20:51 ` Dmitry Torokhov
2012-09-21 21:32 ` David Herrmann
2012-09-25 8:55 ` David Herrmann
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=1348163523-2062-1-git-send-email-dh.herrmann@googlemail.com \
--to=dh.herrmann@googlemail.com \
--cc=bernie@plugable.com \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).