2019-11-06 17:40:13

by Alexey Khoroshilov

[permalink] [raw]
Subject: [PATCH] MIPS: allow building with kcov coverage

Add ARCH_HAS_KCOV and HAVE_GCC_PLUGINS to MIPS config.
Disable instrumentation of vdso to avoid build failure.

Signed-off-by: Alexey Khoroshilov <[email protected]>
---
arch/mips/Kconfig | 2 ++
arch/mips/vdso/Makefile | 1 +
2 files changed, 3 insertions(+)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 7cb8947..2ae1e6d 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -87,6 +87,8 @@ config MIPS
select SYSCTL_EXCEPTION_TRACE
select VIRT_TO_BUS
select ARCH_HAS_PTE_SPECIAL if !(32BIT && CPU_HAS_RIXI)
+ select ARCH_HAS_KCOV
+ select HAVE_GCC_PLUGINS

menu "Machine selection"

diff --git a/arch/mips/vdso/Makefile b/arch/mips/vdso/Makefile
index 996a934..e059389 100644
--- a/arch/mips/vdso/Makefile
+++ b/arch/mips/vdso/Makefile
@@ -75,6 +75,7 @@ CFLAGS_REMOVE_vdso.o = -pg

GCOV_PROFILE := n
UBSAN_SANITIZE := n
+KCOV_INSTRUMENT := n

#
# Shared build commands.
--
2.7.4


2019-11-09 01:37:04

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] MIPS: allow building with kcov coverage

Hi Alexey,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.4-rc6 next-20191108]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url: https://github.com/0day-ci/linux/commits/Alexey-Khoroshilov/MIPS-allow-building-with-kcov-coverage/20191109-041000
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6737e763495185999b073303bf58a49ca0b1e64d
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=mips

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <[email protected]>

All warnings (new ones prefixed by >>):

arch/mips/math-emu/me-debugfs.c: In function 'debugfs_fpuemu':
>> arch/mips/math-emu/me-debugfs.c:353:1: warning: the frame size of 3656 bytes is larger than 2048 bytes [-Wframe-larger-than=]
}
^

vim +353 arch/mips/math-emu/me-debugfs.c

454854ace22f5a Aleksandar Markovic 2017-08-21 236
454854ace22f5a Aleksandar Markovic 2017-08-21 237 FPU_STAT_CREATE_EX(abs_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 238 FPU_STAT_CREATE_EX(abs_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 239 FPU_STAT_CREATE_EX(add_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 240 FPU_STAT_CREATE_EX(add_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 241 FPU_STAT_CREATE_EX(bc1eqz);
454854ace22f5a Aleksandar Markovic 2017-08-21 242 FPU_STAT_CREATE_EX(bc1nez);
454854ace22f5a Aleksandar Markovic 2017-08-21 243 FPU_STAT_CREATE_EX(ceil_w_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 244 FPU_STAT_CREATE_EX(ceil_w_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 245 FPU_STAT_CREATE_EX(ceil_l_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 246 FPU_STAT_CREATE_EX(ceil_l_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 247 FPU_STAT_CREATE_EX(class_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 248 FPU_STAT_CREATE_EX(class_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 249 FPU_STAT_CREATE_EX(cmp_af_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 250 FPU_STAT_CREATE_EX(cmp_af_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 251 FPU_STAT_CREATE_EX(cmp_eq_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 252 FPU_STAT_CREATE_EX(cmp_eq_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 253 FPU_STAT_CREATE_EX(cmp_le_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 254 FPU_STAT_CREATE_EX(cmp_le_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 255 FPU_STAT_CREATE_EX(cmp_lt_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 256 FPU_STAT_CREATE_EX(cmp_lt_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 257 FPU_STAT_CREATE_EX(cmp_ne_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 258 FPU_STAT_CREATE_EX(cmp_ne_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 259 FPU_STAT_CREATE_EX(cmp_or_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 260 FPU_STAT_CREATE_EX(cmp_or_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 261 FPU_STAT_CREATE_EX(cmp_ueq_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 262 FPU_STAT_CREATE_EX(cmp_ueq_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 263 FPU_STAT_CREATE_EX(cmp_ule_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 264 FPU_STAT_CREATE_EX(cmp_ule_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 265 FPU_STAT_CREATE_EX(cmp_ult_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 266 FPU_STAT_CREATE_EX(cmp_ult_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 267 FPU_STAT_CREATE_EX(cmp_un_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 268 FPU_STAT_CREATE_EX(cmp_un_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 269 FPU_STAT_CREATE_EX(cmp_une_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 270 FPU_STAT_CREATE_EX(cmp_une_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 271 FPU_STAT_CREATE_EX(cmp_saf_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 272 FPU_STAT_CREATE_EX(cmp_saf_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 273 FPU_STAT_CREATE_EX(cmp_seq_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 274 FPU_STAT_CREATE_EX(cmp_seq_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 275 FPU_STAT_CREATE_EX(cmp_sle_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 276 FPU_STAT_CREATE_EX(cmp_sle_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 277 FPU_STAT_CREATE_EX(cmp_slt_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 278 FPU_STAT_CREATE_EX(cmp_slt_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 279 FPU_STAT_CREATE_EX(cmp_sne_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 280 FPU_STAT_CREATE_EX(cmp_sne_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 281 FPU_STAT_CREATE_EX(cmp_sor_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 282 FPU_STAT_CREATE_EX(cmp_sor_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 283 FPU_STAT_CREATE_EX(cmp_sueq_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 284 FPU_STAT_CREATE_EX(cmp_sueq_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 285 FPU_STAT_CREATE_EX(cmp_sule_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 286 FPU_STAT_CREATE_EX(cmp_sule_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 287 FPU_STAT_CREATE_EX(cmp_sult_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 288 FPU_STAT_CREATE_EX(cmp_sult_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 289 FPU_STAT_CREATE_EX(cmp_sun_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 290 FPU_STAT_CREATE_EX(cmp_sun_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 291 FPU_STAT_CREATE_EX(cmp_sune_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 292 FPU_STAT_CREATE_EX(cmp_sune_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 293 FPU_STAT_CREATE_EX(cvt_d_l);
454854ace22f5a Aleksandar Markovic 2017-08-21 294 FPU_STAT_CREATE_EX(cvt_d_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 295 FPU_STAT_CREATE_EX(cvt_d_w);
454854ace22f5a Aleksandar Markovic 2017-08-21 296 FPU_STAT_CREATE_EX(cvt_l_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 297 FPU_STAT_CREATE_EX(cvt_l_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 298 FPU_STAT_CREATE_EX(cvt_s_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 299 FPU_STAT_CREATE_EX(cvt_s_l);
454854ace22f5a Aleksandar Markovic 2017-08-21 300 FPU_STAT_CREATE_EX(cvt_s_w);
454854ace22f5a Aleksandar Markovic 2017-08-21 301 FPU_STAT_CREATE_EX(cvt_w_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 302 FPU_STAT_CREATE_EX(cvt_w_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 303 FPU_STAT_CREATE_EX(div_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 304 FPU_STAT_CREATE_EX(div_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 305 FPU_STAT_CREATE_EX(floor_w_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 306 FPU_STAT_CREATE_EX(floor_w_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 307 FPU_STAT_CREATE_EX(floor_l_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 308 FPU_STAT_CREATE_EX(floor_l_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 309 FPU_STAT_CREATE_EX(maddf_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 310 FPU_STAT_CREATE_EX(maddf_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 311 FPU_STAT_CREATE_EX(max_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 312 FPU_STAT_CREATE_EX(max_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 313 FPU_STAT_CREATE_EX(maxa_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 314 FPU_STAT_CREATE_EX(maxa_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 315 FPU_STAT_CREATE_EX(min_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 316 FPU_STAT_CREATE_EX(min_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 317 FPU_STAT_CREATE_EX(mina_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 318 FPU_STAT_CREATE_EX(mina_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 319 FPU_STAT_CREATE_EX(mov_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 320 FPU_STAT_CREATE_EX(mov_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 321 FPU_STAT_CREATE_EX(msubf_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 322 FPU_STAT_CREATE_EX(msubf_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 323 FPU_STAT_CREATE_EX(mul_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 324 FPU_STAT_CREATE_EX(mul_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 325 FPU_STAT_CREATE_EX(neg_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 326 FPU_STAT_CREATE_EX(neg_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 327 FPU_STAT_CREATE_EX(recip_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 328 FPU_STAT_CREATE_EX(recip_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 329 FPU_STAT_CREATE_EX(rint_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 330 FPU_STAT_CREATE_EX(rint_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 331 FPU_STAT_CREATE_EX(round_w_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 332 FPU_STAT_CREATE_EX(round_w_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 333 FPU_STAT_CREATE_EX(round_l_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 334 FPU_STAT_CREATE_EX(round_l_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 335 FPU_STAT_CREATE_EX(rsqrt_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 336 FPU_STAT_CREATE_EX(rsqrt_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 337 FPU_STAT_CREATE_EX(sel_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 338 FPU_STAT_CREATE_EX(sel_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 339 FPU_STAT_CREATE_EX(seleqz_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 340 FPU_STAT_CREATE_EX(seleqz_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 341 FPU_STAT_CREATE_EX(selnez_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 342 FPU_STAT_CREATE_EX(selnez_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 343 FPU_STAT_CREATE_EX(sqrt_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 344 FPU_STAT_CREATE_EX(sqrt_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 345 FPU_STAT_CREATE_EX(sub_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 346 FPU_STAT_CREATE_EX(sub_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 347 FPU_STAT_CREATE_EX(trunc_w_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 348 FPU_STAT_CREATE_EX(trunc_w_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 349 FPU_STAT_CREATE_EX(trunc_l_s);
454854ace22f5a Aleksandar Markovic 2017-08-21 350 FPU_STAT_CREATE_EX(trunc_l_d);
454854ace22f5a Aleksandar Markovic 2017-08-21 351
85c51c511d6373 Ralf Baechle 2014-04-16 352 return 0;
85c51c511d6373 Ralf Baechle 2014-04-16 @353 }

:::::: The code at line 353 was first introduced by commit
:::::: 85c51c511d6373d4bc859458fd3f130015db31a5 MIPS: math-emu: Move all debug fs code to a separate file.

:::::: TO: Ralf Baechle <[email protected]>
:::::: CC: Ralf Baechle <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/[email protected] Intel Corporation


Attachments:
(No filename) (11.31 kB)
.config.gz (60.76 kB)
Download all attachments

2019-11-11 19:54:12

by Paul Burton

[permalink] [raw]
Subject: Re: [PATCH] MIPS: allow building with kcov coverage

Hello,

Alexey Khoroshilov wrote:
> Add ARCH_HAS_KCOV and HAVE_GCC_PLUGINS to MIPS config.
> Disable instrumentation of vdso to avoid build failure.

Applied to mips-next.

> commit dcf78ee66088
> https://git.kernel.org/mips/c/dcf78ee66088
>
> Signed-off-by: Alexey Khoroshilov <[email protected]>
> Signed-off-by: Paul Burton <[email protected]>

Thanks,
Paul

[ This message was auto-generated; if you believe anything is incorrect
then please email [email protected] to report it. ]