Skip to contentSkip to conversation

mpic build failure for 7447_hpc defconfig (bisected)

DISCUSSION Paul Gortmaker 1 participant 2 messages Jan 9, 2014 – Jan 25, 2014

lore
Share & tools
lore
#0 lore raw

Commit 446f6d06fab0b49c61887ecbe8286d6aaa796637 ("powerpc/mpic: Properly set default triggers") breaks the mpc7447_hpc_defconfig as follows:

CC arch/powerpc/sysdev/mpic.o
arch/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.
--

#1 lore raw
Quoted 31 lines · Paul Gortmaker

Commit 446f6d06fab0b49c61887ecbe8286d6aaa796637 ("powerpc/mpic: Properly set default triggers") breaks the mpc7447_hpc_defconfig as follows:

CC arch/powerpc/sysdev/mpic.o
arch/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
Quoted 7 lines

#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?

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