input: Dynamic Minor Numbers
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 6 repliesIn review
- v1 RFC3 patches 0 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | input: add dynamic-minor allocation helpersdrivers/ include/ | +166 | 0 replies | |
| 2/3 | input: increase INPUT_DEVICES to 512 to allow dynamic minorsdrivers/ | +3 | 0 replies | |
| 3/3 | input: evdev: use dynamic-minors if running out of static minorsdrivers/ | +53 | 0 replies |
Reviews trailers per patch
None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | David Herrmann |
|---|---|
| Series | T-b R-b |
| 1/3 | |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/3] input: Dynamic Minor Numbers
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(-)
Signature · 1 line
1.7.12