Re: [RFC PATCH 3/8] qaic: Create char dev
From: Jeffrey Hugo
Date: Sat May 16 2020 - 17:29:42 EST
On 5/16/2020 1:01 AM, Greg KH wrote:
On Fri, May 15, 2020 at 03:08:59PM -0600, Jeffrey Hugo wrote:
2. There are a limited number of dynamic minor numbers for misc devs (64),
so if you are expecting more devices than that, a misc dev is not
appropiate. Also, these minors are shared with other misc dev users, so
depending on the system configuration, you might have significantly less
than 64 minors available for use.
I'm pretty sure we can have more than 64 misc devices, that limitation
should have been removed a while ago. Try it and see :)
In total, there can be more tha 64 misc devices. However my previous
comment was specific to dynamic minors (ie devices which do not have an
assigned minor). The limit on dynamic minors still apears to be 64.
Looking at the code -
DYNAMIC_MINORS is still 64
https://elixir.bootlin.com/linux/v5.7-rc5/source/drivers/char/misc.c#L63
I see the same in -next
DYNAMIC_MINORS is used to size a bitmap - one bit for each dynamic minor
misc device that exists at one particular point in time. After all 64
bits are consumed by misc_register() by clients requesting a dynamic
minor, no more dynamic minor misc devices can be registered until some
are unregistered.
What am I missing?
--
Jeffrey Hugo
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.