From: Peter Oberparleiter Disable profiling of tsc_$(BITS).o to fix a run-time error when using CONFIG_GCOV_PROFILE_ALL on x86_64: bash[498] segfault at ffffffff80868b58 ip ffffffffff600412 sp 7fffa3d010f0 error 7 init[1] segfault at ffffffff80868b58 ip ffffffffff600412 sp 7fff9e97f640 error 7 init[1] segfault at ffffffff80868b58 ip ffffffffff600412 sp 7fff9e97eed0 error 7 Kernel panic - not syncing: Attemted to kill init! Pid 1, comm: init Not tainted 2.6.26-rc5-mm1 #1 m.kozlowski@tuxland.pl wrote: > After a few hours and tons of reboots I narrowed it down to > arch/x86/kernel/Makefile: > > a) works > obj-y += tsc_$(BITS).o io_delay.o rtc.o > GCOV_tsc_$(BITS).o := n > #GCOV_io_delay.o := n > #GCOV_rtc.o := n > > b) doesn't work > obj-y += tsc_$(BITS).o io_delay.o rtc.o > #GCOV_tsc_$(BITS).o := n > #GCOV_io_delay.o := n > #GCOV_rtc.o := n > > and that points to arch/x86/kernel/tsc_64.c Reported-by: Mariusz Kozlowski Reviewed-by: Mariusz Kozlowski Reviewed-by: Balbir Singh Signed-off-by: Peter Oberparleiter Signed-off-by: Andrew Morton --- arch/x86/kernel/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff -puN arch/x86/kernel/Makefile~gcov-architecture-specific-compile-flag-adjustments-x86_64-fix arch/x86/kernel/Makefile --- a/arch/x86/kernel/Makefile~gcov-architecture-specific-compile-flag-adjustments-x86_64-fix +++ a/arch/x86/kernel/Makefile @@ -13,6 +13,9 @@ CFLAGS_REMOVE_tsc_32.o = -pg CFLAGS_REMOVE_rtc.o = -pg endif +GCOV_tsc_32.o := n +GCOV_tsc_64.o := n + # # vsyscalls (which work on the user stack) should have # no stack-protector checks: _