diff options
author | Riku Voipio <riku.voipio@linaro.org> | 2014-09-02 11:15:06 +0300 |
---|---|---|
committer | Riku Voipio <riku.voipio@linaro.org> | 2014-09-02 11:15:06 +0300 |
commit | f78d088e90e5301ec35a03703dd0270e814df32f (patch) | |
tree | c5d8c52af0d4dfbf43870710f94220d62f7106ab | |
parent | cfecb0298b8211c8d0caa74df9b5c1a634938ce4 (diff) |
Add missing gcov kernel bit
Actually add the bit for gcov kernel config options
-rw-r--r-- | configs/gcov-enable.patch | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/configs/gcov-enable.patch b/configs/gcov-enable.patch new file mode 100644 index 0000000..b649b9e --- /dev/null +++ b/configs/gcov-enable.patch @@ -0,0 +1,122 @@ +From 84581e3ff5a2ce86b83c797b8318985b70c12901 Mon Sep 17 00:00:00 2001 +From: Vincent Sanders <vince@collabora.co.uk> +Date: Mon, 18 Aug 2014 15:47:32 +0300 +Subject: [PATCH 1/3] Enable gcov support on the ARM architecture + +Enable gcov support for ARM based on original patches by David +Singleton and George G. Davis + +Riku - updated to patch to current mainline kernel. The patch +has beeb submitted in 2010, 2012 - and now in 2014. + +https://lwn.net/Articles/390419/ +http://marc.info/?l=linux-arm-kernel&m=133823081813044 + +Cc: Arnd Bergmann <arnd@arndb.de> +Cc: Russell King <linux@arm.linux.org.uk> +Cc: Naresh Kamboju <naresh.kamboju@linaro.org> +Cc: linux-arm-kernel@lists.infradead.org +Signed-off-by: Riku Voipio <riku.voipio@linaro.org> +Signed-off-by: Vincent Sanders <vincent.sanders@collabora.co.uk> +--- + arch/arm/boot/bootp/Makefile | 2 ++ + arch/arm/boot/compressed/Makefile | 2 ++ + arch/arm/include/asm/elf.h | 1 + + arch/arm/kernel/Makefile | 2 ++ + arch/arm/kernel/module.c | 1 + + kernel/gcov/Kconfig | 2 +- + lib/Makefile | 2 ++ + 7 files changed, 11 insertions(+), 1 deletion(-) + +diff --git a/arch/arm/boot/bootp/Makefile b/arch/arm/boot/bootp/Makefile +index c394e30..5761f00 100644 +--- a/arch/arm/boot/bootp/Makefile ++++ b/arch/arm/boot/bootp/Makefile +@@ -5,6 +5,8 @@ + # architecture-specific flags and dependencies. + # + ++GCOV_PROFILE := n ++ + LDFLAGS_bootp :=-p --no-undefined -X \ + --defsym initrd_phys=$(INITRD_PHYS) \ + --defsym params_phys=$(PARAMS_PHYS) -T +diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile +index 9aee36e..172e606 100644 +--- a/arch/arm/boot/compressed/Makefile ++++ b/arch/arm/boot/compressed/Makefile +@@ -37,6 +37,8 @@ ifeq ($(CONFIG_ARM_VIRT_EXT),y) + OBJS += hyp-stub.o + endif + ++GCOV_PROFILE := n ++ + # + # Architecture dependencies + # +diff --git a/arch/arm/include/asm/elf.h b/arch/arm/include/asm/elf.h +index f4b46d3..afb9caf 100644 +--- a/arch/arm/include/asm/elf.h ++++ b/arch/arm/include/asm/elf.h +@@ -50,6 +50,7 @@ typedef struct user_fp elf_fpregset_t; + #define R_ARM_ABS32 2 + #define R_ARM_CALL 28 + #define R_ARM_JUMP24 29 ++#define R_ARM_TARGET1 38 + #define R_ARM_V4BX 40 + #define R_ARM_PREL31 42 + #define R_ARM_MOVW_ABS_NC 43 +diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile +index 38ddd9f..979c4e9 100644 +--- a/arch/arm/kernel/Makefile ++++ b/arch/arm/kernel/Makefile +@@ -5,6 +5,8 @@ + CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET) + AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) + ++GCOV_PROFILE := n ++ + ifdef CONFIG_FUNCTION_TRACER + CFLAGS_REMOVE_ftrace.o = -pg + CFLAGS_REMOVE_insn.o = -pg +diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c +index 45e4781..6a4dffe 100644 +--- a/arch/arm/kernel/module.c ++++ b/arch/arm/kernel/module.c +@@ -91,6 +91,7 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex, + break; + + case R_ARM_ABS32: ++ case R_ARM_TARGET1: + *(u32 *)loc += sym->st_value; + break; + +diff --git a/kernel/gcov/Kconfig b/kernel/gcov/Kconfig +index d04ce8a..cf66c5c 100644 +--- a/kernel/gcov/Kconfig ++++ b/kernel/gcov/Kconfig +@@ -35,7 +35,7 @@ config GCOV_KERNEL + config GCOV_PROFILE_ALL + bool "Profile entire Kernel" + depends on GCOV_KERNEL +- depends on SUPERH || S390 || X86 || PPC || MICROBLAZE ++ depends on SUPERH || S390 || X86 || PPC || MICROBLAZE || ARM + default n + ---help--- + This options activates profiling for the entire kernel. +diff --git a/lib/Makefile b/lib/Makefile +index 7ab38f7..6b0a770 100644 +--- a/lib/Makefile ++++ b/lib/Makefile +@@ -2,6 +2,8 @@ + # Makefile for some libs needed in the kernel. + # + ++GCOV_PROFILE := n ++ + ifdef CONFIG_FUNCTION_TRACER + ORIG_CFLAGS := $(KBUILD_CFLAGS) + KBUILD_CFLAGS = $(subst -pg,,$(ORIG_CFLAGS)) +-- +2.0.1 + |