[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5e5d138f-c9f0-4d0a-b116-8dd6879c7872@intel.com>
Date: Thu, 18 Apr 2024 10:14:02 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Naresh Kamboju <naresh.kamboju@...aro.org>, open list
<linux-kernel@...r.kernel.org>, "open list:KERNEL SELFTEST FRAMEWORK"
<linux-kselftest@...r.kernel.org>, <lkft-triage@...ts.linaro.org>, "Linux
Regressions" <regressions@...ts.linux.dev>
CC: Fenghua Yu <fenghua.yu@...el.com>, Shuah Khan <shuah@...nel.org>, "Anders
Roxell" <anders.roxell@...aro.org>, Arnd Bergmann <arnd@...db.de>, "Dan
Carpenter" <dan.carpenter@...aro.org>
Subject: 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"
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@...aro.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
Powered by blists - more mailing lists