[rppt:secretmemfd/v0 4/6] include/uapi/asm-generic/unistd.h:863:29: error: 'sys_secretmemfd' undeclared here (not in a function)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git secretmemfd/v0
head: 1be1031a8ed57dcefb64c7a2d333b9c0d66e575a
commit: 328d5719045171dd3e1f608281079d6918093d1d [4/6] arch, mm: wire up secretmemfd system call were relevant
config: riscv-allyesconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 328d5719045171dd3e1f608281079d6918093d1d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
| ^
include/uapi/asm-generic/unistd.h:840:1: note: in expansion of macro '__SYSCALL'
840 | __SYSCALL(__NR_fsopen, sys_fsopen)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:842:1: note: in expansion of macro '__SYSCALL'
842 | __SYSCALL(__NR_fsconfig, sys_fsconfig)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for 'sys_call_table[431]')
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:842:1: note: in expansion of macro '__SYSCALL'
842 | __SYSCALL(__NR_fsconfig, sys_fsconfig)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:844:1: note: in expansion of macro '__SYSCALL'
844 | __SYSCALL(__NR_fsmount, sys_fsmount)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for 'sys_call_table[432]')
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:844:1: note: in expansion of macro '__SYSCALL'
844 | __SYSCALL(__NR_fsmount, sys_fsmount)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:846:1: note: in expansion of macro '__SYSCALL'
846 | __SYSCALL(__NR_fspick, sys_fspick)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for 'sys_call_table[433]')
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:846:1: note: in expansion of macro '__SYSCALL'
846 | __SYSCALL(__NR_fspick, sys_fspick)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:848:1: note: in expansion of macro '__SYSCALL'
848 | __SYSCALL(__NR_pidfd_open, sys_pidfd_open)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for 'sys_call_table[434]')
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:848:1: note: in expansion of macro '__SYSCALL'
848 | __SYSCALL(__NR_pidfd_open, sys_pidfd_open)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:851:1: note: in expansion of macro '__SYSCALL'
851 | __SYSCALL(__NR_clone3, sys_clone3)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for 'sys_call_table[435]')
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:851:1: note: in expansion of macro '__SYSCALL'
851 | __SYSCALL(__NR_clone3, sys_clone3)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:855:1: note: in expansion of macro '__SYSCALL'
855 | __SYSCALL(__NR_openat2, sys_openat2)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for 'sys_call_table[437]')
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:855:1: note: in expansion of macro '__SYSCALL'
855 | __SYSCALL(__NR_openat2, sys_openat2)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:857:1: note: in expansion of macro '__SYSCALL'
857 | __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for 'sys_call_table[438]')
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:857:1: note: in expansion of macro '__SYSCALL'
857 | __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:859:1: note: in expansion of macro '__SYSCALL'
859 | __SYSCALL(__NR_faccessat2, sys_faccessat2)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for 'sys_call_table[439]')
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
include/uapi/asm-generic/unistd.h:859:1: note: in expansion of macro '__SYSCALL'
859 | __SYSCALL(__NR_faccessat2, sys_faccessat2)
| ^~~~~~~~~
>> include/uapi/asm-generic/unistd.h:863:29: error: 'sys_secretmemfd' undeclared here (not in a function)
863 | __SYSCALL(__NR_secretmemfd, sys_secretmemfd)
| ^~~~~~~~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:37: note: in definition of macro '__SYSCALL'
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^~~~
arch/riscv/kernel/syscall_table.c:14:36: warning: initialized field overwritten [-Woverride-init]
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
arch/riscv/include/uapi/asm/unistd.h:43:1: note: in expansion of macro '__SYSCALL'
43 | __SYSCALL(__NR_riscv_flush_icache, sys_riscv_flush_icache)
| ^~~~~~~~~
arch/riscv/kernel/syscall_table.c:14:36: note: (near initialization for 'sys_call_table[259]')
14 | #define __SYSCALL(nr, call) [nr] = (call),
| ^
arch/riscv/include/uapi/asm/unistd.h:43:1: note: in expansion of macro '__SYSCALL'
43 | __SYSCALL(__NR_riscv_flush_icache, sys_riscv_flush_icache)
| ^~~~~~~~~
vim +/sys_secretmemfd +863 include/uapi/asm-generic/unistd.h
853
854 #define __NR_openat2 437
855 __SYSCALL(__NR_openat2, sys_openat2)
856 #define __NR_pidfd_getfd 438
857 __SYSCALL(__NR_pidfd_getfd, sys_pidfd_getfd)
858 #define __NR_faccessat2 439
> 859 __SYSCALL(__NR_faccessat2, sys_faccessat2)
860
861 #ifdef __ARCH_WANT_SECRETMEMFD
862 #define __NR_secretmemfd 440
> 863 __SYSCALL(__NR_secretmemfd, sys_secretmemfd)
864 #endif
865
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[lkp] [+1158 bytes kernel size regression] [i386-tinyconfig] [22dd199a72] mm: introduce secretmemfd system call to create "secret" memory areas
by kernel test robot
FYI, we noticed a +1158 bytes kernel size regression due to commit:
commit: 22dd199a7221932b194badb999181ca3fa2e62e2 (mm: introduce secretmemfd system call to create "secret" memory areas)
https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git secretmemfd/v0
Details as below (size data is obtained by `nm --size-sort vmlinux`):
f56cf703: mmap: make mlock_future_check() global
22dd199a: mm: introduce secretmemfd system call to create "secret" memory areas
+--------------------------------+----------+----------+-------+
| symbol | f56cf703 | 22dd199a | delta |
+--------------------------------+----------+----------+-------+
| bzImage | 442560 | 443008 | 448 |
| nm.T.__ia32_sys_secretmemfd | 0 | 285 | 285 |
| nm.t.secretmem_fault | 0 | 254 | 254 |
| nm.R.secretmem_fops | 0 | 128 | 128 |
| nm.t.secretmem_mmap | 0 | 110 | 110 |
| nm.r.secretmem_super_ops | 0 | 92 | 92 |
| nm.r.secretmem_aops | 0 | 88 | 88 |
| nm.r.secretmem_vm_ops | 0 | 52 | 52 |
| nm.t.secretmem_evict_inode | 0 | 37 | 37 |
| nm.d.secretmem_fs | 0 | 36 | 36 |
| nm.t.secretmem_init | 0 | 29 | 29 |
| nm.t.secretmem_init_fs_context | 0 | 29 | 29 |
| nm.t.secretmem_migratepage | 0 | 6 | 6 |
| nm.t.secretmem_freepage | 0 | 5 | 5 |
| nm.b.secretmem_mnt | 0 | 4 | 4 |
| nm.t.secretmem_isolate_page | 0 | 3 | 3 |
+--------------------------------+----------+----------+-------+
Thanks
2 years, 2 months
[radeon-alex:drm-next 140/193] drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1233:3: warning: variable 'direct_poll' set but not used
by kernel test robot
tree: git://people.freedesktop.org/~agd5f/linux.git drm-next
head: d7373aaf738393f38f40b0570bfa1403584eb982
commit: 1f61a43fcec1dceac2ec537a63aba6846dd0e80a [140/193] drm/amd/sriov porting sriov cap to vcn3.0
config: parisc-allyesconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 1f61a43fcec1dceac2ec537a63aba6846dd0e80a
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c: In function 'vcn_v3_0_start_sriov':
>> drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:1233:3: warning: variable 'direct_poll' set but not used [-Wunused-but-set-variable]
1233 | direct_poll = { {0} };
| ^~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:25:
At top level:
drivers/gpu/drm/amd/amdgpu/amdgpu.h:192:19: warning: 'debug_evictions' defined but not used [-Wunused-const-variable=]
192 | static const bool debug_evictions; /* = false */
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu.h:191:18: warning: 'sched_policy' defined but not used [-Wunused-const-variable=]
191 | static const int sched_policy = KFD_SCHED_POLICY_HWS;
| ^~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/../display/dc/dc_types.h:33,
from drivers/gpu/drm/amd/amdgpu/../display/dc/dm_services_types.h:30,
from drivers/gpu/drm/amd/amdgpu/../include/dm_pp_interface.h:26,
from drivers/gpu/drm/amd/amdgpu/amdgpu.h:65,
from drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c:25:
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:76:32: warning: 'dc_fixpt_ln2_div_2' defined but not used [-Wunused-const-variable=]
76 | static const struct fixed31_32 dc_fixpt_ln2_div_2 = { 1488522236LL };
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:75:32: warning: 'dc_fixpt_ln2' defined but not used [-Wunused-const-variable=]
75 | static const struct fixed31_32 dc_fixpt_ln2 = { 2977044471LL };
| ^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:74:32: warning: 'dc_fixpt_e' defined but not used [-Wunused-const-variable=]
74 | static const struct fixed31_32 dc_fixpt_e = { 11674931555LL };
| ^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:73:32: warning: 'dc_fixpt_two_pi' defined but not used [-Wunused-const-variable=]
73 | static const struct fixed31_32 dc_fixpt_two_pi = { 26986075409LL };
| ^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:72:32: warning: 'dc_fixpt_pi' defined but not used [-Wunused-const-variable=]
72 | static const struct fixed31_32 dc_fixpt_pi = { 13493037705LL };
| ^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/include/fixed31_32.h:67:32: warning: 'dc_fixpt_zero' defined but not used [-Wunused-const-variable=]
67 | static const struct fixed31_32 dc_fixpt_zero = { 0 };
| ^~~~~~~~~~~~~
vim +/direct_poll +1233 drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c
1210
1211 static int vcn_v3_0_start_sriov(struct amdgpu_device *adev)
1212 {
1213 int i, j;
1214 struct amdgpu_ring *ring;
1215 uint64_t cache_addr;
1216 uint64_t rb_addr;
1217 uint64_t ctx_addr;
1218 uint32_t param, resp, expected;
1219 uint32_t offset, cache_size;
1220 uint32_t tmp, timeout;
1221 uint32_t id;
1222
1223 struct amdgpu_mm_table *table = &adev->virt.mm_table;
1224 uint32_t *table_loc;
1225 uint32_t table_size;
1226 uint32_t size, size_dw;
1227
1228 struct mmsch_v3_0_cmd_direct_write
1229 direct_wt = { {0} };
1230 struct mmsch_v3_0_cmd_direct_read_modify_write
1231 direct_rd_mod_wt = { {0} };
1232 struct mmsch_v3_0_cmd_direct_polling
> 1233 direct_poll = { {0} };
1234 struct mmsch_v3_0_cmd_end end = { {0} };
1235 struct mmsch_v3_0_init_header header;
1236
1237 direct_wt.cmd_header.command_type =
1238 MMSCH_COMMAND__DIRECT_REG_WRITE;
1239 direct_rd_mod_wt.cmd_header.command_type =
1240 MMSCH_COMMAND__DIRECT_REG_READ_MODIFY_WRITE;
1241 direct_poll.cmd_header.command_type =
1242 MMSCH_COMMAND__DIRECT_REG_POLLING;
1243 end.cmd_header.command_type =
1244 MMSCH_COMMAND__END;
1245
1246 header.version = MMSCH_VERSION;
1247 header.total_size = sizeof(struct mmsch_v3_0_init_header) >> 2;
1248 for (i = 0; i < AMDGPU_MAX_VCN_INSTANCES; i++) {
1249 header.inst[i].init_status = 0;
1250 header.inst[i].table_offset = 0;
1251 header.inst[i].table_size = 0;
1252 }
1253
1254 table_loc = (uint32_t *)table->cpu_addr;
1255 table_loc += header.total_size;
1256 for (i = 0; i < adev->vcn.num_vcn_inst; i++) {
1257 if (adev->vcn.harvest_config & (1 << i))
1258 continue;
1259
1260 table_size = 0;
1261
1262 MMSCH_V3_0_INSERT_DIRECT_RD_MOD_WT(SOC15_REG_OFFSET(VCN, i,
1263 mmUVD_STATUS),
1264 ~UVD_STATUS__UVD_BUSY, UVD_STATUS__UVD_BUSY);
1265
1266 cache_size = AMDGPU_GPU_PAGE_ALIGN(adev->vcn.fw->size + 4);
1267
1268 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) {
1269 id = amdgpu_ucode_id_vcns[i];
1270 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1271 mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW),
1272 adev->firmware.ucode[id].tmr_mc_addr_lo);
1273 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1274 mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH),
1275 adev->firmware.ucode[id].tmr_mc_addr_hi);
1276 offset = 0;
1277 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1278 mmUVD_VCPU_CACHE_OFFSET0),
1279 0);
1280 } else {
1281 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1282 mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW),
1283 lower_32_bits(adev->vcn.inst[i].gpu_addr));
1284 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1285 mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH),
1286 upper_32_bits(adev->vcn.inst[i].gpu_addr));
1287 offset = cache_size;
1288 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1289 mmUVD_VCPU_CACHE_OFFSET0),
1290 AMDGPU_UVD_FIRMWARE_OFFSET >> 3);
1291 }
1292
1293 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1294 mmUVD_VCPU_CACHE_SIZE0),
1295 cache_size);
1296
1297 cache_addr = adev->vcn.inst[i].gpu_addr + offset;
1298 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1299 mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_LOW),
1300 lower_32_bits(cache_addr));
1301 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1302 mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_HIGH),
1303 upper_32_bits(cache_addr));
1304 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1305 mmUVD_VCPU_CACHE_OFFSET1),
1306 0);
1307 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1308 mmUVD_VCPU_CACHE_SIZE1),
1309 AMDGPU_VCN_STACK_SIZE);
1310
1311 cache_addr = adev->vcn.inst[i].gpu_addr + offset +
1312 AMDGPU_VCN_STACK_SIZE;
1313 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1314 mmUVD_LMI_VCPU_CACHE2_64BIT_BAR_LOW),
1315 lower_32_bits(cache_addr));
1316 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1317 mmUVD_LMI_VCPU_CACHE2_64BIT_BAR_HIGH),
1318 upper_32_bits(cache_addr));
1319 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1320 mmUVD_VCPU_CACHE_OFFSET2),
1321 0);
1322 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1323 mmUVD_VCPU_CACHE_SIZE2),
1324 AMDGPU_VCN_CONTEXT_SIZE);
1325
1326 for (j = 0; j < adev->vcn.num_enc_rings; ++j) {
1327 ring = &adev->vcn.inst[i].ring_enc[j];
1328 ring->wptr = 0;
1329 rb_addr = ring->gpu_addr;
1330 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1331 mmUVD_RB_BASE_LO),
1332 lower_32_bits(rb_addr));
1333 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1334 mmUVD_RB_BASE_HI),
1335 upper_32_bits(rb_addr));
1336 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1337 mmUVD_RB_SIZE),
1338 ring->ring_size / 4);
1339 }
1340
1341 ring = &adev->vcn.inst[i].ring_dec;
1342 ring->wptr = 0;
1343 rb_addr = ring->gpu_addr;
1344 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1345 mmUVD_LMI_RBC_RB_64BIT_BAR_LOW),
1346 lower_32_bits(rb_addr));
1347 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1348 mmUVD_LMI_RBC_RB_64BIT_BAR_HIGH),
1349 upper_32_bits(rb_addr));
1350 /* force RBC into idle state */
1351 tmp = order_base_2(ring->ring_size);
1352 tmp = REG_SET_FIELD(0, UVD_RBC_RB_CNTL, RB_BUFSZ, tmp);
1353 tmp = REG_SET_FIELD(tmp, UVD_RBC_RB_CNTL, RB_BLKSZ, 1);
1354 tmp = REG_SET_FIELD(tmp, UVD_RBC_RB_CNTL, RB_NO_FETCH, 1);
1355 tmp = REG_SET_FIELD(tmp, UVD_RBC_RB_CNTL, RB_NO_UPDATE, 1);
1356 tmp = REG_SET_FIELD(tmp, UVD_RBC_RB_CNTL, RB_RPTR_WR_EN, 1);
1357 MMSCH_V3_0_INSERT_DIRECT_WT(SOC15_REG_OFFSET(VCN, i,
1358 mmUVD_RBC_RB_CNTL),
1359 tmp);
1360
1361 /* add end packet */
1362 MMSCH_V3_0_INSERT_END();
1363
1364 /* refine header */
1365 header.inst[i].init_status = 1;
1366 header.inst[i].table_offset = header.total_size;
1367 header.inst[i].table_size = table_size;
1368 header.total_size += table_size;
1369 }
1370
1371 /* Update init table header in memory */
1372 size = sizeof(struct mmsch_v3_0_init_header);
1373 table_loc = (uint32_t *)table->cpu_addr;
1374 memcpy((void *)table_loc, &header, size);
1375
1376 /* message MMSCH (in VCN[0]) to initialize this client
1377 * 1, write to mmsch_vf_ctx_addr_lo/hi register with GPU mc addr
1378 * of memory descriptor location
1379 */
1380 ctx_addr = table->gpu_addr;
1381 WREG32_SOC15(VCN, 0, mmMMSCH_VF_CTX_ADDR_LO, lower_32_bits(ctx_addr));
1382 WREG32_SOC15(VCN, 0, mmMMSCH_VF_CTX_ADDR_HI, upper_32_bits(ctx_addr));
1383
1384 /* 2, update vmid of descriptor */
1385 tmp = RREG32_SOC15(VCN, 0, mmMMSCH_VF_VMID);
1386 tmp &= ~MMSCH_VF_VMID__VF_CTX_VMID_MASK;
1387 /* use domain0 for MM scheduler */
1388 tmp |= (0 << MMSCH_VF_VMID__VF_CTX_VMID__SHIFT);
1389 WREG32_SOC15(VCN, 0, mmMMSCH_VF_VMID, tmp);
1390
1391 /* 3, notify mmsch about the size of this descriptor */
1392 size = header.total_size;
1393 WREG32_SOC15(VCN, 0, mmMMSCH_VF_CTX_SIZE, size);
1394
1395 /* 4, set resp to zero */
1396 WREG32_SOC15(VCN, 0, mmMMSCH_VF_MAILBOX_RESP, 0);
1397
1398 /* 5, kick off the initialization and wait until
1399 * MMSCH_VF_MAILBOX_RESP becomes non-zero
1400 */
1401 param = 0x10000001;
1402 WREG32_SOC15(VCN, 0, mmMMSCH_VF_MAILBOX_HOST, param);
1403 tmp = 0;
1404 timeout = 1000;
1405 resp = 0;
1406 expected = param + 1;
1407 while (resp != expected) {
1408 resp = RREG32_SOC15(VCN, 0, mmMMSCH_VF_MAILBOX_RESP);
1409 if (resp == expected)
1410 break;
1411
1412 udelay(10);
1413 tmp = tmp + 10;
1414 if (tmp >= timeout) {
1415 DRM_ERROR("failed to init MMSCH. TIME-OUT after %d usec"\
1416 " waiting for mmMMSCH_VF_MAILBOX_RESP "\
1417 "(expected=0x%08x, readback=0x%08x)\n",
1418 tmp, expected, resp);
1419 return -EBUSY;
1420 }
1421 }
1422
1423 return 0;
1424 }
1425
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH 1/2] gpio/aspeed-sgpio: enable access to all 80 input & output sgpios
by kernel test robot
Hi Jeremy,
I love your patch! Perhaps something to improve:
[auto build test WARNING on gpio/for-next]
[also build test WARNING on joel-aspeed/for-next v5.8-rc5 next-20200715]
[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/Jeremy-Kerr/gpio-aspeed-sgpio-en...
base: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git for-next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpio/gpio-aspeed-sgpio.c:162:8: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
162 | static const bool aspeed_sgpio_is_input(unsigned int offset)
| ^~~~~
drivers/gpio/gpio-aspeed-sgpio.c: In function 'aspeed_sgpio_dir_out':
>> drivers/gpio/gpio-aspeed-sgpio.c:233:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable]
233 | int rc;
| ^~
vim +162 drivers/gpio/gpio-aspeed-sgpio.c
161
> 162 static const bool aspeed_sgpio_is_input(unsigned int offset)
163 {
164 return offset < SGPIO_OUTPUT_OFFSET;
165 }
166
167 static int aspeed_sgpio_get(struct gpio_chip *gc, unsigned int offset)
168 {
169 struct aspeed_sgpio *gpio = gpiochip_get_data(gc);
170 const struct aspeed_sgpio_bank *bank = to_bank(offset);
171 unsigned long flags;
172 enum aspeed_sgpio_reg reg;
173 int rc = 0;
174
175 spin_lock_irqsave(&gpio->lock, flags);
176
177 reg = aspeed_sgpio_is_input(offset) ? reg_val : reg_rdata;
178 rc = !!(ioread32(bank_reg(gpio, bank, reg)) & GPIO_BIT(offset));
179
180 spin_unlock_irqrestore(&gpio->lock, flags);
181
182 return rc;
183 }
184
185 static int sgpio_set_value(struct gpio_chip *gc, unsigned int offset, int val)
186 {
187 struct aspeed_sgpio *gpio = gpiochip_get_data(gc);
188 const struct aspeed_sgpio_bank *bank = to_bank(offset);
189 void __iomem *addr_r, *addr_w;
190 u32 reg = 0;
191
192 if (aspeed_sgpio_is_input(offset))
193 return -EINVAL;
194
195 /* Since this is an output, read the cached value from rdata, then
196 * update val. */
197 addr_r = bank_reg(gpio, bank, reg_rdata);
198 addr_w = bank_reg(gpio, bank, reg_val);
199
200 reg = ioread32(addr_r);
201
202 if (val)
203 reg |= GPIO_BIT(offset);
204 else
205 reg &= ~GPIO_BIT(offset);
206
207 iowrite32(reg, addr_w);
208
209 return 0;
210 }
211
212 static void aspeed_sgpio_set(struct gpio_chip *gc, unsigned int offset, int val)
213 {
214 struct aspeed_sgpio *gpio = gpiochip_get_data(gc);
215 unsigned long flags;
216
217 spin_lock_irqsave(&gpio->lock, flags);
218
219 sgpio_set_value(gc, offset, val);
220
221 spin_unlock_irqrestore(&gpio->lock, flags);
222 }
223
224 static int aspeed_sgpio_dir_in(struct gpio_chip *gc, unsigned int offset)
225 {
226 return aspeed_sgpio_is_input(offset) ? 0 : -EINVAL;
227 }
228
229 static int aspeed_sgpio_dir_out(struct gpio_chip *gc, unsigned int offset, int val)
230 {
231 struct aspeed_sgpio *gpio = gpiochip_get_data(gc);
232 unsigned long flags;
> 233 int rc;
234
235 /* No special action is required for setting the direction; we'll
236 * error-out in sgpio_set_value if this isn't an output GPIO */
237
238 spin_lock_irqsave(&gpio->lock, flags);
239 rc = sgpio_set_value(gc, offset, val);
240 spin_unlock_irqrestore(&gpio->lock, flags);
241
242 return 0;
243 }
244
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH 5/5] btrfs: Switch seed device to list api
by kernel test robot
Hi Nikolay,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kdave/for-next]
[also build test ERROR on next-20200715]
[cannot apply to v5.8-rc5]
[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/Nikolay-Borisov/Convert-seed-dev...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from fs/btrfs/super.c:30:
In file included from fs/btrfs/delayed-inode.h:17:
fs/btrfs/ctree.h:2271:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
size_t __const btrfs_get_num_csums(void);
^~~~~~~~
In file included from fs/btrfs/super.c:46:
fs/btrfs/sysfs.h:16:14: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
const char * const btrfs_feature_set_name(enum btrfs_feature_set set);
^~~~~~
>> fs/btrfs/super.c:2404:30: error: no member named 'seed' in 'struct btrfs_fs_devices'
cur_devices = cur_devices->seed;
~~~~~~~~~~~ ^
2 warnings and 1 error generated.
vim +2404 fs/btrfs/super.c
9e7cc91a6d18a4 Wang Xiaoguang 2016-08-01 2377
9c5085c147989d Josef Bacik 2012-06-05 2378 static int btrfs_show_devname(struct seq_file *m, struct dentry *root)
9c5085c147989d Josef Bacik 2012-06-05 2379 {
9c5085c147989d Josef Bacik 2012-06-05 2380 struct btrfs_fs_info *fs_info = btrfs_sb(root->d_sb);
9c5085c147989d Josef Bacik 2012-06-05 2381 struct btrfs_fs_devices *cur_devices;
9c5085c147989d Josef Bacik 2012-06-05 2382 struct btrfs_device *dev, *first_dev = NULL;
9c5085c147989d Josef Bacik 2012-06-05 2383 struct list_head *head;
9c5085c147989d Josef Bacik 2012-06-05 2384
88c14590cdd6f3 David Sterba 2018-03-16 2385 /*
88c14590cdd6f3 David Sterba 2018-03-16 2386 * Lightweight locking of the devices. We should not need
88c14590cdd6f3 David Sterba 2018-03-16 2387 * device_list_mutex here as we only read the device data and the list
88c14590cdd6f3 David Sterba 2018-03-16 2388 * is protected by RCU. Even if a device is deleted during the list
88c14590cdd6f3 David Sterba 2018-03-16 2389 * traversals, we'll get valid data, the freeing callback will wait at
52042d8e82ff50 Andrea Gelmini 2018-11-28 2390 * least until the rcu_read_unlock.
88c14590cdd6f3 David Sterba 2018-03-16 2391 */
88c14590cdd6f3 David Sterba 2018-03-16 2392 rcu_read_lock();
9c5085c147989d Josef Bacik 2012-06-05 2393 cur_devices = fs_info->fs_devices;
9c5085c147989d Josef Bacik 2012-06-05 2394 while (cur_devices) {
9c5085c147989d Josef Bacik 2012-06-05 2395 head = &cur_devices->devices;
88c14590cdd6f3 David Sterba 2018-03-16 2396 list_for_each_entry_rcu(dev, head, dev_list) {
e6e674bd4d54fe Anand Jain 2017-12-04 2397 if (test_bit(BTRFS_DEV_STATE_MISSING, &dev->dev_state))
aa9ddcd4b55571 Josef Bacik 2012-08-02 2398 continue;
0aeb8a6e67cdde Anand Jain 2014-06-30 2399 if (!dev->name)
0aeb8a6e67cdde Anand Jain 2014-06-30 2400 continue;
9c5085c147989d Josef Bacik 2012-06-05 2401 if (!first_dev || dev->devid < first_dev->devid)
9c5085c147989d Josef Bacik 2012-06-05 2402 first_dev = dev;
9c5085c147989d Josef Bacik 2012-06-05 2403 }
9c5085c147989d Josef Bacik 2012-06-05 @2404 cur_devices = cur_devices->seed;
9c5085c147989d Josef Bacik 2012-06-05 2405 }
9c5085c147989d Josef Bacik 2012-06-05 2406
672d599041c862 Misono Tomohiro 2018-08-02 2407 if (first_dev)
672d599041c862 Misono Tomohiro 2018-08-02 2408 seq_escape(m, rcu_str_deref(first_dev->name), " \t\n\\");
672d599041c862 Misono Tomohiro 2018-08-02 2409 else
9c5085c147989d Josef Bacik 2012-06-05 2410 WARN_ON(1);
88c14590cdd6f3 David Sterba 2018-03-16 2411 rcu_read_unlock();
9c5085c147989d Josef Bacik 2012-06-05 2412 return 0;
9c5085c147989d Josef Bacik 2012-06-05 2413 }
9c5085c147989d Josef Bacik 2012-06-05 2414
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
Re: [PATCH 2/5] btrfs: Factor out loop logic from btrfs_free_extra_devids
by kernel test robot
Hi Nikolay,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on kdave/for-next]
[also build test WARNING on v5.8-rc5 next-20200715]
[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/Nikolay-Borisov/Convert-seed-dev...
base: https://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 02946de3802d3bc65bc9f2eb9b8d4969b5a7add8)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from fs/btrfs/volumes.c:17:
fs/btrfs/ctree.h:2271:8: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
size_t __const btrfs_get_num_csums(void);
^~~~~~~~
In file included from fs/btrfs/volumes.c:28:
fs/btrfs/sysfs.h:16:14: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
const char * const btrfs_feature_set_name(enum btrfs_feature_set set);
^~~~~~
>> fs/btrfs/volumes.c:1029:6: warning: no previous prototype for function '__btrfs_free_extra_devids' [-Wmissing-prototypes]
void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step,
^
fs/btrfs/volumes.c:1029:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step,
^
static
3 warnings generated.
vim +/__btrfs_free_extra_devids +1029 fs/btrfs/volumes.c
1026
1027
1028
> 1029 void __btrfs_free_extra_devids(struct btrfs_fs_devices *fs_devices, int step,
1030 struct btrfs_device **latest_dev)
1031 {
1032 struct btrfs_device *device, *next;
1033
1034 /* This is the initialized path, it is safe to release the devices. */
1035 list_for_each_entry_safe(device, next, &fs_devices->devices, dev_list) {
1036 if (test_bit(BTRFS_DEV_STATE_IN_FS_METADATA,
1037 &device->dev_state)) {
1038 if (!test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
1039 &device->dev_state) &&
1040 !test_bit(BTRFS_DEV_STATE_MISSING,
1041 &device->dev_state) &&
1042 (!*latest_dev ||
1043 device->generation > (*latest_dev)->generation)) {
1044 *latest_dev = device;
1045 }
1046 continue;
1047 }
1048
1049 if (device->devid == BTRFS_DEV_REPLACE_DEVID) {
1050 /*
1051 * In the first step, keep the device which has
1052 * the correct fsid and the devid that is used
1053 * for the dev_replace procedure.
1054 * In the second step, the dev_replace state is
1055 * read from the device tree and it is known
1056 * whether the procedure is really active or
1057 * not, which means whether this device is
1058 * used or whether it should be removed.
1059 */
1060 if (step == 0 || test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
1061 &device->dev_state)) {
1062 continue;
1063 }
1064 }
1065 if (device->bdev) {
1066 blkdev_put(device->bdev, device->mode);
1067 device->bdev = NULL;
1068 fs_devices->open_devices--;
1069 }
1070 if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state)) {
1071 list_del_init(&device->dev_alloc_list);
1072 clear_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state);
1073 if (!test_bit(BTRFS_DEV_STATE_REPLACE_TGT,
1074 &device->dev_state))
1075 fs_devices->rw_devices--;
1076 }
1077 list_del_init(&device->dev_list);
1078 fs_devices->num_devices--;
1079 btrfs_free_device(device);
1080 }
1081
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months
[hch-misc:sockopt-cleanups 5/20] ld: arch/x86/entry/syscall_x32.o:undefined reference to `__x32_sys_setsockopt'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git sockopt-cleanups
head: 89e7eccdfa8ce7ab64561daa5ee7fd1967338dc2
commit: 33b76686967d80cf2b42df516e7db96df7ab9e7e [5/20] net: remove compat_{get,set}sockopt
config: x86_64-randconfig-s021-20200715 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-49-g707c5017-dirty
git checkout 33b76686967d80cf2b42df516e7db96df7ab9e7e
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> ld: arch/x86/entry/syscall_x32.o:(.rodata+0x10e8): undefined reference to `__x32_sys_setsockopt'
>> ld: arch/x86/entry/syscall_x32.o:(.rodata+0x10f0): undefined reference to `__x32_sys_getsockopt'
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 2 months