profile: setup_profiling_timer() is moslty not implemented
The setup_profiling_timer() is mostly un-implemented by many architectures. In many places it isn't guarded by CONFIG_PROFILE which is needed for it to be used. Make it a weak symbol in kernel/profile.c and remove the 'return -EINVAL' implementations from the kenrel. There are a couple of architectures which do return 0 from the setup_profiling_timer() function but they don't seem to do anything else with it. To keep the /proc compatibility for now, leave these for a future update or removal. On ARM, this fixes the following sparse warning: arch/arm/kernel/smp.c:793:5: warning: symbol 'setup_profiling_timer' was not declared. Should it be static? Link: https://lkml.kernel.org/r/20220721195509.418205-1-ben-linux@fluff.org Signed-off-by:Ben Dooks <ben-linux@fluff.org> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
Showing
- arch/alpha/kernel/smp.c 0 additions, 6 deletionsarch/alpha/kernel/smp.c
- arch/arc/kernel/smp.c 0 additions, 8 deletionsarch/arc/kernel/smp.c
- arch/arm/kernel/smp.c 0 additions, 8 deletionsarch/arm/kernel/smp.c
- arch/arm64/kernel/smp.c 0 additions, 8 deletionsarch/arm64/kernel/smp.c
- arch/csky/kernel/smp.c 0 additions, 5 deletionsarch/csky/kernel/smp.c
- arch/hexagon/kernel/smp.c 0 additions, 5 deletionsarch/hexagon/kernel/smp.c
- arch/ia64/kernel/smp.c 0 additions, 6 deletionsarch/ia64/kernel/smp.c
- arch/openrisc/kernel/smp.c 0 additions, 6 deletionsarch/openrisc/kernel/smp.c
- arch/parisc/kernel/smp.c 0 additions, 7 deletionsarch/parisc/kernel/smp.c
- arch/powerpc/kernel/smp.c 0 additions, 7 deletionsarch/powerpc/kernel/smp.c
- arch/riscv/kernel/smp.c 0 additions, 6 deletionsarch/riscv/kernel/smp.c
- arch/sparc/kernel/smp_32.c 0 additions, 5 deletionsarch/sparc/kernel/smp_32.c
- arch/sparc/kernel/smp_64.c 0 additions, 6 deletionsarch/sparc/kernel/smp_64.c
- arch/x86/include/asm/apic.h 0 additions, 2 deletionsarch/x86/include/asm/apic.h
- arch/x86/kernel/apic/apic.c 0 additions, 5 deletionsarch/x86/kernel/apic/apic.c
- kernel/profile.c 6 additions, 2 deletionskernel/profile.c
Loading
Please register or sign in to comment