All of lore.kernel.org
 help / color / mirror / Atom feed
* selftests: resctrl: cat_test.c: In function 'noncont_cat_run_test': ../kselftest.h:74:9: error: impossible constraint in 'asm' 74 | __asm__ __volatile__ ("cpuid\n\t"
@ 2024-04-18  9:37 Naresh Kamboju
  2024-04-18 17:14 ` Reinette Chatre
  0 siblings, 1 reply; 2+ messages in thread
From: Naresh Kamboju @ 2024-04-18  9:37 UTC (permalink / raw)
  To: open list, open list:KERNEL SELFTEST FRAMEWORK, lkft-triage,
	Linux Regressions
  Cc: Fenghua Yu, Reinette Chatre, Shuah Khan, Anders Roxell,
	Arnd Bergmann, Dan Carpenter

The Linux next building selftests with gcc-13 found these build warnings
and errors.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

Build log:
---------
Path:
selftests/resctrl/resctrl_tests/

In file included from resctrl.h:24,
                 from cat_test.c:11:
cat_test.c: In function 'noncont_cat_run_test':
../kselftest.h:74:9: error: impossible constraint in 'asm'
   74 |         __asm__ __volatile__ ("cpuid\n\t"
         \
      |         ^~~~~~~
cat_test.c:308:17: note: in expansion of macro '__cpuid_count'
  308 |                 __cpuid_count(0x10, 1, eax, ebx, ecx, edx);
      |                 ^~~~~~~~~~~~~
../kselftest.h:74:9: error: impossible constraint in 'asm'
   74 |         __asm__ __volatile__ ("cpuid\n\t"
         \
      |         ^~~~~~~
cat_test.c:310:17: note: in expansion of macro '__cpuid_count'
  310 |                 __cpuid_count(0x10, 2, eax, ebx, ecx, edx);
      |                 ^~~~~~~~~~~~~

Steps to reproduce:
---
tuxmake --runtime podman --target-arch arm64 --toolchain gcc-13 \
  --kconfig https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3wG8BqWxf0afUI5f4wkArPi/config
\
  debugkernel dtbs dtbs-legacy headers kernel kselftest modules

Links:
 - https://storage.tuxsuite.com/public/linaro/lkft/builds/2fDW3wG8BqWxf0afUI5f4wkArPi/

--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: selftests: resctrl: cat_test.c: In function 'noncont_cat_run_test': ../kselftest.h:74:9: error: impossible constraint in 'asm' 74 | __asm__ __volatile__ ("cpuid\n\t"
  2024-04-18  9:37 selftests: resctrl: cat_test.c: In function 'noncont_cat_run_test': ../kselftest.h:74:9: error: impossible constraint in 'asm' 74 | __asm__ __volatile__ ("cpuid\n\t" Naresh Kamboju
@ 2024-04-18 17:14 ` Reinette Chatre
  0 siblings, 0 replies; 2+ messages in thread
From: Reinette Chatre @ 2024-04-18 17:14 UTC (permalink / raw)
  To: Naresh Kamboju, open list, open list:KERNEL SELFTEST FRAMEWORK,
	lkft-triage, Linux Regressions
  Cc: Fenghua Yu, Shuah Khan, Anders Roxell, Arnd Bergmann, Dan Carpenter



On 4/18/2024 2:37 AM, Naresh Kamboju wrote:
> The Linux next building selftests with gcc-13 found these build warnings
> and errors.
> 
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
> 
> Build log:
> ---------
> Path:
> selftests/resctrl/resctrl_tests/
> 
> In file included from resctrl.h:24,
>                  from cat_test.c:11:
> cat_test.c: In function 'noncont_cat_run_test':
> ../kselftest.h:74:9: error: impossible constraint in 'asm'
>    74 |         __asm__ __volatile__ ("cpuid\n\t"
>          \
>       |         ^~~~~~~
> cat_test.c:308:17: note: in expansion of macro '__cpuid_count'
>   308 |                 __cpuid_count(0x10, 1, eax, ebx, ecx, edx);
>       |                 ^~~~~~~~~~~~~
> ../kselftest.h:74:9: error: impossible constraint in 'asm'
>    74 |         __asm__ __volatile__ ("cpuid\n\t"
>          \
>       |         ^~~~~~~
> cat_test.c:310:17: note: in expansion of macro '__cpuid_count'
>   310 |                 __cpuid_count(0x10, 2, eax, ebx, ecx, edx);
>       |                 ^~~~~~~~~~~~~
> 

This is unexpected to me. kselftest.h intends to and still does define
__cpuid_count() exactly the same as gcc does (in gcc/config/i386/cpuid.h):


 255 #define __cpuid_count(level, count, a, b, c, d)                         \
 256   __asm__ __volatile__ ("cpuid\n\t"                                     \
 257                         : "=a" (a), "=b" (b), "=c" (c), "=d" (d)        \
 258                         : "0" (level), "2" (count))

Reinette

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-18 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18  9:37 selftests: resctrl: cat_test.c: In function 'noncont_cat_run_test': ../kselftest.h:74:9: error: impossible constraint in 'asm' 74 | __asm__ __volatile__ ("cpuid\n\t" Naresh Kamboju
2024-04-18 17:14 ` Reinette Chatre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.