[android-goldfish:android-5.4 4869/9999] include/linux/unaligned/access_ok.h:8:28: error: redefinition of 'get_unaligned_le16'
by kernel test robot
Hi Christian,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/goldfish android-5.4
head: 5eb96e454e88c2666ba10b3f07661431132e3ef4
commit: 1972b15841c7fe775146ba08b898c28f98ac9f4a [4869/9999] FROMLIST: usb: renesas-xhci: Add the renesas xhci driver
config: ia64-allmodconfig (attached as .config)
compiler: ia64-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
git checkout 1972b15841c7fe775146ba08b898c28f98ac9f4a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
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 drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:8:28: error: redefinition of 'get_unaligned_le16'
8 | static __always_inline u16 get_unaligned_le16(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:5,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/le_struct.h:7:19: note: previous definition of 'get_unaligned_le16' was here
7 | static inline u16 get_unaligned_le16(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:13:28: error: redefinition of 'get_unaligned_le32'
13 | static __always_inline u32 get_unaligned_le32(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:5,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/le_struct.h:12:19: note: previous definition of 'get_unaligned_le32' was here
12 | static inline u32 get_unaligned_le32(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:18:28: error: redefinition of 'get_unaligned_le64'
18 | static __always_inline u64 get_unaligned_le64(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:5,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/le_struct.h:17:19: note: previous definition of 'get_unaligned_le64' was here
17 | static inline u64 get_unaligned_le64(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:23:28: error: redefinition of 'get_unaligned_be16'
23 | static __always_inline u16 get_unaligned_be16(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:6,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/be_byteshift.h:41:19: note: previous definition of 'get_unaligned_be16' was here
41 | static inline u16 get_unaligned_be16(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:28:28: error: redefinition of 'get_unaligned_be32'
28 | static __always_inline u32 get_unaligned_be32(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:6,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/be_byteshift.h:46:19: note: previous definition of 'get_unaligned_be32' was here
46 | static inline u32 get_unaligned_be32(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:33:28: error: redefinition of 'get_unaligned_be64'
33 | static __always_inline u64 get_unaligned_be64(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:6,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/be_byteshift.h:51:19: note: previous definition of 'get_unaligned_be64' was here
51 | static inline u64 get_unaligned_be64(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:38:29: error: redefinition of 'put_unaligned_le16'
38 | static __always_inline void put_unaligned_le16(u16 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:5,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/le_struct.h:22:20: note: previous definition of 'put_unaligned_le16' was here
22 | static inline void put_unaligned_le16(u16 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:43:29: error: redefinition of 'put_unaligned_le32'
43 | static __always_inline void put_unaligned_le32(u32 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:5,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/le_struct.h:27:20: note: previous definition of 'put_unaligned_le32' was here
27 | static inline void put_unaligned_le32(u32 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:48:29: error: redefinition of 'put_unaligned_le64'
48 | static __always_inline void put_unaligned_le64(u64 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:5,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/le_struct.h:32:20: note: previous definition of 'put_unaligned_le64' was here
32 | static inline void put_unaligned_le64(u64 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:53:29: error: redefinition of 'put_unaligned_be16'
53 | static __always_inline void put_unaligned_be16(u16 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:6,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/be_byteshift.h:56:20: note: previous definition of 'put_unaligned_be16' was here
56 | static inline void put_unaligned_be16(u16 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:58:29: error: redefinition of 'put_unaligned_be32'
58 | static __always_inline void put_unaligned_be32(u32 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:6,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/be_byteshift.h:61:20: note: previous definition of 'put_unaligned_be32' was here
61 | static inline void put_unaligned_be32(u32 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/usb/host/xhci-pci-renesas.c:9:
>> include/linux/unaligned/access_ok.h:63:29: error: redefinition of 'put_unaligned_be64'
63 | static __always_inline void put_unaligned_be64(u64 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/ia64/include/asm/unaligned.h:6,
from arch/ia64/include/asm/io.h:23,
from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/percpu.h:7,
from include/linux/arch_topology.h:9,
from include/linux/topology.h:30,
from include/linux/gfp.h:9,
from include/linux/xarray.h:14,
from include/linux/radix-tree.h:18,
from include/linux/idr.h:15,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from drivers/usb/host/xhci-pci-renesas.c:4:
include/linux/unaligned/be_byteshift.h:66:20: note: previous definition of 'put_unaligned_be64' was here
66 | static inline void put_unaligned_be64(u64 val, void *p)
| ^~~~~~~~~~~~~~~~~~
vim +/get_unaligned_le16 +8 include/linux/unaligned/access_ok.h
064106a91be5e7 Harvey Harrison 2008-04-29 7
e3bde9568d992c Denys Vlasenko 2016-03-17 @8 static __always_inline u16 get_unaligned_le16(const void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 9 {
064106a91be5e7 Harvey Harrison 2008-04-29 10 return le16_to_cpup((__le16 *)p);
064106a91be5e7 Harvey Harrison 2008-04-29 11 }
064106a91be5e7 Harvey Harrison 2008-04-29 12
e3bde9568d992c Denys Vlasenko 2016-03-17 @13 static __always_inline u32 get_unaligned_le32(const void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 14 {
064106a91be5e7 Harvey Harrison 2008-04-29 15 return le32_to_cpup((__le32 *)p);
064106a91be5e7 Harvey Harrison 2008-04-29 16 }
064106a91be5e7 Harvey Harrison 2008-04-29 17
e3bde9568d992c Denys Vlasenko 2016-03-17 @18 static __always_inline u64 get_unaligned_le64(const void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 19 {
064106a91be5e7 Harvey Harrison 2008-04-29 20 return le64_to_cpup((__le64 *)p);
064106a91be5e7 Harvey Harrison 2008-04-29 21 }
064106a91be5e7 Harvey Harrison 2008-04-29 22
e3bde9568d992c Denys Vlasenko 2016-03-17 @23 static __always_inline u16 get_unaligned_be16(const void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 24 {
064106a91be5e7 Harvey Harrison 2008-04-29 25 return be16_to_cpup((__be16 *)p);
064106a91be5e7 Harvey Harrison 2008-04-29 26 }
064106a91be5e7 Harvey Harrison 2008-04-29 27
e3bde9568d992c Denys Vlasenko 2016-03-17 @28 static __always_inline u32 get_unaligned_be32(const void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 29 {
064106a91be5e7 Harvey Harrison 2008-04-29 30 return be32_to_cpup((__be32 *)p);
064106a91be5e7 Harvey Harrison 2008-04-29 31 }
064106a91be5e7 Harvey Harrison 2008-04-29 32
e3bde9568d992c Denys Vlasenko 2016-03-17 @33 static __always_inline u64 get_unaligned_be64(const void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 34 {
064106a91be5e7 Harvey Harrison 2008-04-29 35 return be64_to_cpup((__be64 *)p);
064106a91be5e7 Harvey Harrison 2008-04-29 36 }
064106a91be5e7 Harvey Harrison 2008-04-29 37
e3bde9568d992c Denys Vlasenko 2016-03-17 @38 static __always_inline void put_unaligned_le16(u16 val, void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 39 {
064106a91be5e7 Harvey Harrison 2008-04-29 40 *((__le16 *)p) = cpu_to_le16(val);
064106a91be5e7 Harvey Harrison 2008-04-29 41 }
064106a91be5e7 Harvey Harrison 2008-04-29 42
e3bde9568d992c Denys Vlasenko 2016-03-17 @43 static __always_inline void put_unaligned_le32(u32 val, void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 44 {
064106a91be5e7 Harvey Harrison 2008-04-29 45 *((__le32 *)p) = cpu_to_le32(val);
064106a91be5e7 Harvey Harrison 2008-04-29 46 }
064106a91be5e7 Harvey Harrison 2008-04-29 47
e3bde9568d992c Denys Vlasenko 2016-03-17 @48 static __always_inline void put_unaligned_le64(u64 val, void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 49 {
064106a91be5e7 Harvey Harrison 2008-04-29 50 *((__le64 *)p) = cpu_to_le64(val);
064106a91be5e7 Harvey Harrison 2008-04-29 51 }
064106a91be5e7 Harvey Harrison 2008-04-29 52
e3bde9568d992c Denys Vlasenko 2016-03-17 @53 static __always_inline void put_unaligned_be16(u16 val, void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 54 {
064106a91be5e7 Harvey Harrison 2008-04-29 55 *((__be16 *)p) = cpu_to_be16(val);
064106a91be5e7 Harvey Harrison 2008-04-29 56 }
064106a91be5e7 Harvey Harrison 2008-04-29 57
e3bde9568d992c Denys Vlasenko 2016-03-17 @58 static __always_inline void put_unaligned_be32(u32 val, void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 59 {
064106a91be5e7 Harvey Harrison 2008-04-29 60 *((__be32 *)p) = cpu_to_be32(val);
064106a91be5e7 Harvey Harrison 2008-04-29 61 }
064106a91be5e7 Harvey Harrison 2008-04-29 62
e3bde9568d992c Denys Vlasenko 2016-03-17 @63 static __always_inline void put_unaligned_be64(u64 val, void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 64 {
064106a91be5e7 Harvey Harrison 2008-04-29 65 *((__be64 *)p) = cpu_to_be64(val);
064106a91be5e7 Harvey Harrison 2008-04-29 66 }
064106a91be5e7 Harvey Harrison 2008-04-29 67
:::::: The code at line 8 was first introduced by commit
:::::: e3bde9568d992c5f985e6e30731a5f9f9bef7b13 include/linux/unaligned: force inlining of byteswap operations
:::::: TO: Denys Vlasenko <dvlasenk(a)redhat.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[peterz-queue:modules/WIP 21/22] kernel/module.c:1036: undefined reference to `ftrace_module_release'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git modules/WIP
head: 5d1d829c46e1fc74ab3cfbaec73ca14e2bbf3642
commit: 7e54f0ea9397718057e43653496fc89fd42b986e [21/22] ftrace: Merge ftrace_module_{init,enable}()
config: x86_64-lkp (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 7e54f0ea9397718057e43653496fc89fd42b986e
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
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 >>):
ld: kernel/module.o: in function `__do_sys_delete_module':
>> kernel/module.c:1036: undefined reference to `ftrace_module_release'
ld: kernel/module.o: in function `do_init_module':
kernel/module.c:3670: undefined reference to `ftrace_module_release'
ld: kernel/module.o: in function `load_module':
kernel/module.c:3965: undefined reference to `ftrace_module_release'
vim +1036 kernel/module.c
972
973 SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
974 unsigned int, flags)
975 {
976 struct module *mod;
977 char name[MODULE_NAME_LEN];
978 int ret, forced = 0;
979
980 if (!capable(CAP_SYS_MODULE) || modules_disabled)
981 return -EPERM;
982
983 if (strncpy_from_user(name, name_user, MODULE_NAME_LEN-1) < 0)
984 return -EFAULT;
985 name[MODULE_NAME_LEN-1] = '\0';
986
987 audit_log_kern_module(name);
988
989 if (mutex_lock_interruptible(&module_mutex) != 0)
990 return -EINTR;
991
992 mod = find_module(name);
993 if (!mod) {
994 ret = -ENOENT;
995 goto out;
996 }
997
998 if (!list_empty(&mod->source_list)) {
999 /* Other modules depend on us: get rid of them first. */
1000 ret = -EWOULDBLOCK;
1001 goto out;
1002 }
1003
1004 /* Doing init or already dying? */
1005 if (mod->state != MODULE_STATE_LIVE) {
1006 /* FIXME: if (force), slam module count damn the torpedoes */
1007 pr_debug("%s already dying\n", mod->name);
1008 ret = -EBUSY;
1009 goto out;
1010 }
1011
1012 /* If it has an init func, it must have an exit func to unload */
1013 if (mod->init && !mod->exit) {
1014 forced = try_force_unload(flags);
1015 if (!forced) {
1016 /* This module can't be removed */
1017 ret = -EBUSY;
1018 goto out;
1019 }
1020 }
1021
1022 /* Stop the machine so refcounts can't move and disable module. */
1023 ret = try_stop_module(mod, flags, &forced);
1024 if (ret != 0)
1025 goto out;
1026
1027 mutex_unlock(&module_mutex);
1028 /* Final destruction now no one is using it. */
1029 if (mod->exit != NULL)
1030 mod->exit();
1031 blocking_notifier_call_chain(&module_notify_list,
1032 MODULE_STATE_GOING, mod);
1033 klp_module_going(mod);
1034 blocking_notifier_call_chain(&module_notify_list,
1035 MODULE_STATE_GONE, mod);
> 1036 ftrace_module_release(mod);
1037
1038 async_synchronize_full();
1039
1040 /* Store the name of the last unloaded module for diagnostic purposes */
1041 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
1042
1043 free_module(mod);
1044 /* someone could wait for the module in add_unformed_module() */
1045 wake_up_all(&module_wq);
1046 return 0;
1047 out:
1048 mutex_unlock(&module_mutex);
1049 return ret;
1050 }
1051
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH 2/2] ASoC: qcom: add apq8039 sound card support
by kernel test robot
Hi Pantelis,
I love your patch! Perhaps something to improve:
[auto build test WARNING on asoc/for-next]
[also build test WARNING on sound/for-next v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Pantelis-Antoniou/ASoC-qcom-add-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
# save the attached .config to linux build tree
make 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 warnings (new ones prefixed by >>, old ones prefixed by <<):
In file included from arch/x86/include/asm/page_32.h:35,
from arch/x86/include/asm/page.h:14,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rculist.h:11,
from include/linux/pid.h:5,
from include/linux/sched.h:14,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from sound/soc/qcom/apq8039.c:5:
In function 'strncpy',
inlined from 'snd_soc_card_ctl_getset.constprop' at sound/soc/qcom/apq8039.c:176:5:
>> include/linux/string.h:297:30: warning: '__builtin_strncpy' destination unchanged after copying no bytes [-Wstringop-truncation]
297 | #define __underlying_strncpy __builtin_strncpy
| ^
include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
307 | return __underlying_strncpy(p, q, size);
| ^~~~~~~~~~~~~~~~~~~~
vim +/__builtin_strncpy +297 include/linux/string.h
47227d27e2fcb0 Daniel Axtens 2020-06-03 275
47227d27e2fcb0 Daniel Axtens 2020-06-03 276 #ifdef CONFIG_KASAN
47227d27e2fcb0 Daniel Axtens 2020-06-03 277 extern void *__underlying_memchr(const void *p, int c, __kernel_size_t size) __RENAME(memchr);
47227d27e2fcb0 Daniel Axtens 2020-06-03 278 extern int __underlying_memcmp(const void *p, const void *q, __kernel_size_t size) __RENAME(memcmp);
47227d27e2fcb0 Daniel Axtens 2020-06-03 279 extern void *__underlying_memcpy(void *p, const void *q, __kernel_size_t size) __RENAME(memcpy);
47227d27e2fcb0 Daniel Axtens 2020-06-03 280 extern void *__underlying_memmove(void *p, const void *q, __kernel_size_t size) __RENAME(memmove);
47227d27e2fcb0 Daniel Axtens 2020-06-03 281 extern void *__underlying_memset(void *p, int c, __kernel_size_t size) __RENAME(memset);
47227d27e2fcb0 Daniel Axtens 2020-06-03 282 extern char *__underlying_strcat(char *p, const char *q) __RENAME(strcat);
47227d27e2fcb0 Daniel Axtens 2020-06-03 283 extern char *__underlying_strcpy(char *p, const char *q) __RENAME(strcpy);
47227d27e2fcb0 Daniel Axtens 2020-06-03 284 extern __kernel_size_t __underlying_strlen(const char *p) __RENAME(strlen);
47227d27e2fcb0 Daniel Axtens 2020-06-03 285 extern char *__underlying_strncat(char *p, const char *q, __kernel_size_t count) __RENAME(strncat);
47227d27e2fcb0 Daniel Axtens 2020-06-03 286 extern char *__underlying_strncpy(char *p, const char *q, __kernel_size_t size) __RENAME(strncpy);
47227d27e2fcb0 Daniel Axtens 2020-06-03 287 #else
47227d27e2fcb0 Daniel Axtens 2020-06-03 288 #define __underlying_memchr __builtin_memchr
47227d27e2fcb0 Daniel Axtens 2020-06-03 289 #define __underlying_memcmp __builtin_memcmp
47227d27e2fcb0 Daniel Axtens 2020-06-03 290 #define __underlying_memcpy __builtin_memcpy
47227d27e2fcb0 Daniel Axtens 2020-06-03 291 #define __underlying_memmove __builtin_memmove
47227d27e2fcb0 Daniel Axtens 2020-06-03 292 #define __underlying_memset __builtin_memset
47227d27e2fcb0 Daniel Axtens 2020-06-03 293 #define __underlying_strcat __builtin_strcat
47227d27e2fcb0 Daniel Axtens 2020-06-03 294 #define __underlying_strcpy __builtin_strcpy
47227d27e2fcb0 Daniel Axtens 2020-06-03 295 #define __underlying_strlen __builtin_strlen
47227d27e2fcb0 Daniel Axtens 2020-06-03 296 #define __underlying_strncat __builtin_strncat
47227d27e2fcb0 Daniel Axtens 2020-06-03 @297 #define __underlying_strncpy __builtin_strncpy
47227d27e2fcb0 Daniel Axtens 2020-06-03 298 #endif
47227d27e2fcb0 Daniel Axtens 2020-06-03 299
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
Re: [PATCH 4/4] powerpc/pseries/iommu: Remove default DMA window before creating DDW
by kernel test robot
Hi Leonardo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Leonardo-Bras/Remove-default-DMA...
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-randconfig-r031-20200619 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 63700971ac9cdf198faa4a3a7c226fa579e49206)
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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 warnings (new ones prefixed by >>, old ones prefixed by <<):
>> arch/powerpc/platforms/pseries/iommu.c:1111:6: warning: variable 'dfl_win' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (ret)
^~~
arch/powerpc/platforms/pseries/iommu.c:1234:6: note: uninitialized use occurs here
if (dfl_win)
^~~~~~~
arch/powerpc/platforms/pseries/iommu.c:1111:2: note: remove the 'if' if its condition is always false
if (ret)
^~~~~~~~
arch/powerpc/platforms/pseries/iommu.c:1079:34: note: initialize the variable 'dfl_win' to silence this warning
struct property *win64, *dfl_win;
^
= NULL
1 warning generated.
vim +1111 arch/powerpc/platforms/pseries/iommu.c
715a454e17d328 Leonardo Bras 2020-06-19 1056
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1057 /*
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1058 * If the PE supports dynamic dma windows, and there is space for a table
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1059 * that can map all pages in a linear offset, then setup such a table,
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1060 * and record the dma-offset in the struct device.
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1061 *
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1062 * dev: the pci device we are checking
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1063 * pdn: the parent pe node with the ibm,dma_window property
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1064 * Future: also check if we can remap the base window for our base page size
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1065 *
9ae2fddeda4cbf Christoph Hellwig 2019-02-13 1066 * returns the dma offset for use by the direct mapped DMA code.
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1067 */
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1068 static u64 enable_ddw(struct pci_dev *dev, struct device_node *pdn)
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1069 {
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1070 int len, ret;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1071 struct ddw_query_response query;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1072 struct ddw_create_response create;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1073 int page_shift;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1074 u64 dma_addr, max_addr;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1075 struct device_node *dn;
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1076 u32 ddw_avail[3];
3248d5f65aac44 Leonardo Bras 2020-06-19 1077
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1078 struct direct_window *window;
3248d5f65aac44 Leonardo Bras 2020-06-19 1079 struct property *win64, *dfl_win;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1080 struct dynamic_dma_window_prop *ddwprop;
61435690a9c781 Nishanth Aravamudan 2013-03-07 1081 struct failed_ddw_pdn *fpdn;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1082
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1083 mutex_lock(&direct_window_init_mutex);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1084
b73a635f348610 Milton Miller 2011-05-11 1085 dma_addr = find_existing_ddw(pdn);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1086 if (dma_addr != 0)
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1087 goto out_unlock;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1088
61435690a9c781 Nishanth Aravamudan 2013-03-07 1089 /*
61435690a9c781 Nishanth Aravamudan 2013-03-07 1090 * If we already went through this for a previous function of
61435690a9c781 Nishanth Aravamudan 2013-03-07 1091 * the same device and failed, we don't want to muck with the
61435690a9c781 Nishanth Aravamudan 2013-03-07 1092 * DMA window again, as it will race with in-flight operations
61435690a9c781 Nishanth Aravamudan 2013-03-07 1093 * and can lead to EEHs. The above mutex protects access to the
61435690a9c781 Nishanth Aravamudan 2013-03-07 1094 * list.
61435690a9c781 Nishanth Aravamudan 2013-03-07 1095 */
61435690a9c781 Nishanth Aravamudan 2013-03-07 1096 list_for_each_entry(fpdn, &failed_ddw_pdn_list, list) {
b7c670d673d118 Rob Herring 2017-08-21 1097 if (fpdn->pdn == pdn)
61435690a9c781 Nishanth Aravamudan 2013-03-07 1098 goto out_unlock;
61435690a9c781 Nishanth Aravamudan 2013-03-07 1099 }
61435690a9c781 Nishanth Aravamudan 2013-03-07 1100
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1101 /*
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1102 * the ibm,ddw-applicable property holds the tokens for:
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1103 * ibm,query-pe-dma-window
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1104 * ibm,create-pe-dma-window
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1105 * ibm,remove-pe-dma-window
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1106 * for the given node in that order.
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1107 * the property is actually in the parent, not the PE
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1108 */
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1109 ret = of_property_read_u32_array(pdn, "ibm,ddw-applicable",
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1110 &ddw_avail[0], 3);
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 @1111 if (ret)
ae69e1eddc646f Nishanth Aravamudan 2014-01-10 1112 goto out_failed;
25ebc45b93452d Nishanth Aravamudan 2012-05-15 1113
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1114 /*
3248d5f65aac44 Leonardo Bras 2020-06-19 1115 * First step of setting up DDW is removing the default DMA window,
3248d5f65aac44 Leonardo Bras 2020-06-19 1116 * if it's present. It will make all the resources available to the
3248d5f65aac44 Leonardo Bras 2020-06-19 1117 * new DDW window.
3248d5f65aac44 Leonardo Bras 2020-06-19 1118 * If anything fails after this, we need to restore it.
3248d5f65aac44 Leonardo Bras 2020-06-19 1119 */
3248d5f65aac44 Leonardo Bras 2020-06-19 1120
3248d5f65aac44 Leonardo Bras 2020-06-19 1121 dfl_win = of_find_property(pdn, "ibm,dma-window", NULL);
3248d5f65aac44 Leonardo Bras 2020-06-19 1122 if (dfl_win)
3248d5f65aac44 Leonardo Bras 2020-06-19 1123 remove_dma_window(pdn, ddw_avail, dfl_win);
3248d5f65aac44 Leonardo Bras 2020-06-19 1124
3248d5f65aac44 Leonardo Bras 2020-06-19 1125 /*
3248d5f65aac44 Leonardo Bras 2020-06-19 1126 * Query if there is a window of size to map the
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1127 * whole partition. Query returns number of windows, largest
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1128 * block assigned to PE (partition endpoint), and two bitmasks
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1129 * of page sizes: supported and supported for migrate-dma.
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1130 */
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1131 dn = pci_device_to_OF_node(dev);
0ef1ee0bda323e Leonardo Bras 2020-06-19 1132 ret = query_ddw(dev, ddw_avail, &query, pdn);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1133 if (ret != 0)
ae69e1eddc646f Nishanth Aravamudan 2014-01-10 1134 goto out_failed;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1135
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1136 if (query.windows_available == 0) {
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1137 /*
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1138 * no additional windows are available for this device.
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1139 * We might be able to reallocate the existing window,
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1140 * trading in for a larger page size.
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1141 */
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1142 dev_dbg(&dev->dev, "no free dynamic windows");
ae69e1eddc646f Nishanth Aravamudan 2014-01-10 1143 goto out_failed;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1144 }
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1145 if (query.page_size & 4) {
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1146 page_shift = 24; /* 16MB */
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1147 } else if (query.page_size & 2) {
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1148 page_shift = 16; /* 64kB */
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1149 } else if (query.page_size & 1) {
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1150 page_shift = 12; /* 4kB */
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1151 } else {
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1152 dev_dbg(&dev->dev, "no supported direct page size in mask %x",
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1153 query.page_size);
ae69e1eddc646f Nishanth Aravamudan 2014-01-10 1154 goto out_failed;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1155 }
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1156 /* verify the window * number of ptes will map the partition */
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1157 /* check largest block * page size > max memory hotplug addr */
68c0449ea16d77 Alexey Kardashevskiy 2018-12-19 1158 max_addr = ddw_memory_hotplug_max();
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1159 if (query.largest_available_block < (max_addr >> page_shift)) {
0ef1ee0bda323e Leonardo Bras 2020-06-19 1160 dev_dbg(&dev->dev, "can't map partition max 0x%llx with %llu "
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1161 "%llu-sized pages\n", max_addr, query.largest_available_block,
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1162 1ULL << page_shift);
ae69e1eddc646f Nishanth Aravamudan 2014-01-10 1163 goto out_failed;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1164 }
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1165 len = order_base_2(max_addr);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1166 win64 = kzalloc(sizeof(struct property), GFP_KERNEL);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1167 if (!win64) {
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1168 dev_info(&dev->dev,
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1169 "couldn't allocate property for 64bit dma window\n");
ae69e1eddc646f Nishanth Aravamudan 2014-01-10 1170 goto out_failed;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1171 }
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1172 win64->name = kstrdup(DIRECT64_PROPNAME, GFP_KERNEL);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1173 win64->value = ddwprop = kmalloc(sizeof(*ddwprop), GFP_KERNEL);
767303349e052a Nishanth Aravamudan 2011-05-06 1174 win64->length = sizeof(*ddwprop);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1175 if (!win64->name || !win64->value) {
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1176 dev_info(&dev->dev,
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1177 "couldn't allocate property name and value\n");
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1178 goto out_free_prop;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1179 }
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1180
b73a635f348610 Milton Miller 2011-05-11 1181 ret = create_ddw(dev, ddw_avail, &create, page_shift, len);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1182 if (ret != 0)
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1183 goto out_free_prop;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1184
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1185 ddwprop->liobn = cpu_to_be32(create.liobn);
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1186 ddwprop->dma_base = cpu_to_be64(((u64)create.addr_hi << 32) |
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1187 create.addr_lo);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1188 ddwprop->tce_shift = cpu_to_be32(page_shift);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1189 ddwprop->window_shift = cpu_to_be32(len);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1190
b7c670d673d118 Rob Herring 2017-08-21 1191 dev_dbg(&dev->dev, "created tce table LIOBN 0x%x for %pOF\n",
b7c670d673d118 Rob Herring 2017-08-21 1192 create.liobn, dn);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1193
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1194 window = kzalloc(sizeof(*window), GFP_KERNEL);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1195 if (!window)
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1196 goto out_clear_window;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1197
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1198 ret = walk_system_ram_range(0, memblock_end_of_DRAM() >> PAGE_SHIFT,
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1199 win64->value, tce_setrange_multi_pSeriesLP_walk);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1200 if (ret) {
b7c670d673d118 Rob Herring 2017-08-21 1201 dev_info(&dev->dev, "failed to map direct window for %pOF: %d\n",
b7c670d673d118 Rob Herring 2017-08-21 1202 dn, ret);
7a19081fc26581 Julia Lawall 2011-08-08 1203 goto out_free_window;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1204 }
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1205
79d1c712958f94 Nathan Fontenot 2012-10-02 1206 ret = of_add_property(pdn, win64);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1207 if (ret) {
b7c670d673d118 Rob Herring 2017-08-21 1208 dev_err(&dev->dev, "unable to add dma window property for %pOF: %d",
b7c670d673d118 Rob Herring 2017-08-21 1209 pdn, ret);
7a19081fc26581 Julia Lawall 2011-08-08 1210 goto out_free_window;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1211 }
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1212
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1213 window->device = pdn;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1214 window->prop = ddwprop;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1215 spin_lock(&direct_window_list_lock);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1216 list_add(&window->list, &direct_window_list);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1217 spin_unlock(&direct_window_list_lock);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1218
9410e0185e6539 Alexey Kardashevskiy 2014-09-25 1219 dma_addr = be64_to_cpu(ddwprop->dma_base);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1220 goto out_unlock;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1221
7a19081fc26581 Julia Lawall 2011-08-08 1222 out_free_window:
7a19081fc26581 Julia Lawall 2011-08-08 1223 kfree(window);
7a19081fc26581 Julia Lawall 2011-08-08 1224
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1225 out_clear_window:
5efbabe09d986f Gavin Shan 2014-08-11 1226 remove_ddw(pdn, true);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1227
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1228 out_free_prop:
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1229 kfree(win64->name);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1230 kfree(win64->value);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1231 kfree(win64);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1232
ae69e1eddc646f Nishanth Aravamudan 2014-01-10 1233 out_failed:
3248d5f65aac44 Leonardo Bras 2020-06-19 1234 if (dfl_win)
3248d5f65aac44 Leonardo Bras 2020-06-19 1235 reset_dma_window(dev, pdn);
25ebc45b93452d Nishanth Aravamudan 2012-05-15 1236
61435690a9c781 Nishanth Aravamudan 2013-03-07 1237 fpdn = kzalloc(sizeof(*fpdn), GFP_KERNEL);
61435690a9c781 Nishanth Aravamudan 2013-03-07 1238 if (!fpdn)
61435690a9c781 Nishanth Aravamudan 2013-03-07 1239 goto out_unlock;
61435690a9c781 Nishanth Aravamudan 2013-03-07 1240 fpdn->pdn = pdn;
61435690a9c781 Nishanth Aravamudan 2013-03-07 1241 list_add(&fpdn->list, &failed_ddw_pdn_list);
61435690a9c781 Nishanth Aravamudan 2013-03-07 1242
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1243 out_unlock:
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1244 mutex_unlock(&direct_window_init_mutex);
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1245 return dma_addr;
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1246 }
4e8b0cf46b2570 Nishanth Aravamudan 2011-02-10 1247
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[ipmi:ipmi-wdt-rework 5/10] drivers/hwmon/sch56xx-common.c:289:12: error: static declaration of 'watchdog_start' follows non-static declaration
by kernel test robot
tree: https://github.com/cminyard/linux-ipmi ipmi-wdt-rework
head: a22010ce71ef67492980e4c55ad7864679826b53
commit: d8aebbc6501b431180c705c6e8a4fc4e129325ec [5/10] watchdog: Export an interface to start the watchdog
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
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
git checkout d8aebbc6501b431180c705c6e8a4fc4e129325ec
# 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 errors (new ones prefixed by >>):
drivers/hwmon/sch56xx-common.c:245:12: error: static declaration of 'watchdog_set_timeout' follows non-static declaration
static int watchdog_set_timeout(struct watchdog_device *wddev,
^
include/linux/watchdog.h:205:5: note: previous declaration is here
int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
^
>> drivers/hwmon/sch56xx-common.c:289:12: error: static declaration of 'watchdog_start' follows non-static declaration
static int watchdog_start(struct watchdog_device *wddev)
^
include/linux/watchdog.h:209:5: note: previous declaration is here
int watchdog_start(struct watchdog_device *wdd);
^
2 errors generated.
--
drivers/watchdog/f71808e_wdt.c:221:12: error: static declaration of 'watchdog_set_timeout' follows non-static declaration
static int watchdog_set_timeout(int timeout)
^
include/linux/watchdog.h:205:5: note: previous declaration is here
int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
^
>> drivers/watchdog/f71808e_wdt.c:330:12: error: static declaration of 'watchdog_start' follows non-static declaration
static int watchdog_start(void)
^
include/linux/watchdog.h:209:5: note: previous declaration is here
int watchdog_start(struct watchdog_device *wdd);
^
>> drivers/watchdog/f71808e_wdt.c:519:23: error: too few arguments to function call, single argument 'wdd' was not specified
err = watchdog_start();
~~~~~~~~~~~~~~ ^
include/linux/watchdog.h:209:5: note: 'watchdog_start' declared here
int watchdog_start(struct watchdog_device *wdd);
^
drivers/watchdog/f71808e_wdt.c:631:26: error: too few arguments to function call, single argument 'wdd' was not specified
return watchdog_start();
~~~~~~~~~~~~~~ ^
include/linux/watchdog.h:209:5: note: 'watchdog_start' declared here
int watchdog_start(struct watchdog_device *wdd);
^
drivers/watchdog/f71808e_wdt.c:642:39: error: too few arguments to function call, expected 2, have 1
if (watchdog_set_timeout(new_timeout))
~~~~~~~~~~~~~~~~~~~~ ^
include/linux/watchdog.h:205:5: note: 'watchdog_set_timeout' declared here
int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
^
drivers/watchdog/f71808e_wdt.c:711:36: error: too few arguments to function call, expected 2, have 1
err = watchdog_set_timeout(timeout);
~~~~~~~~~~~~~~~~~~~~ ^
include/linux/watchdog.h:205:5: note: 'watchdog_set_timeout' declared here
int watchdog_set_timeout(struct watchdog_device *wdd, unsigned int timeout);
^
drivers/watchdog/f71808e_wdt.c:737:24: error: too few arguments to function call, single argument 'wdd' was not specified
err = watchdog_start();
~~~~~~~~~~~~~~ ^
include/linux/watchdog.h:209:5: note: 'watchdog_start' declared here
int watchdog_start(struct watchdog_device *wdd);
^
7 errors generated.
vim +/watchdog_start +289 drivers/hwmon/sch56xx-common.c
312869ec935ab3 Hans de Goede 2012-03-18 288
fb551405c0f8e1 Hans de Goede 2012-05-22 @289 static int watchdog_start(struct watchdog_device *wddev)
312869ec935ab3 Hans de Goede 2012-03-18 290 {
fb551405c0f8e1 Hans de Goede 2012-05-22 291 struct sch56xx_watchdog_data *data = watchdog_get_drvdata(wddev);
312869ec935ab3 Hans de Goede 2012-03-18 292 int ret;
312869ec935ab3 Hans de Goede 2012-03-18 293 u8 val;
312869ec935ab3 Hans de Goede 2012-03-18 294
312869ec935ab3 Hans de Goede 2012-03-18 295 /*
312869ec935ab3 Hans de Goede 2012-03-18 296 * The sch56xx's watchdog cannot really be started / stopped
312869ec935ab3 Hans de Goede 2012-03-18 297 * it is always running, but we can avoid the timer expiring
312869ec935ab3 Hans de Goede 2012-03-18 298 * from causing a system reset by clearing the output enable bit.
312869ec935ab3 Hans de Goede 2012-03-18 299 *
312869ec935ab3 Hans de Goede 2012-03-18 300 * The sch56xx's watchdog will set the watchdog event bit, bit 0
312869ec935ab3 Hans de Goede 2012-03-18 301 * of the second interrupt source register (at base-address + 9),
312869ec935ab3 Hans de Goede 2012-03-18 302 * when the timer expires.
312869ec935ab3 Hans de Goede 2012-03-18 303 *
312869ec935ab3 Hans de Goede 2012-03-18 304 * This will only cause a system reset if the 0-1 flank happens when
312869ec935ab3 Hans de Goede 2012-03-18 305 * output enable is true. Setting output enable after the flank will
312869ec935ab3 Hans de Goede 2012-03-18 306 * not cause a reset, nor will the timer expiring a second time.
312869ec935ab3 Hans de Goede 2012-03-18 307 * This means we must clear the watchdog event bit in case it is set.
312869ec935ab3 Hans de Goede 2012-03-18 308 *
312869ec935ab3 Hans de Goede 2012-03-18 309 * The timer may still be running (after a recent watchdog_stop) and
312869ec935ab3 Hans de Goede 2012-03-18 310 * mere milliseconds away from expiring, so the timer must be reset
312869ec935ab3 Hans de Goede 2012-03-18 311 * first!
312869ec935ab3 Hans de Goede 2012-03-18 312 */
312869ec935ab3 Hans de Goede 2012-03-18 313
312869ec935ab3 Hans de Goede 2012-03-18 314 mutex_lock(data->io_lock);
312869ec935ab3 Hans de Goede 2012-03-18 315
312869ec935ab3 Hans de Goede 2012-03-18 316 /* 1. Reset the watchdog countdown counter */
312869ec935ab3 Hans de Goede 2012-03-18 317 ret = sch56xx_write_virtual_reg(data->addr, SCH56XX_REG_WDOG_PRESET,
312869ec935ab3 Hans de Goede 2012-03-18 318 data->watchdog_preset);
312869ec935ab3 Hans de Goede 2012-03-18 319 if (ret)
312869ec935ab3 Hans de Goede 2012-03-18 320 goto leave;
312869ec935ab3 Hans de Goede 2012-03-18 321
85a2e40cb50535 Hans de Goede 2012-05-22 322 /* 2. Enable output */
85a2e40cb50535 Hans de Goede 2012-05-22 323 val = data->watchdog_output_enable | SCH56XX_WDOG_OUTPUT_ENABLE;
312869ec935ab3 Hans de Goede 2012-03-18 324 ret = sch56xx_write_virtual_reg(data->addr,
85a2e40cb50535 Hans de Goede 2012-05-22 325 SCH56XX_REG_WDOG_OUTPUT_ENABLE, val);
312869ec935ab3 Hans de Goede 2012-03-18 326 if (ret)
312869ec935ab3 Hans de Goede 2012-03-18 327 goto leave;
312869ec935ab3 Hans de Goede 2012-03-18 328
312869ec935ab3 Hans de Goede 2012-03-18 329 data->watchdog_output_enable = val;
312869ec935ab3 Hans de Goede 2012-03-18 330
312869ec935ab3 Hans de Goede 2012-03-18 331 /* 3. Clear the watchdog event bit if set */
312869ec935ab3 Hans de Goede 2012-03-18 332 val = inb(data->addr + 9);
312869ec935ab3 Hans de Goede 2012-03-18 333 if (val & 0x01)
312869ec935ab3 Hans de Goede 2012-03-18 334 outb(0x01, data->addr + 9);
312869ec935ab3 Hans de Goede 2012-03-18 335
312869ec935ab3 Hans de Goede 2012-03-18 336 leave:
312869ec935ab3 Hans de Goede 2012-03-18 337 mutex_unlock(data->io_lock);
312869ec935ab3 Hans de Goede 2012-03-18 338 return ret;
312869ec935ab3 Hans de Goede 2012-03-18 339 }
312869ec935ab3 Hans de Goede 2012-03-18 340
:::::: The code at line 289 was first introduced by commit
:::::: fb551405c0f8e15d6fc7ae6e16a5e15382f8b8ac watchdog: sch56xx: Use watchdog core
:::::: TO: Hans de Goede <hdegoede(a)redhat.com>
:::::: CC: Wim Van Sebroeck <wim(a)iguana.be>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
nds32le-linux-ld: undefined reference to `__trace_hardirqs_off'
by kernel test robot
Hi Mike,
It's probably a bug fix that unveils the link errors.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4333a9b0b67bb4e8bcd91bdd80da80b0ec151162
commit: 4f0bd808134d73184054ad09173821c84f31dd5d asm-generic/nds32: don't redefine cacheflush primitives
date: 6 months ago
config: nds32-randconfig-r035-20200619 (attached as .config)
compiler: nds32le-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
git checkout 4f0bd808134d73184054ad09173821c84f31dd5d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nds32
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 >>):
nds32le-linux-ld: arch/nds32/kernel/ex-entry.o: in function `common_exception_handler':
(.text+0xfe): undefined reference to `__trace_hardirqs_off'
(.text+0xfe): relocation truncated to fit: R_NDS32_25_PCREL_RELA against undefined symbol `__trace_hardirqs_off'
nds32le-linux-ld: arch/nds32/kernel/ex-exit.o: in function `no_work_pending':
(.text+0xce): undefined reference to `__trace_hardirqs_off'
>> nds32le-linux-ld: (.text+0xd2): undefined reference to `__trace_hardirqs_off'
nds32le-linux-ld: (.text+0xd6): undefined reference to `__trace_hardirqs_on'
nds32le-linux-ld: (.text+0xda): undefined reference to `__trace_hardirqs_on'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months
[peterz-queue:locking/irqstate 19/20] arch/arm/include/asm/percpu.h:29:34: error: 'current_stack_pointer' undeclared; did you mean
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/irqstate
head: 886d429f4a3a4b0af97566f5f6cb26ae7ddf2807
commit: 5321a620f6eb25e0990612f2e93670851415f344 [19/20] lockdep: Change hardirq{s_enabled,_context} to per-cpu variables
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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
git checkout 5321a620f6eb25e0990612f2e93670851415f344
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from include/linux/irqflags.h:17,
from arch/arm/include/asm/bitops.h:28,
from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:19,
from arch/arm/include/asm/bug.h:60,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/arm/include/asm/percpu.h: In function '__my_cpu_offset':
>> arch/arm/include/asm/percpu.h:29:34: error: 'current_stack_pointer' undeclared (first use in this function); did you mean 'user_stack_pointer'?
29 | : "Q" (*(const unsigned long *)current_stack_pointer));
| ^~~~~~~~~~~~~~~~~~~~~
| user_stack_pointer
arch/arm/include/asm/percpu.h:29:34: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:114: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1175: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +29 arch/arm/include/asm/percpu.h
14318efb322e2f Rob Herring 2012-11-29 18
14318efb322e2f Rob Herring 2012-11-29 19 static inline unsigned long __my_cpu_offset(void)
14318efb322e2f Rob Herring 2012-11-29 20 {
14318efb322e2f Rob Herring 2012-11-29 21 unsigned long off;
509eb76ebf9771 Will Deacon 2013-06-05 22
509eb76ebf9771 Will Deacon 2013-06-05 23 /*
509eb76ebf9771 Will Deacon 2013-06-05 24 * Read TPIDRPRW.
509eb76ebf9771 Will Deacon 2013-06-05 25 * We want to allow caching the value, so avoid using volatile and
509eb76ebf9771 Will Deacon 2013-06-05 26 * instead use a fake stack read to hazard against barrier().
509eb76ebf9771 Will Deacon 2013-06-05 27 */
ccbd2da50db211 Mark Charlebois 2014-09-27 28 asm("mrc p15, 0, %0, c13, c0, 4" : "=r" (off)
ccbd2da50db211 Mark Charlebois 2014-09-27 @29 : "Q" (*(const unsigned long *)current_stack_pointer));
509eb76ebf9771 Will Deacon 2013-06-05 30
14318efb322e2f Rob Herring 2012-11-29 31 return off;
14318efb322e2f Rob Herring 2012-11-29 32 }
14318efb322e2f Rob Herring 2012-11-29 33 #define __my_cpu_offset __my_cpu_offset()
14318efb322e2f Rob Herring 2012-11-29 34 #else
14318efb322e2f Rob Herring 2012-11-29 35 #define set_my_cpu_offset(x) do {} while(0)
14318efb322e2f Rob Herring 2012-11-29 36
:::::: The code at line 29 was first introduced by commit
:::::: ccbd2da50db2111f6d055e3201c39a37e542ceb6 ARM: 8174/1: Use global stack register variable for percpu
:::::: TO: Mark Charlebois <charlebm(a)gmail.com>
:::::: CC: Russell King <rmk+kernel(a)arm.linux.org.uk>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 3 months