2014-01-31 00:52:23

by Kamble, Nitin A

[permalink] [raw]
Subject: [PATCH] a Kconfig fix

From: Nitin A Kamble <[email protected]>

This is pull request with a fix for Kconfig dependency issue. It fixes
a build failure when the kernel configuration option GENERIC_IRQ_CHIP
is enabled without enabling the IRQ_DOMAIN config option in the kernel
configuration.

Thanks,
Nitin

Nitin A Kamble (1):
irq: fix a Kconfig dependency

kernel/irq/Kconfig | 1 +
1 file changed, 1 insertion(+)

--
1.8.1.4


2014-01-31 00:52:24

by Kamble, Nitin A

[permalink] [raw]
Subject: [PATCH] irq: fix a Kconfig dependency

From: Nitin A Kamble <[email protected]>

The generic_chip.c uses interfaces from irq_domain.c which is controlled by
the IRQ_DOMAIN config option.

Add a select statement in the Kconfig to reflect this requirement.

Without this fix, the generic_chip.c compilation fails like this:

linux/kernel/irq/generic-chip.c:400:11:
error: 'irq_domain_xlate_onetwocell' undeclared here (not in a function)

Signed-off-by: Nitin A Kamble <[email protected]>
---
kernel/irq/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig
index 4a1fef0..07cbdfe 100644
--- a/kernel/irq/Kconfig
+++ b/kernel/irq/Kconfig
@@ -40,6 +40,7 @@ config IRQ_EDGE_EOI_HANDLER
# Generic configurable interrupt chip implementation
config GENERIC_IRQ_CHIP
bool
+ select IRQ_DOMAIN

# Generic irq_domain hw <--> linux irq number translation
config IRQ_DOMAIN
--
1.8.1.4

2014-01-31 10:27:08

by David Rientjes

[permalink] [raw]
Subject: Re: [PATCH] irq: fix a Kconfig dependency

On Thu, 30 Jan 2014, [email protected] wrote:

> From: Nitin A Kamble <[email protected]>
>
> The generic_chip.c uses interfaces from irq_domain.c which is controlled by
> the IRQ_DOMAIN config option.
>
> Add a select statement in the Kconfig to reflect this requirement.
>
> Without this fix, the generic_chip.c compilation fails like this:
>
> linux/kernel/irq/generic-chip.c:400:11:
> error: 'irq_domain_xlate_onetwocell' undeclared here (not in a function)
>

You're not specifying which config option you have enabled that selects
CONFIG_GENERIC_IRQ_CHIP and does not select CONFIG_IRQ_DOMAIN, but it does
look like there is a dependency here.

So, if this dependency is reasonable, it begs the question of why we have
CONFIG_GENERIC_IRQ_CHIP at all and shouldn't just make generic-chip.c
depend on CONFIG_IRQ_DOMAIN.

2014-01-31 17:44:52

by Kamble, Nitin A

[permalink] [raw]
Subject: Re: [PATCH] irq: fix a Kconfig dependency


On 1/31/2014 2:27 AM, David Rientjes wrote:
> On Thu, 30 Jan 2014, [email protected] wrote:
>
>> From: Nitin A Kamble <[email protected]>
>>
>> The generic_chip.c uses interfaces from irq_domain.c which is controlled by
>> the IRQ_DOMAIN config option.
>>
>> Add a select statement in the Kconfig to reflect this requirement.
>>
>> Without this fix, the generic_chip.c compilation fails like this:
>>
>> linux/kernel/irq/generic-chip.c:400:11:
>> error: 'irq_domain_xlate_onetwocell' undeclared here (not in a function)
>>
> You're not specifying which config option you have enabled that selects
> CONFIG_GENERIC_IRQ_CHIP and does not select CONFIG_IRQ_DOMAIN, but it does
> look like there is a dependency here.
It is enabled by GPIO_PCH as seen here:

config GPIO_PCH
tristate "Intel EG20T PCH/LAPIS Semiconductor
IOH(ML7223/ML7831) GPIO"
depends on PCI && X86
select GENERIC_IRQ_CHIP
help
This driver is for PCH(Platform controller Hub) GPIO of Intel
Topcliff
which is an IOH(Input/Output Hub) for x86 embedded processor.
This driver can access PCH GPIO device.

>
> So, if this dependency is reasonable, it begs the question of why we have
> CONFIG_GENERIC_IRQ_CHIP at all and shouldn't just make generic-chip.c
> depend on CONFIG_IRQ_DOMAIN.
Looking at the code there are cases where IRQ_DOMAIN functionality is used
without using the GENERIC_IRQ_CHIP. So making generic-chip.c depend
on CONFIG_IRQ_DOMAIN in the makefile will reduce the flexibility of using
these config options separately.

Nitin

2014-01-31 20:46:03

by David Rientjes

[permalink] [raw]
Subject: Re: [PATCH] irq: fix a Kconfig dependency

On Fri, 31 Jan 2014, Kamble, Nitin A wrote:

> > So, if this dependency is reasonable, it begs the question of why we have
> > CONFIG_GENERIC_IRQ_CHIP at all and shouldn't just make generic-chip.c
> > depend on CONFIG_IRQ_DOMAIN.
> Looking at the code there are cases where IRQ_DOMAIN functionality is used
> without using the GENERIC_IRQ_CHIP. So making generic-chip.c depend
> on CONFIG_IRQ_DOMAIN in the makefile will reduce the flexibility of using
> these config options separately.
>

Acked-by: David Rientjes <[email protected]>

Although the changelog should be updated since I get a couple problems
when trying to enable CONFIG_GENERIC_IRQ_CHIP without CONFIG_IRQ_DOMAIN on
Linus's latest tree:

kernel/irq/generic-chip.c:400:11: error: ‘irq_domain_xlate_onetwocell’ undeclared here (not in a function)
kernel/irq/generic-chip.c: In function ‘irq_gc_get_irq_data’:
kernel/irq/generic-chip.c:522:2: error: implicit declaration of function ‘irq_find_mapping’ [-Werror=implicit-function-declaration]

2014-02-04 17:36:01

by Kamble, Nitin A

[permalink] [raw]
Subject: Re: [PATCH] irq: fix a Kconfig dependency


On 1/31/2014 9:44 AM, Kamble, Nitin A wrote:
>
> On 1/31/2014 2:27 AM, David Rientjes wrote:
>> On Thu, 30 Jan 2014, [email protected] wrote:
>>
>>> From: Nitin A Kamble <[email protected]>
>>>
>>> The generic_chip.c uses interfaces from irq_domain.c which is
>>> controlled by
>>> the IRQ_DOMAIN config option.
>>>
>>> Add a select statement in the Kconfig to reflect this requirement.
>>>
>>> Without this fix, the generic_chip.c compilation fails like this:
>>>
>>> linux/kernel/irq/generic-chip.c:400:11:
>>> error: 'irq_domain_xlate_onetwocell' undeclared here (not in a
>>> function)
>>>
>> You're not specifying which config option you have enabled that selects
>> CONFIG_GENERIC_IRQ_CHIP and does not select CONFIG_IRQ_DOMAIN, but it
>> does
>> look like there is a dependency here.
> It is enabled by GPIO_PCH as seen here:
>
> config GPIO_PCH
> tristate "Intel EG20T PCH/LAPIS Semiconductor
> IOH(ML7223/ML7831) GPIO"
> depends on PCI && X86
> select GENERIC_IRQ_CHIP
> help
> This driver is for PCH(Platform controller Hub) GPIO of
> Intel Topcliff
> which is an IOH(Input/Output Hub) for x86 embedded processor.
> This driver can access PCH GPIO device.
>
>>
>> So, if this dependency is reasonable, it begs the question of why we
>> have
>> CONFIG_GENERIC_IRQ_CHIP at all and shouldn't just make generic-chip.c
>> depend on CONFIG_IRQ_DOMAIN.
> Looking at the code there are cases where IRQ_DOMAIN functionality is
> used
> without using the GENERIC_IRQ_CHIP. So making generic-chip.c depend
> on CONFIG_IRQ_DOMAIN in the makefile will reduce the flexibility of using
> these config options separately.
>
> Nitin
>
>
Hi David, Thomas,
Is there any more feedback for this fix? Currently kernel is not
building for the
affected platform without this fix. and I am happy to help here to get
the fix
pulled in sooner. Let me know.

Thanks,
Nitin

2014-02-04 18:55:37

by Thomas Gleixner

[permalink] [raw]
Subject: Re: [PATCH] irq: fix a Kconfig dependency

On Tue, 4 Feb 2014, Kamble, Nitin A wrote:
> Is there any more feedback for this fix? Currently kernel is not
> building for the affected platform without this fix. and I am happy
> to help here to get the fix pulled in sooner. Let me know.

It's in my list of stuff to apply. It'll get to Linus in a few days.

Thanks,

tglx

Subject: [tip:irq/urgent] genirq: Generic irq chip requires IRQ_DOMAIN

Commit-ID: 923fa4ea382f592dee2ba3b205befb90cbddf3af
Gitweb: http://git.kernel.org/tip/923fa4ea382f592dee2ba3b205befb90cbddf3af
Author: Nitin A Kamble <[email protected]>
AuthorDate: Thu, 30 Jan 2014 16:50:10 -0800
Committer: Thomas Gleixner <[email protected]>
CommitDate: Wed, 5 Feb 2014 10:17:32 +0100

genirq: Generic irq chip requires IRQ_DOMAIN

The generic_chip.c uses interfaces from irq_domain.c which is
controlled by the IRQ_DOMAIN config option, but there is no Kconfig
dependency so the build can fail:

linux/kernel/irq/generic-chip.c:400:11: error:
'irq_domain_xlate_onetwocell' undeclared here (not in a function)

Select IRQ_DOMAIN when GENERIC_IRQ_CHIP is selected.

Signed-off-by: Nitin A Kamble <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
Cc: [email protected] # 3.11+
---
kernel/irq/Kconfig | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/irq/Kconfig b/kernel/irq/Kconfig
index 4a1fef0..07cbdfe 100644
--- a/kernel/irq/Kconfig
+++ b/kernel/irq/Kconfig
@@ -40,6 +40,7 @@ config IRQ_EDGE_EOI_HANDLER
# Generic configurable interrupt chip implementation
config GENERIC_IRQ_CHIP
bool
+ select IRQ_DOMAIN

# Generic irq_domain hw <--> linux irq number translation
config IRQ_DOMAIN