* [aegl:resctrl2_v65rc4 2/2] fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator
@ 2023-08-03 22:45 kernel test robot
2023-08-10 6:36 ` Yujie Liu
2023-08-10 17:18 ` Nathan Chancellor
0 siblings, 2 replies; 4+ messages in thread
From: kernel test robot @ 2023-08-03 22:45 UTC (permalink / raw)
To: Tony Luck; +Cc: llvm, oe-kbuild-all, linux-ia64
tree: https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git resctrl2_v65rc4
head: 36621209814f9810feed9af60d278a198847c117
commit: 36621209814f9810feed9af60d278a198847c117 [2/2] resctrl2: Arch x86 modules for most of the legacy control/monitor functions
config: i386-randconfig-r032-20230804 (https://download.01.org/0day-ci/archive/20230804/202308040650.ayL6ExhZ-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230804/202308040650.ayL6ExhZ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308040650.ayL6ExhZ-lkp@intel.com/
All errors (new ones prefixed by >>):
fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: warning: '__cold__' attribute only applies to functions [-Wignored-attributes]
module_init(cat_init);
^
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/init.h:243:6: note: expanded from macro '__define_initcall_stub'
int __init __stub(void); \
^
include/linux/init.h:52:41: note: expanded from macro '__init'
#define __init __section(".init.text") __cold __latent_entropy __noinitretpoline
^
include/linux/compiler_types.h:104:34: note: expanded from macro '__cold'
#define __cold __attribute__((__cold__))
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/init.h:280:35: note: expanded from macro '___define_initcall'
__unique_initcall(fn, id, __sec, __initcall_id(fn))
^
include/linux/init.h:209:10: note: expanded from macro '__initcall_id'
__PASTE(__KBUILD_MODNAME, \
^
<command line>:9:48: note: expanded from macro '__KBUILD_MODNAME'
#define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
^
include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
^
<scratch space>:15:1: note: expanded from here
rdt_l3_pseudolock__215_569_cat_init6
^
fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: warning: '__cold__' attribute only applies to functions [-Wignored-attributes]
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/init.h:244:6: note: expanded from macro '__define_initcall_stub'
int __init __stub(void) \
^
include/linux/init.h:52:41: note: expanded from macro '__init'
#define __init __section(".init.text") __cold __latent_entropy __noinitretpoline
^
include/linux/compiler_types.h:104:34: note: expanded from macro '__cold'
#define __cold __attribute__((__cold__))
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/init.h:280:35: note: expanded from macro '___define_initcall'
__unique_initcall(fn, id, __sec, __initcall_id(fn))
^
include/linux/init.h:209:10: note: expanded from macro '__initcall_id'
__PASTE(__KBUILD_MODNAME, \
^
<command line>:9:48: note: expanded from macro '__KBUILD_MODNAME'
#define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
^
include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
^
<scratch space>:15:1: note: expanded from here
rdt_l3_pseudolock__215_569_cat_init6
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/init.h:280:35: note: expanded from macro '___define_initcall'
__unique_initcall(fn, id, __sec, __initcall_id(fn))
^
include/linux/init.h:209:10: note: expanded from macro '__initcall_id'
__PASTE(__KBUILD_MODNAME, \
^
<command line>:9:48: note: expanded from macro '__KBUILD_MODNAME'
#define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
^
include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
^
<scratch space>:28:1: note: expanded from here
rdt_l3_pseudolock__215_569_cat_init6216
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion]
module_init(cat_init);
^~~~~~~~~~~~~~~~~~~~~
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^~~~~~~~~~~~~
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^~~~~~~~~~~~~~~~~~~
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
^
include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
^
<scratch space>:28:1: note: expanded from here
rdt_l3_pseudolock__215_569_cat_init6216
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/init.h:280:35: note: expanded from macro '___define_initcall'
__unique_initcall(fn, id, __sec, __initcall_id(fn))
^
include/linux/init.h:209:10: note: expanded from macro '__initcall_id'
__PASTE(__KBUILD_MODNAME, \
^
<command line>:9:48: note: expanded from macro '__KBUILD_MODNAME'
#define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int]
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
^
include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
^
<scratch space>:15:1: note: expanded from here
rdt_l3_pseudolock__215_569_cat_init6
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: redefinition of 'rdt_l3_pseudolock__215_569_cat_init6' as different kind of symbol
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
^
include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
^
<scratch space>:15:1: note: expanded from here
rdt_l3_pseudolock__215_569_cat_init6
^
fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: note: previous definition is here
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
^
include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
^
<scratch space>:15:1: note: expanded from here
rdt_l3_pseudolock__215_569_cat_init6
^
>> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: '__initstub__kmod_rdt_l2_pseudolock' causes a section type conflict with 'init_rootfs'
module_init(cat_init);
^
include/linux/module.h:88:24: note: expanded from macro 'module_init'
#define module_init(x) __initcall(x);
^
include/linux/init.h:316:24: note: expanded from macro '__initcall'
#define __initcall(fn) device_initcall(fn)
^
include/linux/init.h:311:30: note: expanded from macro 'device_initcall'
#define device_initcall(fn) __define_initcall(fn, 6)
^
note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE'
#define __PASTE(a,b) ___PASTE(a,b)
^
include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE'
#define ___PASTE(a,b) a##b
^
<scratch space>:18:1: note: expanded from here
__initstub__kmod_rdt_l2_pseudolock
^
include/linux/init.h:154:13: note: declared here
void __init init_rootfs(void);
^
2 warnings and 11 errors generated.
vim +569 fs/resctrl2/arch/x86/l3_pseudolock.c
568
> 569 module_init(cat_init);
570 module_exit(cat_cleanup);
571
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [aegl:resctrl2_v65rc4 2/2] fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator 2023-08-03 22:45 [aegl:resctrl2_v65rc4 2/2] fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator kernel test robot @ 2023-08-10 6:36 ` Yujie Liu 2023-08-10 14:35 ` Nathan Chancellor 2023-08-10 17:18 ` Nathan Chancellor 1 sibling, 1 reply; 4+ messages in thread From: Yujie Liu @ 2023-08-10 6:36 UTC (permalink / raw) To: Nathan Chancellor, Nick Desaulniers Cc: Tony Luck, llvm, oe-kbuild-all, linux-ia64, kernel test robot Hi Nathan, Hi Nick, Could you kindly help to take a look at this report? Quote Tony's comment: > It seems that some/all of the combination of CLANG, ARCH=i386, and > building with CONFIG_XXX=y rather than CONFIG_XXX=m makes clang freak > out. > GCC seems able to build the files in fs/resctrl2/arch/x86/ as either > modules or built-in, x86_64 or i386 without problems. We re-tested this case and got the same result as Tony's. GCC can build this without problems, while various versions of clang (clang 17/16/15/14) throw this error. Could you help do a quick check to see if necessary to track an issue? Thanks. Best Regards, Yujie On Fri, Aug 04, 2023 at 06:45:45AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git resctrl2_v65rc4 > head: 36621209814f9810feed9af60d278a198847c117 > commit: 36621209814f9810feed9af60d278a198847c117 [2/2] resctrl2: Arch x86 modules for most of the legacy control/monitor functions > config: i386-randconfig-r032-20230804 (https://download.01.org/0day-ci/archive/20230804/202308040650.ayL6ExhZ-lkp@intel.com/config) > compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) > reproduce: (https://download.01.org/0day-ci/archive/20230804/202308040650.ayL6ExhZ-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot <lkp@intel.com> > | Closes: https://lore.kernel.org/oe-kbuild-all/202308040650.ayL6ExhZ-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: warning: '__cold__' attribute only applies to functions [-Wignored-attributes] > module_init(cat_init); > ^ > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:243:6: note: expanded from macro '__define_initcall_stub' > int __init __stub(void); \ > ^ > include/linux/init.h:52:41: note: expanded from macro '__init' > #define __init __section(".init.text") __cold __latent_entropy __noinitretpoline > ^ > include/linux/compiler_types.h:104:34: note: expanded from macro '__cold' > #define __cold __attribute__((__cold__)) > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > ^ > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > __PASTE(__KBUILD_MODNAME, \ > ^ > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: warning: '__cold__' attribute only applies to functions [-Wignored-attributes] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:244:6: note: expanded from macro '__define_initcall_stub' > int __init __stub(void) \ > ^ > include/linux/init.h:52:41: note: expanded from macro '__init' > #define __init __section(".init.text") __cold __latent_entropy __noinitretpoline > ^ > include/linux/compiler_types.h:104:34: note: expanded from macro '__cold' > #define __cold __attribute__((__cold__)) > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > ^ > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > __PASTE(__KBUILD_MODNAME, \ > ^ > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > ^ > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > __PASTE(__KBUILD_MODNAME, \ > ^ > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:28:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6216 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion] > module_init(cat_init); > ^~~~~~~~~~~~~~~~~~~~~ > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^~~~~~~~~~~~~ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^~~~~~~~~~~~~~~~~~~ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^~~~~~~~~~~~~~~~~~~~~~~~ > note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:28:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6216 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > ^ > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > __PASTE(__KBUILD_MODNAME, \ > ^ > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: redefinition of 'rdt_l3_pseudolock__215_569_cat_init6' as different kind of symbol > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: note: previous definition is here > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: '__initstub__kmod_rdt_l2_pseudolock' causes a section type conflict with 'init_rootfs' > module_init(cat_init); > ^ > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:18:1: note: expanded from here > __initstub__kmod_rdt_l2_pseudolock > ^ > include/linux/init.h:154:13: note: declared here > void __init init_rootfs(void); > ^ > 2 warnings and 11 errors generated. > > > vim +569 fs/resctrl2/arch/x86/l3_pseudolock.c > > 568 > > 569 module_init(cat_init); > 570 module_exit(cat_cleanup); > 571 > > -- > 0-DAY CI Kernel Test Service > https://github.com/intel/lkp-tests/wiki > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [aegl:resctrl2_v65rc4 2/2] fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator 2023-08-10 6:36 ` Yujie Liu @ 2023-08-10 14:35 ` Nathan Chancellor 0 siblings, 0 replies; 4+ messages in thread From: Nathan Chancellor @ 2023-08-10 14:35 UTC (permalink / raw) To: Yujie Liu Cc: Nick Desaulniers, Tony Luck, llvm, oe-kbuild-all, linux-ia64, kernel test robot Hi Yujie, On Thu, Aug 10, 2023 at 02:36:00PM +0800, Yujie Liu wrote: > Hi Nathan, Hi Nick, > > Could you kindly help to take a look at this report? > > Quote Tony's comment: > > > It seems that some/all of the combination of CLANG, ARCH=i386, and > > building with CONFIG_XXX=y rather than CONFIG_XXX=m makes clang freak > > out. > > GCC seems able to build the files in fs/resctrl2/arch/x86/ as either > > modules or built-in, x86_64 or i386 without problems. > > We re-tested this case and got the same result as Tony's. GCC can build > this without problems, while various versions of clang (clang > 17/16/15/14) throw this error. Could you help do a quick check to see if > necessary to track an issue? Thanks. I'll do my best to take a look at this either today/tomorrow or early next week. We're dealing with some fallout from the SRSO mitigations, so that has been priority 0 at the moment. Cheers, Nathan > On Fri, Aug 04, 2023 at 06:45:45AM +0800, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git resctrl2_v65rc4 > > head: 36621209814f9810feed9af60d278a198847c117 > > commit: 36621209814f9810feed9af60d278a198847c117 [2/2] resctrl2: Arch x86 modules for most of the legacy control/monitor functions > > config: i386-randconfig-r032-20230804 (https://download.01.org/0day-ci/archive/20230804/202308040650.ayL6ExhZ-lkp@intel.com/config) > > compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) > > reproduce: (https://download.01.org/0day-ci/archive/20230804/202308040650.ayL6ExhZ-lkp@intel.com/reproduce) > > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > > the same patch/commit), kindly add following tags > > | Reported-by: kernel test robot <lkp@intel.com> > > | Closes: https://lore.kernel.org/oe-kbuild-all/202308040650.ayL6ExhZ-lkp@intel.com/ > > > > All errors (new ones prefixed by >>): > > > > fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: warning: '__cold__' attribute only applies to functions [-Wignored-attributes] > > module_init(cat_init); > > ^ > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/init.h:243:6: note: expanded from macro '__define_initcall_stub' > > int __init __stub(void); \ > > ^ > > include/linux/init.h:52:41: note: expanded from macro '__init' > > #define __init __section(".init.text") __cold __latent_entropy __noinitretpoline > > ^ > > include/linux/compiler_types.h:104:34: note: expanded from macro '__cold' > > #define __cold __attribute__((__cold__)) > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > > ^ > > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > > __PASTE(__KBUILD_MODNAME, \ > > ^ > > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > > #define __PASTE(a,b) ___PASTE(a,b) > > ^ > > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > > #define ___PASTE(a,b) a##b > > ^ > > <scratch space>:15:1: note: expanded from here > > rdt_l3_pseudolock__215_569_cat_init6 > > ^ > > fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: warning: '__cold__' attribute only applies to functions [-Wignored-attributes] > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/init.h:244:6: note: expanded from macro '__define_initcall_stub' > > int __init __stub(void) \ > > ^ > > include/linux/init.h:52:41: note: expanded from macro '__init' > > #define __init __section(".init.text") __cold __latent_entropy __noinitretpoline > > ^ > > include/linux/compiler_types.h:104:34: note: expanded from macro '__cold' > > #define __cold __attribute__((__cold__)) > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > > ^ > > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > > __PASTE(__KBUILD_MODNAME, \ > > ^ > > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > > #define __PASTE(a,b) ___PASTE(a,b) > > ^ > > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > > #define ___PASTE(a,b) a##b > > ^ > > <scratch space>:15:1: note: expanded from here > > rdt_l3_pseudolock__215_569_cat_init6 > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > > ^ > > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > > __PASTE(__KBUILD_MODNAME, \ > > ^ > > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > > #define __PASTE(a,b) ___PASTE(a,b) > > ^ > > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > > #define ___PASTE(a,b) a##b > > ^ > > <scratch space>:28:1: note: expanded from here > > rdt_l3_pseudolock__215_569_cat_init6216 > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion] > > module_init(cat_init); > > ^~~~~~~~~~~~~~~~~~~~~ > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^~~~~~~~~~~~~ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^~~~~~~~~~~~~~~~~~~ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^~~~~~~~~~~~~~~~~~~~~~~~ > > note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > > #define __PASTE(a,b) ___PASTE(a,b) > > ^ > > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > > #define ___PASTE(a,b) a##b > > ^ > > <scratch space>:28:1: note: expanded from here > > rdt_l3_pseudolock__215_569_cat_init6216 > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > > ^ > > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > > __PASTE(__KBUILD_MODNAME, \ > > ^ > > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > > #define __PASTE(a,b) ___PASTE(a,b) > > ^ > > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > > #define ___PASTE(a,b) a##b > > ^ > > <scratch space>:15:1: note: expanded from here > > rdt_l3_pseudolock__215_569_cat_init6 > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: redefinition of 'rdt_l3_pseudolock__215_569_cat_init6' as different kind of symbol > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > > #define __PASTE(a,b) ___PASTE(a,b) > > ^ > > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > > #define ___PASTE(a,b) a##b > > ^ > > <scratch space>:15:1: note: expanded from here > > rdt_l3_pseudolock__215_569_cat_init6 > > ^ > > fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: note: previous definition is here > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > > #define __PASTE(a,b) ___PASTE(a,b) > > ^ > > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > > #define ___PASTE(a,b) a##b > > ^ > > <scratch space>:15:1: note: expanded from here > > rdt_l3_pseudolock__215_569_cat_init6 > > ^ > > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: '__initstub__kmod_rdt_l2_pseudolock' causes a section type conflict with 'init_rootfs' > > module_init(cat_init); > > ^ > > include/linux/module.h:88:24: note: expanded from macro 'module_init' > > #define module_init(x) __initcall(x); > > ^ > > include/linux/init.h:316:24: note: expanded from macro '__initcall' > > #define __initcall(fn) device_initcall(fn) > > ^ > > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > > #define device_initcall(fn) __define_initcall(fn, 6) > > ^ > > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > > #define __PASTE(a,b) ___PASTE(a,b) > > ^ > > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > > #define ___PASTE(a,b) a##b > > ^ > > <scratch space>:18:1: note: expanded from here > > __initstub__kmod_rdt_l2_pseudolock > > ^ > > include/linux/init.h:154:13: note: declared here > > void __init init_rootfs(void); > > ^ > > 2 warnings and 11 errors generated. > > > > > > vim +569 fs/resctrl2/arch/x86/l3_pseudolock.c > > > > 568 > > > 569 module_init(cat_init); > > 570 module_exit(cat_cleanup); > > 571 > > > > -- > > 0-DAY CI Kernel Test Service > > https://github.com/intel/lkp-tests/wiki > > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [aegl:resctrl2_v65rc4 2/2] fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator 2023-08-03 22:45 [aegl:resctrl2_v65rc4 2/2] fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator kernel test robot 2023-08-10 6:36 ` Yujie Liu @ 2023-08-10 17:18 ` Nathan Chancellor 1 sibling, 0 replies; 4+ messages in thread From: Nathan Chancellor @ 2023-08-10 17:18 UTC (permalink / raw) To: kernel test robot; +Cc: Tony Luck, llvm, oe-kbuild-all, linux-ia64 On Fri, Aug 04, 2023 at 06:45:45AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux.git resctrl2_v65rc4 > head: 36621209814f9810feed9af60d278a198847c117 > commit: 36621209814f9810feed9af60d278a198847c117 [2/2] resctrl2: Arch x86 modules for most of the legacy control/monitor functions > config: i386-randconfig-r032-20230804 (https://download.01.org/0day-ci/archive/20230804/202308040650.ayL6ExhZ-lkp@intel.com/config) > compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07) > reproduce: (https://download.01.org/0day-ci/archive/20230804/202308040650.ayL6ExhZ-lkp@intel.com/reproduce) > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > the same patch/commit), kindly add following tags > | Reported-by: kernel test robot <lkp@intel.com> > | Closes: https://lore.kernel.org/oe-kbuild-all/202308040650.ayL6ExhZ-lkp@intel.com/ > > All errors (new ones prefixed by >>): > > fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: warning: '__cold__' attribute only applies to functions [-Wignored-attributes] > module_init(cat_init); > ^ > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:243:6: note: expanded from macro '__define_initcall_stub' > int __init __stub(void); \ > ^ > include/linux/init.h:52:41: note: expanded from macro '__init' > #define __init __section(".init.text") __cold __latent_entropy __noinitretpoline > ^ > include/linux/compiler_types.h:104:34: note: expanded from macro '__cold' > #define __cold __attribute__((__cold__)) > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > ^ > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > __PASTE(__KBUILD_MODNAME, \ > ^ > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: warning: '__cold__' attribute only applies to functions [-Wignored-attributes] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:244:6: note: expanded from macro '__define_initcall_stub' > int __init __stub(void) \ > ^ > include/linux/init.h:52:41: note: expanded from macro '__init' > #define __init __section(".init.text") __cold __latent_entropy __noinitretpoline > ^ > include/linux/compiler_types.h:104:34: note: expanded from macro '__cold' > #define __cold __attribute__((__cold__)) > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > ^ > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > __PASTE(__KBUILD_MODNAME, \ > ^ > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > ^ > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > __PASTE(__KBUILD_MODNAME, \ > ^ > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:28:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6216 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void *' [-Wint-conversion] > module_init(cat_init); > ^~~~~~~~~~~~~~~~~~~~~ > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^~~~~~~~~~~~~ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^~~~~~~~~~~~~~~~~~~ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^~~~~~~~~~~~~~~~~~~~~~~~ > note: (skipping 8 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:28:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6216 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/init.h:280:35: note: expanded from macro '___define_initcall' > __unique_initcall(fn, id, __sec, __initcall_id(fn)) > ^ > include/linux/init.h:209:10: note: expanded from macro '__initcall_id' > __PASTE(__KBUILD_MODNAME, \ > ^ > <command line>:9:48: note: expanded from macro '__KBUILD_MODNAME' > #define __KBUILD_MODNAME kmod_rdt_l2_pseudolock:rdt_l3_pseudolock > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: redefinition of 'rdt_l3_pseudolock__215_569_cat_init6' as different kind of symbol > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: note: previous definition is here > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:15:1: note: expanded from here > rdt_l3_pseudolock__215_569_cat_init6 > ^ > >> fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: '__initstub__kmod_rdt_l2_pseudolock' causes a section type conflict with 'init_rootfs' > module_init(cat_init); > ^ > include/linux/module.h:88:24: note: expanded from macro 'module_init' > #define module_init(x) __initcall(x); > ^ > include/linux/init.h:316:24: note: expanded from macro '__initcall' > #define __initcall(fn) device_initcall(fn) > ^ > include/linux/init.h:311:30: note: expanded from macro 'device_initcall' > #define device_initcall(fn) __define_initcall(fn, 6) > ^ > note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) > include/linux/compiler_types.h:75:22: note: expanded from macro '__PASTE' > #define __PASTE(a,b) ___PASTE(a,b) > ^ > include/linux/compiler_types.h:74:23: note: expanded from macro '___PASTE' > #define ___PASTE(a,b) a##b > ^ > <scratch space>:18:1: note: expanded from here > __initstub__kmod_rdt_l2_pseudolock > ^ > include/linux/init.h:154:13: note: declared here > void __init init_rootfs(void); > ^ > 2 warnings and 11 errors generated. This only happens with LTO, which is clang specific, because __KBUILD_MODNAME has a colon in it, which makes the indentifier generated by __initcall_id() invalid, as I can see from the preprocessed source: int __attribute__((__section__(".init.text"))) __attribute__((__cold__)) __initstub__kmod_rdt_l2_pseudolock:rdt_l3_pseudolock__215_569_cat_init6(void); int __attribute__((__section__(".init.text"))) __attribute__((__cold__)) __initstub__kmod_rdt_l2_pseudolock:rdt_l3_pseudolock__215_569_cat_init6(void) { return cat_init(); } Seems like a copy and paste fail? This fixes it for me: diff --git a/fs/resctrl2/arch/x86/Makefile b/fs/resctrl2/arch/x86/Makefile index f9e089d047a9..fc1dc74ad61b 100644 --- a/fs/resctrl2/arch/x86/Makefile +++ b/fs/resctrl2/arch/x86/Makefile @@ -35,6 +35,6 @@ CFLAGS_l2_pseudolock.o += -DCACHE_LEVEL=2 -DPSEUDO_LOCK rdt_l3_pseudolock-y := l3_pseudolock.o pseudo_lock.o obj-$(CONFIG_X86_RDT_L3_PSEUDOLOCK) += rdt_l3_pseudolock.o rdt_l2_pseudolock-y := l3_pseudolock.o pseudo_lock.o -obj-$(CONFIG_X86_RDT_L3_PSEUDOLOCK) += rdt_l2_pseudolock.o +obj-$(CONFIG_X86_RDT_L2_PSEUDOLOCK) += rdt_l2_pseudolock.o CFLAGS_pseudo_lock.o = -I$(src) -DPSEUDO_LOCK Cheers, Nathan ^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-08-10 17:18 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-08-03 22:45 [aegl:resctrl2_v65rc4 2/2] fs/resctrl2/arch/x86/l3_pseudolock.c:569:1: error: expected ';' after top level declarator kernel test robot 2023-08-10 6:36 ` Yujie Liu 2023-08-10 14:35 ` Nathan Chancellor 2023-08-10 17:18 ` Nathan Chancellor
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox