Re: [PATCH 36/43] x86: kmsan: sync metadata pages on page fault
by kernel test robot
Hi Alexander,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tip/x86/mm]
[also build test WARNING on linus/master v5.16-rc5]
[cannot apply to tip/x86/core hnaz-mm/master next-20211213]
[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/Alexander-Potapenko/Add-KernelMe...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 35fa745286ac44ee26ed100c2bd2553368ad193b
config: i386-randconfig-r015-20211214 (https://download.01.org/0day-ci/archive/20211215/202112150621.jBfij0NA-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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/b9eff579426967ca933560818b165769b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexander-Potapenko/Add-KernelMemorySanitizer-infrastructure/20211215-003033
git checkout b9eff579426967ca933560818b165769b449377b
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/mm/
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 >>):
>> arch/x86/mm/fault.c:263:6: warning: no previous prototype for function '__arch_sync_kernel_mappings' [-Wmissing-prototypes]
void __arch_sync_kernel_mappings(unsigned long start, unsigned long end)
^
arch/x86/mm/fault.c:263:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __arch_sync_kernel_mappings(unsigned long start, unsigned long end)
^
static
arch/x86/mm/fault.c:299:28: error: use of undeclared identifier 'KMSAN_VMALLOC_SHADOW_START'
start - VMALLOC_START + KMSAN_VMALLOC_SHADOW_START,
^
arch/x86/mm/fault.c:300:26: error: use of undeclared identifier 'KMSAN_VMALLOC_SHADOW_START'
end - VMALLOC_START + KMSAN_VMALLOC_SHADOW_START);
^
arch/x86/mm/fault.c:302:28: error: use of undeclared identifier 'KMSAN_VMALLOC_ORIGIN_START'
start - VMALLOC_START + KMSAN_VMALLOC_ORIGIN_START,
^
arch/x86/mm/fault.c:303:26: error: use of undeclared identifier 'KMSAN_VMALLOC_ORIGIN_START'
end - VMALLOC_START + KMSAN_VMALLOC_ORIGIN_START);
^
1 warning and 4 errors generated.
vim +/__arch_sync_kernel_mappings +263 arch/x86/mm/fault.c
262
> 263 void __arch_sync_kernel_mappings(unsigned long start, unsigned long end)
264 {
265 unsigned long addr;
266
267 for (addr = start & PMD_MASK;
268 addr >= TASK_SIZE_MAX && addr < VMALLOC_END;
269 addr += PMD_SIZE) {
270 struct page *page;
271
272 spin_lock(&pgd_lock);
273 list_for_each_entry(page, &pgd_list, lru) {
274 spinlock_t *pgt_lock;
275
276 /* the pgt_lock only for Xen */
277 pgt_lock = &pgd_page_get_mm(page)->page_table_lock;
278
279 spin_lock(pgt_lock);
280 vmalloc_sync_one(page_address(page), addr);
281 spin_unlock(pgt_lock);
282 }
283 spin_unlock(&pgd_lock);
284 }
285 }
286
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH 13/43] kmsan: add KMSAN runtime core
by kernel test robot
Hi Alexander,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/x86/mm]
[also build test ERROR on linus/master v5.16-rc5]
[cannot apply to tip/x86/core hnaz-mm/master next-20211213]
[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/Alexander-Potapenko/Add-KernelMe...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 35fa745286ac44ee26ed100c2bd2553368ad193b
config: arm64-randconfig-r024-20211214 (https://download.01.org/0day-ci/archive/20211215/202112150609.r62ffy1Q-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/ddf3096bf6806b512d7bf5489f2100b46...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexander-Potapenko/Add-KernelMemorySanitizer-infrastructure/20211215-003033
git checkout ddf3096bf6806b512d7bf5489f2100b46add643a
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/arm64/kernel/asm-offsets.c:10:
In file included from include/linux/arm_sdei.h:8:
In file included from include/acpi/ghes.h:5:
In file included from include/acpi/apei.h:9:
In file included from include/linux/acpi.h:15:
In file included from include/linux/device.h:15:
In file included from include/linux/dev_printk.h:16:
In file included from include/linux/ratelimit.h:6:
In file included from include/linux/sched.h:17:
In file included from include/linux/kmsan.h:17:
In file included from include/linux/vmalloc.h:13:
In file included from arch/arm64/include/asm/vmalloc.h:5:
>> arch/arm64/include/asm/pgtable.h:299:19: error: incomplete definition of type 'struct task_struct'
if (mm != current->active_mm && atomic_read(&mm->mm_users) <= 1)
~~~~~~~^
arch/arm64/include/asm/current.h:9:8: note: forward declaration of 'struct task_struct'
struct task_struct;
^
1 error generated.
make[2]: *** [scripts/Makefile.build:121: arch/arm64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1198: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:219: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +299 arch/arm64/include/asm/pgtable.h
4f04d8f0054511 Catalin Marinas 2012-03-05 270
2f4b829c625ec3 Catalin Marinas 2015-07-10 271 /*
2f4b829c625ec3 Catalin Marinas 2015-07-10 272 * PTE bits configuration in the presence of hardware Dirty Bit Management
2f4b829c625ec3 Catalin Marinas 2015-07-10 273 * (PTE_WRITE == PTE_DBM):
2f4b829c625ec3 Catalin Marinas 2015-07-10 274 *
2f4b829c625ec3 Catalin Marinas 2015-07-10 275 * Dirty Writable | PTE_RDONLY PTE_WRITE PTE_DIRTY (sw)
2f4b829c625ec3 Catalin Marinas 2015-07-10 276 * 0 0 | 1 0 0
2f4b829c625ec3 Catalin Marinas 2015-07-10 277 * 0 1 | 1 1 0
2f4b829c625ec3 Catalin Marinas 2015-07-10 278 * 1 0 | 1 0 1
2f4b829c625ec3 Catalin Marinas 2015-07-10 279 * 1 1 | 0 1 x
2f4b829c625ec3 Catalin Marinas 2015-07-10 280 *
2f4b829c625ec3 Catalin Marinas 2015-07-10 281 * When hardware DBM is not present, the sofware PTE_DIRTY bit is updated via
2f4b829c625ec3 Catalin Marinas 2015-07-10 282 * the page fault mechanism. Checking the dirty status of a pte becomes:
2f4b829c625ec3 Catalin Marinas 2015-07-10 283 *
b847415ce96efe Catalin Marinas 2015-09-11 284 * PTE_DIRTY || (PTE_WRITE && !PTE_RDONLY)
2f4b829c625ec3 Catalin Marinas 2015-07-10 285 */
9b604722059039 Mark Rutland 2019-06-10 286
9b604722059039 Mark Rutland 2019-06-10 287 static inline void __check_racy_pte_update(struct mm_struct *mm, pte_t *ptep,
9b604722059039 Mark Rutland 2019-06-10 288 pte_t pte)
4f04d8f0054511 Catalin Marinas 2012-03-05 289 {
20a004e7b017cc Will Deacon 2018-02-15 290 pte_t old_pte;
20a004e7b017cc Will Deacon 2018-02-15 291
9b604722059039 Mark Rutland 2019-06-10 292 if (!IS_ENABLED(CONFIG_DEBUG_VM))
9b604722059039 Mark Rutland 2019-06-10 293 return;
9b604722059039 Mark Rutland 2019-06-10 294
9b604722059039 Mark Rutland 2019-06-10 295 old_pte = READ_ONCE(*ptep);
9b604722059039 Mark Rutland 2019-06-10 296
9b604722059039 Mark Rutland 2019-06-10 297 if (!pte_valid(old_pte) || !pte_valid(pte))
9b604722059039 Mark Rutland 2019-06-10 298 return;
9b604722059039 Mark Rutland 2019-06-10 @299 if (mm != current->active_mm && atomic_read(&mm->mm_users) <= 1)
9b604722059039 Mark Rutland 2019-06-10 300 return;
02522463c84748 Will Deacon 2013-01-09 301
2f4b829c625ec3 Catalin Marinas 2015-07-10 302 /*
9b604722059039 Mark Rutland 2019-06-10 303 * Check for potential race with hardware updates of the pte
9b604722059039 Mark Rutland 2019-06-10 304 * (ptep_set_access_flags safely changes valid ptes without going
9b604722059039 Mark Rutland 2019-06-10 305 * through an invalid entry).
2f4b829c625ec3 Catalin Marinas 2015-07-10 306 */
82d340081b6f71 Catalin Marinas 2015-12-08 307 VM_WARN_ONCE(!pte_young(pte),
82d340081b6f71 Catalin Marinas 2015-12-08 308 "%s: racy access flag clearing: 0x%016llx -> 0x%016llx",
20a004e7b017cc Will Deacon 2018-02-15 309 __func__, pte_val(old_pte), pte_val(pte));
20a004e7b017cc Will Deacon 2018-02-15 310 VM_WARN_ONCE(pte_write(old_pte) && !pte_dirty(pte),
82d340081b6f71 Catalin Marinas 2015-12-08 311 "%s: racy dirty state clearing: 0x%016llx -> 0x%016llx",
20a004e7b017cc Will Deacon 2018-02-15 312 __func__, pte_val(old_pte), pte_val(pte));
2f4b829c625ec3 Catalin Marinas 2015-07-10 313 }
2f4b829c625ec3 Catalin Marinas 2015-07-10 314
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.10 251/1981] drivers/gpu/drm/xlnx/xlnx_scaler.c:1394:21: warning: variable 'fmt_out' set but not used
by kernel test robot
Hi Venkateshwar,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: 87ec9a2d98a7a7dfc98b57348a0ec310fd170e4b
commit: 9c2aaea5d2da626727258703b85f52281b8673bb [251/1981] drm: xlnx: scaler: Adding vpss-scaler driver
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20211215/202112150658.YseS4mn1-lk...)
compiler: arceb-elf-gcc (GCC) 11.2.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/Xilinx/linux-xlnx/commit/9c2aaea5d2da626727258703b85f5...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.10
git checkout 9c2aaea5d2da626727258703b85f52281b8673bb
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arc SHELL=/bin/bash drivers/clk/ drivers/fpga/ drivers/gpu/drm/vc4/ drivers/gpu/drm/xlnx/ drivers/infiniband/hw/mlx5/ drivers/media/platform/xilinx/ drivers/memory/samsung/ drivers/misc/ drivers/mtd/nand/raw/brcmnand/ drivers/mtd/spi-nor/controllers/ drivers/net/ drivers/of/ drivers/ptp/ drivers/remoteproc/ drivers/spi/ drivers/staging/ drivers/thunderbolt/ drivers/uio/ drivers/usb/cdns3/ sound/hda/ sound/pci/hda/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/xlnx/xlnx_scaler.c: In function 'xilinx_scaler_stream':
>> drivers/gpu/drm/xlnx/xlnx_scaler.c:1394:21: warning: variable 'fmt_out' set but not used [-Wunused-but-set-variable]
1394 | u32 fmt_in, fmt_out;
| ^~~~~~~
>> drivers/gpu/drm/xlnx/xlnx_scaler.c:1394:13: warning: variable 'fmt_in' set but not used [-Wunused-but-set-variable]
1394 | u32 fmt_in, fmt_out;
| ^~~~~~
vim +/fmt_out +1394 drivers/gpu/drm/xlnx/xlnx_scaler.c
1383
1384 /**
1385 * xilinx_scaler_stream - Set up v-scaler and h-scaler for streaming
1386 * @scaler: Pointer to scaler device structure
1387 *
1388 * This function sets up the required configuration of v-scaler and h-scaler
1389 *
1390 * Return: 0 on success. Returns -EINVAL on failure conditions.
1391 */
1392 static int xilinx_scaler_stream(struct xilinx_scaler *scaler)
1393 {
> 1394 u32 fmt_in, fmt_out;
1395 u32 pixel_rate;
1396 u32 line_rate;
1397 int ret;
1398
1399 fmt_in = scaler->fmt_in;
1400 fmt_out = scaler->fmt_out;
1401 line_rate = (scaler->height_in * STEP_PRECISION) / scaler->height_out;
1402
1403 if (scaler->is_polyphase) {
1404 ret = xv_vscaler_select_coeff(scaler, scaler->height_in,
1405 scaler->height_out);
1406 if (ret < 0) {
1407 dev_info(scaler->dev, "Failed: vscaler select coeff\n");
1408 return ret;
1409 }
1410 xv_vscaler_set_coeff(scaler);
1411 }
1412 xilinx_scaler_write(scaler->base, V_VSCALER_OFF +
1413 XV_VSCALER_CTRL_ADDR_HWREG_LINERATE_DATA,
1414 line_rate);
1415 ret = xv_vscaler_setup_video_fmt(scaler, scaler->fmt_in);
1416 if (ret < 0) {
1417 dev_info(scaler->dev, "Failed: vscaler setup video format\n");
1418 return ret;
1419 }
1420 pixel_rate = (scaler->width_in * STEP_PRECISION) / scaler->width_out;
1421 xilinx_scaler_write(scaler->base, V_HSCALER_OFF +
1422 XV_HSCALER_CTRL_ADDR_HWREG_PIXELRATE_DATA,
1423 pixel_rate);
1424 ret = xv_hscaler_setup_video_fmt(scaler, scaler->fmt_out, ret);
1425 if (ret < 0) {
1426 dev_info(scaler->dev, "Failed: vscaler setup video format\n");
1427 return ret;
1428 }
1429 if (scaler->is_polyphase) {
1430 ret = xv_hscaler_select_coeff(scaler, scaler->width_in,
1431 scaler->width_out);
1432 if (ret < 0) {
1433 dev_info(scaler->dev, "Failed: hscaler select coeff\n");
1434 return ret;
1435 }
1436 xv_hscaler_set_coeff(scaler);
1437 }
1438 xv_hscaler_calculate_phases(scaler, scaler->width_in,
1439 scaler->width_out, pixel_rate);
1440 xv_hscaler_set_phases(scaler);
1441 return 0;
1442 }
1443
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
Re: [PATCH v6 1/4] phy: cadence: Add Cadence D-PHY Rx driver
by kernel test robot
Hi Pratyush,
I love your patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on linus/master v5.16-rc5 next-20211213]
[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/Pratyush-Yadav/Rx-mode-support-f...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20211215/202112150558.NJXyyT76-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.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/7422cc73ff300a5eb0e57ff6fe426e01f...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Pratyush-Yadav/Rx-mode-support-for-Cadence-DPHY/20211215-021112
git checkout 7422cc73ff300a5eb0e57ff6fe426e01f5dcb2b0
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash drivers/phy/cadence/
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 include/linux/device.h:15,
from include/linux/phy/phy.h:15,
from drivers/phy/cadence/cdns-dphy-rx.c:11:
drivers/phy/cadence/cdns-dphy-rx.c: In function 'cdns_dphy_rx_probe':
>> drivers/phy/cadence/cdns-dphy-rx.c:223:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=]
223 | dev_err(dev, "Failed to create PHY: %d\n", PTR_ERR(dphy->phy));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/phy/cadence/cdns-dphy-rx.c:223:17: note: in expansion of macro 'dev_err'
223 | dev_err(dev, "Failed to create PHY: %d\n", PTR_ERR(dphy->phy));
| ^~~~~~~
drivers/phy/cadence/cdns-dphy-rx.c:223:54: note: format string is defined here
223 | dev_err(dev, "Failed to create PHY: %d\n", PTR_ERR(dphy->phy));
| ~^
| |
| int
| %ld
vim +223 drivers/phy/cadence/cdns-dphy-rx.c
203
204 static int cdns_dphy_rx_probe(struct platform_device *pdev)
205 {
206 struct device *dev = &pdev->dev;
207 struct phy_provider *provider;
208 struct cdns_dphy_rx *dphy;
209
210 dphy = devm_kzalloc(dev, sizeof(*dphy), GFP_KERNEL);
211 if (!dphy)
212 return -ENOMEM;
213
214 dev_set_drvdata(dev, dphy);
215 dphy->dev = dev;
216
217 dphy->regs = devm_platform_ioremap_resource(pdev, 0);
218 if (IS_ERR(dphy->regs))
219 return PTR_ERR(dphy->regs);
220
221 dphy->phy = devm_phy_create(dev, NULL, &cdns_dphy_rx_ops);
222 if (IS_ERR(dphy->phy)) {
> 223 dev_err(dev, "Failed to create PHY: %d\n", PTR_ERR(dphy->phy));
224 return PTR_ERR(dphy->phy);
225 }
226
227 phy_set_drvdata(dphy->phy, dphy);
228 provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
229
230 return PTR_ERR_OR_ZERO(provider);
231 }
232
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
drivers/pci/controller/dwc/pci-dra7xx.c:864 dra7xx_pcie_probe() warn: 'dra7xx->clk' not released on lines: 759.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d58071a8a76d779eedab38033ae4c821c30295a5
commit: 5af9405397bfb90d6adab61d58f4d94c78166698 PCI: dra7xx: Get an optional clock
config: powerpc64-randconfig-m031-20211128 (https://download.01.org/0day-ci/archive/20211130/202111301803.NOwoj4Jd-lk...)
compiler: powerpc64-linux-gcc (GCC) 11.2.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>
smatch warnings:
drivers/pci/controller/dwc/pci-dra7xx.c:864 dra7xx_pcie_probe() warn: 'dra7xx->clk' not released on lines: 759.
vim +864 drivers/pci/controller/dwc/pci-dra7xx.c
e259c2926c016d drivers/pci/controller/dwc/pci-dra7xx.c Tony Lindgren 2021-03-10 684 static int dra7xx_pcie_probe(struct platform_device *pdev)
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 685 {
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 686 u32 reg;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 687 int ret;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 688 int irq;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 689 int i;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 690 int phy_count;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 691 struct phy **phy;
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 692 struct device_link **link;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 693 void __iomem *base;
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 694 struct dw_pcie *pci;
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 695 struct dra7xx_pcie *dra7xx;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 696 struct device *dev = &pdev->dev;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 697 struct device_node *np = dev->of_node;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 698 char name[10];
602d38bc65aa29 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 699 struct gpio_desc *reset;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 700 const struct of_device_id *match;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 701 const struct dra7xx_pcie_of_data *data;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 702 enum dw_pcie_device_mode mode;
c232c0df9610bf drivers/pci/controller/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2019-01-24 703 u32 b1co_mode_sel_mask;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 704
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 705 match = of_match_device(of_match_ptr(of_dra7xx_pcie_match), dev);
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 706 if (!match)
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 707 return -EINVAL;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 708
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 709 data = (struct dra7xx_pcie_of_data *)match->data;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 710 mode = (enum dw_pcie_device_mode)data->mode;
c232c0df9610bf drivers/pci/controller/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2019-01-24 711 b1co_mode_sel_mask = data->b1co_mode_sel_mask;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 712
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 713 dra7xx = devm_kzalloc(dev, sizeof(*dra7xx), GFP_KERNEL);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 714 if (!dra7xx)
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 715 return -ENOMEM;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 716
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 717 pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 718 if (!pci)
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 719 return -ENOMEM;
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 720
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 721 pci->dev = dev;
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 722 pci->ops = &dw_pcie_ops;
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 723
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 724 irq = platform_get_irq(pdev, 0);
caecb05c800081 drivers/pci/controller/dwc/pci-dra7xx.c Krzysztof Wilczyński 2020-08-02 725 if (irq < 0)
a0d21ba120d2c7 drivers/pci/dwc/pci-dra7xx.c Gustavo A. R. Silva 2017-08-09 726 return irq;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 727
c8a119779f5609 drivers/pci/controller/dwc/pci-dra7xx.c Wei Yongjun 2020-04-29 728 base = devm_platform_ioremap_resource_byname(pdev, "ti_conf");
c8a119779f5609 drivers/pci/controller/dwc/pci-dra7xx.c Wei Yongjun 2020-04-29 729 if (IS_ERR(base))
c8a119779f5609 drivers/pci/controller/dwc/pci-dra7xx.c Wei Yongjun 2020-04-29 730 return PTR_ERR(base);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 731
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 732 phy_count = of_property_count_strings(np, "phy-names");
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 733 if (phy_count < 0) {
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 734 dev_err(dev, "unable to find the strings\n");
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 735 return phy_count;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 736 }
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 737
a86854d0c599b3 drivers/pci/dwc/pci-dra7xx.c Kees Cook 2018-06-12 738 phy = devm_kcalloc(dev, phy_count, sizeof(*phy), GFP_KERNEL);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 739 if (!phy)
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 740 return -ENOMEM;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 741
a86854d0c599b3 drivers/pci/dwc/pci-dra7xx.c Kees Cook 2018-06-12 742 link = devm_kcalloc(dev, phy_count, sizeof(*link), GFP_KERNEL);
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 743 if (!link)
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 744 return -ENOMEM;
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 745
5af9405397bfb9 drivers/pci/controller/dwc/pci-dra7xx.c Luca Ceresoli 2021-05-31 746 dra7xx->clk = devm_clk_get_optional(dev, NULL);
5af9405397bfb9 drivers/pci/controller/dwc/pci-dra7xx.c Luca Ceresoli 2021-05-31 747 if (IS_ERR(dra7xx->clk))
5af9405397bfb9 drivers/pci/controller/dwc/pci-dra7xx.c Luca Ceresoli 2021-05-31 748 return dev_err_probe(dev, PTR_ERR(dra7xx->clk),
5af9405397bfb9 drivers/pci/controller/dwc/pci-dra7xx.c Luca Ceresoli 2021-05-31 749 "clock request failed");
5af9405397bfb9 drivers/pci/controller/dwc/pci-dra7xx.c Luca Ceresoli 2021-05-31 750
5af9405397bfb9 drivers/pci/controller/dwc/pci-dra7xx.c Luca Ceresoli 2021-05-31 751 ret = clk_prepare_enable(dra7xx->clk);
5af9405397bfb9 drivers/pci/controller/dwc/pci-dra7xx.c Luca Ceresoli 2021-05-31 752 if (ret)
5af9405397bfb9 drivers/pci/controller/dwc/pci-dra7xx.c Luca Ceresoli 2021-05-31 753 return ret;
5af9405397bfb9 drivers/pci/controller/dwc/pci-dra7xx.c Luca Ceresoli 2021-05-31 754
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 755 for (i = 0; i < phy_count; i++) {
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 756 snprintf(name, sizeof(name), "pcie-phy%d", i);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 757 phy[i] = devm_phy_get(dev, name);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 758 if (IS_ERR(phy[i]))
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 759 return PTR_ERR(phy[i]);
Smatch wants an clk_unprepare_disable(dra7xx->clk) on failure paths.
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 760
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 761 link[i] = device_link_add(dev, &phy[i]->dev, DL_FLAG_STATELESS);
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 762 if (!link[i]) {
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 763 ret = -EINVAL;
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 764 goto err_link;
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 765 }
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 766 }
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 767
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 768 dra7xx->base = base;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 769 dra7xx->phy = phy;
442ec4c04d1235 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 770 dra7xx->pci = pci;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 771 dra7xx->phy_count = phy_count;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 772
c232c0df9610bf drivers/pci/controller/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2019-01-24 773 if (phy_count == 2) {
c232c0df9610bf drivers/pci/controller/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2019-01-24 774 ret = dra7xx_pcie_configure_two_lane(dev, b1co_mode_sel_mask);
c232c0df9610bf drivers/pci/controller/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2019-01-24 775 if (ret < 0)
c232c0df9610bf drivers/pci/controller/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2019-01-24 776 dra7xx->phy_count = 1; /* Fallback to x1 lane mode */
c232c0df9610bf drivers/pci/controller/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2019-01-24 777 }
c232c0df9610bf drivers/pci/controller/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2019-01-24 778
1f6c4501c667a6 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 779 ret = dra7xx_pcie_enable_phy(dra7xx);
1f6c4501c667a6 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 780 if (ret) {
1f6c4501c667a6 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 781 dev_err(dev, "failed to enable phy\n");
1f6c4501c667a6 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 782 return ret;
No clean up on this error path.
1f6c4501c667a6 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 783 }
1f6c4501c667a6 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 784
9bcf0a6fdc5062 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 785 platform_set_drvdata(pdev, dra7xx);
9bcf0a6fdc5062 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-02-15 786
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 787 pm_runtime_enable(dev);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 788 ret = pm_runtime_get_sync(dev);
d3f4caa355c1c9 drivers/pci/host/pci-dra7xx.c Fabio Estevam 2015-08-20 789 if (ret < 0) {
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 790 dev_err(dev, "pm_runtime_get_sync failed\n");
0e2bdb0e7abf4b drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2015-07-31 791 goto err_get_sync;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 792 }
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 793
602d38bc65aa29 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 794 reset = devm_gpiod_get_optional(dev, NULL, GPIOD_OUT_HIGH);
602d38bc65aa29 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 795 if (IS_ERR(reset)) {
602d38bc65aa29 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 796 ret = PTR_ERR(reset);
602d38bc65aa29 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 797 dev_err(&pdev->dev, "gpio request failed, ret %d\n", ret);
78bdcad05ea17f drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2015-07-28 798 goto err_gpio;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 799 }
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 800
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 801 reg = dra7xx_pcie_readl(dra7xx, PCIECTRL_DRA7XX_CONF_DEVICE_CMD);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 802 reg &= ~LTSSM_EN;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 803 dra7xx_pcie_writel(dra7xx, PCIECTRL_DRA7XX_CONF_DEVICE_CMD, reg);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 804
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 805 switch (mode) {
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 806 case DW_PCIE_RC_TYPE:
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 807 if (!IS_ENABLED(CONFIG_PCI_DRA7XX_HOST)) {
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 808 ret = -ENODEV;
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 809 goto err_gpio;
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 810 }
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 811
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 812 dra7xx_pcie_writel(dra7xx, PCIECTRL_TI_CONF_DEVICE_TYPE,
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 813 DEVICE_TYPE_RC);
726d75a6d243bf drivers/pci/controller/dwc/pci-dra7xx.c Vignesh R 2018-09-25 814
726d75a6d243bf drivers/pci/controller/dwc/pci-dra7xx.c Vignesh R 2018-09-25 815 ret = dra7xx_pcie_unaligned_memaccess(dev);
726d75a6d243bf drivers/pci/controller/dwc/pci-dra7xx.c Vignesh R 2018-09-25 816 if (ret)
726d75a6d243bf drivers/pci/controller/dwc/pci-dra7xx.c Vignesh R 2018-09-25 817 dev_err(dev, "WA for Errata i870 not applied\n");
726d75a6d243bf drivers/pci/controller/dwc/pci-dra7xx.c Vignesh R 2018-09-25 818
23926c8dbd6fdc drivers/pci/host/pci-dra7xx.c Jingoo Han 2014-11-06 819 ret = dra7xx_add_pcie_port(dra7xx, pdev);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 820 if (ret < 0)
78bdcad05ea17f drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2015-07-28 821 goto err_gpio;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 822 break;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 823 case DW_PCIE_EP_TYPE:
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 824 if (!IS_ENABLED(CONFIG_PCI_DRA7XX_EP)) {
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 825 ret = -ENODEV;
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 826 goto err_gpio;
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 827 }
f1aba0a0de55c7 drivers/pci/dwc/pci-dra7xx.c Niklas Cassel 2017-12-20 828
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 829 dra7xx_pcie_writel(dra7xx, PCIECTRL_TI_CONF_DEVICE_TYPE,
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 830 DEVICE_TYPE_EP);
f7a2757f6cd0aa drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 831
726d75a6d243bf drivers/pci/controller/dwc/pci-dra7xx.c Vignesh R 2018-09-25 832 ret = dra7xx_pcie_unaligned_memaccess(dev);
f7a2757f6cd0aa drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 833 if (ret)
f7a2757f6cd0aa drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 834 goto err_gpio;
f7a2757f6cd0aa drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 835
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 836 ret = dra7xx_add_pcie_ep(dra7xx, pdev);
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 837 if (ret < 0)
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 838 goto err_gpio;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 839 break;
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 840 default:
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 841 dev_err(dev, "INVALID device type %d\n", mode);
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 842 }
608793e27b3313 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-03-27 843 dra7xx->mode = mode;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 844
d4c7d1a089d6fd drivers/pci/dwc/pci-dra7xx.c Keerthy 2017-03-13 845 ret = devm_request_irq(dev, irq, dra7xx_pcie_irq_handler,
d4c7d1a089d6fd drivers/pci/dwc/pci-dra7xx.c Keerthy 2017-03-13 846 IRQF_SHARED, "dra7xx-pcie-main", dra7xx);
d4c7d1a089d6fd drivers/pci/dwc/pci-dra7xx.c Keerthy 2017-03-13 847 if (ret) {
d4c7d1a089d6fd drivers/pci/dwc/pci-dra7xx.c Keerthy 2017-03-13 848 dev_err(dev, "failed to request irq\n");
d4c7d1a089d6fd drivers/pci/dwc/pci-dra7xx.c Keerthy 2017-03-13 849 goto err_gpio;
d4c7d1a089d6fd drivers/pci/dwc/pci-dra7xx.c Keerthy 2017-03-13 850 }
d4c7d1a089d6fd drivers/pci/dwc/pci-dra7xx.c Keerthy 2017-03-13 851
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 852 return 0;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 853
78bdcad05ea17f drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2015-07-28 854 err_gpio:
0e2bdb0e7abf4b drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2015-07-31 855 err_get_sync:
c2615d620a852a drivers/pci/controller/dwc/pci-dra7xx.c Dinghao Liu 2020-05-20 856 pm_runtime_put(dev);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 857 pm_runtime_disable(dev);
1f6c4501c667a6 drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-01-11 858 dra7xx_pcie_disable_phy(dra7xx);
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 859
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 860 err_link:
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 861 while (--i >= 0)
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 862 device_link_del(link[i]);
7a4db656a6350f drivers/pci/dwc/pci-dra7xx.c Kishon Vijay Abraham I 2017-10-09 863
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 @864 return ret;
47ff3de911a728 drivers/pci/host/pci-dra7xx.c Kishon Vijay Abraham I 2014-07-22 865 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.4 19/1768] drivers/mtd/nand/raw/arasan_nand.c:365:16: warning: right shift count >= width of type
by kernel test robot
Hi Naga,
FYI, the error/warning still remains.
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head: abafefebd1f1e040eef74e4ab571ea08bf745641
commit: 1dea215e98f470c4fabe230cb5dcb648e3301fb9 [19/1768] mtd: rawnand: Add support for ARASAN NAND controller
config: i386-randconfig-r006-20211214 (https://download.01.org/0day-ci/archive/20211215/202112150521.VqbVocvt-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/Xilinx/linux-xlnx/commit/1dea215e98f470c4fabe230cb5dcb...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.4
git checkout 1dea215e98f470c4fabe230cb5dcb648e3301fb9
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/mtd/nand/raw/ drivers/usb/dwc3/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/mtd/nand/raw/arasan_nand.c: In function 'anfc_rw_dma_op':
>> drivers/mtd/nand/raw/arasan_nand.c:365:16: warning: right shift count >= width of type [-Wshift-count-overflow]
365 | writel((paddr >> 32), nfc->base + DMA_ADDR1_OFST);
| ^~
vim +365 drivers/mtd/nand/raw/arasan_nand.c
337
338 static void anfc_rw_dma_op(struct mtd_info *mtd, u8 *buf, int len,
339 bool do_read, u32 prog, int pktcount, int pktsize)
340 {
341 dma_addr_t paddr;
342 struct nand_chip *chip = mtd_to_nand(mtd);
343 struct anfc_nand_controller *nfc = to_anfc(chip->controller);
344 struct anfc_nand_chip *achip = to_anfc_nand(chip);
345 u32 eccintr = 0, dir;
346
347 if (pktsize == 0)
348 pktsize = len;
349
350 anfc_setpktszcnt(nfc, pktsize, pktcount);
351
352 if (!achip->strength)
353 eccintr = MBIT_ERROR;
354
355 if (do_read)
356 dir = DMA_FROM_DEVICE;
357 else
358 dir = DMA_TO_DEVICE;
359 paddr = dma_map_single(nfc->dev, buf, len, dir);
360 if (dma_mapping_error(nfc->dev, paddr)) {
361 dev_err(nfc->dev, "Read buffer mapping error");
362 return;
363 }
364 writel(paddr, nfc->base + DMA_ADDR0_OFST);
> 365 writel((paddr >> 32), nfc->base + DMA_ADDR1_OFST);
366 anfc_enable_intrs(nfc, (XFER_COMPLETE | eccintr));
367 writel(prog, nfc->base + PROG_OFST);
368 anfc_wait_for_event(nfc);
369 dma_unmap_single(nfc->dev, paddr, len, dir);
370 }
371
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.10 1964/1981] drivers/clk/clk-xlnx-clock-wizard.c:324:8: error: implicit declaration of function 'FIELD_PREP'
by kernel test robot
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.10
head: 87ec9a2d98a7a7dfc98b57348a0ec310fd170e4b
commit: 0a6e9d56f285540e5ca6c69c7fad2c3520b79c50 [1964/1981] clocking-wizard: Support higher frequency accuracy
config: x86_64-randconfig-a013-20211214 (https://download.01.org/0day-ci/archive/20211215/202112150402.8WBLORs1-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project b6a2ddb6c8ac29412b1361810972e15221fa021c)
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/Xilinx/linux-xlnx/commit/0a6e9d56f285540e5ca6c69c7fad2...
git remote add xilinx-xlnx https://github.com/Xilinx/linux-xlnx
git fetch --no-tags xilinx-xlnx xlnx_rebase_v5.10
git checkout 0a6e9d56f285540e5ca6c69c7fad2c3520b79c50
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash
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/clk/clk-xlnx-clock-wizard.c:324:8: error: implicit declaration of function 'FIELD_PREP' [-Werror,-Wimplicit-function-declaration]
reg = FIELD_PREP(WZRD_CLKOUT_DIVIDE_MASK, clockout0_div) |
^
>> drivers/clk/clk-xlnx-clock-wizard.c:392:6: error: implicit declaration of function 'FIELD_GET' [-Werror,-Wimplicit-function-declaration]
d = FIELD_GET(WZRD_DIVCLK_DIVIDE_MASK, reg);
^
2 errors generated.
vim +/FIELD_PREP +324 drivers/clk/clk-xlnx-clock-wizard.c
301
302 static int clk_wzrd_dynamic_all_nolock(struct clk_hw *hw, unsigned long rate,
303 unsigned long parent_rate)
304 {
305 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
306 u32 reg, pre;
307 u16 retries;
308 int err;
309 u64 vco_freq, rate_div, f, clockout0_div;
310
311 err = clk_wzrd_get_divisors(hw, rate, parent_rate);
312 if (err)
313 pr_err("failed to get divisors\n");
314
315 vco_freq = DIV_ROUND_CLOSEST((parent_rate * divider->valuem), divider->valued);
316 rate_div = DIV_ROUND_CLOSEST((vco_freq * WZRD_FRAC_POINTS), rate);
317
318 clockout0_div = rate_div / WZRD_FRAC_POINTS;
319
320 pre = DIV_ROUND_CLOSEST((vco_freq * WZRD_FRAC_POINTS), rate);
321 f = (u32)(pre - (clockout0_div * WZRD_FRAC_POINTS));
322 f = f & WZRD_CLKOUT_FRAC_MASK;
323
> 324 reg = FIELD_PREP(WZRD_CLKOUT_DIVIDE_MASK, clockout0_div) |
325 FIELD_PREP(WZRD_CLKOUT0_FRAC_MASK, f);
326
327 writel(reg, divider->base + WZRD_CLK_CFG_REG(2));
328 /* Set divisor and clear phase offset */
329 reg = FIELD_PREP(WZRD_CLKFBOUT_MULT_MASK, divider->valuem) |
330 FIELD_PREP(WZRD_DIVCLK_DIVIDE_MASK, divider->valued);
331 writel(reg, divider->base + WZRD_CLK_CFG_REG(0));
332 writel(divider->valueo, divider->base + WZRD_CLK_CFG_REG(2));
333 writel(0, divider->base + WZRD_CLK_CFG_REG(3));
334 /* Check status register */
335 retries = WZRD_DR_NUM_RETRIES;
336 while (retries--) {
337 if (readl(divider->base + WZRD_DR_STATUS_REG_OFFSET) &
338 WZRD_DR_LOCK_BIT_MASK)
339 break;
340 }
341
342 if (!retries)
343 return -ETIMEDOUT;
344
345 /* Initiate reconfiguration */
346 writel(WZRD_DR_BEGIN_DYNA_RECONF,
347 divider->base + WZRD_DR_INIT_REG_OFFSET);
348
349 /* Check status register */
350 retries = WZRD_DR_NUM_RETRIES;
351 while (retries--) {
352 if (readl(divider->base + WZRD_DR_STATUS_REG_OFFSET) &
353 WZRD_DR_LOCK_BIT_MASK)
354 break;
355 }
356
357 if (!retries)
358 return -ETIMEDOUT;
359
360 return 0;
361 }
362
363 static int clk_wzrd_dynamic_all(struct clk_hw *hw, unsigned long rate,
364 unsigned long parent_rate)
365 {
366 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
367 unsigned long flags = 0;
368 int ret;
369
370 if (divider->lock)
371 spin_lock_irqsave(divider->lock, flags);
372 else
373 __acquire(divider->lock);
374
375 ret = clk_wzrd_dynamic_all_nolock(hw, rate, parent_rate);
376
377 if (divider->lock)
378 spin_unlock_irqrestore(divider->lock, flags);
379 else
380 __release(divider->lock);
381
382 return ret;
383 }
384
385 static unsigned long clk_wzrd_recalc_rate_all(struct clk_hw *hw,
386 unsigned long parent_rate)
387 {
388 struct clk_wzrd_divider *divider = to_clk_wzrd_divider(hw);
389 u32 m, d, o, div, reg, f;
390
391 reg = readl(divider->base + WZRD_CLK_CFG_REG(0));
> 392 d = FIELD_GET(WZRD_DIVCLK_DIVIDE_MASK, reg);
393 m = FIELD_GET(WZRD_CLKFBOUT_MULT_MASK, reg);
394 reg = readl(divider->base + WZRD_CLK_CFG_REG(2));
395 o = FIELD_GET(WZRD_DIVCLK_DIVIDE_MASK, reg);
396 f = FIELD_GET(WZRD_CLKOUT0_FRAC_MASK, reg);
397
398 div = DIV_ROUND_CLOSEST(d * (WZRD_FRAC_POINTS * o + f), WZRD_FRAC_POINTS);
399 return divider_recalc_rate(hw, parent_rate * m, div, divider->table,
400 divider->flags, divider->width);
401 }
402
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week
undefined reference to `cpu_sa110_suspend_size'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5472f14a37421d1bca3dddf33cabd3bd6dbefbbc
commit: a871be6b8eee13a35a3e8e56c62770ef17ee9220 cpuidle: Convert Qualcomm SPM driver to a generic CPUidle driver
date: 1 year, 7 months ago
config: arm-randconfig-r022-20211214 (https://download.01.org/0day-ci/archive/20211215/202112150401.4b6Ct9qs-lk...)
compiler: arm-linux-gnueabi-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout a871be6b8eee13a35a3e8e56c62770ef17ee9220
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm SHELL=/bin/bash
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 >>):
arm-linux-gnueabi-ld: arch/arm/kernel/sleep.o: in function `__cpu_suspend':
>> (.text+0x60): undefined reference to `cpu_sa110_suspend_size'
arm-linux-gnueabi-ld: arch/arm/kernel/suspend.o: in function `__cpu_suspend_save':
>> suspend.c:(.text+0x214): undefined reference to `cpu_sa110_do_suspend'
>> arm-linux-gnueabi-ld: suspend.c:(.text+0x23c): undefined reference to `cpu_sa110_do_resume'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-smc.o: in function `__scm_smc_do_quirk':
qcom_scm-smc.c:(.text+0x58): undefined reference to `__arm_smccc_smc'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call':
qcom_scm-legacy.c:(.text+0x208): undefined reference to `__arm_smccc_smc'
arm-linux-gnueabi-ld: drivers/firmware/qcom_scm-legacy.o: in function `scm_legacy_call_atomic':
qcom_scm-legacy.c:(.text+0x568): undefined reference to `__arm_smccc_smc'
Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for ARM_CPU_SUSPEND
Depends on ARCH_SUSPEND_POSSIBLE
Selected by
- ARM_QCOM_SPM_CPUIDLE && CPU_IDLE && (ARM || ARM64) && (ARCH_QCOM || COMPILE_TEST && !ARM64
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
9 months, 1 week