Skip to contentSkip to conversation

a Kconfig fix

PATCH New [email protected] 4 participants 8 messages Jan 31, 2014 – Feb 5, 2014 IRQ

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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(+)
Signature · 1 line
1.8.1.4
#1 lore raw

PATCH 1/1 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)

---
 kernel/irq/Kconfig | 1 +
 1 file changed, 1 insertion(+)
kernel/irq/Kconfig +1 -0
index 4a1fef0..07cbdfe 100644
@@ -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
Signature · 1 line
1.8.1.4
#2 lore raw

Re: [PATCH] irq: fix a Kconfig dependency

Quoted 5 lines · 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.

Quoted 7 lines

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.

#3 lore raw

Re: [PATCH] irq: fix a Kconfig dependency

Quoted 9 lines · David Rientjes
Quoted 7 lines · 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.

Quoted 8 lines
Quoted 5 lines

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.

Quoted 4 lines

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

#4 lore raw

Re: [PATCH] irq: fix a Kconfig dependency

Quoted 8 lines · Nitin A
Quoted 3 lines

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.

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]

#5 lore raw

Re: [PATCH] irq: fix a Kconfig dependency

In reply to Kamble, Nitin A
Quoted 37 lines · Nitin A
Quoted 11 lines · David Rientjes
Quoted 9 lines · 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:

Quoted 7 lines
Quoted 4 lines

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.

Quoted 4 lines

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.

Quoted 8 lines

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

#6 lore raw

Re: [PATCH] irq: fix a Kconfig dependency

Quoted 3 lines · Nitin A

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

#7 lore raw

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

In reply to [email protected]
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.

---
 kernel/irq/Kconfig | 1 +
 1 file changed, 1 insertion(+)
kernel/irq/Kconfig +1 -0
index 4a1fef0..07cbdfe 100644
@@ -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