crypto/aegis128-neon.c:17:6: warning: no previous prototype for 'crypto_aegis128_have_simd'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5695e51619745d4fe3ec2506a2f0cd982c5e27a4
commit: a4397635afea5d127548d64e0055ed471ef2d5be crypto: aegis128 - provide a SIMD implementation based on NEON intrinsics
date: 1 year, 6 months ago
config: arm64-randconfig-r035-20210226 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a4397635afea5d127548d64e0055ed471ef2d5be
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> crypto/aegis128-neon.c:17:6: warning: no previous prototype for 'crypto_aegis128_have_simd' [-Wmissing-prototypes]
17 | bool crypto_aegis128_have_simd(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
>> crypto/aegis128-neon.c:22:6: warning: no previous prototype for 'crypto_aegis128_update_simd' [-Wmissing-prototypes]
22 | void crypto_aegis128_update_simd(union aegis_block *state, const void *msg)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> crypto/aegis128-neon.c:29:6: warning: no previous prototype for 'crypto_aegis128_encrypt_chunk_simd' [-Wmissing-prototypes]
29 | void crypto_aegis128_encrypt_chunk_simd(union aegis_block *state, u8 *dst,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> crypto/aegis128-neon.c:37:6: warning: no previous prototype for 'crypto_aegis128_decrypt_chunk_simd' [-Wmissing-prototypes]
37 | void crypto_aegis128_decrypt_chunk_simd(union aegis_block *state, u8 *dst,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from crypto/aegis128-neon.c:9:
crypto/aegis.h:27:32: warning: 'crypto_aegis_const' defined but not used [-Wunused-const-variable=]
27 | static const union aegis_block crypto_aegis_const[2] = {
| ^~~~~~~~~~~~~~~~~~
--
>> crypto/aegis128-neon-inner.c:76:6: warning: no previous prototype for 'crypto_aegis128_update_neon' [-Wmissing-prototypes]
76 | void crypto_aegis128_update_neon(void *state, const void *msg)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> crypto/aegis128-neon-inner.c:85:6: warning: no previous prototype for 'crypto_aegis128_encrypt_chunk_neon' [-Wmissing-prototypes]
85 | void crypto_aegis128_encrypt_chunk_neon(void *state, void *dst, const void *src,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> crypto/aegis128-neon-inner.c:117:6: warning: no previous prototype for 'crypto_aegis128_decrypt_chunk_neon' [-Wmissing-prototypes]
117 | void crypto_aegis128_decrypt_chunk_neon(void *state, void *dst, const void *src,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +/crypto_aegis128_have_simd +17 crypto/aegis128-neon.c
10
11 void crypto_aegis128_update_neon(void *state, const void *msg);
12 void crypto_aegis128_encrypt_chunk_neon(void *state, void *dst, const void *src,
13 unsigned int size);
14 void crypto_aegis128_decrypt_chunk_neon(void *state, void *dst, const void *src,
15 unsigned int size);
16
> 17 bool crypto_aegis128_have_simd(void)
18 {
19 return cpu_have_feature(cpu_feature(AES));
20 }
21
> 22 void crypto_aegis128_update_simd(union aegis_block *state, const void *msg)
23 {
24 kernel_neon_begin();
25 crypto_aegis128_update_neon(state, msg);
26 kernel_neon_end();
27 }
28
> 29 void crypto_aegis128_encrypt_chunk_simd(union aegis_block *state, u8 *dst,
30 const u8 *src, unsigned int size)
31 {
32 kernel_neon_begin();
33 crypto_aegis128_encrypt_chunk_neon(state, dst, src, size);
34 kernel_neon_end();
35 }
36
> 37 void crypto_aegis128_decrypt_chunk_simd(union aegis_block *state, u8 *dst,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[linux-next:master 7714/11865] drivers/platform/x86/dell/dell-smbios-smm.c:27:35: warning: unused variable 'dell_device_table'
by kernel test robot
Hi Mario,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: abaf6f60176f1ae9d946d63e4db63164600b7b1a
commit: f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28 [7714/11865] platform/x86: Move all dell drivers to their own subdirectory
config: x86_64-randconfig-r014-20210220 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
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
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout f1e1ea516721d1ea0b21327ff9e6cb2c2bb86e28
# 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: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/platform/x86/dell/dell-smbios-smm.c:27:35: warning: unused variable 'dell_device_table' [-Wunused-const-variable]
static const struct dmi_system_id dell_device_table[] __initconst = {
^
1 warning generated.
vim +/dell_device_table +27 drivers/platform/x86/dell/dell-smbios-smm.c
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 26
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 @27 static const struct dmi_system_id dell_device_table[] __initconst = {
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 28 {
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 29 .ident = "Dell laptop",
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 30 .matches = {
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 31 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 32 DMI_MATCH(DMI_CHASSIS_TYPE, "8"),
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 33 },
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 34 },
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 35 {
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 36 .matches = {
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 37 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 38 DMI_MATCH(DMI_CHASSIS_TYPE, "9"), /*Laptop*/
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 39 },
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 40 },
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 41 {
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 42 .matches = {
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 43 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 44 DMI_MATCH(DMI_CHASSIS_TYPE, "10"), /*Notebook*/
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 45 },
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 46 },
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 47 {
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 48 .ident = "Dell Computer Corporation",
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 49 .matches = {
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 50 DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 51 DMI_MATCH(DMI_CHASSIS_TYPE, "8"),
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 52 },
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 53 },
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 54 { }
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 55 };
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 56 MODULE_DEVICE_TABLE(dmi, dell_device_table);
549b4930f05765 drivers/platform/x86/dell-smbios-smm.c Mario Limonciello 2017-11-01 57
:::::: The code at line 27 was first introduced by commit
:::::: 549b4930f057658dc50d8010e66219233119a4d8 platform/x86: dell-smbios: Introduce dispatcher for SMM calls
:::::: TO: Mario Limonciello <mario.limonciello(a)dell.com>
:::::: CC: Darren Hart (VMware) <dvhart(a)infradead.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[jeyu:module-cleanup 7/13] arch/powerpc/platforms/powernv/pci-cxl.c:159:14: error: 'module_mutex' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git module-cleanup
head: a1031af5d5028424702be365a903b83554830fb2
commit: b54ea5ff875ffe75b6cebc86f9d8f37c0b89c48a [7/13] module: mark module_mutex static
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git/commit/?id...
git remote add jeyu https://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git
git fetch --no-tags jeyu module-cleanup
git checkout b54ea5ff875ffe75b6cebc86f9d8f37c0b89c48a
# 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: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/seqlock.h:19,
from include/linux/mmzone.h:16,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from arch/powerpc/platforms/powernv/pci-cxl.c:6:
arch/powerpc/platforms/powernv/pci-cxl.c: In function 'get_cxl_module':
>> arch/powerpc/platforms/powernv/pci-cxl.c:159:14: error: 'module_mutex' undeclared (first use in this function); did you mean 'module_put'?
159 | mutex_lock(&module_mutex);
| ^~~~~~~~~~~~
include/linux/mutex.h:167:44: note: in definition of macro 'mutex_lock'
167 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
| ^~~~
arch/powerpc/platforms/powernv/pci-cxl.c:159:14: note: each undeclared identifier is reported only once for each function it appears in
159 | mutex_lock(&module_mutex);
| ^~~~~~~~~~~~
include/linux/mutex.h:167:44: note: in definition of macro 'mutex_lock'
167 | #define mutex_lock(lock) mutex_lock_nested(lock, 0)
| ^~~~
vim +159 arch/powerpc/platforms/powernv/pci-cxl.c
4361b03430d685 Ian Munsie 2016-07-14 153
c2ca9f6b4cc4c4 Ian Munsie 2016-07-19 154 #if IS_MODULE(CONFIG_CXL)
c2ca9f6b4cc4c4 Ian Munsie 2016-07-19 155 static inline int get_cxl_module(void)
c2ca9f6b4cc4c4 Ian Munsie 2016-07-19 156 {
c2ca9f6b4cc4c4 Ian Munsie 2016-07-19 157 struct module *cxl_module;
c2ca9f6b4cc4c4 Ian Munsie 2016-07-19 158
c2ca9f6b4cc4c4 Ian Munsie 2016-07-19 @159 mutex_lock(&module_mutex);
:::::: The code at line 159 was first introduced by commit
:::::: c2ca9f6b4cc4c45eb598b24b8b06beee668052d5 powerpc/powernv: Fix pci-cxl.c build when CONFIG_MODULES=n
:::::: TO: Ian Munsie <imunsie(a)au1.ibm.com>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c:458 lpi_config_set() error: uninitialized symbol 'strength'.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2c87f7a38f930ef6f6a7bdd04aeb82ce3971b54b
commit: 6e261d1090d6db0e9dd22978b6f38a2c58558a3f pinctrl: qcom: Add sm8250 lpass lpi pinctrl driver
config: arm64-randconfig-m031-20210226 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c:458 lpi_config_set() error: uninitialized symbol 'strength'.
Old smatch warnings:
drivers/pinctrl/qcom/pinctrl-lpass-lpi.c:457 lpi_config_set() error: uninitialized symbol 'pullup'.
vim +/strength +458 drivers/pinctrl/qcom/pinctrl-lpass-lpi.c
6e261d1090d6db Srinivas Kandagatla 2020-12-02 391 static int lpi_config_set(struct pinctrl_dev *pctldev, unsigned int group,
6e261d1090d6db Srinivas Kandagatla 2020-12-02 392 unsigned long *configs, unsigned int nconfs)
6e261d1090d6db Srinivas Kandagatla 2020-12-02 393 {
6e261d1090d6db Srinivas Kandagatla 2020-12-02 394 struct lpi_pinctrl *pctrl = dev_get_drvdata(pctldev->dev);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 395 unsigned int param, arg, pullup, strength;
^^^^^^^^
6e261d1090d6db Srinivas Kandagatla 2020-12-02 396 bool value, output_enabled = false;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 397 const struct lpi_pingroup *g;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 398 unsigned long sval;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 399 int i, slew_offset;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 400 u32 val;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 401
6e261d1090d6db Srinivas Kandagatla 2020-12-02 402 g = &pctrl->data->groups[group];
6e261d1090d6db Srinivas Kandagatla 2020-12-02 403 for (i = 0; i < nconfs; i++) {
6e261d1090d6db Srinivas Kandagatla 2020-12-02 404 param = pinconf_to_config_param(configs[i]);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 405 arg = pinconf_to_config_argument(configs[i]);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 406
6e261d1090d6db Srinivas Kandagatla 2020-12-02 407 switch (param) {
6e261d1090d6db Srinivas Kandagatla 2020-12-02 408 case PIN_CONFIG_BIAS_DISABLE:
6e261d1090d6db Srinivas Kandagatla 2020-12-02 409 pullup = LPI_GPIO_BIAS_DISABLE;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 410 break;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 411 case PIN_CONFIG_BIAS_PULL_DOWN:
6e261d1090d6db Srinivas Kandagatla 2020-12-02 412 pullup = LPI_GPIO_PULL_DOWN;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 413 break;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 414 case PIN_CONFIG_BIAS_BUS_HOLD:
6e261d1090d6db Srinivas Kandagatla 2020-12-02 415 pullup = LPI_GPIO_KEEPER;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 416 break;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 417 case PIN_CONFIG_BIAS_PULL_UP:
6e261d1090d6db Srinivas Kandagatla 2020-12-02 418 pullup = LPI_GPIO_PULL_UP;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 419 break;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 420 case PIN_CONFIG_INPUT_ENABLE:
6e261d1090d6db Srinivas Kandagatla 2020-12-02 421 output_enabled = false;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 422 break;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 423 case PIN_CONFIG_OUTPUT:
6e261d1090d6db Srinivas Kandagatla 2020-12-02 424 output_enabled = true;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 425 value = arg;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 426 break;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 427 case PIN_CONFIG_DRIVE_STRENGTH:
6e261d1090d6db Srinivas Kandagatla 2020-12-02 428 strength = arg;
^^^^^^^^^^^^^^^
Only initialized here.
6e261d1090d6db Srinivas Kandagatla 2020-12-02 429 break;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 430 case PIN_CONFIG_SLEW_RATE:
6e261d1090d6db Srinivas Kandagatla 2020-12-02 431 if (arg > LPI_SLEW_RATE_MAX) {
6e261d1090d6db Srinivas Kandagatla 2020-12-02 432 dev_err(pctldev->dev, "invalid slew rate %u for pin: %d\n",
6e261d1090d6db Srinivas Kandagatla 2020-12-02 433 arg, group);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 434 return -EINVAL;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 435 }
6e261d1090d6db Srinivas Kandagatla 2020-12-02 436
6e261d1090d6db Srinivas Kandagatla 2020-12-02 437 slew_offset = g->slew_offset;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 438 if (slew_offset == NO_SLEW)
6e261d1090d6db Srinivas Kandagatla 2020-12-02 439 break;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 440
6e261d1090d6db Srinivas Kandagatla 2020-12-02 441 mutex_lock(&pctrl->slew_access_lock);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 442
6e261d1090d6db Srinivas Kandagatla 2020-12-02 443 sval = ioread32(pctrl->slew_base + LPI_SLEW_RATE_CTL_REG);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 444 sval &= ~(LPI_SLEW_RATE_MASK << slew_offset);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 445 sval |= arg << slew_offset;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 446 iowrite32(sval, pctrl->slew_base + LPI_SLEW_RATE_CTL_REG);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 447
6e261d1090d6db Srinivas Kandagatla 2020-12-02 448 mutex_unlock(&pctrl->slew_access_lock);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 449 break;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 450 default:
6e261d1090d6db Srinivas Kandagatla 2020-12-02 451 return -EINVAL;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 452 }
6e261d1090d6db Srinivas Kandagatla 2020-12-02 453 }
6e261d1090d6db Srinivas Kandagatla 2020-12-02 454
6e261d1090d6db Srinivas Kandagatla 2020-12-02 455 val = lpi_gpio_read(pctrl, group, LPI_GPIO_CFG_REG);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 456
6e261d1090d6db Srinivas Kandagatla 2020-12-02 457 u32p_replace_bits(&val, pullup, LPI_GPIO_PULL_MASK);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 @458 u32p_replace_bits(&val, LPI_GPIO_DS_TO_VAL(strength),
^^^^^^^^
6e261d1090d6db Srinivas Kandagatla 2020-12-02 459 LPI_GPIO_OUT_STRENGTH_MASK);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 460 u32p_replace_bits(&val, output_enabled, LPI_GPIO_OE_MASK);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 461
6e261d1090d6db Srinivas Kandagatla 2020-12-02 462 lpi_gpio_write(pctrl, group, LPI_GPIO_CFG_REG, val);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 463
6e261d1090d6db Srinivas Kandagatla 2020-12-02 464 if (output_enabled) {
6e261d1090d6db Srinivas Kandagatla 2020-12-02 465 val = u32_encode_bits(value ? 1 : 0, LPI_GPIO_VALUE_OUT_MASK);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 466 lpi_gpio_write(pctrl, group, LPI_GPIO_VALUE_REG, val);
6e261d1090d6db Srinivas Kandagatla 2020-12-02 467 }
6e261d1090d6db Srinivas Kandagatla 2020-12-02 468
6e261d1090d6db Srinivas Kandagatla 2020-12-02 469 return 0;
6e261d1090d6db Srinivas Kandagatla 2020-12-02 470 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
hppa64-linux-ld: kernel/rcu/refscale.o(.init.text+0x228): cannot reach schedule_timeout_uninterruptible
by kernel test robot
Hi Paul,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5695e51619745d4fe3ec2506a2f0cd982c5e27a4
commit: 1fbeb3a8c4de29433a8d230ee600b13d369b6c0f refperf: Rename refperf.c to refscale.c and change internal names
date: 8 months ago
config: parisc-randconfig-s031-20210228 (attached as .config)
compiler: hppa64-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
# apt-get install sparse
# sparse version: v0.6.3-241-geaceeafa-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 1fbeb3a8c4de29433a8d230ee600b13d369b6c0f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
hppa64-linux-ld: init/main.o(.init.text+0xdd8): cannot reach rest_init
init/main.o: in function `arch_call_rest_init':
(.init.text+0xdd8): relocation truncated to fit: R_PARISC_PCREL22F against symbol `rest_init' defined in .ref.text section in init/main.o
hppa64-linux-ld: init/main.o(.init.text+0x13d8): cannot reach build_all_zonelists
init/main.o: in function `start_kernel':
(.init.text+0x13d8): relocation truncated to fit: R_PARISC_PCREL22F against symbol `build_all_zonelists' defined in .ref.text section in mm/page_alloc.o
hppa64-linux-ld: init/main.o(.init.text+0x176c): cannot reach profile_init
(.init.text+0x176c): relocation truncated to fit: R_PARISC_PCREL22F against symbol `profile_init' defined in .ref.text section in kernel/profile.o
hppa64-linux-ld: init/main.o(.init.text+0x1ac0): cannot reach wait_for_completion
init/main.o: in function `kernel_init_freeable':
(.init.text+0x1ac0): relocation truncated to fit: R_PARISC_PCREL22F against symbol `wait_for_completion' defined in .sched.text section in kernel/sched/completion.o
hppa64-linux-ld: init/main.o(.ref.text+0x1c): cannot reach rcu_scheduler_starting
init/main.o: in function `rest_init':
(.ref.text+0x1c): relocation truncated to fit: R_PARISC_PCREL22F against symbol `rcu_scheduler_starting' defined in .init.text section in kernel/rcu/srcutiny.o
hppa64-linux-ld: init/main.o(.ref.text+0x17c): cannot reach unknown
init/main.o: in function `kernel_init':
(.ref.text+0x17c): relocation truncated to fit: R_PARISC_PCREL22F against `kernel_init_freeable'
hppa64-linux-ld: arch/parisc/mm/init.o(.ref.text+0x78): cannot reach unknown
arch/parisc/mm/init.o: in function `free_initmem':
(.ref.text+0x78): relocation truncated to fit: R_PARISC_PCREL22F against `map_pages'
hppa64-linux-ld: arch/parisc/mm/init.o(.ref.text+0xa0): cannot reach unknown
(.ref.text+0xa0): relocation truncated to fit: R_PARISC_PCREL22F against `map_pages'
hppa64-linux-ld: arch/parisc/mm/init.o(.ref.text+0xc4): cannot reach unknown
(.ref.text+0xc4): relocation truncated to fit: R_PARISC_PCREL22F against `map_pages'
hppa64-linux-ld: kernel/printk/printk.o(.init.text+0x768): cannot reach _raw_spin_lock
kernel/printk/printk.o: in function `setup_log_buf':
(.init.text+0x768): relocation truncated to fit: R_PARISC_PCREL22F against symbol `_raw_spin_lock' defined in .spinlock.text section in kernel/locking/spinlock.o
hppa64-linux-ld: kernel/printk/printk.o(.init.text+0x7c4): cannot reach _raw_spin_unlock
(.init.text+0x7c4): additional relocation overflows omitted from the output
hppa64-linux-ld: kernel/cgroup/cgroup.o(.init.text+0x228): cannot reach mutex_lock
hppa64-linux-ld: kernel/cgroup/cgroup.o(.init.text+0x440): cannot reach mutex_unlock
hppa64-linux-ld: kernel/cgroup/cgroup.o(.init.text+0x7a0): cannot reach mutex_lock
hppa64-linux-ld: kernel/cgroup/cgroup.o(.init.text+0x878): cannot reach mutex_unlock
hppa64-linux-ld: kernel/cgroup/cgroup.o(.init.text+0xad4): cannot reach mutex_lock
hppa64-linux-ld: kernel/cgroup/cgroup.o(.init.text+0xafc): cannot reach mutex_unlock
hppa64-linux-ld: kernel/resource.o(.init.text+0x32c): cannot reach _raw_write_lock
hppa64-linux-ld: kernel/resource.o(.init.text+0x4f8): cannot reach _raw_write_unlock
hppa64-linux-ld: kernel/time/clocksource.o(.init.text+0x90): cannot reach mutex_lock
hppa64-linux-ld: kernel/time/clocksource.o(.init.text+0xc4): cannot reach mutex_unlock
hppa64-linux-ld: kernel/time/clocksource.o(.init.text+0x1b8): cannot reach mutex_lock
hppa64-linux-ld: kernel/time/clocksource.o(.init.text+0x208): cannot reach mutex_unlock
hppa64-linux-ld: kernel/workqueue.o(.init.text+0xa8): cannot reach mutex_lock
hppa64-linux-ld: kernel/workqueue.o(.init.text+0x128): cannot reach mutex_unlock
hppa64-linux-ld: kernel/workqueue.o(.init.text+0x354): cannot reach mutex_lock
hppa64-linux-ld: kernel/workqueue.o(.init.text+0x388): cannot reach mutex_unlock
hppa64-linux-ld: kernel/user.o(.init.text+0x80): cannot reach _raw_spin_lock_irq
hppa64-linux-ld: kernel/user.o(.init.text+0xb8): cannot reach _raw_spin_unlock_irq
>> hppa64-linux-ld: kernel/rcu/refscale.o(.init.text+0x228): cannot reach schedule_timeout_uninterruptible
hppa64-linux-ld: kernel/time/timekeeping.o(.init.text+0x228): cannot reach _raw_spin_lock_irqsave
hppa64-linux-ld: kernel/time/timekeeping.o(.init.text+0x320): cannot reach _raw_spin_unlock_irqrestore
hppa64-linux-ld: kernel/time/sched_clock.o(.init.text+0x170): cannot reach __muldi3
hppa64-linux-ld: kernel/time/sched_clock.o(.init.text+0x214): cannot reach __udivdi3
hppa64-linux-ld: kernel/time/sched_clock.o(.init.text+0x240): cannot reach __udivdi3
hppa64-linux-ld: arch/parisc/kernel/cache.o(.init.text+0x2d4): cannot reach __muldi3
hppa64-linux-ld: arch/parisc/kernel/cache.o(.init.text+0x2ec): cannot reach __udivdi3
hppa64-linux-ld: arch/parisc/kernel/cache.o(.init.text+0x3d4): cannot reach __muldi3
hppa64-linux-ld: arch/parisc/kernel/cache.o(.init.text+0x3ec): cannot reach __udivdi3
hppa64-linux-ld: arch/parisc/kernel/firmware.o(.init.text+0x3c): cannot reach _raw_spin_lock_irqsave
hppa64-linux-ld: arch/parisc/kernel/firmware.o(.init.text+0xe8): cannot reach _raw_spin_unlock_irqrestore
hppa64-linux-ld: arch/parisc/kernel/firmware.o(.init.text+0x170): cannot reach _raw_spin_lock_irqsave
hppa64-linux-ld: arch/parisc/kernel/firmware.o(.init.text+0x288): cannot reach _raw_spin_unlock_irqrestore
hppa64-linux-ld: arch/parisc/kernel/firmware.o(.init.text+0x30c): cannot reach _raw_spin_lock_irqsave
hppa64-linux-ld: arch/parisc/kernel/firmware.o(.init.text+0x3d8): cannot reach _raw_spin_unlock_irqrestore
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH v4 17/19] coresight: core: Add support for dedicated percpu sinks
by kernel test robot
Hi Suzuki,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on next-20210226]
[cannot apply to kvmarm/next arm64/for-next/core tip/perf/core v5.11]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Suzuki-K-Poulose/arm64-coresight...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6fbd6cf85a3be127454a1ad58525a3adcf8612ab
config: arm-randconfig-r024-20210225 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a921aaf789912d981cbb2036bdc91ad7289e1523)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/c37564326cdf11e0839eae06c1bfead47...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Suzuki-K-Poulose/arm64-coresight-Add-support-for-ETE-and-TRBE/20210226-035447
git checkout c37564326cdf11e0839eae06c1bfead47d3e5775
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/hwtracing/coresight/coresight-core.c:800:6: error: implicit declaration of function 'coresight_is_percpu_source' [-Werror,-Wimplicit-function-declaration]
if (coresight_is_percpu_source(csdev) && coresight_is_percpu_sink(sink) &&
^
>> drivers/hwtracing/coresight/coresight-core.c:800:43: error: implicit declaration of function 'coresight_is_percpu_sink' [-Werror,-Wimplicit-function-declaration]
if (coresight_is_percpu_source(csdev) && coresight_is_percpu_sink(sink) &&
^
drivers/hwtracing/coresight/coresight-core.c:1024:7: error: implicit declaration of function 'coresight_is_percpu_source' [-Werror,-Wimplicit-function-declaration]
if (coresight_is_percpu_source(csdev))
^
3 errors generated.
vim +/coresight_is_percpu_source +800 drivers/hwtracing/coresight/coresight-core.c
775
776 /**
777 * _coresight_build_path - recursively build a path from a @csdev to a sink.
778 * @csdev: The device to start from.
779 * @sink: The final sink we want in this path.
780 * @path: The list to add devices to.
781 *
782 * The tree of Coresight device is traversed until an activated sink is
783 * found. From there the sink is added to the list along with all the
784 * devices that led to that point - the end result is a list from source
785 * to sink. In that list the source is the first device and the sink the
786 * last one.
787 */
788 static int _coresight_build_path(struct coresight_device *csdev,
789 struct coresight_device *sink,
790 struct list_head *path)
791 {
792 int i, ret;
793 bool found = false;
794 struct coresight_node *node;
795
796 /* An activated sink has been found. Enqueue the element */
797 if (csdev == sink)
798 goto out;
799
> 800 if (coresight_is_percpu_source(csdev) && coresight_is_percpu_sink(sink) &&
801 sink == per_cpu(csdev_sink, source_ops(csdev)->cpu_id(csdev))) {
802 if (_coresight_build_path(sink, sink, path) == 0) {
803 found = true;
804 goto out;
805 }
806 }
807
808 /* Not a sink - recursively explore each port found on this element */
809 for (i = 0; i < csdev->pdata->nr_outport; i++) {
810 struct coresight_device *child_dev;
811
812 child_dev = csdev->pdata->conns[i].child_dev;
813 if (child_dev &&
814 _coresight_build_path(child_dev, sink, path) == 0) {
815 found = true;
816 break;
817 }
818 }
819
820 if (!found)
821 return -ENODEV;
822
823 out:
824 /*
825 * A path from this element to a sink has been found. The elements
826 * leading to the sink are already enqueued, all that is left to do
827 * is tell the PM runtime core we need this element and add a node
828 * for it.
829 */
830 ret = coresight_grab_device(csdev);
831 if (ret)
832 return ret;
833
834 node = kzalloc(sizeof(struct coresight_node), GFP_KERNEL);
835 if (!node)
836 return -ENOMEM;
837
838 node->csdev = csdev;
839 list_add(&node->link, path);
840
841 return 0;
842 }
843
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5695e51619745d4fe3ec2506a2f0cd982c5e27a4
commit: c3987cd2bca34ddfec69027acedb2fae5ffcf7a0 leds: lgm: Add LED controller driver for LGM SoC
date: 8 days ago
config: powerpc64-randconfig-r002-20210227 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 83bc7815c4235786111aa2abf7193292e4a602f5)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout c3987cd2bca34ddfec69027acedb2fae5ffcf7a0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:62:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/leds/blink/leds-lgm-sso.c:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:64:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/leds/blink/leds-lgm-sso.c:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:66:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/leds/blink/leds-lgm-sso.c:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:68:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/leds/blink/leds-lgm-sso.c:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:70:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from drivers/leds/blink/leds-lgm-sso.c:18:
In file included from include/linux/regmap.h:20:
In file included from include/linux/iopoll.h:14:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:72:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> drivers/leds/blink/leds-lgm-sso.c:123:19: error: field has incomplete type 'struct gpio_chip'
struct gpio_chip chip;
^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
>> drivers/leds/blink/leds-lgm-sso.c:263:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration]
gpiod_set_value(led->gpiod, val);
^
drivers/leds/blink/leds-lgm-sso.c:263:3: note: did you mean 'gpio_set_value'?
include/linux/gpio.h:168:20: note: 'gpio_set_value' declared here
static inline void gpio_set_value(unsigned gpio, int value)
^
drivers/leds/blink/leds-lgm-sso.c:345:3: error: implicit declaration of function 'gpiod_set_value' [-Werror,-Wimplicit-function-declaration]
gpiod_set_value(led->gpiod, 1);
^
>> drivers/leds/blink/leds-lgm-sso.c:405:30: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^
>> drivers/leds/blink/leds-lgm-sso.c:405:23: warning: incompatible integer to pointer conversion initializing 'struct sso_led_priv *' with an expression of type 'int' [-Wint-conversion]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/blink/leds-lgm-sso.c:418:30: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^
drivers/leds/blink/leds-lgm-sso.c:418:23: warning: incompatible integer to pointer conversion initializing 'struct sso_led_priv *' with an expression of type 'int' [-Wint-conversion]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/blink/leds-lgm-sso.c:432:30: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^
drivers/leds/blink/leds-lgm-sso.c:432:23: warning: incompatible integer to pointer conversion initializing 'struct sso_led_priv *' with an expression of type 'int' [-Wint-conversion]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/blink/leds-lgm-sso.c:445:30: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^
drivers/leds/blink/leds-lgm-sso.c:445:23: warning: incompatible integer to pointer conversion initializing 'struct sso_led_priv *' with an expression of type 'int' [-Wint-conversion]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/leds/blink/leds-lgm-sso.c:455:30: error: implicit declaration of function 'gpiochip_get_data' [-Werror,-Wimplicit-function-declaration]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^
drivers/leds/blink/leds-lgm-sso.c:455:23: warning: incompatible integer to pointer conversion initializing 'struct sso_led_priv *' with an expression of type 'int' [-Wint-conversion]
struct sso_led_priv *priv = gpiochip_get_data(chip);
^ ~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/leds/blink/leds-lgm-sso.c:467:4: error: incomplete definition of type 'struct gpio_chip'
gc->request = sso_gpio_request;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:468:4: error: incomplete definition of type 'struct gpio_chip'
gc->free = sso_gpio_free;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:469:4: error: incomplete definition of type 'struct gpio_chip'
gc->get_direction = sso_gpio_get_dir;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:470:4: error: incomplete definition of type 'struct gpio_chip'
gc->direction_output = sso_gpio_dir_out;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:471:4: error: incomplete definition of type 'struct gpio_chip'
gc->get = sso_gpio_get;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:472:4: error: incomplete definition of type 'struct gpio_chip'
gc->set = sso_gpio_set;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:474:4: error: incomplete definition of type 'struct gpio_chip'
gc->label = "lgm-sso";
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:475:4: error: incomplete definition of type 'struct gpio_chip'
gc->base = -1;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:477:4: error: incomplete definition of type 'struct gpio_chip'
gc->ngpio = priv->gpio.pins;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:478:4: error: incomplete definition of type 'struct gpio_chip'
gc->parent = dev;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
drivers/leds/blink/leds-lgm-sso.c:479:4: error: incomplete definition of type 'struct gpio_chip'
gc->owner = THIS_MODULE;
~~^
include/linux/gpio.h:107:8: note: forward declaration of 'struct gpio_chip'
struct gpio_chip;
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
17 warnings and 20 errors generated.
vim +123 drivers/leds/blink/leds-lgm-sso.c
121
122 struct sso_gpio {
> 123 struct gpio_chip chip;
124 int shift_clk_freq;
125 int edge;
126 int freq;
127 u32 pins;
128 u32 alloc_bitmap;
129 };
130
131 struct sso_led_priv {
132 struct regmap *mmap;
133 struct device *dev;
134 struct platform_device *pdev;
135 struct clk *gclk;
136 struct clk *fpid_clk;
137 u32 fpid_clkrate;
138 u32 gptc_clkrate;
139 u32 freq[MAX_FREQ_RANK];
140 struct list_head led_list;
141 struct sso_gpio gpio;
142 };
143
144 static int sso_get_blink_rate_idx(struct sso_led_priv *priv, u32 rate)
145 {
146 int i;
147
148 for (i = 0; i < MAX_FREQ_RANK; i++) {
149 if (rate <= priv->freq[i])
150 return i;
151 }
152
153 return -1;
154 }
155
156 static unsigned int sso_led_pin_to_group(u32 pin)
157 {
158 if (pin < LED_GRP0_PIN_MAX)
159 return LED_GRP0_0_23;
160 else if (pin < LED_GRP1_PIN_MAX)
161 return LED_GRP1_24_28;
162 else
163 return LED_GRP2_29_31;
164 }
165
166 static u32 sso_led_get_freq_src(int freq_idx)
167 {
168 if (freq_idx < MAX_FPID_FREQ_RANK)
169 return CLK_SRC_FPID;
170 else if (freq_idx < MAX_GPTC_FREQ_RANK)
171 return CLK_SRC_GPTC;
172 else
173 return CLK_SRC_GPTC_HS;
174 }
175
176 static u32 sso_led_pin_blink_off(u32 pin, unsigned int group)
177 {
178 if (group == LED_GRP2_29_31)
179 return pin - LED_GRP1_PIN_MAX;
180 else if (group == LED_GRP1_24_28)
181 return pin - LED_GRP0_PIN_MAX;
182 else /* led 0 - 23 in led 32 location */
183 return SSO_LED_MAX_NUM - LED_GRP1_PIN_MAX;
184 }
185
186 static struct sso_led
187 *cdev_to_sso_led_data(struct led_classdev *led_cdev)
188 {
189 return container_of(led_cdev, struct sso_led, cdev);
190 }
191
192 static void sso_led_freq_set(struct sso_led_priv *priv, u32 pin, int freq_idx)
193 {
194 u32 reg, off, freq_src, val_freq;
195 u32 low, high, val;
196 unsigned int group;
197
198 if (!freq_idx)
199 return;
200
201 group = sso_led_pin_to_group(pin);
202 freq_src = sso_led_get_freq_src(freq_idx);
203 off = sso_led_pin_blink_off(pin, group);
204
205 if (group == LED_GRP0_0_23)
206 return;
207 else if (group == LED_GRP1_24_28)
208 reg = LED_BLINK_H8_0;
209 else
210 reg = LED_BLINK_H8_1;
211
212 if (freq_src == CLK_SRC_FPID)
213 val_freq = freq_idx - 1;
214 else if (freq_src == CLK_SRC_GPTC)
215 val_freq = freq_idx - MAX_FPID_FREQ_RANK;
216
217 /* set blink rate idx */
218 if (freq_src != CLK_SRC_GPTC_HS) {
219 low = GET_FREQ_OFFSET(off, freq_src);
220 high = low + 2;
221 val = val_freq << high;
222 regmap_update_bits(priv->mmap, reg, GENMASK(high, low), val);
223 }
224
225 /* select clock source */
226 low = GET_SRC_OFFSET(off);
227 high = low + 2;
228 val = freq_src << high;
229 regmap_update_bits(priv->mmap, reg, GENMASK(high, low), val);
230 }
231
232 static void sso_led_brightness_set(struct led_classdev *led_cdev,
233 enum led_brightness brightness)
234 {
235 struct sso_led_priv *priv;
236 struct sso_led_desc *desc;
237 struct sso_led *led;
238 int val;
239
240 led = cdev_to_sso_led_data(led_cdev);
241 priv = led->priv;
242 desc = &led->desc;
243
244 desc->brightness = brightness;
245 regmap_write(priv->mmap, DUTY_CYCLE(desc->pin), brightness);
246
247 if (brightness == LED_OFF)
248 val = 0;
249 else
250 val = 1;
251
252 /* HW blink off */
253 if (desc->hw_blink && !val && desc->blinking) {
254 desc->blinking = 0;
255 regmap_update_bits(priv->mmap, SSO_CON2, BIT(desc->pin), 0);
256 } else if (desc->hw_blink && val && !desc->blinking) {
257 desc->blinking = 1;
258 regmap_update_bits(priv->mmap, SSO_CON2, BIT(desc->pin),
259 1 << desc->pin);
260 }
261
262 if (!desc->hw_trig && led->gpiod)
> 263 gpiod_set_value(led->gpiod, val);
264 }
265
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
arch/x86/kvm/mmu/tdp_mmu.c:533:9: sparse: sparse: cast removes address space '__rcu' of expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5695e51619745d4fe3ec2506a2f0cd982c5e27a4
commit: 08f07c800e9d35b59d0c8346333f189160bd67d4 KVM: x86/mmu: Flush TLBs after zap in TDP MMU PF handler
date: 3 weeks ago
config: x86_64-randconfig-s022-20210228 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-241-geaceeafa-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 08f07c800e9d35b59d0c8346333f189160bd67d4
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
arch/x86/kvm/mmu/tdp_mmu.c:459:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:459:49: sparse: expected unsigned long long [usertype] *pt
arch/x86/kvm/mmu/tdp_mmu.c:459:49: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:291:9: sparse: sparse: context imbalance in 'tdp_mmu_link_page' - different lock contexts for basic block
arch/x86/kvm/mmu/tdp_mmu.c:316:9: sparse: sparse: context imbalance in 'tdp_mmu_unlink_page' - different lock contexts for basic block
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: got unsigned long long [noderef] [usertype] __rcu *
>> arch/x86/kvm/mmu/tdp_mmu.c:533:9: sparse: sparse: cast removes address space '__rcu' of expression
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:487:40: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected unsigned long long [usertype] *root_pt @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: expected unsigned long long [usertype] *root_pt
arch/x86/kvm/mmu/tdp_mmu.c:654:51: sparse: got unsigned long long [noderef] [usertype] __rcu *
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt @@
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:560:49: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] root_pt
vim +/__rcu +533 arch/x86/kvm/mmu/tdp_mmu.c
509
510 static inline bool tdp_mmu_zap_spte_atomic(struct kvm *kvm,
511 struct tdp_iter *iter)
512 {
513 /*
514 * Freeze the SPTE by setting it to a special,
515 * non-present value. This will stop other threads from
516 * immediately installing a present entry in its place
517 * before the TLBs are flushed.
518 */
519 if (!tdp_mmu_set_spte_atomic(kvm, iter, REMOVED_SPTE))
520 return false;
521
522 kvm_flush_remote_tlbs_with_address(kvm, iter->gfn,
523 KVM_PAGES_PER_HPAGE(iter->level));
524
525 /*
526 * No other thread can overwrite the removed SPTE as they
527 * must either wait on the MMU lock or use
528 * tdp_mmu_set_spte_atomic which will not overrite the
529 * special removed SPTE value. No bookkeeping is needed
530 * here since the SPTE is going from non-present
531 * to non-present.
532 */
> 533 WRITE_ONCE(*iter->sptep, 0);
534
535 return true;
536 }
537
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH] hugetlb_cgroup: fix imbalanced css_get and css_put pair for shared mappings
by kernel test robot
Hi Miaohe,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20210125]
[also build test ERROR on v5.11-rc7]
[cannot apply to linux/master linus/master hnaz-linux-mm/master v5.11-rc7 v5.11-rc6 v5.11-rc5]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Miaohe-Lin/hugetlb_cgroup-fix-im...
base: 59fa6a163ffabc1bf25c5e0e33899e268a96d3cc
config: arm64-randconfig-r025-20210209 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
reproduce (this is a W=1 build):
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
# https://github.com/0day-ci/linux/commit/68f4ed1b80aa7c51a921c3ad913ee7e6e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Miaohe-Lin/hugetlb_cgroup-fix-imbalanced-css_get-and-css_put-pair-for-shared-mappings/20210210-171736
git checkout 68f4ed1b80aa7c51a921c3ad913ee7e6e00618d0
# 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: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> mm/hugetlb.c:5222:17: error: incomplete definition of type 'struct hugetlb_cgroup'
css_put(&h_cg->css);
~~~~^
include/linux/hugetlb_cgroup.h:20:8: note: forward declaration of 'struct hugetlb_cgroup'
struct hugetlb_cgroup;
^
1 error generated.
vim +5222 mm/hugetlb.c
5091
5092 /* Return true if reservation was successful, false otherwise. */
5093 bool hugetlb_reserve_pages(struct inode *inode,
5094 long from, long to,
5095 struct vm_area_struct *vma,
5096 vm_flags_t vm_flags)
5097 {
5098 long chg, add = -1;
5099 struct hstate *h = hstate_inode(inode);
5100 struct hugepage_subpool *spool = subpool_inode(inode);
5101 struct resv_map *resv_map;
5102 struct hugetlb_cgroup *h_cg = NULL;
5103 long gbl_reserve, regions_needed = 0;
5104
5105 /* This should never happen */
5106 if (from > to) {
5107 VM_WARN(1, "%s called with a negative range\n", __func__);
5108 return false;
5109 }
5110
5111 /*
5112 * Only apply hugepage reservation if asked. At fault time, an
5113 * attempt will be made for VM_NORESERVE to allocate a page
5114 * without using reserves
5115 */
5116 if (vm_flags & VM_NORESERVE)
5117 return true;
5118
5119 /*
5120 * Shared mappings base their reservation on the number of pages that
5121 * are already allocated on behalf of the file. Private mappings need
5122 * to reserve the full area even if read-only as mprotect() may be
5123 * called to make the mapping read-write. Assume !vma is a shm mapping
5124 */
5125 if (!vma || vma->vm_flags & VM_MAYSHARE) {
5126 /*
5127 * resv_map can not be NULL as hugetlb_reserve_pages is only
5128 * called for inodes for which resv_maps were created (see
5129 * hugetlbfs_get_inode).
5130 */
5131 resv_map = inode_resv_map(inode);
5132
5133 chg = region_chg(resv_map, from, to, ®ions_needed);
5134
5135 } else {
5136 /* Private mapping. */
5137 resv_map = resv_map_alloc();
5138 if (!resv_map)
5139 return false;
5140
5141 chg = to - from;
5142
5143 set_vma_resv_map(vma, resv_map);
5144 set_vma_resv_flags(vma, HPAGE_RESV_OWNER);
5145 }
5146
5147 if (chg < 0)
5148 goto out_err;
5149
5150 if (hugetlb_cgroup_charge_cgroup_rsvd(hstate_index(h),
5151 chg * pages_per_huge_page(h), &h_cg) < 0)
5152 goto out_err;
5153
5154 if (vma && !(vma->vm_flags & VM_MAYSHARE) && h_cg) {
5155 /* For private mappings, the hugetlb_cgroup uncharge info hangs
5156 * of the resv_map.
5157 */
5158 resv_map_set_hugetlb_cgroup_uncharge_info(resv_map, h_cg, h);
5159 }
5160
5161 /*
5162 * There must be enough pages in the subpool for the mapping. If
5163 * the subpool has a minimum size, there may be some global
5164 * reservations already in place (gbl_reserve).
5165 */
5166 gbl_reserve = hugepage_subpool_get_pages(spool, chg);
5167 if (gbl_reserve < 0)
5168 goto out_uncharge_cgroup;
5169
5170 /*
5171 * Check enough hugepages are available for the reservation.
5172 * Hand the pages back to the subpool if there are not
5173 */
5174 if (hugetlb_acct_memory(h, gbl_reserve) < 0)
5175 goto out_put_pages;
5176
5177 /*
5178 * Account for the reservations made. Shared mappings record regions
5179 * that have reservations as they are shared by multiple VMAs.
5180 * When the last VMA disappears, the region map says how much
5181 * the reservation was and the page cache tells how much of
5182 * the reservation was consumed. Private mappings are per-VMA and
5183 * only the consumed reservations are tracked. When the VMA
5184 * disappears, the original reservation is the VMA size and the
5185 * consumed reservations are stored in the map. Hence, nothing
5186 * else has to be done for private mappings here
5187 */
5188 if (!vma || vma->vm_flags & VM_MAYSHARE) {
5189 add = region_add(resv_map, from, to, regions_needed, h, h_cg);
5190
5191 if (unlikely(add < 0)) {
5192 hugetlb_acct_memory(h, -gbl_reserve);
5193 goto out_put_pages;
5194 } else if (unlikely(chg > add)) {
5195 /*
5196 * pages in this range were added to the reserve
5197 * map between region_chg and region_add. This
5198 * indicates a race with alloc_huge_page. Adjust
5199 * the subpool and reserve counts modified above
5200 * based on the difference.
5201 */
5202 long rsv_adjust;
5203
5204 /*
5205 * hugetlb_cgroup_uncharge_cgroup_rsvd() will put the
5206 * reference to h_cg->css. See comment below for detail.
5207 */
5208 hugetlb_cgroup_uncharge_cgroup_rsvd(
5209 hstate_index(h),
5210 (chg - add) * pages_per_huge_page(h), h_cg);
5211
5212 rsv_adjust = hugepage_subpool_put_pages(spool,
5213 chg - add);
5214 hugetlb_acct_memory(h, -rsv_adjust);
5215 } else if (h_cg) {
5216 /*
5217 * The file_regions will hold their own reference to
5218 * h_cg->css. So we should release the reference held
5219 * via hugetlb_cgroup_charge_cgroup_rsvd() when we are
5220 * done.
5221 */
> 5222 css_put(&h_cg->css);
5223 }
5224 }
5225 return true;
5226
5227 out_put_pages:
5228 /* put back original number of pages, chg */
5229 (void)hugepage_subpool_put_pages(spool, chg);
5230 out_uncharge_cgroup:
5231 hugetlb_cgroup_uncharge_cgroup_rsvd(hstate_index(h),
5232 chg * pages_per_huge_page(h), h_cg);
5233 out_err:
5234 if (!vma || vma->vm_flags & VM_MAYSHARE)
5235 /* Only call region_abort if the region_chg succeeded but the
5236 * region_add failed or didn't run.
5237 */
5238 if (chg >= 0 && add < 0)
5239 region_abort(resv_map, from, to, regions_needed);
5240 if (vma && is_vma_resv_set(vma, HPAGE_RESV_OWNER))
5241 kref_put(&resv_map->refs, resv_map_release);
5242 return false;
5243 }
5244
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: pasting "LOCHNAGAR1_" and "(" does not give a valid preprocessing token
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 61556703b610a104de324e4f061dc6cf7b218b46
commit: 0548448b719ac78fa18fdbcd03856952ba6cc7dc pinctrl: lochnagar: Add support for the Cirrus Logic Lochnagar
date: 1 year, 10 months ago
config: mips-randconfig-r012-20210209 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 0548448b719ac78fa18fdbcd03856952ba6cc7dc
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: pasting "LOCHNAGAR1_" and "(" does not give a valid preprocessing token
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: note: in expansion of macro 'LN1_PIN_GPIO'
200 | LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
| ^~~~~~~~~~~~
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: implicit declaration of function 'LOCHNAGAR1_'; did you mean 'LOCHNAGAR1_RST'? [-Werror=implicit-function-declaration]
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: note: in expansion of macro 'LN1_PIN_GPIO'
200 | LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
| ^~~~~~~~~~~~
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: initializer element is not constant
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: note: in expansion of macro 'LN1_PIN_GPIO'
200 | LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
| ^~~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: note: (near initialization for 'lochnagar1_CDC_RESET_pin.reg')
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:200:1: note: in expansion of macro 'LN1_PIN_GPIO'
200 | LN1_PIN_GPIO(CDC_RESET, "codec-reset", RST, CDC_RESET, 1);
| ^~~~~~~~~~~~
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: pasting "LOCHNAGAR1_" and "(" does not give a valid preprocessing token
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:201:1: note: in expansion of macro 'LN1_PIN_GPIO'
201 | LN1_PIN_GPIO(DSP_RESET, "dsp-reset", RST, DSP_RESET, 1);
| ^~~~~~~~~~~~
>> drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: error: initializer element is not constant
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:201:1: note: in expansion of macro 'LN1_PIN_GPIO'
201 | LN1_PIN_GPIO(DSP_RESET, "dsp-reset", RST, DSP_RESET, 1);
| ^~~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:52:46: note: (near initialization for 'lochnagar1_DSP_RESET_pin.reg')
52 | .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
| ^~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:67:2: note: in expansion of macro 'LN_PIN_GPIO'
67 | LN_PIN_GPIO(1, ID, NAME, REG, SHIFT, INVERT)
| ^~~~~~~~~~~
drivers/pinctrl/cirrus/pinctrl-lochnagar.c:201:1: note: in expansion of macro 'LN1_PIN_GPIO'
201 | LN1_PIN_GPIO(DSP_RESET, "dsp-reset", RST, DSP_RESET, 1);
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +52 drivers/pinctrl/cirrus/pinctrl-lochnagar.c
49
50 #define LN_PIN_GPIO(REV, ID, NAME, REG, SHIFT, INVERT) \
51 static const struct lochnagar_pin lochnagar##REV##_##ID##_pin = { \
> 52 .name = NAME, .type = LN_PTYPE_GPIO, .reg = LOCHNAGAR##REV##_##REG, \
53 .shift = LOCHNAGAR##REV##_##SHIFT##_SHIFT, .invert = INVERT, \
54 }
55
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months