From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751594AbdGZKhk (ORCPT ); Wed, 26 Jul 2017 06:37:40 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:58970 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750982AbdGZKhj (ORCPT ); Wed, 26 Jul 2017 06:37:39 -0400 Subject: Re: [PATCH] irqchip: create a Kconfig menu for irqchip drivers To: Masahiro Yamada References: <1501041791-10131-1-git-send-email-yamada.masahiro@socionext.com> <3d59b609-aeec-9177-8849-da1fbd386191@arm.com> Cc: Thomas Gleixner , Jason Cooper , Linux Kernel Mailing List From: Marc Zyngier Organization: ARM Ltd Message-ID: <7595babf-8cc8-9191-cead-09fe955a42af@arm.com> Date: Wed, 26 Jul 2017 11:37:36 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26/07/17 11:18, Masahiro Yamada wrote: > Hi Marc, > > > 2017-07-26 17:04 GMT+09:00 Marc Zyngier : >> On 26/07/17 05:03, Masahiro Yamada wrote: >>> Some irqchip drivers have a Kconfig prompt. When we run menuconfig >>> or friends, those drivers are directly listed in the "Device Drivers" >>> menu level. This does not look nice. Create a sub-system level menu. >>> >>> Signed-off-by: Masahiro Yamada >>> --- >>> >>> drivers/irqchip/Kconfig | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig >>> index f1fd5f44d1d4..7b66313a2952 100644 >>> --- a/drivers/irqchip/Kconfig >>> +++ b/drivers/irqchip/Kconfig >>> @@ -1,3 +1,5 @@ >>> +menu "IRQ chip support" >>> + >>> config IRQCHIP >>> def_bool y >>> depends on OF_IRQ >>> @@ -306,3 +308,5 @@ config QCOM_IRQ_COMBINER >>> help >>> Say yes here to add support for the IRQ combiner devices embedded >>> in Qualcomm Technologies chips. >>> + >>> +endmenu >>> >> >> I'm very reluctant to introduce this. IMHO, interrupt controllers are >> way too low level a thing to let them be selected by the user. They >> really should be selected by the platform that needs them > > This is true for the root irqchip. > Not necessarily true for child irqchips. I dispute that argument. We've been able to make this work so far *without* exposing yet another menu maze to the user. What has changed? > > >> Do you have any example in mind where having a user-selectable interrupt >> controller actually makes sense on its own? > > Yes. > > I see some user-selectable drivers in drivers/irqchip/Kconfig > and I'd like to add one more for my SoCs. > > > This patch: > https://github.com/uniphier/linux/commit/f39efdf0ce34f77ae9e324d9ec6c7f486f43a0ed > > This is really optional, so > I intentionally implemented it as a platform driver > instead of IRQCHIP_DECLARE(). I really cannot see how this could be optional. It means that you could end-up in a situation where the drivers for the devices being this irqchip could have been compiled in, but not their interrupt controller. How useful is that? > Looks like irq-ts4800.c, irq-keystone.c are modules as well. They are directly selected by their respective defconfig. On arm64, which is what I expect you driver targets, you should simply select it in your platform entry. M. -- Jazz is not dead. It just smells funny...