Message ID | 20250107140004.2732830-21-memxor@gmail.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | BPF |
Headers | show |
Series | Resilient Queued Spin Lock | expand |
Hi Kumar,
kernel test robot noticed the following build errors:
[auto build test ERROR on f44275e7155dc310d36516fc25be503da099781c]
url: https://github.com/intel-lab-lkp/linux/commits/Kumar-Kartikeya-Dwivedi/locking-Move-MCS-struct-definition-to-public-header/20250107-220615
base: f44275e7155dc310d36516fc25be503da099781c
patch link: https://lore.kernel.org/r/20250107140004.2732830-21-memxor%40gmail.com
patch subject: [PATCH bpf-next v1 20/22] bpf: Introduce rqspinlock kfuncs
config: alpha-allnoconfig (https://download.01.org/0day-ci/archive/20250108/202501081832.WyLcpM5w-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250108/202501081832.WyLcpM5w-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/202501081832.WyLcpM5w-lkp@intel.com/
All errors (new ones prefixed by >>):
In file included from ./arch/alpha/include/generated/asm/rqspinlock.h:1,
from include/linux/bpf.h:33,
from include/linux/security.h:35,
from include/linux/perf_event.h:62,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:94,
from init/main.c:21:
>> include/asm-generic/rqspinlock.h:15:10: fatal error: asm/qspinlock.h: No such file or directory
15 | #include <asm/qspinlock.h>
| ^~~~~~~~~~~~~~~~~
compilation terminated.
vim +15 include/asm-generic/rqspinlock.h
13d8f36ca2ecdf Kumar Kartikeya Dwivedi 2025-01-07 11
13d8f36ca2ecdf Kumar Kartikeya Dwivedi 2025-01-07 12 #include <linux/types.h>
ebea887f32c13b Kumar Kartikeya Dwivedi 2025-01-07 13 #include <vdso/time64.h>
83c0f407f3dad2 Kumar Kartikeya Dwivedi 2025-01-07 14 #include <linux/percpu.h>
ea74a398e7e95d Kumar Kartikeya Dwivedi 2025-01-07 @15 #include <asm/qspinlock.h>
13d8f36ca2ecdf Kumar Kartikeya Dwivedi 2025-01-07 16
Hi Kumar, kernel test robot noticed the following build errors: [auto build test ERROR on f44275e7155dc310d36516fc25be503da099781c] url: https://github.com/intel-lab-lkp/linux/commits/Kumar-Kartikeya-Dwivedi/locking-Move-MCS-struct-definition-to-public-header/20250107-220615 base: f44275e7155dc310d36516fc25be503da099781c patch link: https://lore.kernel.org/r/20250107140004.2732830-21-memxor%40gmail.com patch subject: [PATCH bpf-next v1 20/22] bpf: Introduce rqspinlock kfuncs config: loongarch-allnoconfig (https://download.01.org/0day-ci/archive/20250108/202501081853.1N3CiU6j-lkp@intel.com/config) compiler: loongarch64-linux-gcc (GCC) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250108/202501081853.1N3CiU6j-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/202501081853.1N3CiU6j-lkp@intel.com/ All errors (new ones prefixed by >>): In file included from include/asm-generic/qspinlock.h:42, from arch/loongarch/include/asm/qspinlock.h:39, from include/asm-generic/rqspinlock.h:15, from ./arch/loongarch/include/generated/asm/rqspinlock.h:1, from include/linux/bpf.h:33, from include/linux/security.h:35, from kernel/printk/printk.c:34: include/asm-generic/qspinlock_types.h:44:3: error: conflicting types for 'arch_spinlock_t'; have 'struct qspinlock' 44 | } arch_spinlock_t; | ^~~~~~~~~~~~~~~ In file included from include/linux/spinlock_types_raw.h:9, from include/linux/ratelimit_types.h:7, from include/linux/printk.h:9, from include/linux/kernel.h:31, from kernel/printk/printk.c:22: include/linux/spinlock_types_up.h:25:20: note: previous declaration of 'arch_spinlock_t' with type 'arch_spinlock_t' 25 | typedef struct { } arch_spinlock_t; | ^~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:9: warning: "__ARCH_SPIN_LOCK_UNLOCKED" redefined 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_up.h:27:9: note: this is the location of the previous definition 27 | #define __ARCH_SPIN_LOCK_UNLOCKED { } | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock.h:144:9: warning: "arch_spin_is_locked" redefined 144 | #define arch_spin_is_locked(l) queued_spin_is_locked(l) | ^~~~~~~~~~~~~~~~~~~ In file included from include/linux/spinlock.h:97, from include/linux/mmzone.h:8, from include/linux/gfp.h:7, from include/linux/mm.h:7, from kernel/printk/printk.c:23: include/linux/spinlock_up.h:62:9: note: this is the location of the previous definition 62 | #define arch_spin_is_locked(lock) ((void)(lock), 0) | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock.h:145:9: warning: "arch_spin_is_contended" redefined 145 | #define arch_spin_is_contended(l) queued_spin_is_contended(l) | ^~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_up.h:69:9: note: this is the location of the previous definition 69 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) | ^~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock.h:147:9: warning: "arch_spin_lock" redefined 147 | #define arch_spin_lock(l) queued_spin_lock(l) | ^~~~~~~~~~~~~~ include/linux/spinlock_up.h:64:10: note: this is the location of the previous definition 64 | # define arch_spin_lock(lock) do { barrier(); (void)(lock); } while (0) | ^~~~~~~~~~~~~~ include/asm-generic/qspinlock.h:148:9: warning: "arch_spin_trylock" redefined 148 | #define arch_spin_trylock(l) queued_spin_trylock(l) | ^~~~~~~~~~~~~~~~~ include/linux/spinlock_up.h:66:10: note: this is the location of the previous definition 66 | # define arch_spin_trylock(lock) ({ barrier(); (void)(lock); 1; }) | ^~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock.h:149:9: warning: "arch_spin_unlock" redefined 149 | #define arch_spin_unlock(l) queued_spin_unlock(l) | ^~~~~~~~~~~~~~~~ include/linux/spinlock_up.h:65:10: note: this is the location of the previous definition 65 | # define arch_spin_unlock(lock) do { barrier(); (void)(lock); } while (0) | ^~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: error: extra brace group at end of initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:89:8: note: in expansion of macro 'DEFINE_MUTEX' 89 | static DEFINE_MUTEX(console_mutex); | ^~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:89:8: note: in expansion of macro 'DEFINE_MUTEX' 89 | static DEFINE_MUTEX(console_mutex); | ^~~~~~~~~~~~ In file included from include/linux/atomic.h:7, from include/asm-generic/bitops/atomic.h:5, from arch/loongarch/include/asm/bitops.h:27, from include/linux/bitops.h:68, from include/linux/kernel.h:23: >> arch/loongarch/include/asm/atomic.h:32:27: error: extra brace group at end of initializer 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:89:8: note: in expansion of macro 'DEFINE_MUTEX' 89 | static DEFINE_MUTEX(console_mutex); | ^~~~~~~~~~~~ arch/loongarch/include/asm/atomic.h:32:27: note: (near initialization for '(anonymous).raw_lock') 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:89:8: note: in expansion of macro 'DEFINE_MUTEX' 89 | static DEFINE_MUTEX(console_mutex); | ^~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: warning: excess elements in struct initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:89:8: note: in expansion of macro 'DEFINE_MUTEX' 89 | static DEFINE_MUTEX(console_mutex); | ^~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:89:8: note: in expansion of macro 'DEFINE_MUTEX' 89 | static DEFINE_MUTEX(console_mutex); | ^~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: error: extra brace group at end of initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:23:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:35:34: note: in expansion of macro '__SEMAPHORE_INITIALIZER' 35 | struct semaphore _name = __SEMAPHORE_INITIALIZER(_name, _n) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:95:8: note: in expansion of macro 'DEFINE_SEMAPHORE' 95 | static DEFINE_SEMAPHORE(console_sem, 1); | ^~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:23:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:35:34: note: in expansion of macro '__SEMAPHORE_INITIALIZER' 35 | struct semaphore _name = __SEMAPHORE_INITIALIZER(_name, _n) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:95:8: note: in expansion of macro 'DEFINE_SEMAPHORE' 95 | static DEFINE_SEMAPHORE(console_sem, 1); | ^~~~~~~~~~~~~~~~ >> arch/loongarch/include/asm/atomic.h:32:27: error: extra brace group at end of initializer 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:23:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:35:34: note: in expansion of macro '__SEMAPHORE_INITIALIZER' 35 | struct semaphore _name = __SEMAPHORE_INITIALIZER(_name, _n) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:95:8: note: in expansion of macro 'DEFINE_SEMAPHORE' 95 | static DEFINE_SEMAPHORE(console_sem, 1); | ^~~~~~~~~~~~~~~~ arch/loongarch/include/asm/atomic.h:32:27: note: (near initialization for '(anonymous).raw_lock') 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:23:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:35:34: note: in expansion of macro '__SEMAPHORE_INITIALIZER' 35 | struct semaphore _name = __SEMAPHORE_INITIALIZER(_name, _n) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:95:8: note: in expansion of macro 'DEFINE_SEMAPHORE' 95 | static DEFINE_SEMAPHORE(console_sem, 1); | ^~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: warning: excess elements in struct initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:23:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:35:34: note: in expansion of macro '__SEMAPHORE_INITIALIZER' 35 | struct semaphore _name = __SEMAPHORE_INITIALIZER(_name, _n) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:95:8: note: in expansion of macro 'DEFINE_SEMAPHORE' 95 | static DEFINE_SEMAPHORE(console_sem, 1); | ^~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:23:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 23 | .lock = __RAW_SPIN_LOCK_UNLOCKED((name).lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/semaphore.h:35:34: note: in expansion of macro '__SEMAPHORE_INITIALIZER' 35 | struct semaphore _name = __SEMAPHORE_INITIALIZER(_name, _n) | ^~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:95:8: note: in expansion of macro 'DEFINE_SEMAPHORE' 95 | static DEFINE_SEMAPHORE(console_sem, 1); | ^~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: error: extra brace group at end of initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/swait.h:62:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 62 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:36:20: note: in expansion of macro '__SWAIT_QUEUE_HEAD_INITIALIZER' 36 | .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:49:42: note: in expansion of macro '__SRCU_STRUCT_INIT' 49 | static struct srcu_struct name = __SRCU_STRUCT_INIT(name, name, name) | ^~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:98:1: note: in expansion of macro 'DEFINE_STATIC_SRCU' 98 | DEFINE_STATIC_SRCU(console_srcu); | ^~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/swait.h:62:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 62 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:36:20: note: in expansion of macro '__SWAIT_QUEUE_HEAD_INITIALIZER' 36 | .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:49:42: note: in expansion of macro '__SRCU_STRUCT_INIT' 49 | static struct srcu_struct name = __SRCU_STRUCT_INIT(name, name, name) | ^~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:98:1: note: in expansion of macro 'DEFINE_STATIC_SRCU' 98 | DEFINE_STATIC_SRCU(console_srcu); | ^~~~~~~~~~~~~~~~~~ >> arch/loongarch/include/asm/atomic.h:32:27: error: extra brace group at end of initializer 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/swait.h:62:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 62 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:36:20: note: in expansion of macro '__SWAIT_QUEUE_HEAD_INITIALIZER' 36 | .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:49:42: note: in expansion of macro '__SRCU_STRUCT_INIT' 49 | static struct srcu_struct name = __SRCU_STRUCT_INIT(name, name, name) | ^~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:98:1: note: in expansion of macro 'DEFINE_STATIC_SRCU' 98 | DEFINE_STATIC_SRCU(console_srcu); | ^~~~~~~~~~~~~~~~~~ arch/loongarch/include/asm/atomic.h:32:27: note: (near initialization for '(anonymous).raw_lock') 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/swait.h:62:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 62 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:36:20: note: in expansion of macro '__SWAIT_QUEUE_HEAD_INITIALIZER' 36 | .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:49:42: note: in expansion of macro '__SRCU_STRUCT_INIT' 49 | static struct srcu_struct name = __SRCU_STRUCT_INIT(name, name, name) | ^~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:98:1: note: in expansion of macro 'DEFINE_STATIC_SRCU' 98 | DEFINE_STATIC_SRCU(console_srcu); | ^~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: warning: excess elements in struct initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/swait.h:62:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 62 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:36:20: note: in expansion of macro '__SWAIT_QUEUE_HEAD_INITIALIZER' 36 | .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:49:42: note: in expansion of macro '__SRCU_STRUCT_INIT' 49 | static struct srcu_struct name = __SRCU_STRUCT_INIT(name, name, name) | ^~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:98:1: note: in expansion of macro 'DEFINE_STATIC_SRCU' 98 | DEFINE_STATIC_SRCU(console_srcu); | ^~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/swait.h:62:27: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 62 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:36:20: note: in expansion of macro '__SWAIT_QUEUE_HEAD_INITIALIZER' 36 | .srcu_wq = __SWAIT_QUEUE_HEAD_INITIALIZER(name.srcu_wq), \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/srcutiny.h:49:42: note: in expansion of macro '__SRCU_STRUCT_INIT' 49 | static struct srcu_struct name = __SRCU_STRUCT_INIT(name, name, name) | ^~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:98:1: note: in expansion of macro 'DEFINE_STATIC_SRCU' 98 | DEFINE_STATIC_SRCU(console_srcu); | ^~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: error: extra brace group at end of initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:465:8: note: in expansion of macro 'DEFINE_MUTEX' 465 | static DEFINE_MUTEX(syslog_lock); | ^~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:465:8: note: in expansion of macro 'DEFINE_MUTEX' 465 | static DEFINE_MUTEX(syslog_lock); | ^~~~~~~~~~~~ >> arch/loongarch/include/asm/atomic.h:32:27: error: extra brace group at end of initializer 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:465:8: note: in expansion of macro 'DEFINE_MUTEX' 465 | static DEFINE_MUTEX(syslog_lock); | ^~~~~~~~~~~~ arch/loongarch/include/asm/atomic.h:32:27: note: (near initialization for '(anonymous).raw_lock') 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:465:8: note: in expansion of macro 'DEFINE_MUTEX' 465 | static DEFINE_MUTEX(syslog_lock); | ^~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: warning: excess elements in struct initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:465:8: note: in expansion of macro 'DEFINE_MUTEX' 465 | static DEFINE_MUTEX(syslog_lock); | ^~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:32: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:34: note: in expansion of macro '__MUTEX_INITIALIZER' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:465:8: note: in expansion of macro 'DEFINE_MUTEX' 465 | static DEFINE_MUTEX(syslog_lock); | ^~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: error: extra brace group at end of initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:493:1: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 493 | DECLARE_WAIT_QUEUE_HEAD(log_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).<anonymous>.rlock.raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:493:1: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 493 | DECLARE_WAIT_QUEUE_HEAD(log_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ >> arch/loongarch/include/asm/atomic.h:32:27: error: extra brace group at end of initializer 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:493:1: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 493 | DECLARE_WAIT_QUEUE_HEAD(log_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/include/asm/atomic.h:32:27: note: (near initialization for '(anonymous).<anonymous>.rlock.raw_lock') 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:493:1: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 493 | DECLARE_WAIT_QUEUE_HEAD(log_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: warning: excess elements in struct initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:493:1: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 493 | DECLARE_WAIT_QUEUE_HEAD(log_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).<anonymous>.rlock.raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:493:1: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 493 | DECLARE_WAIT_QUEUE_HEAD(log_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: error: extra brace group at end of initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:494:8: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 494 | static DECLARE_WAIT_QUEUE_HEAD(legacy_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).<anonymous>.rlock.raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:494:8: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 494 | static DECLARE_WAIT_QUEUE_HEAD(legacy_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ >> arch/loongarch/include/asm/atomic.h:32:27: error: extra brace group at end of initializer 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:494:8: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 494 | static DECLARE_WAIT_QUEUE_HEAD(legacy_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/include/asm/atomic.h:32:27: note: (near initialization for '(anonymous).<anonymous>.rlock.raw_lock') 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:494:8: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 494 | static DECLARE_WAIT_QUEUE_HEAD(legacy_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: warning: excess elements in struct initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:494:8: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 494 | static DECLARE_WAIT_QUEUE_HEAD(legacy_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).<anonymous>.rlock.raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:56:27: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 56 | .lock = __SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~ include/linux/wait.h:60:39: note: in expansion of macro '__WAIT_QUEUE_HEAD_INITIALIZER' 60 | struct wait_queue_head name = __WAIT_QUEUE_HEAD_INITIALIZER(name) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:494:8: note: in expansion of macro 'DECLARE_WAIT_QUEUE_HEAD' 494 | static DECLARE_WAIT_QUEUE_HEAD(legacy_wait); | ^~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: error: extra brace group at end of initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:71:52: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 71 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:1891:8: note: in expansion of macro 'DEFINE_RAW_SPINLOCK' 1891 | static DEFINE_RAW_SPINLOCK(console_owner_lock); | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:71:52: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 71 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:1891:8: note: in expansion of macro 'DEFINE_RAW_SPINLOCK' 1891 | static DEFINE_RAW_SPINLOCK(console_owner_lock); | ^~~~~~~~~~~~~~~~~~~ >> arch/loongarch/include/asm/atomic.h:32:27: error: extra brace group at end of initializer 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:71:52: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 71 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:1891:8: note: in expansion of macro 'DEFINE_RAW_SPINLOCK' 1891 | static DEFINE_RAW_SPINLOCK(console_owner_lock); | ^~~~~~~~~~~~~~~~~~~ arch/loongarch/include/asm/atomic.h:32:27: note: (near initialization for '(anonymous).raw_lock') 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:71:52: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 71 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:1891:8: note: in expansion of macro 'DEFINE_RAW_SPINLOCK' 1891 | static DEFINE_RAW_SPINLOCK(console_owner_lock); | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: warning: excess elements in struct initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:71:52: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 71 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:1891:8: note: in expansion of macro 'DEFINE_RAW_SPINLOCK' 1891 | static DEFINE_RAW_SPINLOCK(console_owner_lock); | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:71:52: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 71 | #define DEFINE_RAW_SPINLOCK(x) raw_spinlock_t x = __RAW_SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:1891:8: note: in expansion of macro 'DEFINE_RAW_SPINLOCK' 1891 | static DEFINE_RAW_SPINLOCK(console_owner_lock); | ^~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: error: extra brace group at end of initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:27:35: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:34:9: note: in expansion of macro 'RATELIMIT_STATE_INIT_FLAGS' 34 | RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:42:17: note: in expansion of macro 'RATELIMIT_STATE_INIT' 42 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \ | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4592:1: note: in expansion of macro 'DEFINE_RATELIMIT_STATE' 4592 | DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10); | ^~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:27:35: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:34:9: note: in expansion of macro 'RATELIMIT_STATE_INIT_FLAGS' 34 | RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:42:17: note: in expansion of macro 'RATELIMIT_STATE_INIT' 42 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \ | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4592:1: note: in expansion of macro 'DEFINE_RATELIMIT_STATE' 4592 | DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10); | ^~~~~~~~~~~~~~~~~~~~~~ >> arch/loongarch/include/asm/atomic.h:32:27: error: extra brace group at end of initializer 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:27:35: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:34:9: note: in expansion of macro 'RATELIMIT_STATE_INIT_FLAGS' 34 | RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:42:17: note: in expansion of macro 'RATELIMIT_STATE_INIT' 42 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \ | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4592:1: note: in expansion of macro 'DEFINE_RATELIMIT_STATE' 4592 | DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10); | ^~~~~~~~~~~~~~~~~~~~~~ arch/loongarch/include/asm/atomic.h:32:27: note: (near initialization for '(anonymous).raw_lock') 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:27:35: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:34:9: note: in expansion of macro 'RATELIMIT_STATE_INIT_FLAGS' 34 | RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:42:17: note: in expansion of macro 'RATELIMIT_STATE_INIT' 42 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \ | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4592:1: note: in expansion of macro 'DEFINE_RATELIMIT_STATE' 4592 | DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10); | ^~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: warning: excess elements in struct initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:27:35: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:34:9: note: in expansion of macro 'RATELIMIT_STATE_INIT_FLAGS' 34 | RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:42:17: note: in expansion of macro 'RATELIMIT_STATE_INIT' 42 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \ | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4592:1: note: in expansion of macro 'DEFINE_RATELIMIT_STATE' 4592 | DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10); | ^~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_raw.h:64:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:26: note: in expansion of macro '__RAW_SPIN_LOCK_INITIALIZER' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:27:35: note: in expansion of macro '__RAW_SPIN_LOCK_UNLOCKED' 27 | .lock = __RAW_SPIN_LOCK_UNLOCKED(name.lock), \ | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:34:9: note: in expansion of macro 'RATELIMIT_STATE_INIT_FLAGS' 34 | RATELIMIT_STATE_INIT_FLAGS(name, interval_init, burst_init, 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/ratelimit_types.h:42:17: note: in expansion of macro 'RATELIMIT_STATE_INIT' 42 | RATELIMIT_STATE_INIT(name, interval_init, burst_init) \ | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4592:1: note: in expansion of macro 'DEFINE_RATELIMIT_STATE' 4592 | DEFINE_RATELIMIT_STATE(printk_ratelimit_state, 5 * HZ, 10); | ^~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: error: extra brace group at end of initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:43:48: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 43 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4622:8: note: in expansion of macro 'DEFINE_SPINLOCK' 4622 | static DEFINE_SPINLOCK(dump_list_lock); | ^~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).<anonymous>.rlock.raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:43:48: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 43 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4622:8: note: in expansion of macro 'DEFINE_SPINLOCK' 4622 | static DEFINE_SPINLOCK(dump_list_lock); | ^~~~~~~~~~~~~~~ >> arch/loongarch/include/asm/atomic.h:32:27: error: extra brace group at end of initializer 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:43:48: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 43 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4622:8: note: in expansion of macro 'DEFINE_SPINLOCK' 4622 | static DEFINE_SPINLOCK(dump_list_lock); | ^~~~~~~~~~~~~~~ arch/loongarch/include/asm/atomic.h:32:27: note: (near initialization for '(anonymous).<anonymous>.rlock.raw_lock') 32 | #define ATOMIC_INIT(i) { (i) } | ^ include/asm-generic/qspinlock_types.h:49:52: note: in expansion of macro 'ATOMIC_INIT' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:43:48: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 43 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4622:8: note: in expansion of macro 'DEFINE_SPINLOCK' 4622 | static DEFINE_SPINLOCK(dump_list_lock); | ^~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: warning: excess elements in struct initializer 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:43:48: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 43 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4622:8: note: in expansion of macro 'DEFINE_SPINLOCK' 4622 | static DEFINE_SPINLOCK(dump_list_lock); | ^~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:43: note: (near initialization for '(anonymous).<anonymous>.rlock.raw_lock') 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types.h:33:21: note: in expansion of macro '__ARCH_SPIN_LOCK_UNLOCKED' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:22: note: in expansion of macro '___SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:22: note: in expansion of macro '__SPIN_LOCK_INITIALIZER' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:43:48: note: in expansion of macro '__SPIN_LOCK_UNLOCKED' 43 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~ kernel/printk/printk.c:4622:8: note: in expansion of macro 'DEFINE_SPINLOCK' 4622 | static DEFINE_SPINLOCK(dump_list_lock); | ^~~~~~~~~~~~~~~ vim +32 arch/loongarch/include/asm/atomic.h 5b0b14e550a006 Huacai Chen 2022-05-31 31 5b0b14e550a006 Huacai Chen 2022-05-31 @32 #define ATOMIC_INIT(i) { (i) } 5b0b14e550a006 Huacai Chen 2022-05-31 33
Hi Kumar, kernel test robot noticed the following build errors: [auto build test ERROR on f44275e7155dc310d36516fc25be503da099781c] url: https://github.com/intel-lab-lkp/linux/commits/Kumar-Kartikeya-Dwivedi/locking-Move-MCS-struct-definition-to-public-header/20250107-220615 base: f44275e7155dc310d36516fc25be503da099781c patch link: https://lore.kernel.org/r/20250107140004.2732830-21-memxor%40gmail.com patch subject: [PATCH bpf-next v1 20/22] bpf: Introduce rqspinlock kfuncs config: um-allnoconfig (https://download.01.org/0day-ci/archive/20250108/202501081854.xzCcM6nm-lkp@intel.com/config) compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250108/202501081854.xzCcM6nm-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/202501081854.xzCcM6nm-lkp@intel.com/ All error/warnings (new ones prefixed by >>): In file included from fs/kernfs/mount.c:22: In file included from fs/kernfs/kernfs-internal.h:20: In file included from include/linux/fs_context.h:14: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:7: >> include/asm-generic/qspinlock_types.h:44:3: error: typedef redefinition with different types ('struct qspinlock' vs 'struct arch_spinlock_t') 44 | } arch_spinlock_t; | ^ include/linux/spinlock_types_up.h:25:20: note: previous definition is here 25 | typedef struct { } arch_spinlock_t; | ^ In file included from fs/kernfs/mount.c:22: In file included from fs/kernfs/kernfs-internal.h:20: In file included from include/linux/fs_context.h:14: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:7: >> include/asm-generic/qspinlock_types.h:49:9: warning: '__ARCH_SPIN_LOCK_UNLOCKED' macro redefined [-Wmacro-redefined] 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_up.h:27:9: note: previous definition is here 27 | #define __ARCH_SPIN_LOCK_UNLOCKED { } | ^ In file included from fs/kernfs/mount.c:22: In file included from fs/kernfs/kernfs-internal.h:20: In file included from include/linux/fs_context.h:14: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:144:9: warning: 'arch_spin_is_locked' macro redefined [-Wmacro-redefined] 144 | #define arch_spin_is_locked(l) queued_spin_is_locked(l) | ^ include/linux/spinlock_up.h:62:9: note: previous definition is here 62 | #define arch_spin_is_locked(lock) ((void)(lock), 0) | ^ In file included from fs/kernfs/mount.c:22: In file included from fs/kernfs/kernfs-internal.h:20: In file included from include/linux/fs_context.h:14: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:145:9: warning: 'arch_spin_is_contended' macro redefined [-Wmacro-redefined] 145 | #define arch_spin_is_contended(l) queued_spin_is_contended(l) | ^ include/linux/spinlock_up.h:69:9: note: previous definition is here 69 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) | ^ In file included from fs/kernfs/mount.c:22: In file included from fs/kernfs/kernfs-internal.h:20: In file included from include/linux/fs_context.h:14: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:147:9: warning: 'arch_spin_lock' macro redefined [-Wmacro-redefined] 147 | #define arch_spin_lock(l) queued_spin_lock(l) | ^ include/linux/spinlock_up.h:64:10: note: previous definition is here 64 | # define arch_spin_lock(lock) do { barrier(); (void)(lock); } while (0) | ^ In file included from fs/kernfs/mount.c:22: In file included from fs/kernfs/kernfs-internal.h:20: In file included from include/linux/fs_context.h:14: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:148:9: warning: 'arch_spin_trylock' macro redefined [-Wmacro-redefined] 148 | #define arch_spin_trylock(l) queued_spin_trylock(l) | ^ include/linux/spinlock_up.h:66:10: note: previous definition is here 66 | # define arch_spin_trylock(lock) ({ barrier(); (void)(lock); 1; }) | ^ In file included from fs/kernfs/mount.c:22: In file included from fs/kernfs/kernfs-internal.h:20: In file included from include/linux/fs_context.h:14: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:149:9: warning: 'arch_spin_unlock' macro redefined [-Wmacro-redefined] 149 | #define arch_spin_unlock(l) queued_spin_unlock(l) | ^ include/linux/spinlock_up.h:65:10: note: previous definition is here 65 | # define arch_spin_unlock(lock) do { barrier(); (void)(lock); } while (0) | ^ 6 warnings and 1 error generated. -- In file included from fs/kernfs/inode.c:16: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:7: >> include/asm-generic/qspinlock_types.h:44:3: error: typedef redefinition with different types ('struct qspinlock' vs 'struct arch_spinlock_t') 44 | } arch_spinlock_t; | ^ include/linux/spinlock_types_up.h:25:20: note: previous definition is here 25 | typedef struct { } arch_spinlock_t; | ^ In file included from fs/kernfs/inode.c:16: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:7: >> include/asm-generic/qspinlock_types.h:49:9: warning: '__ARCH_SPIN_LOCK_UNLOCKED' macro redefined [-Wmacro-redefined] 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_up.h:27:9: note: previous definition is here 27 | #define __ARCH_SPIN_LOCK_UNLOCKED { } | ^ In file included from fs/kernfs/inode.c:16: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:144:9: warning: 'arch_spin_is_locked' macro redefined [-Wmacro-redefined] 144 | #define arch_spin_is_locked(l) queued_spin_is_locked(l) | ^ include/linux/spinlock_up.h:62:9: note: previous definition is here 62 | #define arch_spin_is_locked(lock) ((void)(lock), 0) | ^ In file included from fs/kernfs/inode.c:16: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:145:9: warning: 'arch_spin_is_contended' macro redefined [-Wmacro-redefined] 145 | #define arch_spin_is_contended(l) queued_spin_is_contended(l) | ^ include/linux/spinlock_up.h:69:9: note: previous definition is here 69 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) | ^ In file included from fs/kernfs/inode.c:16: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:147:9: warning: 'arch_spin_lock' macro redefined [-Wmacro-redefined] 147 | #define arch_spin_lock(l) queued_spin_lock(l) | ^ include/linux/spinlock_up.h:64:10: note: previous definition is here 64 | # define arch_spin_lock(lock) do { barrier(); (void)(lock); } while (0) | ^ In file included from fs/kernfs/inode.c:16: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:148:9: warning: 'arch_spin_trylock' macro redefined [-Wmacro-redefined] 148 | #define arch_spin_trylock(l) queued_spin_trylock(l) | ^ include/linux/spinlock_up.h:66:10: note: previous definition is here 66 | # define arch_spin_trylock(lock) ({ barrier(); (void)(lock); 1; }) | ^ In file included from fs/kernfs/inode.c:16: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:149:9: warning: 'arch_spin_unlock' macro redefined [-Wmacro-redefined] 149 | #define arch_spin_unlock(l) queued_spin_unlock(l) | ^ include/linux/spinlock_up.h:65:10: note: previous definition is here 65 | # define arch_spin_unlock(lock) do { barrier(); (void)(lock); } while (0) | ^ fs/kernfs/inode.c:29:9: warning: excess elements in struct initializer [-Wexcess-initializers] 29 | static DEFINE_MUTEX(iattr_mutex); | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:87:27: note: expanded from macro 'DEFINE_MUTEX' 87 | struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/mutex.h:81:18: note: expanded from macro '__MUTEX_INITIALIZER' 81 | , .wait_lock = __RAW_SPIN_LOCK_UNLOCKED(lockname.wait_lock) \ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:69:19: note: expanded from macro '__RAW_SPIN_LOCK_UNLOCKED' 69 | (raw_spinlock_t) __RAW_SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types_raw.h:64:14: note: expanded from macro '__RAW_SPIN_LOCK_INITIALIZER' 64 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:37: note: expanded from macro '__ARCH_SPIN_LOCK_UNLOCKED' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~~~~~~~~~~~~~~~ 7 warnings and 1 error generated. -- In file included from fs/kernfs/dir.c:15: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:7: >> include/asm-generic/qspinlock_types.h:44:3: error: typedef redefinition with different types ('struct qspinlock' vs 'struct arch_spinlock_t') 44 | } arch_spinlock_t; | ^ include/linux/spinlock_types_up.h:25:20: note: previous definition is here 25 | typedef struct { } arch_spinlock_t; | ^ In file included from fs/kernfs/dir.c:15: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:7: >> include/asm-generic/qspinlock_types.h:49:9: warning: '__ARCH_SPIN_LOCK_UNLOCKED' macro redefined [-Wmacro-redefined] 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^ include/linux/spinlock_types_up.h:27:9: note: previous definition is here 27 | #define __ARCH_SPIN_LOCK_UNLOCKED { } | ^ In file included from fs/kernfs/dir.c:15: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:144:9: warning: 'arch_spin_is_locked' macro redefined [-Wmacro-redefined] 144 | #define arch_spin_is_locked(l) queued_spin_is_locked(l) | ^ include/linux/spinlock_up.h:62:9: note: previous definition is here 62 | #define arch_spin_is_locked(lock) ((void)(lock), 0) | ^ In file included from fs/kernfs/dir.c:15: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:145:9: warning: 'arch_spin_is_contended' macro redefined [-Wmacro-redefined] 145 | #define arch_spin_is_contended(l) queued_spin_is_contended(l) | ^ include/linux/spinlock_up.h:69:9: note: previous definition is here 69 | #define arch_spin_is_contended(lock) (((void)(lock), 0)) | ^ In file included from fs/kernfs/dir.c:15: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:147:9: warning: 'arch_spin_lock' macro redefined [-Wmacro-redefined] 147 | #define arch_spin_lock(l) queued_spin_lock(l) | ^ include/linux/spinlock_up.h:64:10: note: previous definition is here 64 | # define arch_spin_lock(lock) do { barrier(); (void)(lock); } while (0) | ^ In file included from fs/kernfs/dir.c:15: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:148:9: warning: 'arch_spin_trylock' macro redefined [-Wmacro-redefined] 148 | #define arch_spin_trylock(l) queued_spin_trylock(l) | ^ include/linux/spinlock_up.h:66:10: note: previous definition is here 66 | # define arch_spin_trylock(lock) ({ barrier(); (void)(lock); 1; }) | ^ In file included from fs/kernfs/dir.c:15: In file included from include/linux/security.h:35: In file included from include/linux/bpf.h:33: In file included from arch/x86/include/asm/rqspinlock.h:18: In file included from include/asm-generic/rqspinlock.h:15: In file included from arch/x86/include/asm/qspinlock.h:114: >> include/asm-generic/qspinlock.h:149:9: warning: 'arch_spin_unlock' macro redefined [-Wmacro-redefined] 149 | #define arch_spin_unlock(l) queued_spin_unlock(l) | ^ include/linux/spinlock_up.h:65:10: note: previous definition is here 65 | # define arch_spin_unlock(lock) do { barrier(); (void)(lock); } while (0) | ^ fs/kernfs/dir.c:28:8: warning: excess elements in struct initializer [-Wexcess-initializers] 28 | static DEFINE_SPINLOCK(kernfs_pr_cont_lock); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:43:43: note: expanded from macro 'DEFINE_SPINLOCK' 43 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:15: note: expanded from macro '__SPIN_LOCK_UNLOCKED' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:15: note: expanded from macro '__SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:33:14: note: expanded from macro '___SPIN_LOCK_INITIALIZER' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:37: note: expanded from macro '__ARCH_SPIN_LOCK_UNLOCKED' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~~~~~~~~~~~~~~~ fs/kernfs/dir.c:30:8: warning: excess elements in struct initializer [-Wexcess-initializers] 30 | static DEFINE_SPINLOCK(kernfs_idr_lock); /* root->ino_idr */ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:43:43: note: expanded from macro 'DEFINE_SPINLOCK' 43 | #define DEFINE_SPINLOCK(x) spinlock_t x = __SPIN_LOCK_UNLOCKED(x) | ^~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:41:15: note: expanded from macro '__SPIN_LOCK_UNLOCKED' 41 | (spinlock_t) __SPIN_LOCK_INITIALIZER(lockname) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:38:15: note: expanded from macro '__SPIN_LOCK_INITIALIZER' 38 | { { .rlock = ___SPIN_LOCK_INITIALIZER(lockname) } } | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/spinlock_types.h:33:14: note: expanded from macro '___SPIN_LOCK_INITIALIZER' 33 | .raw_lock = __ARCH_SPIN_LOCK_UNLOCKED, \ | ^~~~~~~~~~~~~~~~~~~~~~~~~ include/asm-generic/qspinlock_types.h:49:37: note: expanded from macro '__ARCH_SPIN_LOCK_UNLOCKED' 49 | #define __ARCH_SPIN_LOCK_UNLOCKED { { .val = ATOMIC_INIT(0) } } | ^~~~~~~~~~~~~~~~~~~~~~~~~ 8 warnings and 1 error generated. .. vim +/arch_spin_is_locked +144 include/asm-generic/qspinlock.h 2aa79af6426319 Peter Zijlstra (Intel 2015-04-24 138) ab83647fadae2f Alexandre Ghiti 2024-11-03 139 #ifndef __no_arch_spinlock_redefine a33fda35e3a765 Waiman Long 2015-04-24 140 /* a33fda35e3a765 Waiman Long 2015-04-24 141 * Remapping spinlock architecture specific functions to the corresponding a33fda35e3a765 Waiman Long 2015-04-24 142 * queued spinlock functions. a33fda35e3a765 Waiman Long 2015-04-24 143 */ a33fda35e3a765 Waiman Long 2015-04-24 @144 #define arch_spin_is_locked(l) queued_spin_is_locked(l) a33fda35e3a765 Waiman Long 2015-04-24 @145 #define arch_spin_is_contended(l) queued_spin_is_contended(l) a33fda35e3a765 Waiman Long 2015-04-24 146 #define arch_spin_value_unlocked(l) queued_spin_value_unlocked(l) a33fda35e3a765 Waiman Long 2015-04-24 @147 #define arch_spin_lock(l) queued_spin_lock(l) a33fda35e3a765 Waiman Long 2015-04-24 @148 #define arch_spin_trylock(l) queued_spin_trylock(l) a33fda35e3a765 Waiman Long 2015-04-24 @149 #define arch_spin_unlock(l) queued_spin_unlock(l) ab83647fadae2f Alexandre Ghiti 2024-11-03 150 #endif a33fda35e3a765 Waiman Long 2015-04-24 151
diff --git a/include/asm-generic/rqspinlock.h b/include/asm-generic/rqspinlock.h index 53be8426373c..22f8770f033b 100644 --- a/include/asm-generic/rqspinlock.h +++ b/include/asm-generic/rqspinlock.h @@ -14,6 +14,10 @@ #include <linux/percpu.h> #include <asm/qspinlock.h> +struct bpf_res_spin_lock { + u32 val; +}; + struct qspinlock; typedef struct qspinlock rqspinlock_t; diff --git a/include/linux/bpf.h b/include/linux/bpf.h index feda0ce90f5a..f93a4f40aaaf 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -30,6 +30,7 @@ #include <linux/static_call.h> #include <linux/memcontrol.h> #include <linux/cfi.h> +#include <asm/rqspinlock.h> struct bpf_verifier_env; struct bpf_verifier_log; diff --git a/kernel/locking/rqspinlock.c b/kernel/locking/rqspinlock.c index 9d3036f5e613..2c6293d1298c 100644 --- a/kernel/locking/rqspinlock.c +++ b/kernel/locking/rqspinlock.c @@ -15,6 +15,8 @@ #include <linux/smp.h> #include <linux/bug.h> +#include <linux/bpf.h> +#include <linux/err.h> #include <linux/cpumask.h> #include <linux/percpu.h> #include <linux/hardirq.h> @@ -644,3 +646,79 @@ int __lockfunc resilient_queued_spin_lock_slowpath(struct qspinlock *lock, u32 v return ret; } EXPORT_SYMBOL(resilient_queued_spin_lock_slowpath); + +__bpf_kfunc_start_defs(); + +#define REPORT_STR(ret) ({ ret == -ETIMEDOUT ? "Timeout detected" : "AA or ABBA deadlock detected"; }) + +__bpf_kfunc int bpf_res_spin_lock(struct bpf_res_spin_lock *lock) +{ + int ret; + + BUILD_BUG_ON(sizeof(struct qspinlock) != sizeof(struct bpf_res_spin_lock)); + BUILD_BUG_ON(__alignof__(struct qspinlock) != __alignof__(struct bpf_res_spin_lock)); + + preempt_disable(); + ret = res_spin_lock((struct qspinlock *)lock); + if (unlikely(ret)) { + preempt_enable(); + rqspinlock_report_violation(REPORT_STR(ret), lock); + return ret; + } + return 0; +} + +__bpf_kfunc void bpf_res_spin_unlock(struct bpf_res_spin_lock *lock) +{ + res_spin_unlock((struct qspinlock *)lock); + preempt_enable(); +} + +__bpf_kfunc int bpf_res_spin_lock_irqsave(struct bpf_res_spin_lock *lock, unsigned long *flags__irq_flag) +{ + u64 *ptr = (u64 *)flags__irq_flag; + unsigned long flags; + int ret; + + preempt_disable(); + local_irq_save(flags); + ret = res_spin_lock((struct qspinlock *)lock); + if (unlikely(ret)) { + local_irq_restore(flags); + preempt_enable(); + rqspinlock_report_violation(REPORT_STR(ret), lock); + return ret; + } + *ptr = flags; + return 0; +} + +__bpf_kfunc void bpf_res_spin_unlock_irqrestore(struct bpf_res_spin_lock *lock, unsigned long *flags__irq_flag) +{ + u64 *ptr = (u64 *)flags__irq_flag; + unsigned long flags = *ptr; + + res_spin_unlock((struct qspinlock *)lock); + local_irq_restore(flags); + preempt_enable(); +} + +__bpf_kfunc_end_defs(); + +BTF_KFUNCS_START(rqspinlock_kfunc_ids) +BTF_ID_FLAGS(func, bpf_res_spin_lock, KF_RET_NULL) +BTF_ID_FLAGS(func, bpf_res_spin_unlock) +BTF_ID_FLAGS(func, bpf_res_spin_lock_irqsave, KF_RET_NULL) +BTF_ID_FLAGS(func, bpf_res_spin_unlock_irqrestore) +BTF_KFUNCS_END(rqspinlock_kfunc_ids) + +static const struct btf_kfunc_id_set rqspinlock_kfunc_set = { + .owner = THIS_MODULE, + .set = &rqspinlock_kfunc_ids, +}; + +static __init int rqspinlock_register_kfuncs(void) +{ + return register_btf_kfunc_id_set(BPF_PROG_TYPE_UNSPEC, &rqspinlock_kfunc_set); +} +late_initcall(rqspinlock_register_kfuncs);
Introduce four new kfuncs, bpf_res_spin_lock, and bpf_res_spin_unlock, and their irqsave/irqrestore variants, which wrap the rqspinlock APIs. bpf_res_spin_lock returns a conditional result, depending on whether the lock was acquired (NULL is returned when lock acquisition succeeds, non-NULL upon failure). The memory pointed to by the returned pointer upon failure can be dereferenced after the NULL check to obtain the error code. Instead of using the old bpf_spin_lock type, introduce a new type with the same layout, and the same alignment, but a different name to avoid type confusion. Preemption is disabled upon successful lock acquisition, however IRQs are not. Special kfuncs can be introduced later to allow disabling IRQs when taking a spin lock. Resilient locks are safe against AA deadlocks, hence not disabling IRQs currently does not allow violation of kernel safety. __irq_flag annotation is used to accept IRQ flags for the IRQ-variants, with the same semantics as existing bpf_local_irq_{save, restore}. These kfuncs will require additional verifier-side support in subsequent commits, to allow programs to hold multiple locks at the same time. Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com> --- include/asm-generic/rqspinlock.h | 4 ++ include/linux/bpf.h | 1 + kernel/locking/rqspinlock.c | 78 ++++++++++++++++++++++++++++++++ 3 files changed, 83 insertions(+)