Skip to content

Commit 2363088

Browse files
FreeFlyingSheepchenhuacai
authored andcommitted
LoongArch: Allow building with kcov coverage
Add ARCH_HAS_KCOV and HAVE_GCC_PLUGINS to the LoongArch Kconfig. And also disable instrumentation of vdso. Signed-off-by: Feiyang Chen <chenfeiyang@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent b72961f commit 2363088

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

Documentation/features/debug/kcov/arch-support.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
| csky: | TODO |
1414
| hexagon: | TODO |
1515
| ia64: | TODO |
16-
| loongarch: | TODO |
16+
| loongarch: | ok |
1717
| m68k: | TODO |
1818
| microblaze: | TODO |
1919
| mips: | ok |

arch/loongarch/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ config LOONGARCH
1313
select ARCH_HAS_ACPI_TABLE_UPGRADE if ACPI
1414
select ARCH_HAS_CPU_FINALIZE_INIT
1515
select ARCH_HAS_FORTIFY_SOURCE
16+
select ARCH_HAS_KCOV
1617
select ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
1718
select ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
1819
select ARCH_HAS_PTE_SPECIAL
@@ -116,6 +117,7 @@ config LOONGARCH
116117
select HAVE_FUNCTION_GRAPH_RETVAL if HAVE_FUNCTION_GRAPH_TRACER
117118
select HAVE_FUNCTION_GRAPH_TRACER
118119
select HAVE_FUNCTION_TRACER
120+
select HAVE_GCC_PLUGINS
119121
select HAVE_GENERIC_VDSO
120122
select HAVE_HW_BREAKPOINT if PERF_EVENTS
121123
select HAVE_IOREMAP_PROT

arch/loongarch/vdso/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# SPDX-License-Identifier: GPL-2.0
22
# Objects to go into the VDSO.
33

4+
KCOV_INSTRUMENT := n
5+
46
# Include the generic Makefile to check the built vdso.
57
include $(srctree)/lib/vdso/Makefile
68

0 commit comments

Comments
 (0)