Re: [PATCH v2] include: linux: Reorganize timekeeping and ktime headers
by kernel test robot
Hi Carlos,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on geert-m68k/for-next]
[also build test ERROR on tip/timers/core tip/x86/core linus/master v5.17-rc3]
[cannot apply to next-20220208]
[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/Carlos-Bilbao/include-linux-Reor...
base: https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git for-next
config: m68k-randconfig-r024-20220208 (https://download.01.org/0day-ci/archive/20220209/202202090554.VWOt2B2w-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/5ed7d76f2d6aabedc437bc0b99020dc65...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Carlos-Bilbao/include-linux-Reorganize-timekeeping-and-ktime-headers/20220209-001309
git checkout 5ed7d76f2d6aabedc437bc0b99020dc655ab5719
# 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
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 >>):
arch/m68k/68000/timers.c: In function 'hw_tick':
>> arch/m68k/68000/timers.c:64:9: error: implicit declaration of function 'legacy_timer_tick' [-Werror=implicit-function-declaration]
64 | legacy_timer_tick(1);
| ^~~~~~~~~~~~~~~~~
arch/m68k/68000/timers.c: At top level:
arch/m68k/68000/timers.c:120:5: warning: no previous prototype for 'm68328_hwclk' [-Wmissing-prototypes]
120 | int m68328_hwclk(int set, struct rtc_time *t)
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/legacy_timer_tick +64 arch/m68k/68000/timers.c
36a90f26aa24c5 arch/m68knommu/platform/68328/timers.c Greg Ungerer 2008-02-01 57
36a90f26aa24c5 arch/m68knommu/platform/68328/timers.c Greg Ungerer 2008-02-01 58 static irqreturn_t hw_tick(int irq, void *dummy)
36a90f26aa24c5 arch/m68knommu/platform/68328/timers.c Greg Ungerer 2008-02-01 59 {
36a90f26aa24c5 arch/m68knommu/platform/68328/timers.c Greg Ungerer 2008-02-01 60 /* Reset Timer1 */
36a90f26aa24c5 arch/m68knommu/platform/68328/timers.c Greg Ungerer 2008-02-01 61 TSTAT &= 0;
36a90f26aa24c5 arch/m68knommu/platform/68328/timers.c Greg Ungerer 2008-02-01 62
36a90f26aa24c5 arch/m68knommu/platform/68328/timers.c Greg Ungerer 2008-02-01 63 m68328_tick_cnt += TICKS_PER_JIFFY;
09323308f63708 arch/m68k/68000/timers.c Arnd Bergmann 2020-09-24 @64 legacy_timer_tick(1);
09323308f63708 arch/m68k/68000/timers.c Arnd Bergmann 2020-09-24 65 return IRQ_HANDLED;
36a90f26aa24c5 arch/m68knommu/platform/68328/timers.c Greg Ungerer 2008-02-01 66 }
36a90f26aa24c5 arch/m68knommu/platform/68328/timers.c Greg Ungerer 2008-02-01 67
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH bpf-next 1/2] bpf: Make remote_port field in struct bpf_sk_lookup 16-bit wide
by kernel test robot
Hi Jakub,
I love your patch! Perhaps something to improve:
[auto build test WARNING on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Jakub-Sitnicki/Split-bpf_sk_look...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: sparc-randconfig-s031-20220207 (https://download.01.org/0day-ci/archive/20220208/202202080631.n8UjqRXy-lk...)
compiler: sparc64-linux-gcc (GCC) 11.2.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.4-dirty
# https://github.com/0day-ci/linux/commit/b859a90e4c32a55e71d2731dd8dae96d7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jakub-Sitnicki/Split-bpf_sk_lookup-remote_port-field/20220207-215137
git checkout b859a90e4c32a55e71d2731dd8dae96d7ad1defe
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash net/bpf/
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/bpf/test_run.c:1149:55: sparse: sparse: restricted __be16 degrades to integer
vim +1149 net/bpf/test_run.c
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1111
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1112 int bpf_prog_test_run_sk_lookup(struct bpf_prog *prog, const union bpf_attr *kattr,
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1113 union bpf_attr __user *uattr)
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1114 {
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1115 struct bpf_test_timer t = { NO_PREEMPT };
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1116 struct bpf_prog_array *progs = NULL;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1117 struct bpf_sk_lookup_kern ctx = {};
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1118 u32 repeat = kattr->test.repeat;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1119 struct bpf_sk_lookup *user_ctx;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1120 u32 retval, duration;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1121 int ret = -EINVAL;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1122
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1123 if (prog->type != BPF_PROG_TYPE_SK_LOOKUP)
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1124 return -EINVAL;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1125
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1126 if (kattr->test.flags || kattr->test.cpu)
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1127 return -EINVAL;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1128
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1129 if (kattr->test.data_in || kattr->test.data_size_in || kattr->test.data_out ||
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1130 kattr->test.data_size_out)
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1131 return -EINVAL;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1132
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1133 if (!repeat)
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1134 repeat = 1;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1135
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1136 user_ctx = bpf_ctx_init(kattr, sizeof(*user_ctx));
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1137 if (IS_ERR(user_ctx))
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1138 return PTR_ERR(user_ctx);
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1139
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1140 if (!user_ctx)
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1141 return -EINVAL;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1142
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1143 if (user_ctx->sk)
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1144 goto out;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1145
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1146 if (!range_is_zero(user_ctx, offsetofend(typeof(*user_ctx), local_port), sizeof(*user_ctx)))
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1147 goto out;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1148
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 @1149 if (user_ctx->local_port > U16_MAX || user_ctx->remote_port > U16_MAX) {
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1150 ret = -ERANGE;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1151 goto out;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1152 }
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1153
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1154 ctx.family = (u16)user_ctx->family;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1155 ctx.protocol = (u16)user_ctx->protocol;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1156 ctx.dport = (u16)user_ctx->local_port;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1157 ctx.sport = (__force __be16)user_ctx->remote_port;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1158
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1159 switch (ctx.family) {
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1160 case AF_INET:
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1161 ctx.v4.daddr = (__force __be32)user_ctx->local_ip4;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1162 ctx.v4.saddr = (__force __be32)user_ctx->remote_ip4;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1163 break;
7c32e8f8bc33a5f Lorenz Bauer 2021-03-03 1164
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH v2] trace: param: fix tp_printk option related with tp_printk_stop_on_boot
by kernel test robot
Hi JaeSang,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on rostedt-trace/for-next]
[also build test ERROR on v5.17-rc3 next-20220208]
[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/JaeSang-Yoo/trace-param-fix-tp_p...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
config: x86_64-randconfig-m001 (https://download.01.org/0day-ci/archive/20220209/202202090421.PMWXYPxl-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/2f6eb784171798586c7fde6d2f2e445ac...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review JaeSang-Yoo/trace-param-fix-tp_printk-option-related-with-tp_printk_stop_on_boot/20220209-003316
git checkout 2f6eb784171798586c7fde6d2f2e445ac5a344c3
# save the config file to linux build tree
mkdir build_dir
make 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 >>):
kernel/trace/trace.c: In function 'set_tracepoint_printk':
>> kernel/trace/trace.c:256:11: error: expected ';' before 'if'
256 | return 0
| ^
| ;
257 | if ((strcmp(str, "=0") != 0 && strcmp(str, "=off") != 0))
| ~~
kernel/trace/trace.c: In function 'trace_check_vprintf':
kernel/trace/trace.c:3824:3: warning: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
3824 | trace_seq_vprintf(&iter->seq, iter->fmt, ap);
| ^~~~~~~~~~~~~~~~~
kernel/trace/trace.c:3891:3: warning: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
3891 | trace_seq_vprintf(&iter->seq, p, ap);
| ^~~~~~~~~~~~~~~~~
At top level:
kernel/trace/trace.c:1672:37: warning: 'tracing_max_lat_fops' defined but not used [-Wunused-const-variable=]
1672 | static const struct file_operations tracing_max_lat_fops;
| ^~~~~~~~~~~~~~~~~~~~
vim +256 kernel/trace/trace.c
252
253 static int __init set_tracepoint_printk(char *str)
254 {
255 if (*str == '_')
> 256 return 0
257 if ((strcmp(str, "=0") != 0 && strcmp(str, "=off") != 0))
258 tracepoint_printk = 1;
259 return 1;
260 }
261 __setup("tp_printk", set_tracepoint_printk);
262
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.15 304/872] serial: uartps: preceding lock on line 1458
by Julia Lawall
The return on line 1465 is missing a mutex_unlock on &bitmap_lock.
julia
---------- Forwarded message ----------
Date: Tue, 8 Feb 2022 18:55:12 +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: [xilinx-xlnx:xlnx_rebase_v5.15 304/872]
drivers/tty/serial/xilinx_uartps.c:1465:3-9: preceding lock on line 1458
CC: kbuild-all(a)lists.01.org
CC: linux-arm-kernel(a)lists.infradead.org
TO: Michal Simek <monstr(a)monstr.eu>
CC: Shubhrajyoti Datta <shubhrajyoti.datta(a)xilinx.com>
CC: Radhey Shyam Pandey <radhey.shyam.pandey(a)xilinx.com>
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head: 1183ce490adb103e5e569b8ebd74c50c885ddc05
commit: f0090478ae8a76b733a846f50dc5559fff3c461f [304/872] serial: uartps: Change uart ID port allocation
:::::: branch date: 7 days ago
:::::: commit date: 8 days ago
config: xtensa-randconfig-c004-20220207 (https://download.01.org/0day-ci/archive/20220208/202202081830.Tk4vrixD-lk...)
compiler: xtensa-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: Julia Lawall <julia.lawall(a)lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> drivers/tty/serial/xilinx_uartps.c:1465:3-9: preceding lock on line 1458
vim +1465 drivers/tty/serial/xilinx_uartps.c
f0090478ae8a76 Michal Simek 2018-09-20 1453
f0090478ae8a76 Michal Simek 2018-09-20 1454 static int cdns_get_id(struct platform_device *pdev)
f0090478ae8a76 Michal Simek 2018-09-20 1455 {
f0090478ae8a76 Michal Simek 2018-09-20 1456 int id, ret;
f0090478ae8a76 Michal Simek 2018-09-20 1457
f0090478ae8a76 Michal Simek 2018-09-20 @1458 mutex_lock(&bitmap_lock);
f0090478ae8a76 Michal Simek 2018-09-20 1459
f0090478ae8a76 Michal Simek 2018-09-20 1460 /* Alias list is stable that's why get alias bitmap only once */
f0090478ae8a76 Michal Simek 2018-09-20 1461 if (!alias_bitmap_initialized) {
f0090478ae8a76 Michal Simek 2018-09-20 1462 ret = of_alias_get_alias_list(cdns_uart_of_match, "serial",
f0090478ae8a76 Michal Simek 2018-09-20 1463 alias_bitmap, CDNS_UART_NR_PORTS);
f0090478ae8a76 Michal Simek 2018-09-20 1464 if (ret)
f0090478ae8a76 Michal Simek 2018-09-20 @1465 return ret;
f0090478ae8a76 Michal Simek 2018-09-20 1466
f0090478ae8a76 Michal Simek 2018-09-20 1467 alias_bitmap_initialized++;
f0090478ae8a76 Michal Simek 2018-09-20 1468 }
f0090478ae8a76 Michal Simek 2018-09-20 1469
f0090478ae8a76 Michal Simek 2018-09-20 1470 /* Make sure that alias ID is not taken by instance without alias */
f0090478ae8a76 Michal Simek 2018-09-20 1471 bitmap_or(bitmap, bitmap, alias_bitmap, CDNS_UART_NR_PORTS);
f0090478ae8a76 Michal Simek 2018-09-20 1472
f0090478ae8a76 Michal Simek 2018-09-20 1473 dev_dbg(&pdev->dev, "Alias bitmap: %*pb\n",
f0090478ae8a76 Michal Simek 2018-09-20 1474 CDNS_UART_NR_PORTS, bitmap);
f0090478ae8a76 Michal Simek 2018-09-20 1475
f0090478ae8a76 Michal Simek 2018-09-20 1476 /* Look for a serialN alias */
f0090478ae8a76 Michal Simek 2018-09-20 1477 id = of_alias_get_id(pdev->dev.of_node, "serial");
f0090478ae8a76 Michal Simek 2018-09-20 1478 if (id < 0) {
f0090478ae8a76 Michal Simek 2018-09-20 1479 dev_warn(&pdev->dev,
f0090478ae8a76 Michal Simek 2018-09-20 1480 "No serial alias passed. Using the first free id\n");
f0090478ae8a76 Michal Simek 2018-09-20 1481
f0090478ae8a76 Michal Simek 2018-09-20 1482 /*
f0090478ae8a76 Michal Simek 2018-09-20 1483 * Start with id 0 and check if there is no serial0 alias
f0090478ae8a76 Michal Simek 2018-09-20 1484 * which points to device which is compatible with this driver.
f0090478ae8a76 Michal Simek 2018-09-20 1485 * If alias exists then try next free position.
f0090478ae8a76 Michal Simek 2018-09-20 1486 */
f0090478ae8a76 Michal Simek 2018-09-20 1487 id = 0;
f0090478ae8a76 Michal Simek 2018-09-20 1488
f0090478ae8a76 Michal Simek 2018-09-20 1489 for (;;) {
f0090478ae8a76 Michal Simek 2018-09-20 1490 dev_info(&pdev->dev, "Checking id %d\n", id);
f0090478ae8a76 Michal Simek 2018-09-20 1491 id = find_next_zero_bit(bitmap, CDNS_UART_NR_PORTS, id);
f0090478ae8a76 Michal Simek 2018-09-20 1492
f0090478ae8a76 Michal Simek 2018-09-20 1493 /* No free empty instance */
f0090478ae8a76 Michal Simek 2018-09-20 1494 if (id == CDNS_UART_NR_PORTS) {
f0090478ae8a76 Michal Simek 2018-09-20 1495 dev_err(&pdev->dev, "No free ID\n");
f0090478ae8a76 Michal Simek 2018-09-20 1496 mutex_unlock(&bitmap_lock);
f0090478ae8a76 Michal Simek 2018-09-20 1497 return -EINVAL;
f0090478ae8a76 Michal Simek 2018-09-20 1498 }
f0090478ae8a76 Michal Simek 2018-09-20 1499
f0090478ae8a76 Michal Simek 2018-09-20 1500 dev_dbg(&pdev->dev, "The empty id is %d\n", id);
f0090478ae8a76 Michal Simek 2018-09-20 1501 /* Check if ID is empty */
f0090478ae8a76 Michal Simek 2018-09-20 1502 if (!test_and_set_bit(id, bitmap)) {
f0090478ae8a76 Michal Simek 2018-09-20 1503 /* Break the loop if bit is taken */
f0090478ae8a76 Michal Simek 2018-09-20 1504 dev_dbg(&pdev->dev,
f0090478ae8a76 Michal Simek 2018-09-20 1505 "Selected ID %d allocation passed\n",
f0090478ae8a76 Michal Simek 2018-09-20 1506 id);
f0090478ae8a76 Michal Simek 2018-09-20 1507 break;
f0090478ae8a76 Michal Simek 2018-09-20 1508 }
f0090478ae8a76 Michal Simek 2018-09-20 1509 dev_dbg(&pdev->dev,
f0090478ae8a76 Michal Simek 2018-09-20 1510 "Selected ID %d allocation failed\n", id);
f0090478ae8a76 Michal Simek 2018-09-20 1511 /* if taking bit fails then try next one */
f0090478ae8a76 Michal Simek 2018-09-20 1512 id++;
f0090478ae8a76 Michal Simek 2018-09-20 1513 }
f0090478ae8a76 Michal Simek 2018-09-20 1514 }
f0090478ae8a76 Michal Simek 2018-09-20 1515
f0090478ae8a76 Michal Simek 2018-09-20 1516 mutex_unlock(&bitmap_lock);
f0090478ae8a76 Michal Simek 2018-09-20 1517
f0090478ae8a76 Michal Simek 2018-09-20 1518 return id;
f0090478ae8a76 Michal Simek 2018-09-20 1519 }
f0090478ae8a76 Michal Simek 2018-09-20 1520
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[xilinx-xlnx:xlnx_rebase_v5.15 561/872] sound/soc/xilinx/xlnx_pl_snd_card.c:391:3-9: ERROR: missing put_device; call of_find_device_by_node on line 399, but without a corresponding object release within this function. (fwd)
by Julia Lawall
Hello,
I think that the rule output is not really correct, but there are some
problems:
* line 390: pnode is NULL, os the of_node_put is not needed.
* line 407: There should be an of_node_put before this return, like there
is before the previous one.
julia
---------- Forwarded message ----------
Date: Wed, 9 Feb 2022 00:10:21 +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: [xilinx-xlnx:xlnx_rebase_v5.15 561/872]
sound/soc/xilinx/xlnx_pl_snd_card.c:391:3-9: ERROR: missing put_device; call
of_find_device_by_node on line 399,
but without a corresponding object release within this function.
CC: kbuild-all(a)lists.01.org
CC: linux-arm-kernel(a)lists.infradead.org
TO: Maruthi Srinivas Bayyavarapu <maruthi.srinivas.bayyavarapu(a)xilinx.com>
CC: Michal Simek <monstr(a)monstr.eu>
CC: Hyun Kwon <hyun.kwon(a)xilinx.com>
tree: https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.15
head: 1183ce490adb103e5e569b8ebd74c50c885ddc05
commit: c078611ad13fd9b920a3aa5a206a014322742227 [561/872] ASoC: xlnx: add PL sound card support
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
config: ia64-randconfig-c023-20220208 (https://download.01.org/0day-ci/archive/20220208/202202082343.teK89qWC-lk...)
compiler: ia64-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: Julia Lawall <julia.lawall(a)lip6.fr>
cocci warnings: (new ones prefixed by >>)
>> sound/soc/xilinx/xlnx_pl_snd_card.c:391:3-9: ERROR: missing put_device; call of_find_device_by_node on line 399, but without a corresponding object release within this function.
sound/soc/xilinx/xlnx_pl_snd_card.c:407:4-10: ERROR: missing put_device; call of_find_device_by_node on line 399, but without a corresponding object release within this function.
sound/soc/xilinx/xlnx_pl_snd_card.c:475:3-9: ERROR: missing put_device; call of_find_device_by_node on line 399, but without a corresponding object release within this function.
sound/soc/xilinx/xlnx_pl_snd_card.c:489:3-9: ERROR: missing put_device; call of_find_device_by_node on line 399, but without a corresponding object release within this function.
sound/soc/xilinx/xlnx_pl_snd_card.c:495:3-9: ERROR: missing put_device; call of_find_device_by_node on line 399, but without a corresponding object release within this function.
sound/soc/xilinx/xlnx_pl_snd_card.c:507:3-9: ERROR: missing put_device; call of_find_device_by_node on line 399, but without a corresponding object release within this function.
sound/soc/xilinx/xlnx_pl_snd_card.c:514:1-7: ERROR: missing put_device; call of_find_device_by_node on line 399, but without a corresponding object release within this function.
vim +391 sound/soc/xilinx/xlnx_pl_snd_card.c
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 337
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 338 static int xlnx_snd_probe(struct platform_device *pdev)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 339 {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 340 u32 i, max_links = 0, start_count = 0;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 341 size_t sz;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 342 char *buf;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 343 int ret, audio_interface;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 344 struct snd_soc_dai_link *dai;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 345 struct pl_card_data *prv;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 346 struct platform_device *iface_pdev;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 347
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 348 struct snd_soc_card *card;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 349 struct device_node **node = pdev->dev.platform_data;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 350
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 351 if (!node)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 352 return -ENODEV;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 353
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 354 if (node[XLNX_PLAYBACK] && node[XLNX_CAPTURE]) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 355 max_links = 2;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 356 start_count = XLNX_PLAYBACK;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 357 } else if (node[XLNX_PLAYBACK]) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 358 max_links = 1;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 359 start_count = XLNX_PLAYBACK;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 360 } else if (node[XLNX_CAPTURE]) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 361 max_links = 1;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 362 start_count = XLNX_CAPTURE;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 363 }
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 364
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 365 card = devm_kzalloc(&pdev->dev, sizeof(struct snd_soc_card),
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 366 GFP_KERNEL);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 367 if (!card)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 368 return -ENOMEM;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 369
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 370 card->dev = &pdev->dev;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 371
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 372 card->dai_link = devm_kzalloc(card->dev,
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 373 sizeof(*dai) * max_links,
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 374 GFP_KERNEL);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 375 if (!card->dai_link)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 376 return -ENOMEM;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 377
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 378 prv = devm_kzalloc(card->dev,
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 379 sizeof(struct pl_card_data),
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 380 GFP_KERNEL);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 381 if (!prv)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 382 return -ENOMEM;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 383
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 384 card->num_links = 0;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 385 for (i = start_count; i < (start_count + max_links); i++) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 386 struct device_node *pnode = of_parse_phandle(node[i],
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 387 "xlnx,snd-pcm", 0);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 388 if (!pnode) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 389 dev_err(card->dev, "platform node not found\n");
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 390 of_node_put(pnode);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 @391 return -ENODEV;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 392 }
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 393
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 394 /*
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 395 * Check for either playback or capture is enough, as
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 396 * same clock is used for both.
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 397 */
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 398 if (i == XLNX_PLAYBACK) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 @399 iface_pdev = of_find_device_by_node(pnode);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 400 if (!iface_pdev) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 401 of_node_put(pnode);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 402 return -ENODEV;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 403 }
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 404
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 405 prv->mclk = devm_clk_get(&iface_pdev->dev, "aud_mclk");
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 406 if (IS_ERR(prv->mclk))
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 407 return PTR_ERR(prv->mclk);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 408
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 409 }
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 410 of_node_put(pnode);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 411
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 412 if (max_links == 2)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 413 dai = &card->dai_link[i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 414 else
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 415 dai = &card->dai_link[0];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 416
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 417 audio_interface = find_link(node[i], i);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 418 switch (audio_interface) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 419 case I2S_AUDIO:
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 420 *dai = xlnx_snd_dai[I2S_AUDIO][i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 421 dai->platforms->of_node = pnode;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 422 dai->cpus->of_node = node[i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 423 card->num_links++;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 424 snd_soc_card_set_drvdata(card, prv);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 425 dev_dbg(card->dev, "%s registered\n",
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 426 card->dai_link[i].name);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 427 break;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 428 case HDMI_AUDIO:
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 429 *dai = xlnx_snd_dai[HDMI_AUDIO][i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 430 dai->platforms->of_node = pnode;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 431 if (i == XLNX_CAPTURE)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 432 dai->codecs->of_node = node[i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 433 card->num_links++;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 434 /* TODO: support multiple sampling rates */
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 435 prv->mclk_ratio = 384;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 436 snd_soc_card_set_drvdata(card, prv);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 437 dev_dbg(card->dev, "%s registered\n",
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 438 card->dai_link[i].name);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 439 break;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 440 case SDI_AUDIO:
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 441 *dai = xlnx_snd_dai[SDI_AUDIO][i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 442 dai->platforms->of_node = pnode;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 443 dai->codecs->of_node = node[i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 444 card->num_links++;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 445 /* TODO: support multiple sampling rates */
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 446 prv->mclk_ratio = 384;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 447 snd_soc_card_set_drvdata(card, prv);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 448 dev_dbg(card->dev, "%s registered\n",
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 449 card->dai_link[i].name);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 450 break;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 451 case SPDIF_AUDIO:
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 452 *dai = xlnx_snd_dai[SPDIF_AUDIO][i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 453 dai->platforms->of_node = pnode;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 454 dai->codecs->of_node = node[i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 455 card->num_links++;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 456 prv->mclk_ratio = 384;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 457 snd_soc_card_set_drvdata(card, prv);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 458 dev_dbg(card->dev, "%s registered\n",
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 459 card->dai_link[i].name);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 460 break;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 461 case DP_AUDIO:
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 462 *dai = xlnx_snd_dai[DP_AUDIO][i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 463 dai->platforms->of_node = pnode;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 464 if (i == XLNX_CAPTURE)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 465 dai->codecs->of_node = node[i];
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 466 card->num_links++;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 467 /* TODO: support multiple sampling rates */
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 468 prv->mclk_ratio = 512;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 469 snd_soc_card_set_drvdata(card, prv);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 470 dev_dbg(card->dev, "%s registered\n",
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 471 card->dai_link[i].name);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 472 break;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 473 default:
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 474 dev_err(card->dev, "Invalid audio interface\n");
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 475 return -ENODEV;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 476 }
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 477 }
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 478
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 479 if (card->num_links) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 480 /*
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 481 * Example : i2s card name = xlnx-i2s-snd-card-0
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 482 * length = number of chars in "xlnx-i2s-snd-card"
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 483 * + 1 ('-'), + 1 (card instance num)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 484 * + 1 ('\0')
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 485 */
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 486 sz = strlen(xlnx_snd_card_name[audio_interface]) + 3;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 487 buf = devm_kzalloc(card->dev, sz, GFP_KERNEL);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 488 if (!buf)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 489 return -ENOMEM;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 490
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 491 prv->xlnx_snd_dev_id = ida_simple_get(&xlnx_snd_card_dev, 0,
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 492 XLNX_MAX_PL_SND_DEV,
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 493 GFP_KERNEL);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 494 if (prv->xlnx_snd_dev_id < 0)
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 495 return prv->xlnx_snd_dev_id;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 496
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 497 snprintf(buf, sz, "%s-%d", xlnx_snd_card_name[audio_interface],
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 498 prv->xlnx_snd_dev_id);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 499 card->name = buf;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 500
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 501 ret = devm_snd_soc_register_card(card->dev, card);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 502 if (ret) {
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 503 dev_err(card->dev, "%s registration failed\n",
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 504 card->name);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 505 ida_simple_remove(&xlnx_snd_card_dev,
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 506 prv->xlnx_snd_dev_id);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 507 return ret;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 508 }
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 509
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 510 dev_set_drvdata(card->dev, prv);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 511 dev_info(card->dev, "%s registered\n", card->name);
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 512 }
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 513
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 514 return 0;
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 515 }
c078611ad13fd9 Maruthi Srinivas Bayyavarapu 2018-09-06 516
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[mark:arm64/preempt-dynamic-static-key 7/7] arch/arm64/include/asm/preempt.h:85:25: error: a parameter list without types is only allowed in a function definition
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git arm64/preempt-dynamic-static-key
head: 106f60395c0b424e5e05a69bbd40075152f9a17f
commit: 106f60395c0b424e5e05a69bbd40075152f9a17f [7/7] arm64: support PREEMPT_DYNAMIC
config: arm64-randconfig-r025-20220208 (https://download.01.org/0day-ci/archive/20220209/202202090439.RWVJ0AMJ-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e8bff9ae54a55b4dbfeb6ba55f723abbd81bf494)
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://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?id...
git remote add mark https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git
git fetch --no-tags mark arm64/preempt-dynamic-static-key
git checkout 106f60395c0b424e5e05a69bbd40075152f9a17f
# 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 error/warnings (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:13:
In file included from include/linux/irqdomain.h:35:
In file included from include/linux/of.h:17:
In file included from include/linux/kobject.h:20:
In file included from include/linux/sysfs.h:16:
In file included from include/linux/kernfs.h:11:
In file included from include/linux/mutex.h:17:
In file included from include/linux/lockdep.h:14:
In file included from include/linux/smp.h:110:
In file included from include/linux/preempt.h:78:
>> arch/arm64/include/asm/preempt.h:85:1: warning: declaration specifier missing, defaulting to 'int'
DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
^
int
>> arch/arm64/include/asm/preempt.h:85:25: error: a parameter list without types is only allowed in a function definition
DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
^
1 warning and 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:1191: 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 +85 arch/arm64/include/asm/preempt.h
84
> 85 DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
86 void dynamic_preempt_schedule(void);
87 #define __preempt_schedule() dynamic_preempt_schedule()
88 void dynamic_preempt_schedule_notrace(void);
89 #define __preempt_schedule_notrace() dynamic_preempt_schedule_notrace()
90
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[intel-tdx:kvm-upstream-workaround 158/167] arch/x86/kvm/mmu/tdp_mmu.c:786:34: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://github.com/intel/tdx.git kvm-upstream-workaround
head: ae19e4b18af5a4b4b7d7b3d9c86614006d0a0216
commit: d384a6a6e5dd4a155d9a6a497df231282c6036f6 [158/167] KVM, x86/tdp_mmu: optimize remote tlb flush
config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220209/202202090436.z5pWmpmZ-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/intel/tdx/commit/d384a6a6e5dd4a155d9a6a497df231282c6036f6
git remote add intel-tdx https://github.com/intel/tdx.git
git fetch --no-tags intel-tdx kvm-upstream-workaround
git checkout d384a6a6e5dd4a155d9a6a497df231282c6036f6
# save the config file to linux build tree
mkdir build_dir
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' 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>
sparse warnings: (new ones prefixed by >>)
arch/x86/kvm/mmu/tdp_mmu.c:588:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu * @@
arch/x86/kvm/mmu/tdp_mmu.c:588:17: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:588:17: sparse: got unsigned long long [noderef] [usertype] __rcu *
>> arch/x86/kvm/mmu/tdp_mmu.c:786:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *const [usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:786:34: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:786:34: sparse: got unsigned long long [noderef] [usertype] __rcu *const [usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:1106:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:1106:41: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:1106:41: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:1260:17: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[addressable] [usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:1260:17: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:1260:17: sparse: got unsigned long long [noderef] [usertype] __rcu *[addressable] [usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:1392:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:1392:13: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:1392:13: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:1447:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:1447:33: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:1447:33: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:1498:13: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:1498:13: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:1498:13: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:332:9: sparse: sparse: context imbalance in 'tdp_mmu_unlink_page' - different lock contexts for basic block
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:713:9: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:728:80: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:735:67: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:626:9: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: expected unsigned long long [usertype] *sptep
arch/x86/kvm/mmu/tdp_mmu.c:645:80: sparse: got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep
arch/x86/kvm/mmu/tdp_mmu.c:621:48: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *sptep @@ got unsigned long long [noderef] [usertype] __rcu *[usertype] sptep @@
vim +786 arch/x86/kvm/mmu/tdp_mmu.c
759
760 #define tdp_root_for_each_pte(_iter, _root, _start, _end) \
761 for_each_tdp_pte(_iter, _root->spt, _root->role.level, _start, _end)
762
763 /*
764 * Note temporarily blocked private SPTE is considered as valid leaf, although
765 * !is_shadow_present_pte() returns true for it, since the target page (which
766 * the mapping maps to ) is still there.
767 */
768 #define tdp_root_for_each_leaf_pte(_iter, _root, _start, _end) \
769 tdp_root_for_each_pte(_iter, _root, _start, _end) \
770 if ((!is_shadow_present_pte(_iter.old_spte) && \
771 !is_private_zapped_spte(_iter.old_spte)) || \
772 !is_last_spte(_iter.old_spte, _iter.level)) \
773 continue; \
774 else
775
776 #define tdp_mmu_for_each_pte(_iter, _mmu, _private, _start, _end) \
777 for_each_tdp_pte(_iter, \
778 __va((_private) ? _mmu->private_root_hpa : _mmu->root_hpa), \
779 _mmu->shadow_root_level, _start, _end)
780
781 static u64 private_zapped_spte(struct kvm *kvm, const struct tdp_iter *iter)
782 {
783 if (!kvm_gfn_stolen_mask(kvm))
784 return shadow_init_value;
785
> 786 if (!is_private_spte(iter->sptep))
787 return shadow_init_value;
788
789 return shadow_init_value | SPTE_PRIVATE_ZAPPED |
790 (spte_to_pfn(iter->old_spte) << PAGE_SHIFT) |
791 (is_large_pte(iter->old_spte) ? PT_PAGE_SIZE_MASK : 0) |
792 (is_private_prohibit_spte(iter->old_spte) ?
793 SPTE_PRIVATE_PROHIBIT : 0);
794 }
795
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week