Re: [PATCH] smp: fix smp_call_function_single_async prototype
by kernel test robot
Hi Arnd,
I love your patch! Perhaps something to improve:
[auto build test WARNING on next-20210429]
[cannot apply to linux/master soc/for-next linus/master v5.12 v5.12-rc8 v5.12-rc7 v5.12]
[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/Arnd-Bergmann/smp-fix-smp_call_f...
base: 9e5cff2a1315fec1da1f497714395670366506b6
config: arm64-randconfig-r022-20210429 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9131a078901b00e68248a27a4f8c4b11bb1db1ae)
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/be40015a8e0990182fa440f75adecf40c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Arnd-Bergmann/smp-fix-smp_call_function_single_async-prototype/20210429-231235
git checkout be40015a8e0990182fa440f75adecf40cf5d0062
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 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 >>):
>> kernel/smp.c:407:19: warning: passing 8-byte aligned argument to 32-byte aligned parameter 1 of '__csd_lock_wait' may result in an unaligned pointer access [-Walign-mismatch]
__csd_lock_wait(csd);
^
kernel/smp.c:515:19: warning: passing 8-byte aligned argument to 32-byte aligned parameter 1 of 'csd_lock_record' may result in an unaligned pointer access [-Walign-mismatch]
csd_lock_record(csd);
^
kernel/smp.c:516:14: warning: passing 8-byte aligned argument to 32-byte aligned parameter 1 of 'csd_unlock' may result in an unaligned pointer access [-Walign-mismatch]
csd_unlock(csd);
^
kernel/smp.c:525:14: warning: passing 8-byte aligned argument to 32-byte aligned parameter 1 of 'csd_unlock' may result in an unaligned pointer access [-Walign-mismatch]
csd_unlock(csd);
^
kernel/smp.c:684:6: warning: no previous prototype for function 'flush_smp_call_function_from_idle' [-Wmissing-prototypes]
void flush_smp_call_function_from_idle(void)
^
kernel/smp.c:684:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void flush_smp_call_function_from_idle(void)
^
static
5 warnings generated.
vim +/__csd_lock_wait +407 kernel/smp.c
35feb60474bf4f Paul E. McKenney 2020-06-30 403
be40015a8e0990 Arnd Bergmann 2021-04-29 404 static __always_inline void csd_lock_wait(struct __call_single_data *csd)
8d0968cc6b8ffd Juergen Gross 2021-03-01 405 {
8d0968cc6b8ffd Juergen Gross 2021-03-01 406 if (static_branch_unlikely(&csdlock_debug_enabled)) {
8d0968cc6b8ffd Juergen Gross 2021-03-01 @407 __csd_lock_wait(csd);
8d0968cc6b8ffd Juergen Gross 2021-03-01 408 return;
8d0968cc6b8ffd Juergen Gross 2021-03-01 409 }
8d0968cc6b8ffd Juergen Gross 2021-03-01 410
8d0968cc6b8ffd Juergen Gross 2021-03-01 411 smp_cond_load_acquire(&csd->node.u_flags, !(VAL & CSD_FLAG_LOCK));
8d0968cc6b8ffd Juergen Gross 2021-03-01 412 }
a5aabace5fb8ab Juergen Gross 2021-03-01 413
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[stffrdhrn:litex-gpio-fix 3/26] drivers/mmc/host/litex_mmc.c:85:6: warning: no previous prototype for function 'sdclk_set_clk'
by kernel test robot
tree: https://github.com/stffrdhrn/linux.git litex-gpio-fix
head: 6f903ad53b35652c15f91265053f437a6b6f17f0
commit: 79f4d67d68801c63e6abf11ead9c2cbf5449f7d6 [3/26] LiteX: driver for LiteSDCard (litex_mmc)
config: powerpc64-randconfig-r015-20210429 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9131a078901b00e68248a27a4f8c4b11bb1db1ae)
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://github.com/stffrdhrn/linux/commit/79f4d67d68801c63e6abf11ead9c2cb...
git remote add stffrdhrn https://github.com/stffrdhrn/linux.git
git fetch --no-tags stffrdhrn litex-gpio-fix
git checkout 79f4d67d68801c63e6abf11ead9c2cbf5449f7d6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
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/mmc/host/litex_mmc.c:85:6: warning: no previous prototype for function 'sdclk_set_clk' [-Wmissing-prototypes]
void sdclk_set_clk(struct litex_mmc_host *host, unsigned int clk_freq) {
^
drivers/mmc/host/litex_mmc.c:85:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void sdclk_set_clk(struct litex_mmc_host *host, unsigned int clk_freq) {
^
static
1 warning generated.
vim +/sdclk_set_clk +85 drivers/mmc/host/litex_mmc.c
83
84
> 85 void sdclk_set_clk(struct litex_mmc_host *host, unsigned int clk_freq) {
86 u32 div = clk_freq ? host->freq / clk_freq : 256;
87 div = roundup_pow_of_two(div);
88 div = min(max(div, (u32)2), (u32)256);
89 dev_info(&host->dev->dev,
90 "Requested clk_freq=%d: set to %d via div=%d\n",
91 clk_freq, host->freq / div, div);
92 litex_write16(host->sdphy + LITEX_MMC_SDPHY_CLOCKERDIV_OFF, div);
93 }
94
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[RFC PATCH] nvme-tcp-offload: nvme_tcp_ofld_report_queue_err() can be static
by kernel test robot
drivers/nvme/host/tcp-offload.c:76:5: warning: symbol 'nvme_tcp_ofld_report_queue_err' was not declared. Should it be static?
drivers/nvme/host/tcp-offload.c:94:6: warning: symbol 'nvme_tcp_ofld_req_done' was not declared. Should it be static?
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
tcp-offload.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/nvme/host/tcp-offload.c b/drivers/nvme/host/tcp-offload.c
index 711232eba3390..949a8225b6672 100644
--- a/drivers/nvme/host/tcp-offload.c
+++ b/drivers/nvme/host/tcp-offload.c
@@ -73,7 +73,7 @@ EXPORT_SYMBOL_GPL(nvme_tcp_ofld_unregister_dev);
* API function that allows the vendor specific offload driver to reports errors
* to the common offload layer, to invoke error recovery.
*/
-int nvme_tcp_ofld_report_queue_err(struct nvme_tcp_ofld_queue *queue)
+static int nvme_tcp_ofld_report_queue_err(struct nvme_tcp_ofld_queue *queue)
{
/* Placeholder - invoke error recovery flow */
@@ -91,9 +91,9 @@ int nvme_tcp_ofld_report_queue_err(struct nvme_tcp_ofld_queue *queue)
* API function that allows the vendor specific offload driver to report request
* completions to the common offload layer.
*/
-void nvme_tcp_ofld_req_done(struct nvme_tcp_ofld_req *req,
- union nvme_result *result,
- __le16 status)
+static void nvme_tcp_ofld_req_done(struct nvme_tcp_ofld_req *req,
+ union nvme_result *result,
+ __le16 status)
{
/* Placeholder - complete request with/without error */
}
1 year, 3 months
[csky-linux:v5.12-riscv-atomic-arch-v3 5/5] include/linux/atomic-arch-fallback.h:60:32: error: implicit declaration of function 'arch_cmpxchg64'; did you mean 'arch_cmpxchg'?
by kernel test robot
tree: https://github.com/c-sky/csky-linux v5.12-riscv-atomic-arch-v3
head: 867f16e200fd7bf347fb4d018f5a433c3afff75b
commit: 867f16e200fd7bf347fb4d018f5a433c3afff75b [5/5] riscv: atomic: Using ARCH_ATOMIC in asm/atomic.h
config: riscv-allmodconfig (attached as .config)
compiler: riscv64-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://github.com/c-sky/csky-linux/commit/867f16e200fd7bf347fb4d018f5a43...
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux v5.12-riscv-atomic-arch-v3
git checkout 867f16e200fd7bf347fb4d018f5a433c3afff75b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=riscv
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/atomic.h:81,
from drivers/iommu/io-pgtable-arm.c:12:
drivers/iommu/io-pgtable-arm.c: In function 'arm_lpae_install_table':
>> include/linux/atomic-arch-fallback.h:60:32: error: implicit declaration of function 'arch_cmpxchg64'; did you mean 'arch_cmpxchg'? [-Werror=implicit-function-declaration]
60 | #define arch_cmpxchg64_relaxed arch_cmpxchg64
| ^~~~~~~~~~~~~~
include/asm-generic/atomic-instrumented.h:1807:2: note: in expansion of macro 'arch_cmpxchg64_relaxed'
1807 | arch_cmpxchg64_relaxed(__ai_ptr, __VA_ARGS__); \
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/iommu/io-pgtable-arm.c:320:8: note: in expansion of macro 'cmpxchg64_relaxed'
320 | old = cmpxchg64_relaxed(ptep, curr, new);
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +60 include/linux/atomic-arch-fallback.h
37f8173dd84936 Peter Zijlstra 2020-01-24 56
37f8173dd84936 Peter Zijlstra 2020-01-24 57 #ifndef arch_cmpxchg64_relaxed
37f8173dd84936 Peter Zijlstra 2020-01-24 58 #define arch_cmpxchg64_acquire arch_cmpxchg64
37f8173dd84936 Peter Zijlstra 2020-01-24 59 #define arch_cmpxchg64_release arch_cmpxchg64
29f006fdefe6f8 Peter Zijlstra 2020-08-29 @60 #define arch_cmpxchg64_relaxed arch_cmpxchg64
37f8173dd84936 Peter Zijlstra 2020-01-24 61 #else /* arch_cmpxchg64_relaxed */
37f8173dd84936 Peter Zijlstra 2020-01-24 62
:::::: The code at line 60 was first introduced by commit
:::::: 29f006fdefe6f88abde973a0b0f20d2704e93fd4 asm-generic/atomic: Add try_cmpxchg() fallbacks
:::::: TO: Peter Zijlstra <peterz(a)infradead.org>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[stffrdhrn:litex-gpio-fix 15/26] drivers/mtd/spi-nor/litex-spiflash.c:305:15: error: initialization of 'int (*)(struct spi_nor *, u8, const u8 *, size_t)' {aka 'int (*)(struct spi_nor *, unsigned char, const unsigned char *, long unsigned int)'} from incompatible pointer type 'ssize_t ...
by kernel test robot
Hi Daniel,
FYI, the error/warning still remains.
tree: https://github.com/stffrdhrn/linux.git litex-gpio-fix
head: 6f903ad53b35652c15f91265053f437a6b6f17f0
commit: 85b04bca0da9f332aff3820373b7169644d7332b [15/26] LiteX: driver for SPI Flash (mtd) device
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-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://github.com/stffrdhrn/linux/commit/85b04bca0da9f332aff3820373b7169...
git remote add stffrdhrn https://github.com/stffrdhrn/linux.git
git fetch --no-tags stffrdhrn litex-gpio-fix
git checkout 85b04bca0da9f332aff3820373b7169644d7332b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=riscv
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/mtd/spi-nor/litex-spiflash.c: In function 'cs':
drivers/mtd/spi-nor/litex-spiflash.c:71:20: error: implicit declaration of function 'litex_get_reg'; did you mean '_litex_get_reg'? [-Werror=implicit-function-declaration]
71 | u8 curr_val = (u8)litex_get_reg(spi->base + SPIFLASH_BITBANG_OFFSET, SPIFLASH_BITBANG_SIZE);
| ^~~~~~~~~~~~~
| _litex_get_reg
drivers/mtd/spi-nor/litex-spiflash.c:75:2: error: implicit declaration of function 'litex_set_reg'; did you mean '_litex_set_reg'? [-Werror=implicit-function-declaration]
75 | litex_set_reg(spi->base + SPIFLASH_BITBANG_OFFSET, SPIFLASH_BITBANG_SIZE, set_val);
| ^~~~~~~~~~~~~
| _litex_set_reg
drivers/mtd/spi-nor/litex-spiflash.c: At top level:
>> drivers/mtd/spi-nor/litex-spiflash.c:305:15: error: initialization of 'int (*)(struct spi_nor *, u8, const u8 *, size_t)' {aka 'int (*)(struct spi_nor *, unsigned char, const unsigned char *, long unsigned int)'} from incompatible pointer type 'ssize_t (*)(struct spi_nor *, u8, const u8 *, size_t)' {aka 'long int (*)(struct spi_nor *, unsigned char, const unsigned char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
305 | .write_reg = spi_flash_nor_write_reg,
| ^~~~~~~~~~~~~~~~~~~~~~~
drivers/mtd/spi-nor/litex-spiflash.c:305:15: note: (near initialization for 'litex_spi_controller_ops.write_reg')
cc1: some warnings being treated as errors
vim +305 drivers/mtd/spi-nor/litex-spiflash.c
300
301 static const struct spi_nor_controller_ops litex_spi_controller_ops = {
302 .read = spi_flash_nor_read,
303 .write = spi_flash_nor_write,
304 .read_reg = spi_flash_nor_read_reg,
> 305 .write_reg = spi_flash_nor_write_reg,
306 .erase = spi_flash_nor_erase,
307 };
308
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[freescale-fslc:5.12.x+fslc 4/6] drivers/misc/uboot_bootcount.c:70:50: 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...
by kernel test robot
tree: https://github.com/Freescale/linux-fslc 5.12.x+fslc
head: 533c005dbffa6950950622c514132d7b11c039bf
commit: 78c9cede1e8309fbce3522c4ec751d71e6cbd1d4 [4/6] drivers, misc: add U-Boot bootcount driver
config: s390-allmodconfig (attached as .config)
compiler: s390-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://github.com/Freescale/linux-fslc/commit/78c9cede1e8309fbce3522c4ec...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc 5.12.x+fslc
git checkout 78c9cede1e8309fbce3522c4ec751d71e6cbd1d4
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=s390
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/kobject.h:20,
from include/linux/energy_model.h:7,
from include/linux/device.h:16,
from include/linux/miscdevice.h:7,
from drivers/misc/uboot_bootcount.c:17:
>> drivers/misc/uboot_bootcount.c:70:50: 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]
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:104:10: note: in definition of macro '__ATTR'
104 | .show = _show, \
| ^~~~~
drivers/misc/uboot_bootcount.c:70:8: note: in expansion of macro 'DEVICE_ATTR'
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~
drivers/misc/uboot_bootcount.c:70:50: note: (near initialization for 'dev_attr_bootcount.show')
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:104:10: note: in definition of macro '__ATTR'
104 | .show = _show, \
| ^~~~~
drivers/misc/uboot_bootcount.c:70:8: note: in expansion of macro 'DEVICE_ATTR'
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~
>> drivers/misc/uboot_bootcount.c:71:3: error: initialization of 'ssize_t (*)(struct device *, struct device_attribute *, const char *, size_t)' {aka 'long int (*)(struct device *, struct device_attribute *, const char *, long unsigned int)'} from incompatible pointer type 'int (*)(struct device *, struct device_attribute *, const char *, size_t)' {aka 'int (*)(struct device *, struct device_attribute *, const char *, long unsigned int)'} [-Werror=incompatible-pointer-types]
71 | store_str_bootcount);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:105:11: note: in definition of macro '__ATTR'
105 | .store = _store, \
| ^~~~~~
drivers/misc/uboot_bootcount.c:70:8: note: in expansion of macro 'DEVICE_ATTR'
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~
drivers/misc/uboot_bootcount.c:71:3: note: (near initialization for 'dev_attr_bootcount.store')
71 | store_str_bootcount);
| ^~~~~~~~~~~~~~~~~~~
include/linux/sysfs.h:105:11: note: in definition of macro '__ATTR'
105 | .store = _store, \
| ^~~~~~
drivers/misc/uboot_bootcount.c:70:8: note: in expansion of macro 'DEVICE_ATTR'
70 | static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
| ^~~~~~~~~~~
cc1: some warnings being treated as errors
vim +70 drivers/misc/uboot_bootcount.c
69
> 70 static DEVICE_ATTR(bootcount, S_IWUSR | S_IRUGO, show_str_bootcount,
> 71 store_str_bootcount);
72
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[android-common:android-3.18 389/1091] arch/x86/kernel/apic/apic.c:1471:37: error: 'skip_ioapic_setup' undeclared
by kernel test robot
Hi Baoquan,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android-3.18
head: c7075682a9dd6d2807238e2af6c041e86d31bd20
commit: 39972bcf660a4a878675bc794f07a860eb4de0c3 [389/1091] x86/apic: Set up through-local-APIC mode on the boot CPU if 'noapic' specified
config: i386-randconfig-a003-20210429 (attached as .config)
compiler: gcc-5 (Ubuntu 5.5.0-12ubuntu1) 5.5.0 20171010
reproduce (this is a W=1 build):
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-3.18
git checkout 39972bcf660a4a878675bc794f07a860eb4de0c3
# save the attached .config to linux build tree
make W=1 W=1 ARCH=i386
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 arch/x86/include/asm/pgalloc.h:6:0,
from arch/x86/kernel/apic/apic.c:42:
include/linux/pagemap.h: In function 'fault_in_multipages_readable':
include/linux/pagemap.h:633:16: warning: variable 'c' set but not used [-Wunused-but-set-variable]
volatile char c;
^
arch/x86/kernel/apic/apic.c: At top level:
arch/x86/kernel/apic/apic.c:957:28: warning: no previous prototype for 'smp_trace_apic_timer_interrupt' [-Wmissing-prototypes]
__visible void __irq_entry smp_trace_apic_timer_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/apic/apic.c: In function 'setup_local_APIC':
>> arch/x86/kernel/apic/apic.c:1471:37: error: 'skip_ioapic_setup' undeclared (first use in this function)
if (!cpu && (pic_mode || !value || skip_ioapic_setup)) {
^
arch/x86/kernel/apic/apic.c:1471:37: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/kernel/apic/apic.c: At top level:
arch/x86/kernel/apic/apic.c:1595:12: warning: no previous prototype for 'enable_IR' [-Wmissing-prototypes]
int __init enable_IR(void)
^
arch/x86/kernel/apic/apic.c: In function 'enable_IR_x2apic':
arch/x86/kernel/apic/apic.c:1617:11: warning: variable 'x2apic_enabled' set but not used [-Wunused-but-set-variable]
int ret, x2apic_enabled = 0;
^
arch/x86/kernel/apic/apic.c: In function 'apic_verify':
arch/x86/kernel/apic/apic.c:1706:16: warning: variable 'h' set but not used [-Wunused-but-set-variable]
u32 features, h, l;
^
arch/x86/kernel/apic/apic.c: At top level:
arch/x86/kernel/apic/apic.c:1980:16: warning: no previous prototype for 'smp_trace_spurious_interrupt' [-Wmissing-prototypes]
__visible void smp_trace_spurious_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/apic/apic.c:2036:16: warning: no previous prototype for 'smp_trace_error_interrupt' [-Wmissing-prototypes]
__visible void smp_trace_error_interrupt(struct pt_regs *regs)
^
arch/x86/kernel/apic/apic.c: In function 'generic_processor_info':
arch/x86/kernel/apic/apic.c:2174:43: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
if (!boot_cpu_detected && num_processors >= nr_cpu_ids - 1 &&
^
vim +/skip_ioapic_setup +1471 arch/x86/kernel/apic/apic.c
1453
1454 /*
1455 * Set spurious IRQ vector
1456 */
1457 value |= SPURIOUS_APIC_VECTOR;
1458 apic_write(APIC_SPIV, value);
1459
1460 /*
1461 * Set up LVT0, LVT1:
1462 *
1463 * set up through-local-APIC on the BP's LINT0. This is not
1464 * strictly necessary in pure symmetric-IO mode, but sometimes
1465 * we delegate interrupts to the 8259A.
1466 */
1467 /*
1468 * TODO: set up through-local-APIC from through-I/O-APIC? --macro
1469 */
1470 value = apic_read(APIC_LVT0) & APIC_LVT_MASKED;
> 1471 if (!cpu && (pic_mode || !value || skip_ioapic_setup)) {
1472 value = APIC_DM_EXTINT;
1473 apic_printk(APIC_VERBOSE, "enabled ExtINT on CPU#%d\n", cpu);
1474 } else {
1475 value = APIC_DM_EXTINT | APIC_LVT_MASKED;
1476 apic_printk(APIC_VERBOSE, "masked ExtINT on CPU#%d\n", cpu);
1477 }
1478 apic_write(APIC_LVT0, value);
1479
1480 /*
1481 * only the BP should see the LINT1 NMI signal, obviously.
1482 */
1483 if (!cpu)
1484 value = APIC_DM_NMI;
1485 else
1486 value = APIC_DM_NMI | APIC_LVT_MASKED;
1487 if (!lapic_is_integrated()) /* 82489DX */
1488 value |= APIC_LVT_LEVEL_TRIGGER;
1489 apic_write(APIC_LVT1, value);
1490
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[csky-linux:linux-next-fixup-STRN 4/5] arch/csky/abiv2/fpu.c:32:17: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://github.com/c-sky/csky-linux linux-next-fixup-STRN
head: 87cccc6b2c7d3265f6ba190c02797a097ce8134c
commit: d3900e8d918f8fbd1366b9c2998e2830e66a0081 [4/5] csky: uaccess.h: Coding convention with asm generic
config: csky-randconfig-s031-20210429 (attached as .config)
compiler: csky-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-341-g8af24329-dirty
# https://github.com/c-sky/csky-linux/commit/d3900e8d918f8fbd1366b9c2998e28...
git remote add csky-linux https://github.com/c-sky/csky-linux
git fetch --no-tags csky-linux linux-next-fixup-STRN
git checkout d3900e8d918f8fbd1366b9c2998e2830e66a0081
# 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__' W=1 ARCH=csky
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/csky/abiv2/fpu.c:32:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:32:17: sparse: expected void const volatile [noderef] __user *ptr
arch/csky/abiv2/fpu.c:32:17: sparse: got unsigned short [usertype] *
>> arch/csky/abiv2/fpu.c:32:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:32:17: sparse: expected void const [noderef] __user *ptr
arch/csky/abiv2/fpu.c:32:17: sparse: got unsigned short [usertype] *
>> arch/csky/abiv2/fpu.c:32:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:32:17: sparse: expected void const [noderef] __user *ptr
arch/csky/abiv2/fpu.c:32:17: sparse: got unsigned short [usertype] *
>> arch/csky/abiv2/fpu.c:32:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:32:17: sparse: expected void const [noderef] __user *ptr
arch/csky/abiv2/fpu.c:32:17: sparse: got unsigned short [usertype] *
>> arch/csky/abiv2/fpu.c:32:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:32:17: sparse: expected void const [noderef] __user *ptr
arch/csky/abiv2/fpu.c:32:17: sparse: got unsigned short [usertype] *
arch/csky/abiv2/fpu.c:36:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:36:17: sparse: expected void const volatile [noderef] __user *ptr
arch/csky/abiv2/fpu.c:36:17: sparse: got unsigned short [usertype] *
arch/csky/abiv2/fpu.c:36:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:36:17: sparse: expected void const [noderef] __user *ptr
arch/csky/abiv2/fpu.c:36:17: sparse: got unsigned short [usertype] *
arch/csky/abiv2/fpu.c:36:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:36:17: sparse: expected void const [noderef] __user *ptr
arch/csky/abiv2/fpu.c:36:17: sparse: got unsigned short [usertype] *
arch/csky/abiv2/fpu.c:36:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:36:17: sparse: expected void const [noderef] __user *ptr
arch/csky/abiv2/fpu.c:36:17: sparse: got unsigned short [usertype] *
arch/csky/abiv2/fpu.c:36:17: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *ptr @@ got unsigned short [usertype] * @@
arch/csky/abiv2/fpu.c:36:17: sparse: expected void const [noderef] __user *ptr
arch/csky/abiv2/fpu.c:36:17: sparse: got unsigned short [usertype] *
vim +32 arch/csky/abiv2/fpu.c
e9564df753fd54 Guo Ren 2018-09-05 12
e9564df753fd54 Guo Ren 2018-09-05 13 /*
e9564df753fd54 Guo Ren 2018-09-05 14 * fpu_libc_helper() is to help libc to excute:
e9564df753fd54 Guo Ren 2018-09-05 15 * - mfcr %a, cr<1, 2>
e9564df753fd54 Guo Ren 2018-09-05 16 * - mfcr %a, cr<2, 2>
e9564df753fd54 Guo Ren 2018-09-05 17 * - mtcr %a, cr<1, 2>
e9564df753fd54 Guo Ren 2018-09-05 18 * - mtcr %a, cr<2, 2>
e9564df753fd54 Guo Ren 2018-09-05 19 */
e9564df753fd54 Guo Ren 2018-09-05 20 int fpu_libc_helper(struct pt_regs *regs)
e9564df753fd54 Guo Ren 2018-09-05 21 {
e9564df753fd54 Guo Ren 2018-09-05 22 int fault;
e9564df753fd54 Guo Ren 2018-09-05 23 unsigned long instrptr, regx = 0;
e9564df753fd54 Guo Ren 2018-09-05 24 unsigned long index = 0, tmp = 0;
e9564df753fd54 Guo Ren 2018-09-05 25 unsigned long tinstr = 0;
e9564df753fd54 Guo Ren 2018-09-05 26 u16 instr_hi, instr_low;
e9564df753fd54 Guo Ren 2018-09-05 27
e9564df753fd54 Guo Ren 2018-09-05 28 instrptr = instruction_pointer(regs);
e9564df753fd54 Guo Ren 2018-09-05 29 if (instrptr & 1)
e9564df753fd54 Guo Ren 2018-09-05 30 return 0;
e9564df753fd54 Guo Ren 2018-09-05 31
e9564df753fd54 Guo Ren 2018-09-05 @32 fault = __get_user(instr_low, (u16 *)instrptr);
e9564df753fd54 Guo Ren 2018-09-05 33 if (fault)
e9564df753fd54 Guo Ren 2018-09-05 34 return 0;
e9564df753fd54 Guo Ren 2018-09-05 35
e9564df753fd54 Guo Ren 2018-09-05 36 fault = __get_user(instr_hi, (u16 *)(instrptr + 2));
e9564df753fd54 Guo Ren 2018-09-05 37 if (fault)
e9564df753fd54 Guo Ren 2018-09-05 38 return 0;
e9564df753fd54 Guo Ren 2018-09-05 39
e9564df753fd54 Guo Ren 2018-09-05 40 tinstr = instr_hi | ((unsigned long)instr_low << 16);
e9564df753fd54 Guo Ren 2018-09-05 41
e9564df753fd54 Guo Ren 2018-09-05 42 if (((tinstr >> 21) & 0x1F) != 2)
e9564df753fd54 Guo Ren 2018-09-05 43 return 0;
e9564df753fd54 Guo Ren 2018-09-05 44
e9564df753fd54 Guo Ren 2018-09-05 45 if ((tinstr & MTCR_MASK) == MTCR_DIST) {
e9564df753fd54 Guo Ren 2018-09-05 46 index = (tinstr >> 16) & 0x1F;
e9564df753fd54 Guo Ren 2018-09-05 47 if (index > 13)
e9564df753fd54 Guo Ren 2018-09-05 48 return 0;
e9564df753fd54 Guo Ren 2018-09-05 49
e9564df753fd54 Guo Ren 2018-09-05 50 tmp = tinstr & 0x1F;
e9564df753fd54 Guo Ren 2018-09-05 51 if (tmp > 2)
e9564df753fd54 Guo Ren 2018-09-05 52 return 0;
e9564df753fd54 Guo Ren 2018-09-05 53
e9564df753fd54 Guo Ren 2018-09-05 54 regx = *(®s->a0 + index);
e9564df753fd54 Guo Ren 2018-09-05 55
e9564df753fd54 Guo Ren 2018-09-05 56 if (tmp == 1)
e9564df753fd54 Guo Ren 2018-09-05 57 mtcr("cr<1, 2>", regx);
e9564df753fd54 Guo Ren 2018-09-05 58 else if (tmp == 2)
e9564df753fd54 Guo Ren 2018-09-05 59 mtcr("cr<2, 2>", regx);
e9564df753fd54 Guo Ren 2018-09-05 60 else
e9564df753fd54 Guo Ren 2018-09-05 61 return 0;
e9564df753fd54 Guo Ren 2018-09-05 62
e9564df753fd54 Guo Ren 2018-09-05 63 regs->pc += 4;
e9564df753fd54 Guo Ren 2018-09-05 64 return 1;
e9564df753fd54 Guo Ren 2018-09-05 65 }
e9564df753fd54 Guo Ren 2018-09-05 66
e9564df753fd54 Guo Ren 2018-09-05 67 if ((tinstr & MFCR_MASK) == MFCR_DIST) {
e9564df753fd54 Guo Ren 2018-09-05 68 index = tinstr & 0x1F;
e9564df753fd54 Guo Ren 2018-09-05 69 if (index > 13)
e9564df753fd54 Guo Ren 2018-09-05 70 return 0;
e9564df753fd54 Guo Ren 2018-09-05 71
e9564df753fd54 Guo Ren 2018-09-05 72 tmp = ((tinstr >> 16) & 0x1F);
e9564df753fd54 Guo Ren 2018-09-05 73 if (tmp > 2)
e9564df753fd54 Guo Ren 2018-09-05 74 return 0;
e9564df753fd54 Guo Ren 2018-09-05 75
e9564df753fd54 Guo Ren 2018-09-05 76 if (tmp == 1)
e9564df753fd54 Guo Ren 2018-09-05 77 regx = mfcr("cr<1, 2>");
e9564df753fd54 Guo Ren 2018-09-05 78 else if (tmp == 2)
e9564df753fd54 Guo Ren 2018-09-05 79 regx = mfcr("cr<2, 2>");
e9564df753fd54 Guo Ren 2018-09-05 80 else
e9564df753fd54 Guo Ren 2018-09-05 81 return 0;
e9564df753fd54 Guo Ren 2018-09-05 82
e9564df753fd54 Guo Ren 2018-09-05 83 *(®s->a0 + index) = regx;
e9564df753fd54 Guo Ren 2018-09-05 84
e9564df753fd54 Guo Ren 2018-09-05 85 regs->pc += 4;
e9564df753fd54 Guo Ren 2018-09-05 86 return 1;
e9564df753fd54 Guo Ren 2018-09-05 87 }
e9564df753fd54 Guo Ren 2018-09-05 88
e9564df753fd54 Guo Ren 2018-09-05 89 return 0;
e9564df753fd54 Guo Ren 2018-09-05 90 }
e9564df753fd54 Guo Ren 2018-09-05 91
:::::: The code at line 32 was first introduced by commit
:::::: e9564df753fd547fcbcd4fd10015c3b1213ef452 csky: Process management and Signal
:::::: TO: Guo Ren <ren_guo(a)c-sky.com>
:::::: CC: Guo Ren <ren_guo(a)c-sky.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months