[PATCH 0/3] IRQ_DOMAIN: remove all "depends on", use only "select"
Arnd Bergmann
arnd at arndb.de
Mon Feb 13 00:05:12 PST 2023
On Mon, Feb 13, 2023, at 05:15, Randy Dunlap wrote:
> IRQ_DOMAIN is a hidden (not user visible) symbol. Users cannot set
> it directly thru "make *config", so drivers should select it instead
> of depending on it if they need it.
> Relying on it being set for a dependency is risky.
>
> Consistently using "select" or "depends on" can also help reduce
> Kconfig circular dependency issues.
>
> IRQ_DOMAIN is selected 109 times and is depended on 3 times in
> current linux-next. Eliminate the uses of "depends on" by
> converting them to "select".
>
> [PATCH 1/3] extcon: max8997: select IRQ_DOMAIN instead of depending on it
> [PATCH 2/3] of: OF_IRQ: select IRQ_DOMAIN instead of depending on it
> [PATCH 3/3] rtc: mt6397: select IRQ_DOMAIN instead of depending on it
>From a Kconfig perspective, your reasoning makes a lot of sense.
Looking at the bigger picture, I wonder if we should just remove the
option and make it unconditional. It is enabled in ever architecture
defconfig other than alpha and sparc, and it's selected by a lot of
very common options such as I2C, GENERIC_MSI_IRQ, GENERIC_IRQ_CHIP,
and PCI_HOST_GENERIC. Enabling the option on Alpha grows the kernel
image from 9010KB to 9023KB, or on m68k Coldfire from 3346KB to
3351KB.
Arnd
More information about the Linux-mediatek
mailing list