From: Alexander Holler <holler@ahsoftware.de>
To: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
Russell King <linux@arm.linux.org.uk>,
Grant Likely <grant.likely@linaro.org>
Subject: Re: [PATCH 10/14] init: deps: IDs for annotated initcalls
Date: Tue, 20 Oct 2015 12:42:22 +0200 [thread overview]
Message-ID: <56261A8E.1080808@ahsoftware.de> (raw)
In-Reply-To: <562617C5.2050706@ahsoftware.de>
Am 20.10.2015 um 12:30 schrieb Alexander Holler:
> Am 19.10.2015 um 15:12 schrieb Mark Brown:
>> On Sat, Oct 17, 2015 at 08:46:44PM +0200, Alexander Holler wrote:
>>> Am 17.10.2015 um 20:29 schrieb Greg Kroah-Hartman:
>>>> On Sat, Oct 17, 2015 at 07:55:17PM +0200, Alexander Holler wrote:
>>>>> Am 17.10.2015 um 19:45 schrieb Greg Kroah-Hartman:
>>
>>>>>> A file like this is going to be a nightmare to maintain and ensure
>>>>>> that
>>>>>> it actually is correct, I don't see it as a viable solution, sorry.
>>
>>>>> How often will drivers be added? The only changes on this file will
>>>>> happen
>>>>> if a driver will be added and then just one ID will be added.
>>
>>>> Look at how many drivers we add every kernel release, it's a
>>>> non-trivial
>>>> amount.
>>
>>> I still don't see your problem. As long as the IDs in the enum are
>>> ordered
>>> according to the directories, there won't be more merge conflicts
>>> than in
>>> the Makefile or Kconfig for that directory. And as mentioned, it's e.g.
>>> possible to split the one file into multiple ones, e.g.
>>>
>>> enum driver_ids {
>>>
>>> #include "foo"
>>> #include "bar"
>>>
>>> };
>>>
>>> Of cource, the content of foo and bar might look a bit unusual.
>>
>> If it's a purely mechanical thing we really ought to be able to arrange
>> for it to be generated during the build rather than have to have more
>> typing. If the values matter then people have to think about what they
>> are which is more effort and rather indirect.
>>
>>> It's just that I didn't thought much about another solution, and the
>>> time
>>> I've spend to think about something else which provides a usable ID,
>>> didn't
>>> end in a solution. So I would be happy if someone else would offer an
>>> idea.
>>
>> A checksum of the driver name?
>
> That requires the driver name, which is only available if the struct
> device_driver is available (which isn't always the case). And it would
> require time to build the checksums.
>
> Another idea to split this one file into multiple ones would be to
> reserve blocks of IDs. E.g. use 10000-20000 for networking stuff,
> 1000-1200 for I2C and so on.
In detail it could look like
driver_ids_base.h:
enum {
drvid_i2c_base = 1000,
drvid_networking_base = 1200,
drvid_usb_base = 3000,
};
driver_ids_i2c.h:
# include "driver_ids_base.h"
enum {
drvid_i2c_start = drvid_i2c_base,
/* drivers/i2c */
drvid_i2c,
drvid_i2c_dev,
drvid_i2c_busses_start,
/* drivers/i2c/busses */
drvid_i2c_gpio,
(...)
drvid_i2c_end
};
> Regards,
>
> Alexander Holler
next prev parent reply other threads:[~2015-10-20 10:42 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-17 17:14 [PATCH 0/14] init: deps: dependency based (parallelized) init Alexander Holler
2015-10-17 17:14 ` [PATCH 01/14] init: deps: introduce annotated initcalls Alexander Holler
2015-10-17 17:14 ` [PATCH 02/14] init: deps: use annotated initcalls for a dependency based (optionally parallelized) init Alexander Holler
2015-10-17 17:14 ` [PATCH 03/14] init: deps: dt: use (HW-specific) dependencies provided by the DT too Alexander Holler
2015-10-19 12:37 ` Mark Brown
2015-10-19 16:27 ` Rob Herring
2015-10-19 17:24 ` Alexander Holler
2015-10-19 17:10 ` Alexander Holler
2015-10-17 17:14 ` [PATCH 04/14] init: deps: order network interfaces by link order Alexander Holler
2015-10-17 18:23 ` Linus Torvalds
2015-10-17 18:37 ` Alexander Holler
2015-10-17 18:52 ` Linus Torvalds
2015-10-17 19:01 ` Alexander Holler
2015-10-17 19:08 ` Linus Torvalds
2015-10-17 19:14 ` Alexander Holler
2015-10-17 19:36 ` Greg Kroah-Hartman
2015-10-17 19:58 ` Alexander Holler
2015-10-17 21:20 ` Alexander Holler
2015-10-18 4:59 ` Alexander Holler
2015-10-18 5:14 ` Greg Kroah-Hartman
2015-10-18 5:20 ` Alexander Holler
2015-10-18 5:59 ` Greg Kroah-Hartman
2015-10-18 10:11 ` Alexander Holler
2015-10-19 10:57 ` Alexander Holler
2015-10-19 11:31 ` Alexander Holler
2015-10-22 6:47 ` Alexander Holler
2015-10-17 19:37 ` Linus Torvalds
2015-10-17 21:32 ` Alexander Holler
2015-10-17 18:55 ` Greg Kroah-Hartman
2015-10-17 19:03 ` Linus Torvalds
2015-10-17 19:07 ` Alexander Holler
2015-10-17 17:14 ` [PATCH 05/14] init: deps: order I2C bus drivers by their ID Alexander Holler
2015-10-17 17:14 ` [PATCH 06/14] dtc: deps: Automatically add new property 'dependencies' which contains a list of referenced phandles Alexander Holler
2015-10-17 17:14 ` [PATCH 07/14] dtc: deps: introduce new (virtual) property no-dependencies Alexander Holler
2015-10-17 17:14 ` [PATCH 08/14] dtc: deps: Add option to print initialization order Alexander Holler
2015-10-17 17:14 ` [PATCH 09/14] dtc: deps: Add option to print dependency graph as dot (Graphviz) Alexander Holler
2015-10-17 17:14 ` [PATCH 10/14] init: deps: IDs for annotated initcalls Alexander Holler
2015-10-17 17:45 ` Greg Kroah-Hartman
2015-10-17 17:55 ` Alexander Holler
2015-10-17 18:29 ` Greg Kroah-Hartman
2015-10-17 18:46 ` Alexander Holler
2015-10-19 13:12 ` Mark Brown
2015-10-20 10:30 ` Alexander Holler
2015-10-20 10:42 ` Alexander Holler [this message]
2015-10-20 10:50 ` Alexander Holler
2015-10-20 10:57 ` Alexander Holler
2015-10-17 17:14 ` [PATCH 11/14] init: deps: annotate various initcalls Alexander Holler
2015-10-17 18:47 ` Linus Torvalds
2015-10-17 18:59 ` Alexander Holler
2015-10-17 17:14 ` [PATCH 12/14] dt: dts: deps: kirkwood: dockstar: add dependency ehci -> usb power regulator Alexander Holler
2015-10-17 17:14 ` [PATCH 13/14] dt: dts: deps: imx6q: make some remote-endpoints non-dependencies Alexander Holler
2015-10-17 17:14 ` [PATCH 14/14] dt: dts: deps: omap: beagle: " Alexander Holler
2015-10-17 17:44 ` [PATCH 0/14] init: deps: dependency based (parallelized) init Greg Kroah-Hartman
2015-10-17 18:19 ` Alexander Holler
2015-10-17 18:38 ` Greg Kroah-Hartman
2015-10-17 19:43 ` Alexander Holler
2015-10-17 20:20 ` Greg Kroah-Hartman
2015-10-17 20:37 ` Alexander Holler
2015-11-06 16:07 ` Alexander Holler
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=56261A8E.1080808@ahsoftware.de \
--to=holler@ahsoftware.de \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=torvalds@linux-foundation.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).