[anna-nfs:linux-next 21/23] ld.lld: error: failed to open net/mac80211/mac80211.o: Cannot allocate memory
by kbuild test robot
TO: Chuck Lever <chuck.lever(a)oracle.com>
CC: Anna Schumaker <Anna.Schumaker(a)Netapp.com>
tree: git://git.linux-nfs.org/projects/anna/linux-nfs.git linux-next
head: 65b17cd79c61458fa1bdf50b9b6aee876c87a19c
commit: 56ceffbbb842795653eb51e1d724fa531a02bbc3 [21/23] NFS: Trace short NFS READs
config: x86_64-randconfig-a011-20200519 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project e6658079aca6d971b4e9d7137a3a2ecbc9c34aec)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 56ceffbbb842795653eb51e1d724fa531a02bbc3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
>> ld.lld: error: failed to open net/mac80211/mac80211.o: Cannot allocate memory
#0 0x000055ac2d0b24ea llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/opt/cross/clang-e6658079ac/bin/lld+0x8a44ea)
#1 0x000055ac2d0b0425 llvm::sys::RunSignalHandlers() (/opt/cross/clang-e6658079ac/bin/lld+0x8a2425)
#2 0x000055ac2d0b0542 SignalHandler(int) (/opt/cross/clang-e6658079ac/bin/lld+0x8a2542)
#3 0x00007f627e031110 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14110)
#4 0x00007f627db57781 raise (/lib/x86_64-linux-gnu/libc.so.6+0x3b781)
#5 0x00007f627db4155b abort (/lib/x86_64-linux-gnu/libc.so.6+0x2555b)
#6 0x00007f627deda80c (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x9a80c)
#7 0x00007f627dee58f6 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xa58f6)
#8 0x00007f627dee5961 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xa5961)
#9 0x00007f627dee5bf5 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xa5bf5)
#10 0x00007f627dedd478 std::__throw_system_error(int) (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0x9d478)
#11 0x00007f627df0ee69 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xcee69)
#12 0x000055ac2f97e874 std::thread::_State_impl<std::_Bind_simple<llvm::parallel::detail::(anonymous namespace)::ThreadPoolExecutor::ThreadPoolExecutor(llvm::ThreadPoolStrategy)::'lambda'() ()> >::_M_run() (/opt/cross/clang-e6658079ac/bin/lld+0x3170874)
#13 0x00007f627df0ebe0 (/usr/lib/x86_64-linux-gnu/libstdc++.so.6+0xcebe0)
#14 0x00007f627e025f27 start_thread (/lib/x86_64-linux-gnu/libpthread.so.0+0x8f27)
#15 0x00007f627dc1931f clone (/lib/x86_64-linux-gnu/libc.so.6+0xfd31f)
/bin/bash: line 1: 54622 Aborted ld.lld -m elf_x86_64 -z max-page-size=0x200000 -r -o net/mac80211/mac80211.o net/mac80211/main.o net/mac80211/status.o net/mac80211/driver-ops.o net/mac80211/sta_info.o net/mac80211/wep.o net/mac80211/aead_api.o net/mac80211/wpa.o net/mac80211/scan.o net/mac80211/offchannel.o net/mac80211/ht.o net/mac80211/agg-tx.o net/mac80211/agg-rx.o net/mac80211/vht.o net/mac80211/he.o net/mac80211/ibss.o net/mac80211/iface.o net/mac80211/rate.o net/mac80211/michael.o net/mac80211/tkip.o net/mac80211/aes_cmac.o net/mac80211/aes_gmac.o net/mac80211/fils_aead.o net/mac80211/cfg.o net/mac80211/ethtool.o net/mac80211/rx.o net/mac80211/spectmgmt.o net/mac80211/tx.o net/mac80211/key.o net/mac80211/util.o net/mac80211/wme.o net/mac80211/chan.o net/mac80211/trace.o net/mac80211/mlme.o net/mac80211/tdls.o net/mac80211/ocb.o net/mac80211/airtime.o net/mac80211/pm.o
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[linux-next:master 2551/10701] arch/x86/mm/init.c:79:22: warning: no previous prototype for 'pgprot2cachemode'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb57b1fabcb28f358901b2df90abd2b48abc1ca8
commit: 7fa3e10f0f3646108a1018004d0f571c3222dc9f [2551/10701] x86/mm: Move pgprot2cachemode out of line
config: i386-randconfig-r015-20200519 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout 7fa3e10f0f3646108a1018004d0f571c3222dc9f
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
arch/x86/mm/init.c:74:6: warning: no previous prototype for 'x86_has_pat_wp' [-Wmissing-prototypes]
bool x86_has_pat_wp(void)
^~~~~~~~~~~~~~
>> arch/x86/mm/init.c:79:22: warning: no previous prototype for 'pgprot2cachemode' [-Wmissing-prototypes]
enum page_cache_mode pgprot2cachemode(pgprot_t pgprot)
^~~~~~~~~~~~~~~~
arch/x86/mm/init.c:484:21: warning: no previous prototype for 'init_memory_mapping' [-Wmissing-prototypes]
unsigned long __ref init_memory_mapping(unsigned long start,
^~~~~~~~~~~~~~~~~~~
arch/x86/mm/init.c:726:13: warning: no previous prototype for 'poking_init' [-Wmissing-prototypes]
void __init poking_init(void)
^~~~~~~~~~~
arch/x86/mm/init.c:875:13: warning: no previous prototype for 'mem_encrypt_free_decrypted_mem' [-Wmissing-prototypes]
void __weak mem_encrypt_free_decrypted_mem(void) { }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/pgprot2cachemode +79 arch/x86/mm/init.c
78
> 79 enum page_cache_mode pgprot2cachemode(pgprot_t pgprot)
80 {
81 unsigned long masked;
82
83 masked = pgprot_val(pgprot) & _PAGE_CACHE_MASK;
84 if (likely(masked == 0))
85 return 0;
86 return __pte2cachemode_tbl[__pte2cm_idx(masked)];
87 }
88
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[lpieralisi:for-review/acpi-iort-id-rework 12/12] drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c:35:4: error: implicit declaration of function 'iort_msi_map_id'; did you mean 'iort_msi_map_rid'?
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git for-review/acpi-iort-id-rework
head: b2a8809a420d6d12a92d54c343c360ead32af752
commit: b2a8809a420d6d12a92d54c343c360ead32af752 [12/12] bus: fsl-mc: Add ACPI support for fsl-mc
config: arm-allyesconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b2a8809a420d6d12a92d54c343c360ead32af752
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c: In function 'fsl_mc_msi_domain_get_msi_id':
>> drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c:35:4: error: implicit declaration of function 'iort_msi_map_id'; did you mean 'iort_msi_map_rid'? [-Werror=implicit-function-declaration]
35 | iort_msi_map_id(&mc_dev->dev, mc_dev->icid);
| ^~~~~~~~~~~~~~~
| iort_msi_map_rid
drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c: At top level:
drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c:108:33: warning: 'union acpi_subtable_headers' declared inside parameter list will not be visible outside of this definition or declaration
108 | its_fsl_mc_msi_parse_madt(union acpi_subtable_headers *header,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c: In function 'its_fsl_mc_acpi_msi_init':
drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c:138:2: error: implicit declaration of function 'acpi_table_parse_madt'; did you mean 'acpi_table_parse'? [-Werror=implicit-function-declaration]
138 | acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR,
| ^~~~~~~~~~~~~~~~~~~~~
| acpi_table_parse
cc1: some warnings being treated as errors
vim +35 drivers/irqchip/irq-gic-v3-its-fsl-mc-msi.c
26
27 static u32 fsl_mc_msi_domain_get_msi_id(struct irq_domain *domain,
28 struct fsl_mc_device *mc_dev)
29 {
30 struct device_node *of_node;
31 u32 out_id;
32
33 of_node = irq_domain_get_of_node(domain);
34 out_id = of_node ? of_msi_map_id(&mc_dev->dev, of_node, mc_dev->icid) :
> 35 iort_msi_map_id(&mc_dev->dev, mc_dev->icid);
36
37 return out_id;
38 }
39
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCHv2 4/5] Input: EXC3000: Add support to query model and fw_version
by kbuild test robot
Hi Sebastian,
I love your patch! Yet something to improve:
[auto build test ERROR on input/next]
[also build test ERROR on v5.7-rc6 next-20200519]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Sebastian-Reichel/EXC3000-Update...
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
In file included from include/linux/kobject.h:20,
from include/linux/device.h:17,
from drivers/input/touchscreen/exc3000.c:11:
>> drivers/input/touchscreen/exc3000.c:252:23: error: initialization of 'ssize_t (*)(struct device *, struct device_attribute *, char *)' {aka 'long int (*)(struct device *, struct device_attribute *, char *)'} from incompatible pointer type 'int (*)(struct device *, struct device_attribute *, char *)' [-Werror=incompatible-pointer-types]
252 | static DEVICE_ATTR_RO(fw_version);
| ^~~~~~~~~~
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
117 | .show = _name##_show, | ^~~~~
drivers/input/touchscreen/exc3000.c:252:8: note: in expansion of macro 'DEVICE_ATTR_RO'
252 | static DEVICE_ATTR_RO(fw_version);
| ^~~~~~~~~~~~~~
drivers/input/touchscreen/exc3000.c:252:23: note: (near initialization for 'dev_attr_fw_version.show')
252 | static DEVICE_ATTR_RO(fw_version);
| ^~~~~~~~~~
include/linux/sysfs.h:117:10: note: in definition of macro '__ATTR_RO'
117 | .show = _name##_show, | ^~~~~
drivers/input/touchscreen/exc3000.c:252:8: note: in expansion of macro 'DEVICE_ATTR_RO'
252 | static DEVICE_ATTR_RO(fw_version);
| ^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +252 drivers/input/touchscreen/exc3000.c
222
223 static int fw_version_show(struct device *dev,
224 struct device_attribute *attr, char *buf)
225 {
226 struct exc3000_data *data = dev_get_drvdata(dev);
227 static const u8 request[68] = {
228 0x67, 0x00, 0x42, 0x00, 0x03, 0x01, 'D', 0x00
229 };
230 struct i2c_client *client = data->client;
231 int err;
232
233 mutex_lock(&data->query_lock);
234
235 data->query_result = -ETIMEDOUT;
236 reinit_completion(&data->wait_event);
237
238 err = i2c_master_send(client, request, sizeof(request));
239 if (err < 0) {
240 mutex_unlock(&data->query_lock);
241 return err;
242 }
243
244 wait_for_completion_interruptible_timeout(&data->wait_event, 1*HZ);
245 mutex_unlock(&data->query_lock);
246
247 if (data->query_result < 0)
248 return data->query_result;
249
250 return sprintf(buf, "%s\n", data->fw_version);
251 }
> 252 static DEVICE_ATTR_RO(fw_version);
253
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[shenki:microwatt-5.7 2/8] arch/powerpc/platforms/microwatt/setup.c:107:6: warning: no previous prototype for 'potato_uart_init'
by kbuild test robot
tree: https://github.com/shenki/linux microwatt-5.7
head: fdd5f44ff5120ffb3fe90c60f8f47dfd95139982
commit: 2472f2bbb237abeff9551c09d8764ac7daa8b8cd [2/8] powerpc/microwatt: Add early debug UART support for Microwatt
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 2472f2bbb237abeff9551c09d8764ac7daa8b8cd
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> arch/powerpc/platforms/microwatt/setup.c:107:6: warning: no previous prototype for 'potato_uart_init' [-Wmissing-prototypes]
107 | void potato_uart_init(void)
| ^~~~~~~~~~~~~~~~
vim +/potato_uart_init +107 arch/powerpc/platforms/microwatt/setup.c
106
> 107 void potato_uart_init(void)
108 {
109 potato_uart_base = UART_BASE;
110
111 potato_uart_reg_write(POTATO_CONSOLE_CLOCK_DIV, potato_uart_divisor(PROC_FREQ, UART_FREQ));
112 }
113
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
Re: [PATCH 1/2] optee: do drivers initialization before and after tee-supplicant run
by kbuild test robot
Hi Maxim,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on linus/master v5.7-rc6 next-20200519]
[cannot apply to linux/master]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Maxim-Uvarov/optee-register-driv...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 57c76221d5af648c8355a55c09b050c5d8d38189
config: arm64-randconfig-r026-20200519 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 135b877874fae96b4372c8a3fbfaa8ff44ff86e3)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> drivers/tee/optee/device.c:90:5: warning: no previous prototype for function '__optee_enumerate_devices' [-Wmissing-prototypes]
int __optee_enumerate_devices(u32 func)
^
drivers/tee/optee/device.c:90:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __optee_enumerate_devices(u32 func)
^
static
1 warning generated.
vim +/__optee_enumerate_devices +90 drivers/tee/optee/device.c
89
> 90 int __optee_enumerate_devices(u32 func)
91 {
92 const uuid_t pta_uuid =
93 UUID_INIT(0x7011a688, 0xddde, 0x4053,
94 0xa5, 0xa9, 0x7b, 0x3c, 0x4d, 0xdf, 0x13, 0xb8);
95 struct tee_ioctl_open_session_arg sess_arg;
96 struct tee_shm *device_shm = NULL;
97 const uuid_t *device_uuid = NULL;
98 struct tee_context *ctx = NULL;
99 u32 shm_size = 0, idx, num_devices = 0;
100 int rc;
101
102 memset(&sess_arg, 0, sizeof(sess_arg));
103
104 /* Open context with OP-TEE driver */
105 ctx = tee_client_open_context(NULL, optee_ctx_match, NULL, NULL);
106 if (IS_ERR(ctx))
107 return -ENODEV;
108
109 /* Open session with device enumeration pseudo TA */
110 memcpy(sess_arg.uuid, pta_uuid.b, TEE_IOCTL_UUID_LEN);
111 sess_arg.clnt_login = TEE_IOCTL_LOGIN_PUBLIC;
112 sess_arg.num_params = 0;
113
114 rc = tee_client_open_session(ctx, &sess_arg, NULL);
115 if ((rc < 0) || (sess_arg.ret != TEEC_SUCCESS)) {
116 /* Device enumeration pseudo TA not found */
117 rc = 0;
118 goto out_ctx;
119 }
120
121 rc = get_devices(ctx, sess_arg.session, NULL, &shm_size, func);
122 if (rc < 0 || !shm_size)
123 goto out_sess;
124
125 device_shm = tee_shm_alloc(ctx, shm_size,
126 TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
127 if (IS_ERR(device_shm)) {
128 pr_err("tee_shm_alloc failed\n");
129 rc = PTR_ERR(device_shm);
130 goto out_sess;
131 }
132
133 rc = get_devices(ctx, sess_arg.session, device_shm, &shm_size, func);
134 if (rc < 0)
135 goto out_shm;
136
137 device_uuid = tee_shm_get_va(device_shm, 0);
138 if (IS_ERR(device_uuid)) {
139 pr_err("tee_shm_get_va failed\n");
140 rc = PTR_ERR(device_uuid);
141 goto out_shm;
142 }
143
144 num_devices = shm_size / sizeof(uuid_t);
145
146 for (idx = 0; idx < num_devices; idx++) {
147 rc = optee_register_device(&device_uuid[idx], idx);
148 if (rc)
149 goto out_shm;
150 }
151
152 out_shm:
153 tee_shm_free(device_shm);
154 out_sess:
155 tee_client_close_session(ctx, sess_arg.session);
156 out_ctx:
157 tee_client_close_context(ctx);
158
159 return rc;
160 }
161
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[hnaz-linux-mm:master 177/523] arch/arc/mm/init.c:80:6: warning: no previous prototype for 'arch_has_descending_max_zone_pfns'
by kbuild test robot
tree: https://github.com/hnaz/linux-mm master
head: 2bbf0589bfeb27800c730b76eacf34528eee5418
commit: 3ae9a28a04fa372644c181c9419b3312efe55d77 [177/523] mm: free_area_init: allow defining max_zone_pfn in descending order
config: arc-defconfig (attached as .config)
compiler: arc-elf-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 3ae9a28a04fa372644c181c9419b3312efe55d77
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
arch/arc/mm/init.c:39:13: warning: no previous prototype for 'arc_get_mem_sz' [-Wmissing-prototypes]
39 | long __init arc_get_mem_sz(void)
| ^~~~~~~~~~~~~~
>> arch/arc/mm/init.c:80:6: warning: no previous prototype for 'arch_has_descending_max_zone_pfns' [-Wmissing-prototypes]
80 | bool arch_has_descending_max_zone_pfns(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/arc/mm/init.c:91:13: warning: no previous prototype for 'setup_arch_memory' [-Wmissing-prototypes]
91 | void __init setup_arch_memory(void)
| ^~~~~~~~~~~~~~~~~
vim +/arch_has_descending_max_zone_pfns +80 arch/arc/mm/init.c
79
> 80 bool arch_has_descending_max_zone_pfns(void)
81 {
82 return true;
83 }
84
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[hnaz-linux-mm:master 380/523] arch/riscv/kernel/kgdb.c:47:5: warning: no previous prototype for 'decode_register_index'
by kbuild test robot
Hi Andrew,
First bad commit (maybe != root cause):
tree: https://github.com/hnaz/linux-mm master
head: 2bbf0589bfeb27800c730b76eacf34528eee5418
commit: 91cd0b1b65c463042fdeb4ab5ffcb64ae43179cf [380/523] linux-next-rejects
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 91cd0b1b65c463042fdeb4ab5ffcb64ae43179cf
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
>> arch/riscv/kernel/kgdb.c:47:5: warning: no previous prototype for 'decode_register_index' [-Wmissing-prototypes]
47 | int decode_register_index(unsigned long opcode, int offset)
| ^~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kernel/kgdb.c:52:5: warning: no previous prototype for 'decode_register_index_short' [-Wmissing-prototypes]
52 | int decode_register_index_short(unsigned long opcode, int offset)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kernel/kgdb.c:58:5: warning: no previous prototype for 'get_step_address' [-Wmissing-prototypes]
58 | int get_step_address(struct pt_regs *regs, unsigned long *next_addr)
| ^~~~~~~~~~~~~~~~
>> arch/riscv/kernel/kgdb.c:139:5: warning: no previous prototype for 'do_single_step' [-Wmissing-prototypes]
139 | int do_single_step(struct pt_regs *regs)
| ^~~~~~~~~~~~~~
>> arch/riscv/kernel/kgdb.c:276:6: warning: no previous prototype for 'kgdb_arch_handle_qxfer_pkt' [-Wmissing-prototypes]
276 | void kgdb_arch_handle_qxfer_pkt(char *remcom_in_buffer,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kernel/kgdb.c:323:5: warning: no previous prototype for 'kgdb_riscv_kgdbbreak' [-Wmissing-prototypes]
323 | int kgdb_riscv_kgdbbreak(unsigned long addr)
| ^~~~~~~~~~~~~~~~~~~~
In file included from arch/riscv/include/asm/kgdb.h:109,
from include/linux/kgdb.h:20,
from arch/riscv/kernel/kgdb.c:9:
arch/riscv/include/asm/gdb_xml.h:7:19: warning: 'riscv_gdb_stub_feature' defined but not used [-Wunused-const-variable=]
7 | static const char riscv_gdb_stub_feature[64] =
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/decode_register_index +47 arch/riscv/kernel/kgdb.c
7426ea952ca32f Andrew Morton 2020-05-16 46
7426ea952ca32f Andrew Morton 2020-05-16 @47 int decode_register_index(unsigned long opcode, int offset)
7426ea952ca32f Andrew Morton 2020-05-16 48 {
7426ea952ca32f Andrew Morton 2020-05-16 49 return (opcode >> offset) & 0x1F;
7426ea952ca32f Andrew Morton 2020-05-16 50 }
7426ea952ca32f Andrew Morton 2020-05-16 51
7426ea952ca32f Andrew Morton 2020-05-16 @52 int decode_register_index_short(unsigned long opcode, int offset)
7426ea952ca32f Andrew Morton 2020-05-16 53 {
7426ea952ca32f Andrew Morton 2020-05-16 54 return ((opcode >> offset) & 0x7) + 8;
7426ea952ca32f Andrew Morton 2020-05-16 55 }
7426ea952ca32f Andrew Morton 2020-05-16 56
7426ea952ca32f Andrew Morton 2020-05-16 57 /* Calculate the new address for after a step */
7426ea952ca32f Andrew Morton 2020-05-16 @58 int get_step_address(struct pt_regs *regs, unsigned long *next_addr)
7426ea952ca32f Andrew Morton 2020-05-16 59 {
7426ea952ca32f Andrew Morton 2020-05-16 60 unsigned long pc = regs->epc;
7426ea952ca32f Andrew Morton 2020-05-16 61 unsigned long *regs_ptr = (unsigned long *)regs;
7426ea952ca32f Andrew Morton 2020-05-16 62 unsigned int rs1_num, rs2_num;
7426ea952ca32f Andrew Morton 2020-05-16 63 int op_code;
7426ea952ca32f Andrew Morton 2020-05-16 64
7426ea952ca32f Andrew Morton 2020-05-16 65 if (probe_kernel_address((void *)pc, op_code))
7426ea952ca32f Andrew Morton 2020-05-16 66 return -EINVAL;
7426ea952ca32f Andrew Morton 2020-05-16 67 if ((op_code & __INSN_LENGTH_MASK) != __INSN_LENGTH_GE_32) {
7426ea952ca32f Andrew Morton 2020-05-16 68 if (is_c_jalr_insn(op_code) || is_c_jr_insn(op_code)) {
7426ea952ca32f Andrew Morton 2020-05-16 69 rs1_num = decode_register_index(op_code, RVC_C2_RS1_OPOFF);
7426ea952ca32f Andrew Morton 2020-05-16 70 *next_addr = regs_ptr[rs1_num];
7426ea952ca32f Andrew Morton 2020-05-16 71 } else if (is_c_j_insn(op_code) || is_c_jal_insn(op_code)) {
7426ea952ca32f Andrew Morton 2020-05-16 72 *next_addr = EXTRACT_RVC_J_IMM(op_code) + pc;
7426ea952ca32f Andrew Morton 2020-05-16 73 } else if (is_c_beqz_insn(op_code)) {
7426ea952ca32f Andrew Morton 2020-05-16 74 rs1_num = decode_register_index_short(op_code,
7426ea952ca32f Andrew Morton 2020-05-16 75 RVC_C1_RS1_OPOFF);
7426ea952ca32f Andrew Morton 2020-05-16 76 if (!rs1_num || regs_ptr[rs1_num] == 0)
7426ea952ca32f Andrew Morton 2020-05-16 77 *next_addr = EXTRACT_RVC_B_IMM(op_code) + pc;
7426ea952ca32f Andrew Morton 2020-05-16 78 else
7426ea952ca32f Andrew Morton 2020-05-16 79 *next_addr = pc + 2;
7426ea952ca32f Andrew Morton 2020-05-16 80 } else if (is_c_bnez_insn(op_code)) {
7426ea952ca32f Andrew Morton 2020-05-16 81 rs1_num =
7426ea952ca32f Andrew Morton 2020-05-16 82 decode_register_index_short(op_code, RVC_C1_RS1_OPOFF);
7426ea952ca32f Andrew Morton 2020-05-16 83 if (rs1_num && regs_ptr[rs1_num] != 0)
7426ea952ca32f Andrew Morton 2020-05-16 84 *next_addr = EXTRACT_RVC_B_IMM(op_code) + pc;
7426ea952ca32f Andrew Morton 2020-05-16 85 else
7426ea952ca32f Andrew Morton 2020-05-16 86 *next_addr = pc + 2;
7426ea952ca32f Andrew Morton 2020-05-16 87 } else {
7426ea952ca32f Andrew Morton 2020-05-16 88 *next_addr = pc + 2;
7426ea952ca32f Andrew Morton 2020-05-16 89 }
7426ea952ca32f Andrew Morton 2020-05-16 90 } else {
7426ea952ca32f Andrew Morton 2020-05-16 91 if ((op_code & __INSN_OPCODE_MASK) == __INSN_BRANCH_OPCODE) {
7426ea952ca32f Andrew Morton 2020-05-16 92 bool result = false;
7426ea952ca32f Andrew Morton 2020-05-16 93 long imm = EXTRACT_BTYPE_IMM(op_code);
7426ea952ca32f Andrew Morton 2020-05-16 94 unsigned long rs1_val = 0, rs2_val = 0;
7426ea952ca32f Andrew Morton 2020-05-16 95
7426ea952ca32f Andrew Morton 2020-05-16 96 rs1_num = decode_register_index(op_code, RVG_RS1_OPOFF);
7426ea952ca32f Andrew Morton 2020-05-16 97 rs2_num = decode_register_index(op_code, RVG_RS2_OPOFF);
7426ea952ca32f Andrew Morton 2020-05-16 98 if (rs1_num)
7426ea952ca32f Andrew Morton 2020-05-16 99 rs1_val = regs_ptr[rs1_num];
7426ea952ca32f Andrew Morton 2020-05-16 100 if (rs2_num)
7426ea952ca32f Andrew Morton 2020-05-16 101 rs2_val = regs_ptr[rs2_num];
7426ea952ca32f Andrew Morton 2020-05-16 102
7426ea952ca32f Andrew Morton 2020-05-16 103 if (is_beq_insn(op_code))
7426ea952ca32f Andrew Morton 2020-05-16 104 result = (rs1_val == rs2_val) ? true : false;
7426ea952ca32f Andrew Morton 2020-05-16 105 else if (is_bne_insn(op_code))
7426ea952ca32f Andrew Morton 2020-05-16 106 result = (rs1_val != rs2_val) ? true : false;
7426ea952ca32f Andrew Morton 2020-05-16 107 else if (is_blt_insn(op_code))
7426ea952ca32f Andrew Morton 2020-05-16 108 result =
7426ea952ca32f Andrew Morton 2020-05-16 109 ((long)rs1_val <
7426ea952ca32f Andrew Morton 2020-05-16 110 (long)rs2_val) ? true : false;
7426ea952ca32f Andrew Morton 2020-05-16 111 else if (is_bge_insn(op_code))
7426ea952ca32f Andrew Morton 2020-05-16 112 result =
7426ea952ca32f Andrew Morton 2020-05-16 113 ((long)rs1_val >=
7426ea952ca32f Andrew Morton 2020-05-16 114 (long)rs2_val) ? true : false;
7426ea952ca32f Andrew Morton 2020-05-16 115 else if (is_bltu_insn(op_code))
7426ea952ca32f Andrew Morton 2020-05-16 116 result = (rs1_val < rs2_val) ? true : false;
7426ea952ca32f Andrew Morton 2020-05-16 117 else if (is_bgeu_insn(op_code))
7426ea952ca32f Andrew Morton 2020-05-16 118 result = (rs1_val >= rs2_val) ? true : false;
7426ea952ca32f Andrew Morton 2020-05-16 119 if (result)
7426ea952ca32f Andrew Morton 2020-05-16 120 *next_addr = imm + pc;
7426ea952ca32f Andrew Morton 2020-05-16 121 else
7426ea952ca32f Andrew Morton 2020-05-16 122 *next_addr = pc + 4;
7426ea952ca32f Andrew Morton 2020-05-16 123 } else if (is_jal_insn(op_code)) {
7426ea952ca32f Andrew Morton 2020-05-16 124 *next_addr = EXTRACT_JTYPE_IMM(op_code) + pc;
7426ea952ca32f Andrew Morton 2020-05-16 125 } else if (is_jalr_insn(op_code)) {
7426ea952ca32f Andrew Morton 2020-05-16 126 rs1_num = decode_register_index(op_code, RVG_RS1_OPOFF);
7426ea952ca32f Andrew Morton 2020-05-16 127 if (rs1_num)
7426ea952ca32f Andrew Morton 2020-05-16 128 *next_addr = ((unsigned long *)regs)[rs1_num];
7426ea952ca32f Andrew Morton 2020-05-16 129 *next_addr += EXTRACT_ITYPE_IMM(op_code);
7426ea952ca32f Andrew Morton 2020-05-16 130 } else if (is_sret_insn(op_code)) {
7426ea952ca32f Andrew Morton 2020-05-16 131 *next_addr = pc;
7426ea952ca32f Andrew Morton 2020-05-16 132 } else {
7426ea952ca32f Andrew Morton 2020-05-16 133 *next_addr = pc + 4;
7426ea952ca32f Andrew Morton 2020-05-16 134 }
7426ea952ca32f Andrew Morton 2020-05-16 135 }
7426ea952ca32f Andrew Morton 2020-05-16 136 return 0;
7426ea952ca32f Andrew Morton 2020-05-16 137 }
7426ea952ca32f Andrew Morton 2020-05-16 138
7426ea952ca32f Andrew Morton 2020-05-16 @139 int do_single_step(struct pt_regs *regs)
7426ea952ca32f Andrew Morton 2020-05-16 140 {
7426ea952ca32f Andrew Morton 2020-05-16 141 /* Determine where the target instruction will send us to */
7426ea952ca32f Andrew Morton 2020-05-16 142 unsigned long addr = 0;
7426ea952ca32f Andrew Morton 2020-05-16 143 int error = get_step_address(regs, &addr);
7426ea952ca32f Andrew Morton 2020-05-16 144
7426ea952ca32f Andrew Morton 2020-05-16 145 if (error)
7426ea952ca32f Andrew Morton 2020-05-16 146 return error;
7426ea952ca32f Andrew Morton 2020-05-16 147
7426ea952ca32f Andrew Morton 2020-05-16 148 /* Store the op code in the stepped address */
7426ea952ca32f Andrew Morton 2020-05-16 149 error = probe_kernel_address((void *)addr, stepped_opcode);
7426ea952ca32f Andrew Morton 2020-05-16 150 if (error)
7426ea952ca32f Andrew Morton 2020-05-16 151 return error;
7426ea952ca32f Andrew Morton 2020-05-16 152
7426ea952ca32f Andrew Morton 2020-05-16 153 stepped_address = addr;
7426ea952ca32f Andrew Morton 2020-05-16 154
7426ea952ca32f Andrew Morton 2020-05-16 155 /* Replace the op code with the break instruction */
7426ea952ca32f Andrew Morton 2020-05-16 156 error = probe_kernel_write((void *)stepped_address,
7426ea952ca32f Andrew Morton 2020-05-16 157 arch_kgdb_ops.gdb_bpt_instr,
7426ea952ca32f Andrew Morton 2020-05-16 158 BREAK_INSTR_SIZE);
7426ea952ca32f Andrew Morton 2020-05-16 159 /* Flush and return */
7426ea952ca32f Andrew Morton 2020-05-16 160 if (!error) {
7426ea952ca32f Andrew Morton 2020-05-16 161 flush_icache_range(addr, addr + BREAK_INSTR_SIZE);
7426ea952ca32f Andrew Morton 2020-05-16 162 kgdb_single_step = 1;
7426ea952ca32f Andrew Morton 2020-05-16 163 atomic_set(&kgdb_cpu_doing_single_step,
7426ea952ca32f Andrew Morton 2020-05-16 164 raw_smp_processor_id());
7426ea952ca32f Andrew Morton 2020-05-16 165 } else {
7426ea952ca32f Andrew Morton 2020-05-16 166 stepped_address = 0;
7426ea952ca32f Andrew Morton 2020-05-16 167 stepped_opcode = 0;
7426ea952ca32f Andrew Morton 2020-05-16 168 }
7426ea952ca32f Andrew Morton 2020-05-16 169 return error;
7426ea952ca32f Andrew Morton 2020-05-16 170 }
7426ea952ca32f Andrew Morton 2020-05-16 171
:::::: The code at line 47 was first introduced by commit
:::::: 7426ea952ca32fa58beff5efbbc8ee0d8f84aadc linux-next
:::::: TO: Andrew Morton <akpm(a)linux-foundation.org>
:::::: CC: Johannes Weiner <hannes(a)cmpxchg.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months
[lpieralisi:for-review/acpi-iort-id-rework 8/12] include/linux/bit_spinlock.h:27:9: sparse: sparse: Trying to use reserved word 'while' as identifier
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git for-review/acpi-iort-id-rework
head: b2a8809a420d6d12a92d54c343c360ead32af752
commit: 6b448905a263276e5f0b1f6c677425049c729270 [8/12] of/irq: make of_msi_map_get_device_domain() bus agnostic
config: x86_64-randconfig-s002-20200519 (attached as .config)
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-193-gb8fad4bc-dirty
git checkout 6b448905a263276e5f0b1f6c677425049c729270
# save the attached .config to linux build tree
make C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
include/linux/of_irq.h:89:1: sparse: sparse: missing identifier in declaration
include/linux/of_irq.h:89:1: sparse: sparse: Expected ; at the end of type declaration
include/linux/of_irq.h:89:1: sparse: sparse: got {
include/linux/of_irq.h:91:1: sparse: sparse: Expected ; at the end of type declaration
include/linux/of_irq.h:91:1: sparse: sparse: got }
include/linux/of_irq.h:99:1: sparse: sparse: Expected ; at the end of type declaration
include/linux/of_irq.h:99:1: sparse: sparse: got }
include/linux/of_irq.h:115:1: sparse: sparse: Expected ; at the end of type declaration
include/linux/of_irq.h:115:1: sparse: sparse: got }
include/linux/bit_spinlock.h:25:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:25:9: sparse: sparse: got }
include/linux/bit_spinlock.h:27:16: sparse: sparse: Expected ) in function declarator
include/linux/bit_spinlock.h:27:16: sparse: sparse: got (
>> include/linux/bit_spinlock.h:27:9: sparse: sparse: Trying to use reserved word 'while' as identifier
include/linux/bit_spinlock.h:28:17: sparse: sparse: Expected ) in function declarator
include/linux/bit_spinlock.h:28:17: sparse: sparse: got (
>> include/linux/bit_spinlock.h:28:17: sparse: sparse: Trying to use reserved word 'if' as identifier
include/linux/bit_spinlock.h:28:17: sparse: sparse: Expected ) in function declarator
include/linux/bit_spinlock.h:28:17: sparse: sparse: got 0
include/linux/bit_spinlock.h:28:17: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:28:17: sparse: sparse: got }
include/linux/bit_spinlock.h:28:17: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:28:17: sparse: sparse: got }
>> include/linux/bit_spinlock.h:29:17: sparse: sparse: Trying to use reserved word 'do' as identifier
include/linux/bit_spinlock.h:29:20: sparse: sparse: Expected ; at end of declaration
include/linux/bit_spinlock.h:29:20: sparse: sparse: got {
include/linux/bit_spinlock.h:31:17: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:31:17: sparse: sparse: got }
include/linux/bit_spinlock.h:32:17: sparse: sparse: Trying to use reserved word 'do' as identifier
include/linux/bit_spinlock.h:32:17: sparse: sparse: Expected ; at end of declaration
include/linux/bit_spinlock.h:32:17: sparse: sparse: got {
include/linux/bit_spinlock.h:32:17: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:32:17: sparse: sparse: got }
include/linux/bit_spinlock.h:33:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:33:9: sparse: sparse: got }
include/linux/bit_spinlock.h:36:1: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:36:1: sparse: sparse: got }
include/linux/bit_spinlock.h:43:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:43:9: sparse: sparse: got }
include/linux/bit_spinlock.h:45:13: sparse: sparse: Expected ) in function declarator
include/linux/bit_spinlock.h:45:13: sparse: sparse: got (
include/linux/bit_spinlock.h:45:9: sparse: sparse: Trying to use reserved word 'if' as identifier
include/linux/bit_spinlock.h:46:17: sparse: sparse: Expected ) in function declarator
include/linux/bit_spinlock.h:46:17: sparse: sparse: got (
include/linux/bit_spinlock.h:46:17: sparse: sparse: Trying to use reserved word 'if' as identifier
include/linux/bit_spinlock.h:46:17: sparse: sparse: Expected ) in function declarator
include/linux/bit_spinlock.h:46:17: sparse: sparse: got 0
include/linux/bit_spinlock.h:46:17: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:46:17: sparse: sparse: got }
include/linux/bit_spinlock.h:46:17: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:46:17: sparse: sparse: got }
>> include/linux/bit_spinlock.h:47:17: sparse: sparse: Trying to use reserved word 'return' as identifier
include/linux/bit_spinlock.h:47:24: sparse: sparse: Expected ; at end of declaration
include/linux/bit_spinlock.h:47:24: sparse: sparse: got 0
include/linux/bit_spinlock.h:48:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:48:9: sparse: sparse: got }
include/linux/bit_spinlock.h:51:9: sparse: sparse: Trying to use reserved word 'return' as identifier
include/linux/bit_spinlock.h:51:16: sparse: sparse: Expected ; at end of declaration
include/linux/bit_spinlock.h:51:16: sparse: sparse: got 1
include/linux/bit_spinlock.h:52:1: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:52:1: sparse: sparse: got }
include/linux/bit_spinlock.h:60:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:60:9: sparse: sparse: got }
include/linux/bit_spinlock.h:60:9: sparse: sparse: Trying to use reserved word 'do' as identifier
include/linux/bit_spinlock.h:60:9: sparse: sparse: Expected ; at end of declaration
include/linux/bit_spinlock.h:60:9: sparse: sparse: got {
include/linux/bit_spinlock.h:60:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:60:9: sparse: sparse: got }
include/linux/bit_spinlock.h:60:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:60:9: sparse: sparse: got }
include/linux/bit_spinlock.h:60:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:60:9: sparse: sparse: got }
include/linux/bit_spinlock.h:60:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:60:9: sparse: sparse: got }
include/linux/bit_spinlock.h:65:9: sparse: sparse: Trying to use reserved word 'do' as identifier
include/linux/bit_spinlock.h:65:9: sparse: sparse: Expected ; at end of declaration
include/linux/bit_spinlock.h:65:9: sparse: sparse: got {
include/linux/bit_spinlock.h:65:9: sparse: sparse: Expected ) in function declarator
include/linux/bit_spinlock.h:65:9: sparse: sparse: got (
include/linux/bit_spinlock.h:65:9: sparse: sparse: Trying to use reserved word 'if' as identifier
include/linux/bit_spinlock.h:65:9: sparse: sparse: Expected ) in function declarator
include/linux/bit_spinlock.h:65:9: sparse: sparse: got 0
include/linux/bit_spinlock.h:65:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:65:9: sparse: sparse: got }
include/linux/bit_spinlock.h:65:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:65:9: sparse: sparse: got }
include/linux/bit_spinlock.h:66:9: sparse: sparse: Expected ) in function declarator
include/linux/bit_spinlock.h:66:9: sparse: sparse: got ,
>> include/linux/bit_spinlock.h:66:9: sparse: sparse: Trying to use reserved word '__context__' as identifier
include/linux/bit_spinlock.h:67:1: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:67:1: sparse: sparse: got }
include/linux/bit_spinlock.h:77:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:77:9: sparse: sparse: got }
include/linux/bit_spinlock.h:77:9: sparse: sparse: Trying to use reserved word 'do' as identifier
include/linux/bit_spinlock.h:77:9: sparse: sparse: Expected ; at end of declaration
include/linux/bit_spinlock.h:77:9: sparse: sparse: got {
include/linux/bit_spinlock.h:77:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:77:9: sparse: sparse: got }
include/linux/bit_spinlock.h:77:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:77:9: sparse: sparse: got }
include/linux/bit_spinlock.h:77:9: sparse: sparse: Expected ; at the end of type declaration
include/linux/bit_spinlock.h:77:9: sparse: sparse: got }
>> include/linux/bit_spinlock.h:77:9: sparse: sparse: too many errors
vim +/while +27 include/linux/bit_spinlock.h
626d607435617c Nick Piggin 2011-01-07 9
fb1c8f93d869b3 Ingo Molnar 2005-09-10 10 /*
fb1c8f93d869b3 Ingo Molnar 2005-09-10 11 * bit-based spin_lock()
fb1c8f93d869b3 Ingo Molnar 2005-09-10 12 *
fb1c8f93d869b3 Ingo Molnar 2005-09-10 13 * Don't use this unless you really need to: spin_lock() and spin_unlock()
fb1c8f93d869b3 Ingo Molnar 2005-09-10 14 * are significantly faster.
fb1c8f93d869b3 Ingo Molnar 2005-09-10 15 */
fb1c8f93d869b3 Ingo Molnar 2005-09-10 16 static inline void bit_spin_lock(int bitnum, unsigned long *addr)
fb1c8f93d869b3 Ingo Molnar 2005-09-10 17 {
fb1c8f93d869b3 Ingo Molnar 2005-09-10 18 /*
fb1c8f93d869b3 Ingo Molnar 2005-09-10 19 * Assuming the lock is uncontended, this never enters
fb1c8f93d869b3 Ingo Molnar 2005-09-10 20 * the body of the outer loop. If it is contended, then
fb1c8f93d869b3 Ingo Molnar 2005-09-10 21 * within the inner loop a non-atomic test is used to
fb1c8f93d869b3 Ingo Molnar 2005-09-10 22 * busywait with less bus contention for a good time to
fb1c8f93d869b3 Ingo Molnar 2005-09-10 23 * attempt to acquire the lock bit.
fb1c8f93d869b3 Ingo Molnar 2005-09-10 24 */
fb1c8f93d869b3 Ingo Molnar 2005-09-10 25 preempt_disable();
fb1c8f93d869b3 Ingo Molnar 2005-09-10 26 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
b8dc93cbe91324 Nick Piggin 2007-10-18 @27 while (unlikely(test_and_set_bit_lock(bitnum, addr))) {
fb1c8f93d869b3 Ingo Molnar 2005-09-10 @28 preempt_enable();
3dd2ee4824b668 Linus Torvalds 2011-04-25 @29 do {
fb1c8f93d869b3 Ingo Molnar 2005-09-10 30 cpu_relax();
3dd2ee4824b668 Linus Torvalds 2011-04-25 31 } while (test_bit(bitnum, addr));
fb1c8f93d869b3 Ingo Molnar 2005-09-10 32 preempt_disable();
fb1c8f93d869b3 Ingo Molnar 2005-09-10 33 }
fb1c8f93d869b3 Ingo Molnar 2005-09-10 34 #endif
fb1c8f93d869b3 Ingo Molnar 2005-09-10 35 __acquire(bitlock);
fb1c8f93d869b3 Ingo Molnar 2005-09-10 36 }
fb1c8f93d869b3 Ingo Molnar 2005-09-10 37
fb1c8f93d869b3 Ingo Molnar 2005-09-10 38 /*
fb1c8f93d869b3 Ingo Molnar 2005-09-10 39 * Return true if it was acquired
fb1c8f93d869b3 Ingo Molnar 2005-09-10 40 */
fb1c8f93d869b3 Ingo Molnar 2005-09-10 41 static inline int bit_spin_trylock(int bitnum, unsigned long *addr)
fb1c8f93d869b3 Ingo Molnar 2005-09-10 42 {
fb1c8f93d869b3 Ingo Molnar 2005-09-10 43 preempt_disable();
fb1c8f93d869b3 Ingo Molnar 2005-09-10 44 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
b8dc93cbe91324 Nick Piggin 2007-10-18 45 if (unlikely(test_and_set_bit_lock(bitnum, addr))) {
fb1c8f93d869b3 Ingo Molnar 2005-09-10 46 preempt_enable();
fb1c8f93d869b3 Ingo Molnar 2005-09-10 @47 return 0;
fb1c8f93d869b3 Ingo Molnar 2005-09-10 48 }
fb1c8f93d869b3 Ingo Molnar 2005-09-10 49 #endif
fb1c8f93d869b3 Ingo Molnar 2005-09-10 50 __acquire(bitlock);
fb1c8f93d869b3 Ingo Molnar 2005-09-10 51 return 1;
fb1c8f93d869b3 Ingo Molnar 2005-09-10 52 }
fb1c8f93d869b3 Ingo Molnar 2005-09-10 53
fb1c8f93d869b3 Ingo Molnar 2005-09-10 54 /*
fb1c8f93d869b3 Ingo Molnar 2005-09-10 55 * bit-based spin_unlock()
fb1c8f93d869b3 Ingo Molnar 2005-09-10 56 */
fb1c8f93d869b3 Ingo Molnar 2005-09-10 57 static inline void bit_spin_unlock(int bitnum, unsigned long *addr)
fb1c8f93d869b3 Ingo Molnar 2005-09-10 58 {
b8dc93cbe91324 Nick Piggin 2007-10-18 59 #ifdef CONFIG_DEBUG_SPINLOCK
b8dc93cbe91324 Nick Piggin 2007-10-18 60 BUG_ON(!test_bit(bitnum, addr));
b8dc93cbe91324 Nick Piggin 2007-10-18 61 #endif
fb1c8f93d869b3 Ingo Molnar 2005-09-10 62 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
b8dc93cbe91324 Nick Piggin 2007-10-18 63 clear_bit_unlock(bitnum, addr);
b8dc93cbe91324 Nick Piggin 2007-10-18 64 #endif
b8dc93cbe91324 Nick Piggin 2007-10-18 65 preempt_enable();
b8dc93cbe91324 Nick Piggin 2007-10-18 @66 __release(bitlock);
b8dc93cbe91324 Nick Piggin 2007-10-18 67 }
b8dc93cbe91324 Nick Piggin 2007-10-18 68
b8dc93cbe91324 Nick Piggin 2007-10-18 69 /*
b8dc93cbe91324 Nick Piggin 2007-10-18 70 * bit-based spin_unlock()
b8dc93cbe91324 Nick Piggin 2007-10-18 71 * non-atomic version, which can be used eg. if the bit lock itself is
b8dc93cbe91324 Nick Piggin 2007-10-18 72 * protecting the rest of the flags in the word.
b8dc93cbe91324 Nick Piggin 2007-10-18 73 */
b8dc93cbe91324 Nick Piggin 2007-10-18 74 static inline void __bit_spin_unlock(int bitnum, unsigned long *addr)
b8dc93cbe91324 Nick Piggin 2007-10-18 75 {
b8dc93cbe91324 Nick Piggin 2007-10-18 76 #ifdef CONFIG_DEBUG_SPINLOCK
fb1c8f93d869b3 Ingo Molnar 2005-09-10 @77 BUG_ON(!test_bit(bitnum, addr));
b8dc93cbe91324 Nick Piggin 2007-10-18 78 #endif
b8dc93cbe91324 Nick Piggin 2007-10-18 79 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
b8dc93cbe91324 Nick Piggin 2007-10-18 80 __clear_bit_unlock(bitnum, addr);
fb1c8f93d869b3 Ingo Molnar 2005-09-10 81 #endif
fb1c8f93d869b3 Ingo Molnar 2005-09-10 82 preempt_enable();
fb1c8f93d869b3 Ingo Molnar 2005-09-10 83 __release(bitlock);
fb1c8f93d869b3 Ingo Molnar 2005-09-10 84 }
fb1c8f93d869b3 Ingo Molnar 2005-09-10 85
:::::: The code at line 27 was first introduced by commit
:::::: b8dc93cbe91324b922395919cd5df4cca2fe55f6 bit_spin_lock: use lock bitops
:::::: TO: Nick Piggin <npiggin(a)suse.de>
:::::: CC: Linus Torvalds <torvalds(a)woody.linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 4 months