2016-03-29 10:04:10

by Suzuki K Poulose

[permalink] [raw]
Subject: [PATCH] arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip

Commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option"),
added support for ARCH_SUNXI on arm64, but failed to select
GENERIC_IRQ_CHIP, which is required for drivers/irqchip/irq-sunxi-nmi.c
and causes build failures like :

UPD include/generated/compile.h
CC init/version.o
LD init/built-in.o
drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
drivers/built-in.o: In function `irq_domain_add_linear':
include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'

Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
Cc: Andre Przywara <[email protected]>
Signed-off-by: Suzuki K Poulose <[email protected]>
---
arch/arm64/Kconfig.platforms | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index efa77c1..521b1ec 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -2,6 +2,7 @@ menu "Platform selection"

config ARCH_SUNXI
bool "Allwinner sunxi 64-bit SoC Family"
+ select GENERIC_IRQ_CHIP
help
This enables support for Allwinner sunxi based SoCs like the A64.

--
1.7.9.5


2016-04-06 09:09:09

by Andre Przywara

[permalink] [raw]
Subject: Re: [PATCH] arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip

Hi,

On 29/03/16 11:03, Suzuki K Poulose wrote:
> Commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option"),
> added support for ARCH_SUNXI on arm64, but failed to select
> GENERIC_IRQ_CHIP, which is required for drivers/irqchip/irq-sunxi-nmi.c
> and causes build failures like :

Thanks for the catch! GENERIC_IRQ_CHIP somehow gets selected by
defconfig, so I didn't see the issue.

Currently we don't need the irq-sunxi-nmi driver, but we may in the
future and it depends on CONFIG_ARCH_SUNXI only, so I guess this patch
is the easiest solution (rather than creating a separate config symbol
for it, which may be an option for later).

So...

>
> UPD include/generated/compile.h
> CC init/version.o
> LD init/built-in.o
> drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
> drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
> drivers/built-in.o: In function `irq_domain_add_linear':
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
> drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
> drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
>
> Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
> Cc: Andre Przywara <[email protected]>
> Signed-off-by: Suzuki K Poulose <[email protected]>

Acked-by: Andre Przywara <[email protected]>

Cheers,
Andre.


> ---
> arch/arm64/Kconfig.platforms | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
> index efa77c1..521b1ec 100644
> --- a/arch/arm64/Kconfig.platforms
> +++ b/arch/arm64/Kconfig.platforms
> @@ -2,6 +2,7 @@ menu "Platform selection"
>
> config ARCH_SUNXI
> bool "Allwinner sunxi 64-bit SoC Family"
> + select GENERIC_IRQ_CHIP
> help
> This enables support for Allwinner sunxi based SoCs like the A64.
>
>

2016-04-07 14:18:36

by Suzuki K Poulose

[permalink] [raw]
Subject: Re: [PATCH] arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip

On 06/04/16 10:05, Andre Przywara wrote:
> Hi,
>
> On 29/03/16 11:03, Suzuki K Poulose wrote:
>> Commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option"),
>> added support for ARCH_SUNXI on arm64, but failed to select
>> GENERIC_IRQ_CHIP, which is required for drivers/irqchip/irq-sunxi-nmi.c
>> and causes build failures like :
>
> Thanks for the catch! GENERIC_IRQ_CHIP somehow gets selected by
> defconfig, so I didn't see the issue.
>
> Currently we don't need the irq-sunxi-nmi driver, but we may in the
> future and it depends on CONFIG_ARCH_SUNXI only, so I guess this patch
> is the easiest solution (rather than creating a separate config symbol
> for it, which may be an option for later).

...

>> Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
>> Cc: Andre Przywara <[email protected]>
>> Signed-off-by: Suzuki K Poulose <[email protected]>
>
> Acked-by: Andre Przywara <[email protected]>


Olof, Arnd,

Please could you pick this for rc3 ?

Thanks
Suzuki



2016-04-12 19:37:48

by Olof Johansson

[permalink] [raw]
Subject: Re: [PATCH] arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip

On Tue, Mar 29, 2016 at 11:03:06AM +0100, Suzuki K Poulose wrote:
> Commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option"),
> added support for ARCH_SUNXI on arm64, but failed to select
> GENERIC_IRQ_CHIP, which is required for drivers/irqchip/irq-sunxi-nmi.c
> and causes build failures like :
>
> UPD include/generated/compile.h
> CC init/version.o
> LD init/built-in.o
> drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
> drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
> drivers/built-in.o: In function `irq_domain_add_linear':
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
> drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
> drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
> drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
> drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
>
> Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
> Cc: Andre Przywara <[email protected]>
> Signed-off-by: Suzuki K Poulose <[email protected]>

It'd be nice to have a silent Kconfig entry that selects from ARCH_SUNXI that
sets this dependency, instead of having it from the architecture code. This
pushes down the dependency to the right level.

Can you respin with it like that instead?


-Olof

2016-04-13 09:05:49

by Suzuki K Poulose

[permalink] [raw]
Subject: Re: [PATCH] arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip

On 12/04/16 20:11, Olof Johansson wrote:
> On Tue, Mar 29, 2016 at 11:03:06AM +0100, Suzuki K Poulose wrote:
>> Commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option"),
>> added support for ARCH_SUNXI on arm64, but failed to select
>> GENERIC_IRQ_CHIP, which is required for drivers/irqchip/irq-sunxi-nmi.c
>> and causes build failures like :
>>
>> UPD include/generated/compile.h
>> CC init/version.o
>> LD init/built-in.o
>> drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
>> drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to `irq_setup_alt_chip'
>> drivers/built-in.o: In function `irq_domain_add_linear':
>> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
>> include/linux/irqdomain.h:253: undefined reference to `irq_generic_chip_ops'
>> drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
>> drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to `irq_alloc_domain_generic_chips'
>> drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to `irq_get_domain_generic_chip'
>> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
>> drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to `irq_gc_mask_set_bit'
>> drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to `irq_gc_ack_set_bit'
>> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to `irq_gc_mask_clr_bit'
>>
>> Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option")
>> Cc: Andre Przywara <[email protected]>
>> Signed-off-by: Suzuki K Poulose <[email protected]>
>
> It'd be nice to have a silent Kconfig entry that selects from ARCH_SUNXI that
> sets this dependency, instead of having it from the architecture code. This
> pushes down the dependency to the right level.

Do you mean something like :
config ARCH_SUNXI
...
select SUNXI_PLATFORM

And have

config SUNXI_PLATFORM
select SUNXI_DEPENDENCY_1
select SUNXI_DEPENDENCY_2

where SUNXI_PLATFORM drives the dependencies for both ARM and ARM64 ?

If so, where would you like SUNXI_PLATFORM to reside ? drivers/platform ?
Also, AFAIK, the arm64 port doesn't have the full support for the required
bits for SUNXI yet, which could be handled in the common place with ( && !ARM64).

Andre, please feel free to correct my assessment above.


Thanks
Suzuki

2016-04-13 13:18:24

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH] arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip

On Wed, Apr 13, 2016 at 4:05 AM, Suzuki K Poulose
<[email protected]> wrote:
> On 12/04/16 20:11, Olof Johansson wrote:
>>
>> On Tue, Mar 29, 2016 at 11:03:06AM +0100, Suzuki K Poulose wrote:
>>>
>>> Commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config option"),
>>> added support for ARCH_SUNXI on arm64, but failed to select
>>> GENERIC_IRQ_CHIP, which is required for drivers/irqchip/irq-sunxi-nmi.c
>>> and causes build failures like :
>>>
>>> UPD include/generated/compile.h
>>> CC init/version.o
>>> LD init/built-in.o
>>> drivers/built-in.o: In function `sunxi_sc_nmi_set_type':
>>> drivers/irqchip/irq-sunxi-nmi.c:114: undefined reference to
>>> `irq_setup_alt_chip'
>>> drivers/built-in.o: In function `irq_domain_add_linear':
>>> include/linux/irqdomain.h:253: undefined reference to
>>> `irq_generic_chip_ops'
>>> include/linux/irqdomain.h:253: undefined reference to
>>> `irq_generic_chip_ops'
>>> drivers/built-in.o: In function `sunxi_sc_nmi_irq_init':
>>> drivers/irqchip/irq-sunxi-nmi.c:146: undefined reference to
>>> `irq_alloc_domain_generic_chips'
>>> drivers/irqchip/irq-sunxi-nmi.c:161: undefined reference to
>>> `irq_get_domain_generic_chip'
>>> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to
>>> `irq_gc_mask_clr_bit'
>>> drivers/irqchip/irq-sunxi-nmi.c:171: undefined reference to
>>> `irq_gc_mask_set_bit'
>>> drivers/irqchip/irq-sunxi-nmi.c:172: undefined reference to
>>> `irq_gc_ack_set_bit'
>>> drivers/irqchip/irq-sunxi-nmi.c:170: undefined reference to
>>> `irq_gc_mask_clr_bit'
>>>
>>> Fixes: commit ce3dd55b99b1 ("arm64: Introduce Allwinner SoC config
>>> option")
>>> Cc: Andre Przywara <[email protected]>
>>> Signed-off-by: Suzuki K Poulose <[email protected]>
>>
>>
>> It'd be nice to have a silent Kconfig entry that selects from ARCH_SUNXI
>> that
>> sets this dependency, instead of having it from the architecture code.
>> This
>> pushes down the dependency to the right level.
>
>
> Do you mean something like :
> config ARCH_SUNXI
> ...
> select SUNXI_PLATFORM
>
> And have
>
> config SUNXI_PLATFORM
> select SUNXI_DEPENDENCY_1
> select SUNXI_DEPENDENCY_2
>
> where SUNXI_PLATFORM drives the dependencies for both ARM and ARM64 ?

No, I believe what Olof is saying is make the kconfig symbol for the
irqchip (irq-sunxi-nmi) select it. If there is not a kconfig symbol
already for it because you just use ARCH_SUNXI directly, then add it.

Rob

2016-04-13 13:20:43

by Suzuki K Poulose

[permalink] [raw]
Subject: Re: [PATCH] arm64/sunxi: 4.6-rc1: Add dependency on generic irq chip

On 13/04/16 14:17, Rob Herring wrote:
> On Wed, Apr 13, 2016 at 4:05 AM, Suzuki K Poulose
> <[email protected]> wrote:
>> On 12/04/16 20:11, Olof Johansson wrote:
>>>
>>> On Tue, Mar 29, 2016 at 11:03:06AM +0100, Suzuki K Poulose wrote:

>> Do you mean something like :
>> config ARCH_SUNXI
>> ...
>> select SUNXI_PLATFORM
>>
>> And have
>>
>> config SUNXI_PLATFORM
>> select SUNXI_DEPENDENCY_1
>> select SUNXI_DEPENDENCY_2
>>
>> where SUNXI_PLATFORM drives the dependencies for both ARM and ARM64 ?
>
> No, I believe what Olof is saying is make the kconfig symbol for the
> irqchip (irq-sunxi-nmi) select it. If there is not a kconfig symbol
> already for it because you just use ARCH_SUNXI directly, then add it.

Ok, makes sense. Thanks, will respin it.

Suzuki