[sashal-linux-stable:queue-5.4 25/33] drivers/vfio/vfio_iommu_type1.c:366:22: error: implicit declaration of function 'pte_write'
by kernel test robot
Hi Jason,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-5.4
head: 52992c043a324332256525c1be1cd6b34b766048
commit: e2b35dbc9cd294d70cac30fbe89b14c526d813ec [25/33] vfio: IOMMU_API should be selected
config: arm-randconfig-r026-20210322 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 14696baaf4c43fe53f738bc292bbe169eed93d5d)
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://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-5.4
git checkout e2b35dbc9cd294d70cac30fbe89b14c526d813ec
# 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/vfio/vfio_iommu_type1.c:366:22: error: implicit declaration of function 'pte_write' [-Werror,-Wimplicit-function-declaration]
if (write_fault && !pte_write(*ptep))
^
>> drivers/vfio/vfio_iommu_type1.c:369:10: error: implicit declaration of function 'pte_pfn' [-Werror,-Wimplicit-function-declaration]
*pfn = pte_pfn(*ptep);
^
drivers/vfio/vfio_iommu_type1.c:369:10: note: did you mean 'put_pfn'?
drivers/vfio/vfio_iommu_type1.c:327:12: note: 'put_pfn' declared here
static int put_pfn(unsigned long pfn, int prot)
^
>> drivers/vfio/vfio_iommu_type1.c:371:2: error: implicit declaration of function 'pte_unmap' [-Werror,-Wimplicit-function-declaration]
pte_unmap_unlock(ptep, ptl);
^
include/linux/mm.h:1988:2: note: expanded from macro 'pte_unmap_unlock'
pte_unmap(pte); \
^
3 errors generated.
--
>> arch/arm/kernel/module-plts.c:67:34: error: implicit declaration of function '__opcode_to_mem_thumb32' [-Werror,-Wimplicit-function-declaration]
{ [0 ... PLT_ENT_COUNT - 1] = PLT_ENT_LDR, },
^
arch/arm/kernel/module-plts.c:19:22: note: expanded from macro 'PLT_ENT_LDR'
#define PLT_ENT_LDR __opcode_to_mem_thumb32(0xf8dff000 | \
^
arch/arm/kernel/module-plts.c:188:5: warning: no previous prototype for function 'module_frob_arch_sections' [-Wmissing-prototypes]
int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
^
arch/arm/kernel/module-plts.c:188:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
^
static
1 warning and 1 error generated.
vim +/pte_write +366 drivers/vfio/vfio_iommu_type1.c
73fa0d10d077d9 Alex Williamson 2012-07-31 338
270c35d0723a2f Ajay Kaher 2020-09-06 339 static int follow_fault_pfn(struct vm_area_struct *vma, struct mm_struct *mm,
270c35d0723a2f Ajay Kaher 2020-09-06 340 unsigned long vaddr, unsigned long *pfn,
270c35d0723a2f Ajay Kaher 2020-09-06 341 bool write_fault)
270c35d0723a2f Ajay Kaher 2020-09-06 342 {
e41bb745fd0fca Alex Williamson 2021-02-16 343 pte_t *ptep;
e41bb745fd0fca Alex Williamson 2021-02-16 344 spinlock_t *ptl;
270c35d0723a2f Ajay Kaher 2020-09-06 345 int ret;
270c35d0723a2f Ajay Kaher 2020-09-06 346
e41bb745fd0fca Alex Williamson 2021-02-16 347 ret = follow_pte(vma->vm_mm, vaddr, &ptep, &ptl);
270c35d0723a2f Ajay Kaher 2020-09-06 348 if (ret) {
270c35d0723a2f Ajay Kaher 2020-09-06 349 bool unlocked = false;
270c35d0723a2f Ajay Kaher 2020-09-06 350
270c35d0723a2f Ajay Kaher 2020-09-06 351 ret = fixup_user_fault(NULL, mm, vaddr,
270c35d0723a2f Ajay Kaher 2020-09-06 352 FAULT_FLAG_REMOTE |
270c35d0723a2f Ajay Kaher 2020-09-06 353 (write_fault ? FAULT_FLAG_WRITE : 0),
270c35d0723a2f Ajay Kaher 2020-09-06 354 &unlocked);
270c35d0723a2f Ajay Kaher 2020-09-06 355 if (unlocked)
270c35d0723a2f Ajay Kaher 2020-09-06 356 return -EAGAIN;
270c35d0723a2f Ajay Kaher 2020-09-06 357
270c35d0723a2f Ajay Kaher 2020-09-06 358 if (ret)
270c35d0723a2f Ajay Kaher 2020-09-06 359 return ret;
270c35d0723a2f Ajay Kaher 2020-09-06 360
e41bb745fd0fca Alex Williamson 2021-02-16 361 ret = follow_pte(vma->vm_mm, vaddr, &ptep, &ptl);
e41bb745fd0fca Alex Williamson 2021-02-16 362 if (ret)
e41bb745fd0fca Alex Williamson 2021-02-16 363 return ret;
270c35d0723a2f Ajay Kaher 2020-09-06 364 }
270c35d0723a2f Ajay Kaher 2020-09-06 365
e41bb745fd0fca Alex Williamson 2021-02-16 @366 if (write_fault && !pte_write(*ptep))
e41bb745fd0fca Alex Williamson 2021-02-16 367 ret = -EFAULT;
e41bb745fd0fca Alex Williamson 2021-02-16 368 else
e41bb745fd0fca Alex Williamson 2021-02-16 @369 *pfn = pte_pfn(*ptep);
e41bb745fd0fca Alex Williamson 2021-02-16 370
e41bb745fd0fca Alex Williamson 2021-02-16 @371 pte_unmap_unlock(ptep, ptl);
270c35d0723a2f Ajay Kaher 2020-09-06 372 return ret;
270c35d0723a2f Ajay Kaher 2020-09-06 373 }
270c35d0723a2f Ajay Kaher 2020-09-06 374
:::::: The code at line 366 was first introduced by commit
:::::: e41bb745fd0fcaa1d37a7bd4da46230822ffe18f vfio/type1: Use follow_pte()
:::::: TO: Alex Williamson <alex.williamson(a)redhat.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[block:io_uring-5.12 56/56] fs/io_uring.c:3980:16: warning: variable 'size' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git io_uring-5.12
head: d81269fecb8ce16eb07efafc9ff5520b2a31c486
commit: d81269fecb8ce16eb07efafc9ff5520b2a31c486 [56/56] io_uring: fix provide_buffers sign extension
config: parisc-defconfig (attached as .config)
compiler: hppa-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/axboe/linux-block.git/com...
git remote add block https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git
git fetch --no-tags block io_uring-5.12
git checkout d81269fecb8ce16eb07efafc9ff5520b2a31c486
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
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 >>):
fs/io_uring.c: In function 'io_provide_buffers_prep':
>> fs/io_uring.c:3980:16: warning: variable 'size' set but not used [-Wunused-but-set-variable]
3980 | unsigned long size;
| ^~~~
vim +/size +3980 fs/io_uring.c
3976
3977 static int io_provide_buffers_prep(struct io_kiocb *req,
3978 const struct io_uring_sqe *sqe)
3979 {
> 3980 unsigned long size;
3981 struct io_provide_buf *p = &req->pbuf;
3982 u64 tmp;
3983
3984 if (sqe->ioprio || sqe->rw_flags)
3985 return -EINVAL;
3986
3987 tmp = READ_ONCE(sqe->fd);
3988 if (!tmp || tmp > USHRT_MAX)
3989 return -E2BIG;
3990 p->nbufs = tmp;
3991 p->addr = READ_ONCE(sqe->addr);
3992 p->len = READ_ONCE(sqe->len);
3993
3994 size = (unsigned long)p->len * p->nbufs;
3995 if (!access_ok(u64_to_user_ptr(p->addr), size))
3996 return -EFAULT;
3997
3998 p->bgid = READ_ONCE(sqe->buf_group);
3999 tmp = READ_ONCE(sqe->off);
4000 if (tmp > USHRT_MAX)
4001 return -E2BIG;
4002 p->bid = tmp;
4003 return 0;
4004 }
4005
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH 10/13] usb: mtu3: support ip-sleep wakeup for MT8183
by kernel test robot
Hi Chunfeng,
I love your patch! Perhaps something to improve:
[auto build test WARNING on usb/usb-testing]
[also build test WARNING on robh/for-next linus/master v5.12-rc4 next-20210322]
[cannot apply to mediatek/for-next]
[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/Chunfeng-Yun/dt-bindings-usb-mtk...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: ia64-randconfig-r002-20210322 (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
# https://github.com/0day-ci/linux/commit/6c0e65b02daf53e661d1804f081cb75fd...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chunfeng-Yun/dt-bindings-usb-mtk-xhci-support-property-usb2-lpm-disable/20210322-111651
git checkout 6c0e65b02daf53e661d1804f081cb75fda28b916
# 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 warnings (new ones prefixed by >>):
In file included from arch/ia64/include/asm/pgtable.h:154,
from include/linux/pgtable.h:6,
from arch/ia64/include/asm/uaccess.h:40,
from include/linux/uaccess.h:11,
from arch/ia64/include/asm/sections.h:11,
from include/linux/interrupt.h:20,
from arch/ia64/include/asm/hw_irq.h:10,
from include/linux/irq.h:589,
from drivers/usb/mtu3/mtu3_host.c:12:
arch/ia64/include/asm/mmu_context.h: In function 'reload_context':
arch/ia64/include/asm/mmu_context.h:127:41: warning: variable 'old_rr4' set but not used [-Wunused-but-set-variable]
127 | unsigned long rr0, rr1, rr2, rr3, rr4, old_rr4;
| ^~~~~~~
In file included from include/linux/bits.h:6,
from include/linux/bitops.h:6,
from include/linux/kernel.h:11,
from include/linux/clk.h:13,
from drivers/usb/mtu3/mtu3_host.c:10:
drivers/usb/mtu3/mtu3_host.c: In function 'ssusb_wakeup_ip_sleep_set':
>> include/vdso/bits.h:7:19: warning: conversion from 'long unsigned int' to 'u32' {aka 'unsigned int'} changes value from '18446744073441120320' to '4026536000' [-Woverflow]
7 | #define BIT(nr) (UL(1) << (nr))
| ^
drivers/usb/mtu3/mtu3_host.c:31:19: note: in expansion of macro 'BIT'
31 | #define WC0_IS_EN BIT(6)
| ^~~
drivers/usb/mtu3/mtu3_host.c:60:9: note: in expansion of macro 'WC0_IS_EN'
60 | msk = WC0_IS_EN | WC0_IS_C(0xf) | WC0_IS_P;
| ^~~~~~~~~
vim +7 include/vdso/bits.h
3945ff37d2f48d Vincenzo Frascino 2020-03-20 6
3945ff37d2f48d Vincenzo Frascino 2020-03-20 @7 #define BIT(nr) (UL(1) << (nr))
3945ff37d2f48d Vincenzo Frascino 2020-03-20 8
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[norov:remove-find-h 13/15] arch/arm/include/asm/bitops.h:202:31: error: conflicting types for '_find_first_bit_le'
by kernel test robot
tree: https://github.com/norov/linux remove-find-h
head: a3a1691cca887a386a029d858a3d69cbb3e3843f
commit: c17320c8f35578470da69fe0a4e5eb9e7a2c7fb6 [13/15] remove GENERIC_FIND_FIRST_BIT
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
# https://github.com/norov/linux/commit/c17320c8f35578470da69fe0a4e5eb9e7a2...
git remote add norov https://github.com/norov/linux
git fetch --no-tags norov remove-find-h
git checkout c17320c8f35578470da69fe0a4e5eb9e7a2c7fb6
# 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/bitops.h:32,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
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/bitops.h:202:31: error: conflicting types for '_find_first_bit_le'
202 | #define find_first_bit(p,sz) _find_first_bit_le(p,sz)
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:107:15: note: in expansion of macro 'find_first_bit'
107 | unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~
arch/arm/include/asm/bitops.h:165:12: note: previous declaration of '_find_first_bit_le' was here
165 | extern int _find_first_bit_le(const unsigned long *p, unsigned size);
| ^~~~~~~~~~~~~~~~~~
>> arch/arm/include/asm/bitops.h:200:35: error: conflicting types for '_find_first_zero_bit_le'
200 | #define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:127:15: note: in expansion of macro 'find_first_zero_bit'
127 | unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~~~~~~
arch/arm/include/asm/bitops.h:163:12: note: previous declaration of '_find_first_zero_bit_le' was here
163 | extern int _find_first_zero_bit_le(const unsigned long *p, unsigned size);
| ^~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
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/bitops.h:202:31: error: conflicting types for '_find_first_bit_le'
202 | #define find_first_bit(p,sz) _find_first_bit_le(p,sz)
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:107:15: note: in expansion of macro 'find_first_bit'
107 | unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~
arch/arm/include/asm/bitops.h:165:12: note: previous declaration of '_find_first_bit_le' was here
165 | extern int _find_first_bit_le(const unsigned long *p, unsigned size);
| ^~~~~~~~~~~~~~~~~~
>> arch/arm/include/asm/bitops.h:200:35: error: conflicting types for '_find_first_zero_bit_le'
200 | #define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:127:15: note: in expansion of macro 'find_first_zero_bit'
127 | unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~~~~~~
arch/arm/include/asm/bitops.h:163:12: note: previous declaration of '_find_first_zero_bit_le' was here
163 | extern int _find_first_zero_bit_le(const unsigned long *p, unsigned size);
| ^~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:118: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1329: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:222: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
error: no override and no default toolchain set
init/Kconfig:67:warning: 'RUSTC_VERSION': number is invalid
In file included from include/linux/bitops.h:32,
from include/linux/kernel.h:11,
from include/asm-generic/bug.h:20,
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/bitops.h:202:31: error: conflicting types for '_find_first_bit_le'
202 | #define find_first_bit(p,sz) _find_first_bit_le(p,sz)
| ^~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:107:15: note: in expansion of macro 'find_first_bit'
107 | unsigned long find_first_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~
arch/arm/include/asm/bitops.h:165:12: note: previous declaration of '_find_first_bit_le' was here
165 | extern int _find_first_bit_le(const unsigned long *p, unsigned size);
| ^~~~~~~~~~~~~~~~~~
>> arch/arm/include/asm/bitops.h:200:35: error: conflicting types for '_find_first_zero_bit_le'
200 | #define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz)
| ^~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:127:15: note: in expansion of macro 'find_first_zero_bit'
127 | unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size)
| ^~~~~~~~~~~~~~~~~~~
arch/arm/include/asm/bitops.h:163:12: note: previous declaration of '_find_first_zero_bit_le' was here
163 | extern int _find_first_zero_bit_le(const unsigned long *p, unsigned size);
| ^~~~~~~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:118: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1329: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:222: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/_find_first_bit_le +202 arch/arm/include/asm/bitops.h
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 195
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 196 #ifndef __ARMEB__
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 197 /*
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 198 * These are the little endian, atomic definitions.
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 199 */
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 @200 #define find_first_zero_bit(p,sz) _find_first_zero_bit_le(p,sz)
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 201 #define find_next_zero_bit(p,sz,off) _find_next_zero_bit_le(p,sz,off)
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 @202 #define find_first_bit(p,sz) _find_first_bit_le(p,sz)
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 203 #define find_next_bit(p,sz,off) _find_next_bit_le(p,sz,off)
^1da177e4c3f41 include/asm-arm/bitops.h Linus Torvalds 2005-04-16 204
:::::: The code at line 202 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[westeri-thunderbolt:next 6/21] drivers/thunderbolt/domain.c:497:1-7: preceding lock on line 451 (fwd)
by Julia Lawall
Is an unlock needed in the various error handling code?
julia
---------- Forwarded message ----------
Date: Fri, 19 Mar 2021 04:54:06 +0800
From: kernel test robot <lkp(a)intel.com>
To: kbuild(a)lists.01.org
Cc: lkp(a)intel.com, Julia Lawall <julia.lawall(a)lip6.fr>
Subject: [westeri-thunderbolt:next 6/21] drivers/thunderbolt/domain.c:497:1-7:
preceding lock on line 451
CC: kbuild-all(a)lists.01.org
TO: Mika Westerberg <mika.westerberg(a)linux.intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt.git next
head: 3231307e399a411db07d7d7927df38c4a4b88353
commit: 7f0a34d7900b8403d3068755856b86bcc790c5a3 [6/21] thunderbolt: Decrease control channel timeout for software connection manager
:::::: branch date: 5 hours ago
:::::: commit date: 5 hours ago
config: i386-randconfig-c021-20210318 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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: Julia Lawall <julia.lawall(a)lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> drivers/thunderbolt/domain.c:497:1-7: preceding lock on line 451
vim +497 drivers/thunderbolt/domain.c
9d3cce0b613689 Mika Westerberg 2017-06-06 432
9d3cce0b613689 Mika Westerberg 2017-06-06 433 /**
9d3cce0b613689 Mika Westerberg 2017-06-06 434 * tb_domain_add() - Add domain to the system
9d3cce0b613689 Mika Westerberg 2017-06-06 435 * @tb: Domain to add
9d3cce0b613689 Mika Westerberg 2017-06-06 436 *
9d3cce0b613689 Mika Westerberg 2017-06-06 437 * Starts the domain and adds it to the system. Hotplugging devices will
9d3cce0b613689 Mika Westerberg 2017-06-06 438 * work after this has been returned successfully. In order to remove
9d3cce0b613689 Mika Westerberg 2017-06-06 439 * and release the domain after this function has been called, call
9d3cce0b613689 Mika Westerberg 2017-06-06 440 * tb_domain_remove().
9d3cce0b613689 Mika Westerberg 2017-06-06 441 *
9d3cce0b613689 Mika Westerberg 2017-06-06 442 * Return: %0 in case of success and negative errno in case of error
9d3cce0b613689 Mika Westerberg 2017-06-06 443 */
9d3cce0b613689 Mika Westerberg 2017-06-06 444 int tb_domain_add(struct tb *tb)
9d3cce0b613689 Mika Westerberg 2017-06-06 445 {
9d3cce0b613689 Mika Westerberg 2017-06-06 446 int ret;
9d3cce0b613689 Mika Westerberg 2017-06-06 447
9d3cce0b613689 Mika Westerberg 2017-06-06 448 if (WARN_ON(!tb->cm_ops))
9d3cce0b613689 Mika Westerberg 2017-06-06 449 return -EINVAL;
9d3cce0b613689 Mika Westerberg 2017-06-06 450
9d3cce0b613689 Mika Westerberg 2017-06-06 @451 mutex_lock(&tb->lock);
9d3cce0b613689 Mika Westerberg 2017-06-06 452 /*
9d3cce0b613689 Mika Westerberg 2017-06-06 453 * tb_schedule_hotplug_handler may be called as soon as the config
9d3cce0b613689 Mika Westerberg 2017-06-06 454 * channel is started. Thats why we have to hold the lock here.
9d3cce0b613689 Mika Westerberg 2017-06-06 455 */
9d3cce0b613689 Mika Westerberg 2017-06-06 456 tb_ctl_start(tb->ctl);
9d3cce0b613689 Mika Westerberg 2017-06-06 457
f67cf491175a31 Mika Westerberg 2017-06-06 458 if (tb->cm_ops->driver_ready) {
f67cf491175a31 Mika Westerberg 2017-06-06 459 ret = tb->cm_ops->driver_ready(tb);
f67cf491175a31 Mika Westerberg 2017-06-06 460 if (ret)
f67cf491175a31 Mika Westerberg 2017-06-06 461 goto err_ctl_stop;
f67cf491175a31 Mika Westerberg 2017-06-06 462 }
f67cf491175a31 Mika Westerberg 2017-06-06 463
3cd542e6e6afb6 Mika Westerberg 2020-09-03 464 tb_dbg(tb, "security level set to %s\n",
3cd542e6e6afb6 Mika Westerberg 2020-09-03 465 tb_security_names[tb->security_level]);
3cd542e6e6afb6 Mika Westerberg 2020-09-03 466
9d3cce0b613689 Mika Westerberg 2017-06-06 467 ret = device_add(&tb->dev);
9d3cce0b613689 Mika Westerberg 2017-06-06 468 if (ret)
9d3cce0b613689 Mika Westerberg 2017-06-06 469 goto err_ctl_stop;
9d3cce0b613689 Mika Westerberg 2017-06-06 470
9d3cce0b613689 Mika Westerberg 2017-06-06 471 /* Start the domain */
9d3cce0b613689 Mika Westerberg 2017-06-06 472 if (tb->cm_ops->start) {
9d3cce0b613689 Mika Westerberg 2017-06-06 473 ret = tb->cm_ops->start(tb);
9d3cce0b613689 Mika Westerberg 2017-06-06 474 if (ret)
9d3cce0b613689 Mika Westerberg 2017-06-06 475 goto err_domain_del;
9d3cce0b613689 Mika Westerberg 2017-06-06 476 }
9d3cce0b613689 Mika Westerberg 2017-06-06 477
9d3cce0b613689 Mika Westerberg 2017-06-06 478 /* This starts event processing */
9d3cce0b613689 Mika Westerberg 2017-06-06 479 mutex_unlock(&tb->lock);
9d3cce0b613689 Mika Westerberg 2017-06-06 480
b2911a593a705e Mika Westerberg 2019-12-06 481 device_init_wakeup(&tb->dev, true);
b2911a593a705e Mika Westerberg 2019-12-06 482
2d8ff0b586fb1c Mika Westerberg 2018-07-25 483 pm_runtime_no_callbacks(&tb->dev);
2d8ff0b586fb1c Mika Westerberg 2018-07-25 484 pm_runtime_set_active(&tb->dev);
2d8ff0b586fb1c Mika Westerberg 2018-07-25 485 pm_runtime_enable(&tb->dev);
2d8ff0b586fb1c Mika Westerberg 2018-07-25 486 pm_runtime_set_autosuspend_delay(&tb->dev, TB_AUTOSUSPEND_DELAY);
2d8ff0b586fb1c Mika Westerberg 2018-07-25 487 pm_runtime_mark_last_busy(&tb->dev);
2d8ff0b586fb1c Mika Westerberg 2018-07-25 488 pm_runtime_use_autosuspend(&tb->dev);
2d8ff0b586fb1c Mika Westerberg 2018-07-25 489
9d3cce0b613689 Mika Westerberg 2017-06-06 490 return 0;
9d3cce0b613689 Mika Westerberg 2017-06-06 491
9d3cce0b613689 Mika Westerberg 2017-06-06 492 err_domain_del:
9d3cce0b613689 Mika Westerberg 2017-06-06 493 device_del(&tb->dev);
9d3cce0b613689 Mika Westerberg 2017-06-06 494 err_ctl_stop:
9d3cce0b613689 Mika Westerberg 2017-06-06 495 tb_ctl_stop(tb->ctl);
9d3cce0b613689 Mika Westerberg 2017-06-06 496
9d3cce0b613689 Mika Westerberg 2017-06-06 @497 return ret;
9d3cce0b613689 Mika Westerberg 2017-06-06 498 }
9d3cce0b613689 Mika Westerberg 2017-06-06 499
:::::: The code at line 497 was first introduced by commit
:::::: 9d3cce0b613689ee849a505ffac179af0ae9fff2 thunderbolt: Introduce thunderbolt bus and connection manager
:::::: TO: Mika Westerberg <mika.westerberg(a)linux.intel.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
include/linux/unaligned/be_byteshift.h:46:19: error: redefinition of 'get_unaligned_be32'
by kernel test robot
Hi Linus,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8b12a62a4e3ed4ae99c715034f557eb391d6b196
commit: de8860b1ed4701ea7e6f760f02d79ca6a3b656a1 iio: magnetometer: Add driver for Yamaha YAS530
date: 10 weeks ago
config: m68k-randconfig-s032-20210318 (attached as .config)
compiler: m68k-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-277-gc089cd2d-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 de8860b1ed4701ea7e6f760f02d79ca6a3b656a1
# 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=m68k
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/build_bug.h:5,
from include/linux/bitfield.h:10,
from drivers/iio/magnetometer/yamaha-yas530.c:22:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_no.h:33:50: warning: ordered comparison of pointer with null pointer [-Wextra]
33 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:137:2: note: in expansion of macro 'BUG_ON'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:137:10: note: in expansion of macro 'virt_addr_valid'
137 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
In file included from drivers/iio/magnetometer/yamaha-yas530.c:35:
include/linux/unaligned/be_byteshift.h: At top level:
include/linux/unaligned/be_byteshift.h:41:19: error: redefinition of 'get_unaligned_be16'
41 | static inline u16 get_unaligned_be16(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/unaligned.h:18,
from include/asm-generic/uaccess.h:13,
from arch/m68k/include/asm/uaccess.h:394,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/cgroup.h:17,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from drivers/iio/magnetometer/yamaha-yas530.c:33:
include/linux/unaligned/access_ok.h:23:28: note: previous definition of 'get_unaligned_be16' was here
23 | static __always_inline u16 get_unaligned_be16(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/magnetometer/yamaha-yas530.c:35:
>> include/linux/unaligned/be_byteshift.h:46:19: error: redefinition of 'get_unaligned_be32'
46 | static inline u32 get_unaligned_be32(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/unaligned.h:18,
from include/asm-generic/uaccess.h:13,
from arch/m68k/include/asm/uaccess.h:394,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/cgroup.h:17,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from drivers/iio/magnetometer/yamaha-yas530.c:33:
include/linux/unaligned/access_ok.h:28:28: note: previous definition of 'get_unaligned_be32' was here
28 | static __always_inline u32 get_unaligned_be32(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/magnetometer/yamaha-yas530.c:35:
include/linux/unaligned/be_byteshift.h:51:19: error: redefinition of 'get_unaligned_be64'
51 | static inline u64 get_unaligned_be64(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/unaligned.h:18,
from include/asm-generic/uaccess.h:13,
from arch/m68k/include/asm/uaccess.h:394,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/cgroup.h:17,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from drivers/iio/magnetometer/yamaha-yas530.c:33:
include/linux/unaligned/access_ok.h:33:28: note: previous definition of 'get_unaligned_be64' was here
33 | static __always_inline u64 get_unaligned_be64(const void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/magnetometer/yamaha-yas530.c:35:
include/linux/unaligned/be_byteshift.h:56:20: error: redefinition of 'put_unaligned_be16'
56 | static inline void put_unaligned_be16(u16 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/unaligned.h:18,
from include/asm-generic/uaccess.h:13,
from arch/m68k/include/asm/uaccess.h:394,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/cgroup.h:17,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from drivers/iio/magnetometer/yamaha-yas530.c:33:
include/linux/unaligned/access_ok.h:53:29: note: previous definition of 'put_unaligned_be16' was here
53 | static __always_inline void put_unaligned_be16(u16 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/magnetometer/yamaha-yas530.c:35:
>> include/linux/unaligned/be_byteshift.h:61:20: error: redefinition of 'put_unaligned_be32'
61 | static inline void put_unaligned_be32(u32 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/unaligned.h:18,
from include/asm-generic/uaccess.h:13,
from arch/m68k/include/asm/uaccess.h:394,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/cgroup.h:17,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from drivers/iio/magnetometer/yamaha-yas530.c:33:
include/linux/unaligned/access_ok.h:58:29: note: previous definition of 'put_unaligned_be32' was here
58 | static __always_inline void put_unaligned_be32(u32 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/iio/magnetometer/yamaha-yas530.c:35:
include/linux/unaligned/be_byteshift.h:66:20: error: redefinition of 'put_unaligned_be64'
66 | static inline void put_unaligned_be64(u64 val, void *p)
| ^~~~~~~~~~~~~~~~~~
In file included from arch/m68k/include/asm/unaligned.h:18,
from include/asm-generic/uaccess.h:13,
from arch/m68k/include/asm/uaccess.h:394,
from include/linux/uaccess.h:11,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/rcuwait.h:6,
from include/linux/percpu-rwsem.h:7,
from include/linux/fs.h:33,
from include/linux/cgroup.h:17,
from include/linux/memcontrol.h:13,
from include/linux/swap.h:9,
from include/linux/suspend.h:5,
from include/linux/regulator/consumer.h:35,
from drivers/iio/magnetometer/yamaha-yas530.c:33:
include/linux/unaligned/access_ok.h:63:29: note: previous definition of 'put_unaligned_be64' was here
63 | static __always_inline void put_unaligned_be64(u64 val, void *p)
| ^~~~~~~~~~~~~~~~~~
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
Selected by
- SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
- SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC
vim +/get_unaligned_be32 +46 include/linux/unaligned/be_byteshift.h
064106a91be5e7 Harvey Harrison 2008-04-29 45
064106a91be5e7 Harvey Harrison 2008-04-29 @46 static inline u32 get_unaligned_be32(const void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 47 {
19f747f7370fcf Bart Van Assche 2020-03-13 48 return __get_unaligned_be32(p);
064106a91be5e7 Harvey Harrison 2008-04-29 49 }
064106a91be5e7 Harvey Harrison 2008-04-29 50
064106a91be5e7 Harvey Harrison 2008-04-29 51 static inline u64 get_unaligned_be64(const void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 52 {
19f747f7370fcf Bart Van Assche 2020-03-13 53 return __get_unaligned_be64(p);
064106a91be5e7 Harvey Harrison 2008-04-29 54 }
064106a91be5e7 Harvey Harrison 2008-04-29 55
064106a91be5e7 Harvey Harrison 2008-04-29 56 static inline void put_unaligned_be16(u16 val, void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 57 {
064106a91be5e7 Harvey Harrison 2008-04-29 58 __put_unaligned_be16(val, p);
064106a91be5e7 Harvey Harrison 2008-04-29 59 }
064106a91be5e7 Harvey Harrison 2008-04-29 60
064106a91be5e7 Harvey Harrison 2008-04-29 @61 static inline void put_unaligned_be32(u32 val, void *p)
064106a91be5e7 Harvey Harrison 2008-04-29 62 {
064106a91be5e7 Harvey Harrison 2008-04-29 63 __put_unaligned_be32(val, p);
064106a91be5e7 Harvey Harrison 2008-04-29 64 }
064106a91be5e7 Harvey Harrison 2008-04-29 65
:::::: The code at line 46 was first introduced by commit
:::::: 064106a91be5e76cb42c1ddf5d3871e3a1bd2a23 kernel: add common infrastructure for unaligned access
:::::: TO: Harvey Harrison <harvey.harrison(a)gmail.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
1 year, 6 months
Re: [PATCH net-next 4/5] ipv6: ioam: Support for IOAM injection with lwtunnels
by kernel test robot
Hi Justin,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Justin-Iurman/Support-for-the-IO...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d310ec03a34e92a77302edb804f7d68ee4f01ba0
:::::: branch date: 2 hours ago
:::::: commit date: 2 hours ago
config: sparc64-randconfig-s032-20210310 (attached as .config)
compiler: sparc64-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-262-g5e674421-dirty
# https://github.com/0day-ci/linux/commit/f20771586508a195a44298f251d68446c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Justin-Iurman/Support-for-the-IOAM-Pre-allocated-Trace-with-IPv6/20210311-005727
git checkout f20771586508a195a44298f251d68446c10830ce
# 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=sparc64
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 >>)"
>> net/ipv6/ioam6.c:856:1: sparse: sparse: unused label 'out_unregister_genl'
vim +/out_unregister_genl +856 net/ipv6/ioam6.c
f20771586508a1 Justin Iurman 2021-03-10 851
e1a4cb7c14f537 Justin Iurman 2021-03-10 852 pr_info("In-situ OAM (IOAM) with IPv6\n");
ffece959dfe59a Justin Iurman 2021-03-10 853
ffece959dfe59a Justin Iurman 2021-03-10 854 out:
ffece959dfe59a Justin Iurman 2021-03-10 855 return err;
f20771586508a1 Justin Iurman 2021-03-10 @856 out_unregister_genl:
f20771586508a1 Justin Iurman 2021-03-10 857 genl_unregister_family(&ioam6_genl_family);
ffece959dfe59a Justin Iurman 2021-03-10 858 out_unregister_pernet_subsys:
ffece959dfe59a Justin Iurman 2021-03-10 859 unregister_pernet_subsys(&ioam6_net_ops);
ffece959dfe59a Justin Iurman 2021-03-10 860 goto out;
e1a4cb7c14f537 Justin Iurman 2021-03-10 861 }
e1a4cb7c14f537 Justin Iurman 2021-03-10 862
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
1 year, 6 months
drivers/clocksource/dw_apb_timer_of.c:66 timer_get_base_and_rate() warn: 'timer_clk' not released on lines: 64.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 55f62bc873477dae2c45bbbc30b86cf3e0982f3b
commit: 5d9814df0aec56a638bbf20795abb4cfaf3cd331 clocksource/drivers/dw_apb_timer_of: Add error handling if no clock available
config: arm64-randconfig-m031-20210221 (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/clocksource/dw_apb_timer_of.c:66 timer_get_base_and_rate() warn: 'timer_clk' not released on lines: 64.
Old smatch warnings:
drivers/clocksource/dw_apb_timer_of.c:66 timer_get_base_and_rate() warn: '*base' not released on lines: 56,64.
vim +/timer_clk +66 drivers/clocksource/dw_apb_timer_of.c
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 17 static int __init timer_get_base_and_rate(struct device_node *np,
af75655c066621 arch/arm/mach-picoxcell/time.c Jamie Iles 2011-07-25 18 void __iomem **base, u32 *rate)
af75655c066621 arch/arm/mach-picoxcell/time.c Jamie Iles 2011-07-25 19 {
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 20 struct clk *timer_clk;
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 21 struct clk *pclk;
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 22 struct reset_control *rstc;
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 23 int ret;
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 24
af75655c066621 arch/arm/mach-picoxcell/time.c Jamie Iles 2011-07-25 25 *base = of_iomap(np, 0);
af75655c066621 arch/arm/mach-picoxcell/time.c Jamie Iles 2011-07-25 26
af75655c066621 arch/arm/mach-picoxcell/time.c Jamie Iles 2011-07-25 27 if (!*base)
2a4849d2674b96 drivers/clocksource/dw_apb_timer_of.c Rob Herring 2018-08-27 28 panic("Unable to map regs for %pOFn", np);
af75655c066621 arch/arm/mach-picoxcell/time.c Jamie Iles 2011-07-25 29
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 30 /*
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 31 * Reset the timer if the reset control is available, wiping
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 32 * out the state the firmware may have left it
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 33 */
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 34 rstc = of_reset_control_get(np, NULL);
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 35 if (!IS_ERR(rstc)) {
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 36 reset_control_assert(rstc);
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 37 reset_control_deassert(rstc);
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 38 }
1f174a1a2cdebc drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2018-09-17 39
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 40 /*
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 41 * Not all implementations use a periphal clock, so don't panic
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 42 * if it's not present
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 43 */
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 44 pclk = of_clk_get_by_name(np, "pclk");
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 45 if (!IS_ERR(pclk))
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 46 if (clk_prepare_enable(pclk))
2a4849d2674b96 drivers/clocksource/dw_apb_timer_of.c Rob Herring 2018-08-27 47 pr_warn("pclk for %pOFn is present, but could not be activated\n",
2a4849d2674b96 drivers/clocksource/dw_apb_timer_of.c Rob Herring 2018-08-27 48 np);
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 49
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 50 if (!of_property_read_u32(np, "clock-freq", rate) &&
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 51 !of_property_read_u32(np, "clock-frequency", rate))
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 52 return 0;
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 53
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 54 timer_clk = of_clk_get_by_name(np, "timer");
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 55 if (IS_ERR(timer_clk))
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 56 return PTR_ERR(timer_clk);
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 57
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 58 ret = clk_prepare_enable(timer_clk);
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 59 if (ret)
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 60 return ret;
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 61
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 62 *rate = clk_get_rate(timer_clk);
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 63 if (!(*rate))
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 64 return -EINVAL;
disable timer_clk if clk_get_rate() fails?
a8b447f2bbbba7 drivers/clocksource/dw_apb_timer_of.c Heiko Stuebner 2013-06-04 65
5d9814df0aec56 drivers/clocksource/dw_apb_timer_of.c Dinh Nguyen 2020-12-05 @66 return 0;
af75655c066621 arch/arm/mach-picoxcell/time.c Jamie Iles 2011-07-25 67 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months