tree:
https://github.com/avpatel/linux.git riscv_kvm_v10
head: adf8e35ae72bfdf0ce6f00f7c30923ea8f791748
commit: 522547d7acac1b1d65bb7567415ea038ba02381d [6/31] RISC-V: Implement new SBI v0.2
extensions
config: riscv-allnoconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.4.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 522547d7acac1b1d65bb7567415ea038ba02381d
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
^~~~~~~~
include/linux/printk.h:306:9: note: in expansion of macro 'KERN_WARNING'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~
include/linux/printk.h:307:17: note: in expansion of macro 'pr_warning'
#define pr_warn pr_warning
^~~~~~~~~~
arch/riscv/kernel/sbi.c:83:2: note: in expansion of macro 'pr_warn'
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:83:61: note: format string is defined here
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
~~^
%u
In file included from include/linux/printk.h:7:0,
from include/linux/kernel.h:15,
from include/linux/list.h:9,
from include/linux/pm.h:11,
from arch/riscv/kernel/sbi.c:4:
include/linux/kern_levels.h:5:18: warning: format '%lu' expects argument of
type 'long unsigned int', but argument 3 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:12:22: note: in expansion of macro 'KERN_SOH'
#define KERN_WARNING KERN_SOH "4" /* warning conditions */
^~~~~~~~
include/linux/printk.h:306:9: note: in expansion of macro 'KERN_WARNING'
printk(KERN_WARNING pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~~~~
include/linux/printk.h:307:17: note: in expansion of macro 'pr_warning'
#define pr_warn pr_warning
^~~~~~~~~~
arch/riscv/kernel/sbi.c:83:2: note: in expansion of macro 'pr_warn'
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
^~~~~~~
arch/riscv/kernel/sbi.c:83:65: note: format string is defined here
pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
~~^
%u
arch/riscv/kernel/sbi.c: In function '__sbi_set_timer_v02':
arch/riscv/kernel/sbi.c:214:12: error: 'SBI_EXT_TIME' undeclared (first use in
this function); did you mean 'STA_PPSTIME'?
sbi_ecall(SBI_EXT_TIME, SBI_EXT_TIME_SET_TIMER, stime_value, 0,
^~~~~~~~~~~~
STA_PPSTIME
arch/riscv/kernel/sbi.c:214:26: error: 'SBI_EXT_TIME_SET_TIMER' undeclared
(first use in this function); did you mean 'SBI_EXT_TIME'?
sbi_ecall(SBI_EXT_TIME, SBI_EXT_TIME_SET_TIMER, stime_value, 0,
^~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_TIME
arch/riscv/kernel/sbi.c: In function '__sbi_send_ipi_v02':
arch/riscv/kernel/sbi.c:222:9: error: variable 'ret' has initializer but
incomplete type
struct sbiret ret = {0};
^~~~~~
arch/riscv/kernel/sbi.c:222:23: warning: excess elements in struct initializer
struct sbiret ret = {0};
^
arch/riscv/kernel/sbi.c:222:23: note: (near initialization for 'ret')
arch/riscv/kernel/sbi.c:222:16: error: storage size of 'ret' isn't known
struct sbiret ret = {0};
^~~
arch/riscv/kernel/sbi.c:230:18: error: 'SBI_EXT_IPI' undeclared (first use in
this function)
ret = sbi_ecall(SBI_EXT_IPI, SBI_EXT_IPI_SEND_IPI, hmask_val,
^~~~~~~~~~~
arch/riscv/kernel/sbi.c:230:31: error: 'SBI_EXT_IPI_SEND_IPI' undeclared (first
use in this function); did you mean 'SBI_EXT_IPI'?
ret = sbi_ecall(SBI_EXT_IPI, SBI_EXT_IPI_SEND_IPI, hmask_val,
^~~~~~~~~~~~~~~~~~~~
SBI_EXT_IPI
arch/riscv/kernel/sbi.c:222:16: warning: unused variable 'ret'
[-Wunused-variable]
struct sbiret ret = {0};
^~~
arch/riscv/kernel/sbi.c: In function '__sbi_rfence_v02':
arch/riscv/kernel/sbi.c:249:9: error: variable 'ret' has initializer but
incomplete type
struct sbiret ret = {0};
^~~~~~
arch/riscv/kernel/sbi.c:249:23: warning: excess elements in struct initializer
struct sbiret ret = {0};
^
arch/riscv/kernel/sbi.c:249:23: note: (near initialization for 'ret')
arch/riscv/kernel/sbi.c:249:16: error: storage size of 'ret' isn't known
struct sbiret ret = {0};
^~~
arch/riscv/kernel/sbi.c:251:22: error: 'SBI_EXT_RFENCE' undeclared (first use
in this function); did you mean 'RISCV_FENCE'?
unsigned long ext = SBI_EXT_RFENCE;
^~~~~~~~~~~~~~
RISCV_FENCE
arch/riscv/kernel/sbi.c:259:7: error: 'SBI_EXT_RFENCE_REMOTE_FENCE_I'
undeclared (first use in this function)
case SBI_EXT_RFENCE_REMOTE_FENCE_I:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:262:7: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA'
undeclared (first use in this function); did you mean
'SBI_EXT_RFENCE_REMOTE_FENCE_I'?
case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_FENCE_I
arch/riscv/kernel/sbi.c:266:7: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID'
undeclared (first use in this function); did you mean
'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA'?
case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA
arch/riscv/kernel/sbi.c:271:7: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA'
undeclared (first use in this function); did you mean
'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA'?
case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA
> arch/riscv/kernel/sbi.c:275:7: error:
'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID' undeclared (first use in this function);
did you mean 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID'?
case
SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID
arch/riscv/kernel/sbi.c:279:7: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA'
undeclared (first use in this function); did you mean
'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA'?
case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA
> arch/riscv/kernel/sbi.c:283:7: error:
'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID' undeclared (first use in this function);
did you mean 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID'?
case
SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID:
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID
arch/riscv/kernel/sbi.c:249:16: warning: unused variable 'ret'
[-Wunused-variable]
struct sbiret ret = {0};
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_fence_i':
arch/riscv/kernel/sbi.c:335:15: error: 'SBI_EXT_0_1_REMOTE_FENCE_I' undeclared
(first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_FENCE_I, SBI_EXT_RFENCE_REMOTE_FENCE_I,
^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:335:43: error: 'SBI_EXT_RFENCE_REMOTE_FENCE_I'
undeclared (first use in this function); did you mean
'SBI_EXT_0_1_REMOTE_FENCE_I'?
__sbi_rfence(SBI_EXT_0_1_REMOTE_FENCE_I, SBI_EXT_RFENCE_REMOTE_FENCE_I,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_0_1_REMOTE_FENCE_I
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma':
arch/riscv/kernel/sbi.c:353:15: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA'
undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:354:8: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA'
undeclared (first use in this function); did you mean
'SBI_EXT_0_1_REMOTE_SFENCE_VMA'?
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_0_1_REMOTE_SFENCE_VMA
arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma_asid':
arch/riscv/kernel/sbi.c:375:15: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID'
undeclared (first use in this function)
__sbi_rfence(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:376:8: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID'
undeclared (first use in this function); did you mean
'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID'?
SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID
arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_gvma':
arch/riscv/kernel/sbi.c:394:22: error: 'SBI_EXT_RFENCE' undeclared (first use
in this function); did you mean 'RISCV_FENCE'?
return __sbi_rfence(SBI_EXT_RFENCE, SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA,
^~~~~~~~~~~~~~
RISCV_FENCE
arch/riscv/kernel/sbi.c:394:38: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA'
undeclared (first use in this function)
return __sbi_rfence(SBI_EXT_RFENCE, SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_gvma_vmid':
arch/riscv/kernel/sbi.c:415:22: error: 'SBI_EXT_RFENCE' undeclared (first use
in this function); did you mean 'RISCV_FENCE'?
return __sbi_rfence(SBI_EXT_RFENCE,
^~~~~~~~~~~~~~
RISCV_FENCE
arch/riscv/kernel/sbi.c:416:8: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID'
undeclared (first use in this function)
SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_vvma':
arch/riscv/kernel/sbi.c:434:22: error: 'SBI_EXT_RFENCE' undeclared (first use
in this function); did you mean 'RISCV_FENCE'?
return __sbi_rfence(SBI_EXT_RFENCE, SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA,
^~~~~~~~~~~~~~
RISCV_FENCE
arch/riscv/kernel/sbi.c:434:38: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA'
undeclared (first use in this function)
return __sbi_rfence(SBI_EXT_RFENCE, SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_vvma_asid':
arch/riscv/kernel/sbi.c:456:22: error: 'SBI_EXT_RFENCE' undeclared (first use
in this function); did you mean 'RISCV_FENCE'?
return __sbi_rfence(SBI_EXT_RFENCE,
^~~~~~~~~~~~~~
RISCV_FENCE
arch/riscv/kernel/sbi.c:457:8: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID'
undeclared (first use in this function)
SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c: In function 'sbi_probe_extension':
arch/riscv/kernel/sbi.c:470:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:472:18: error: 'SBI_EXT_BASE' undeclared (first use in
this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:472:32: error: 'SBI_BASE_PROBE_EXT' undeclared (first
use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_PROBE_EXT, extid, 0, 0, 0, 0, 0);
^~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:470:16: warning: unused variable 'ret'
[-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_spec_version':
arch/riscv/kernel/sbi.c:483:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:485:18: error: 'SBI_EXT_BASE' undeclared (first use in
this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:485:32: error: 'SBI_BASE_GET_SPEC_VERSION' undeclared
(first use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_SPEC_VERSION,
^~~~~~~~~~~~~~~~~~~~~~~~~
arch/riscv/kernel/sbi.c:483:16: warning: unused variable 'ret'
[-Wunused-variable]
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_id':
arch/riscv/kernel/sbi.c:495:16: error: storage size of 'ret' isn't known
struct sbiret ret;
^~~
arch/riscv/kernel/sbi.c:497:18: error: 'SBI_EXT_BASE' undeclared (first use in
this function); did you mean 'BIT_MASK'?
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
^~~~~~~~~~~~
BIT_MASK
arch/riscv/kernel/sbi.c:497:32: error: 'SBI_BASE_GET_IMP_ID' undeclared (first
use in this function)
ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
vim +275 arch/riscv/kernel/sbi.c
241
242 static int __sbi_rfence_v02(unsigned long extid, unsigned long fid,
243 const unsigned long *hart_mask,
244 unsigned long hbase, unsigned long start,
245 unsigned long size, unsigned long arg4,
246 unsigned long arg5)
247 {
248 unsigned long hmask_val;
249 struct sbiret ret = {0};
250 int result;
251 unsigned long ext = SBI_EXT_RFENCE;
252
253 if (!hart_mask)
254 hmask_val = *(cpumask_bits(cpu_online_mask));
255 else
256 hmask_val = *hart_mask;
257
258 switch (fid) {
259 case SBI_EXT_RFENCE_REMOTE_FENCE_I:
260 ret = sbi_ecall(ext, fid, hmask_val, 0, 0, 0, 0, 0);
261 break;
262 case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA:
263 ret = sbi_ecall(ext, fid, hmask_val, 0, start,
264 size, 0, 0);
265 break;
266 case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID:
267 ret =
sbi_ecall(ext, fid, hmask_val, 0, start,
268 size, arg4, 0);
269 break;
270 /*TODO: Handle non zero hbase cases */
271 case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA:
272 ret = sbi_ecall(ext, fid, hmask_val, 0, start,
273 size, 0, 0);
274 break;
275 case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID:
276 ret
= sbi_ecall(ext, fid, hmask_val, 0, start,
277 size, arg4, 0);
278 break;
279 case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA:
280 ret = sbi_ecall(ext, fid, hmask_val, 0, start,
281 size, 0, 0);
282 break;
283 case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID:
284 ret
= sbi_ecall(ext, fid, hmask_val, 0, start,
285 size, arg4, 0);
286 break;
287 default:
288 pr_err("unknown function ID [%lu] for SBI extension [%lu]\n",
289 fid, ext);
290 result = -EINVAL;
291 }
292
293 if (ret.error) {
294 pr_err("%s: failed with error [%d]\n", __func__,
295 sbi_err_map_linux_errno(ret.error));
296 result = ret.error;
297 } else
298 result = ret.value;
299
300 return result;
301 }
302
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation