Skip to content

build failure for E500 CPUs w/ CONFIG_OPROFLE=y

Vitaly Wool linuxppc-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2build failure for E500 CPUs w/ CONFIG_OPROFLE=yarch/powerpc/oprofile/Makefile arch/powerpc/oprofile/common.c+4 -54 replies
2/2build failure for E500 CPUs w/ CONFIG_OPROFLE=yarch/powerpc/oprofile/op_model_7450.c arch/powerpc/oprofile/op_model_fsl_booke.c include/asm-powerpc/oprofile_impl.h+42 -430 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [0/2] build failure for E500 CPUs w/ CONFIG_OPROFLE=y

Hello folks,

we've observed the following build failure compiling the kernel w/ oprofile on 8540 (FSL_BOOKE):

CC arch/powerpc/oprofile/op_model_7450.o
arch/powerpc/oprofile/op_model_7450.c:62: error: conflicting types for 'pmc_start_ctrs'
include/asm/pmc.h:41: error: previous declaration of 'pmc_start_ctrs' was here arch/powerpc/oprofile/op_model_7450.c:62: error: conflicting types for 'pmc_start_ctrs'
include/asm/pmc.h:41: error: previous declaration of 'pmc_start_ctrs' was here arch/powerpc/oprofile/op_model_7450.c:73: warning: static declaration of 'pmc_stop_ctrs' follows non-static declaration include/asm/pmc.h:42: warning: previous declaration of 'pmc_stop_ctrs' was here arch/powerpc/oprofile/op_model_7450.c: In function `fsl7450_start':
arch/powerpc/oprofile/op_model_7450.c:140: warning: implicit declaration of function `ctr_write'
arch/powerpc/oprofile/op_model_7450.c: In function `fsl7450_handle_interrupt':
arch/powerpc/oprofile/op_model_7450.c:182: warning: implicit declaration of function `ctr_read'
make[1]: *** [arch/powerpc/oprofile/op_model_7450.o] Error 1

The thing is that op_model_7450.c is compiled when CONFIG_PPC32 is true which might be reasonable but results in conflicting functions' types when compiled w/ CONFIG_FSL_BOOKE=y. Effectively, op_model_fsl_booke.c introduces the functions with the same names as op_model_7450.c but with different declarations, and latter ones are static while former ones are not, and this can drive any compiler mad.

This message will have two *alternative* follow-up patches which are probably more likely RFCs rather than complete solutions, but still I'm sure it's reasonable to look at those, b/c those represent two different approaches and we need to decide which way to go first.

Vitaly