mpic build failure for 7447_hpc defconfig (bisected)
Commit 446f6d06fab0b49c61887ecbe8286d6aaa796637 ("powerpc/mpic: Properly set default triggers") breaks the mpc7447_hpc_defconfig as follows:
CC arch/powerpc/sysdev/mpic.oarch/powerpc/sysdev/mpic.c: In function 'mpic_set_irq_type':arch/powerpc/sysdev/mpic.c:886:9: error: case label does not reduce to an integer constant arch/powerpc/sysdev/mpic.c:890:9: error: case label does not reduce to an integer constant arch/powerpc/sysdev/mpic.c:894:9: error: case label does not reduce to an integer constant arch/powerpc/sysdev/mpic.c:898:9: error: case label does not reduce to an integer constant
Looking at the cpp output (gcc 4.7.3 from the kernel.org toolchains), I see:
case mpic->hw_set[MPIC_IDX_VECPRI_SENSE_EDGE] |
mpic->hw_set[MPIC_IDX_VECPRI_POLARITY_POSITIVE]:
The pointer into an array appears because CONFIG_MPIC_WEIRD=y is set for this thing.
-------------------
#ifdef CONFIG_MPIC_WEIRD
static u32 mpic_infos[][MPIC_IDX_END] = {
[0] = { /* Original OpenPIC compatible MPIC */
[...]
#define MPIC_INFO(name) mpic->hw_set[MPIC_IDX_##name] #else /* CONFIG_MPIC_WEIRD */ #define MPIC_INFO(name) MPIC_##name
#endif /* CONFIG_MPIC_WEIRD */
-------------------
Given it has been broken since 3.4-rc5, is it safe to say MPIC_WEIRD is dead and unused? Or should the case be converted to if/else or similar? Or were other versions of gcc actually able to "see" constant numbers?
Paul.
--
Quoted 31 lines · Paul Gortmaker
Commit
446f6d06fab0b49c61887ecbe8286d6aaa796637("powerpc/mpic: Properly set default triggers") breaks thempc7447_hpc_defconfigas follows:CC
arch/powerpc/sysdev/mpic.oarch/powerpc/sysdev/mpic.c: In function 'mpic_set_irq_type':arch/powerpc/sysdev/mpic.c:886:9: error: case label does not reduce to an integer constantarch/powerpc/sysdev/mpic.c:890:9: error: case label does not reduce to an integer constantarch/powerpc/sysdev/mpic.c:894:9: error: case label does not reduce to an integer constantarch/powerpc/sysdev/mpic.c:898:9: error: case label does not reduce to an integer constantLooking at the cpp output (gcc 4.7.3 from the kernel.org toolchains), I see:
case mpic->hw_set[MPIC_IDX_VECPRI_SENSE_EDGE] | mpic->hw_set[MPIC_IDX_VECPRI_POLARITY_POSITIVE]:The pointer into an array appears because
CONFIG_MPIC_WEIRD=yis set for this thing.-------------------
#ifdefCONFIG_MPIC_WEIRD
static u32 mpic_infos[][MPIC_IDX_END] = {
[0] = { /* Original OpenPIC compatible MPIC */[...]
#define MPIC_INFO(name) mpic->hw_set[MPIC_IDX_##name] #else /* CONFIG_MPIC_WEIRD */ #define MPIC_INFO(name) MPIC_##name
Quoted 7 lines
#endif /*
CONFIG_MPIC_WEIRD*/
-------------------Given it has been broken since 3.4-rc5, is it safe to say
MPIC_WEIRDis dead and unused? Or should the case be converted to if/else or similar? Or were other versions of gcc actually able to "see" constant numbers?
Ping. I'll default to conversion to if/else since I don't see any other solution that will solve thiis easily. However I am tempted to delete the abandonware platforms, if given a choice. The 3.4 was quite some time ago, and if nobody cared since then, well ....
P.
--
Quoted 7 lines
Paul.
--
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://lists.ozlabs.org/listinfo/linuxppc-dev