All of lore.kernel.org
 help / color / mirror / Atom feed
* [avpatel:v5.5-rc1_unleashed 13/13] arch/riscv/kernel/sbi.c:146:13: error: 'SBI_EXT_0_1_REMOTE_FENCE_I' undeclared; did you mean 'SBI_EXT_RFENCE_REMOTE_FENCE_I'?
@ 2019-12-19 10:39 kbuild test robot
  0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2019-12-19 10:39 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 34272 bytes --]

tree:   https://github.com/avpatel/linux.git v5.5-rc1_unleashed
head:   9db5653d335469187ed8791d9169ed7619264453
commit: 9db5653d335469187ed8791d9169ed7619264453 [13/13] RISC-V: sbi: Few more cosmetic changes
config: riscv-randconfig-a001-20191219 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.5.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 9db5653d335469187ed8791d9169ed7619264453
        # save the attached .config to linux build tree
        GCC_VERSION=7.5.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   arch/riscv/kernel/sbi.c:8:34: error: 'SBI_SPEC_VERSION_DEFAULT' undeclared here (not in a function); did you mean 'PIDS_PER_CPU_DEFAULT'?
    unsigned long sbi_spec_version = SBI_SPEC_VERSION_DEFAULT;
                                     ^~~~~~~~~~~~~~~~~~~~~~~~
                                     PIDS_PER_CPU_DEFAULT
   arch/riscv/kernel/sbi.c:19:15: error: return type is an incomplete type
    struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0,
                  ^~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_ecall':
   arch/riscv/kernel/sbi.c:24:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:41:9: warning: 'return' with a value, in function returning void
     return ret;
            ^~~
   arch/riscv/kernel/sbi.c:19:15: note: declared here
    struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0,
                  ^~~~~~~~~
   arch/riscv/kernel/sbi.c:24:16: warning: unused variable 'ret' [-Wunused-variable]
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c: In function 'sbi_err_map_linux_errno':
   arch/riscv/kernel/sbi.c:48:7: error: 'SBI_SUCCESS' undeclared (first use in this function)
     case SBI_SUCCESS:
          ^~~~~~~~~~~
   arch/riscv/kernel/sbi.c:48:7: note: each undeclared identifier is reported only once for each function it appears in
   arch/riscv/kernel/sbi.c:50:7: error: 'SBI_ERR_DENIED' undeclared (first use in this function); did you mean 'TIMER_PINNED'?
     case SBI_ERR_DENIED:
          ^~~~~~~~~~~~~~
          TIMER_PINNED
   arch/riscv/kernel/sbi.c:52:7: error: 'SBI_ERR_INVALID_PARAM' undeclared (first use in this function)
     case SBI_ERR_INVALID_PARAM:
          ^~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c:54:7: error: 'SBI_ERR_INVALID_ADDRESS' undeclared (first use in this function); did you mean 'SBI_ERR_INVALID_PARAM'?
     case SBI_ERR_INVALID_ADDRESS:
          ^~~~~~~~~~~~~~~~~~~~~~~
          SBI_ERR_INVALID_PARAM
   arch/riscv/kernel/sbi.c:56:7: error: 'SBI_ERR_NOT_SUPPORTED' undeclared (first use in this function)
     case SBI_ERR_NOT_SUPPORTED:
          ^~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c:57:7: error: 'SBI_ERR_FAILURE' undeclared (first use in this function); did you mean 'SBI_ERR_DENIED'?
     case SBI_ERR_FAILURE:
          ^~~~~~~~~~~~~~~
          SBI_ERR_DENIED
   arch/riscv/kernel/sbi.c: In function 'sbi_console_putchar':
   arch/riscv/kernel/sbi.c:72:12: error: 'SBI_EXT_0_1_CONSOLE_PUTCHAR' undeclared (first use in this function)
     sbi_ecall(SBI_EXT_0_1_CONSOLE_PUTCHAR, 0, ch, 0, 0, 0, 0, 0);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_console_getchar':
   arch/riscv/kernel/sbi.c:83:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:85:18: error: 'SBI_EXT_0_1_CONSOLE_GETCHAR' undeclared (first use in this function)
     ret = sbi_ecall(SBI_EXT_0_1_CONSOLE_GETCHAR, 0, 0, 0, 0, 0, 0, 0);
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c:83:16: warning: unused variable 'ret' [-Wunused-variable]
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c: In function 'sbi_shutdown':
   arch/riscv/kernel/sbi.c:98:12: error: 'SBI_EXT_0_1_SHUTDOWN' undeclared (first use in this function)
     sbi_ecall(SBI_EXT_0_1_SHUTDOWN, 0, 0, 0, 0, 0, 0, 0);
               ^~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_clear_ipi':
   arch/riscv/kernel/sbi.c:109:12: error: 'SBI_EXT_0_1_CLEAR_IPI' undeclared (first use in this function)
     sbi_ecall(SBI_EXT_0_1_CLEAR_IPI, 0, 0, 0, 0, 0, 0, 0);
               ^~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function '__sbi_set_timer_v01':
   arch/riscv/kernel/sbi.c:125:12: error: 'SBI_EXT_0_1_SET_TIMER' undeclared (first use in this function)
     sbi_ecall(SBI_EXT_0_1_SET_TIMER, 0, stime_value, 0, 0, 0, 0, 0);
               ^~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function '__sbi_send_ipi_v01':
   arch/riscv/kernel/sbi.c:131:12: error: 'SBI_EXT_0_1_SEND_IPI' undeclared (first use in this function)
     sbi_ecall(SBI_EXT_0_1_SEND_IPI, 0, (unsigned long)hart_mask,
               ^~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function '__sbi_rfence_v01':
   arch/riscv/kernel/sbi.c:145: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:146:13: error: 'SBI_EXT_0_1_REMOTE_FENCE_I' undeclared (first use in this function); did you mean 'SBI_EXT_RFENCE_REMOTE_FENCE_I'?
      sbi_ecall(SBI_EXT_0_1_REMOTE_FENCE_I, 0,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~
                SBI_EXT_RFENCE_REMOTE_FENCE_I
   arch/riscv/kernel/sbi.c:149: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:150:13: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA' undeclared (first use in this function); did you mean 'SBI_EXT_0_1_REMOTE_FENCE_I'?
      sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA, 0,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                SBI_EXT_0_1_REMOTE_FENCE_I
   arch/riscv/kernel/sbi.c:154: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:155:13: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID' undeclared (first use in this function); did you mean 'SBI_EXT_0_1_REMOTE_SFENCE_VMA'?
      sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID, 0,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                SBI_EXT_0_1_REMOTE_SFENCE_VMA
   arch/riscv/kernel/sbi.c: In function '__sbi_set_timer_v02':
   arch/riscv/kernel/sbi.c:198: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:198: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:206:9: error: variable 'ret' has initializer but incomplete type
     struct sbiret ret = {0};
            ^~~~~~
   arch/riscv/kernel/sbi.c:206:23: warning: excess elements in struct initializer
     struct sbiret ret = {0};
                          ^
   arch/riscv/kernel/sbi.c:206:23: note: (near initialization for 'ret')
   arch/riscv/kernel/sbi.c:206:16: error: storage size of 'ret' isn't known
     struct sbiret ret = {0};
                   ^~~
   arch/riscv/kernel/sbi.c:214: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:214: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:206: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:232:9: error: variable 'ret' has initializer but incomplete type
     struct sbiret ret = {0};
            ^~~~~~
   arch/riscv/kernel/sbi.c:232:23: warning: excess elements in struct initializer
     struct sbiret ret = {0};
                          ^
   arch/riscv/kernel/sbi.c:232:23: note: (near initialization for 'ret')
   arch/riscv/kernel/sbi.c:232:16: error: storage size of 'ret' isn't known
     struct sbiret ret = {0};
                   ^~~
   arch/riscv/kernel/sbi.c:241: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:242:19: error: 'SBI_EXT_RFENCE' undeclared (first use in this function); did you mean 'RISCV_FENCE'?
      ret = sbi_ecall(SBI_EXT_RFENCE, fid, hmask_val, 0, 0,
                      ^~~~~~~~~~~~~~
                      RISCV_FENCE
   arch/riscv/kernel/sbi.c:245: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:249: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:254: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:258: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:262: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:266: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:232: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:315:15: error: 'SBI_EXT_RFENCE_REMOTE_FENCE_I' undeclared (first use in this function)
     __sbi_rfence(SBI_EXT_RFENCE_REMOTE_FENCE_I,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma':
>> arch/riscv/kernel/sbi.c:333:15: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA' undeclared (first use in this function)
     __sbi_rfence(SBI_EXT_RFENCE_REMOTE_SFENCE_VMA,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma_asid':
>> arch/riscv/kernel/sbi.c:354:15: error: 'SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID' undeclared (first use in this function)
     __sbi_rfence(SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID,
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_gvma':
   arch/riscv/kernel/sbi.c:372:22: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA' undeclared (first use in this function)
     return __sbi_rfence(SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_gvma_vmid':
   arch/riscv/kernel/sbi.c:393:22: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID' undeclared (first use in this function)
     return __sbi_rfence(SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_vvma':
   arch/riscv/kernel/sbi.c:411:22: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA' undeclared (first use in this function)
     return __sbi_rfence(SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_remote_hfence_vvma_asid':
   arch/riscv/kernel/sbi.c:433:22: error: 'SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID' undeclared (first use in this function)
     return __sbi_rfence(SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID,
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_probe_extension':
   arch/riscv/kernel/sbi.c:446:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:448:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
     ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_PROBE_EXT, extid,
                     ^~~~~~~~~~~~
                     BIT_MASK
   arch/riscv/kernel/sbi.c:448:32: error: 'SBI_EXT_BASE_PROBE_EXT' undeclared (first use in this function); did you mean 'SBI_EXT_BASE'?
     ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_PROBE_EXT, extid,
                                   ^~~~~~~~~~~~~~~~~~~~~~
                                   SBI_EXT_BASE
   arch/riscv/kernel/sbi.c:446: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:460:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:462:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
     ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_GET_SPEC_VERSION,
                     ^~~~~~~~~~~~
                     BIT_MASK
   arch/riscv/kernel/sbi.c:462:32: error: 'SBI_EXT_BASE_GET_SPEC_VERSION' undeclared (first use in this function)
     ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_GET_SPEC_VERSION,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c:460: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:472:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:474:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
     ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_GET_IMP_ID,
                     ^~~~~~~~~~~~
                     BIT_MASK
   arch/riscv/kernel/sbi.c:474:32: error: 'SBI_EXT_BASE_GET_IMP_ID' undeclared (first use in this function); did you mean 'SBI_EXT_BASE'?
     ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_GET_IMP_ID,
                                   ^~~~~~~~~~~~~~~~~~~~~~~
                                   SBI_EXT_BASE
   arch/riscv/kernel/sbi.c:472:16: warning: unused variable 'ret' [-Wunused-variable]
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_version':
   arch/riscv/kernel/sbi.c:484:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:486:18: error: 'SBI_EXT_BASE' undeclared (first use in this function); did you mean 'BIT_MASK'?
     ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_GET_IMP_VERSION,
                     ^~~~~~~~~~~~
                     BIT_MASK
   arch/riscv/kernel/sbi.c:486:32: error: 'SBI_EXT_BASE_GET_IMP_VERSION' undeclared (first use in this function)
     ret = sbi_ecall(SBI_EXT_BASE, SBI_EXT_BASE_GET_IMP_VERSION,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c:484:16: warning: unused variable 'ret' [-Wunused-variable]
     struct sbiret ret;
                   ^~~
   In file included from include/linux/kernel.h:15:0,
                    from include/linux/list.h:9,
                    from include/linux/pm.h:11,
                    from arch/riscv/kernel/sbi.c:4:
   arch/riscv/kernel/sbi.c: In function 'sbi_init':
   arch/riscv/kernel/sbi.c:509:3: error: implicit declaration of function 'sbi_major_version'; did you mean 'sbi_get_spec_version'? [-Werror=implicit-function-declaration]
      sbi_major_version(), sbi_minor_version());
      ^
   include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                     ^~~~~~~~~~~
   arch/riscv/kernel/sbi.c:509:24: error: implicit declaration of function 'sbi_minor_version'; did you mean 'sbi_get_spec_version'? [-Werror=implicit-function-declaration]
      sbi_major_version(), sbi_minor_version());
                           ^
   include/linux/printk.h:311:34: note: in definition of macro 'pr_info'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
                                     ^~~~~~~~~~~
   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 2 has type 'int' [-Wformat=]
    #define KERN_SOH "\001"  /* ASCII Start Of Header */

vim +146 arch/riscv/kernel/sbi.c

ce210825e919ab Atish Patra 2019-11-26  128  
968b021e59c110 Atish Patra 2019-11-26  129  static int __sbi_send_ipi_v01(const unsigned long *hart_mask)
ce210825e919ab Atish Patra 2019-11-26  130  {
968b021e59c110 Atish Patra 2019-11-26 @131  	sbi_ecall(SBI_EXT_0_1_SEND_IPI, 0, (unsigned long)hart_mask,
968b021e59c110 Atish Patra 2019-11-26  132  		  0, 0, 0, 0, 0);
968b021e59c110 Atish Patra 2019-11-26  133  	return 0;
968b021e59c110 Atish Patra 2019-11-26  134  }
968b021e59c110 Atish Patra 2019-11-26  135  
9db5653d335469 Anup Patel  2019-12-17  136  static int __sbi_rfence_v01(unsigned long fid,
968b021e59c110 Atish Patra 2019-11-26  137  			    const unsigned long *hart_mask,
968b021e59c110 Atish Patra 2019-11-26  138  			    unsigned long hbase, unsigned long start,
968b021e59c110 Atish Patra 2019-11-26  139  			    unsigned long size, unsigned long arg4,
968b021e59c110 Atish Patra 2019-11-26  140  			    unsigned long arg5)
968b021e59c110 Atish Patra 2019-11-26  141  {
9db5653d335469 Anup Patel  2019-12-17  142  	int result = 0;
9db5653d335469 Anup Patel  2019-12-17  143  
9db5653d335469 Anup Patel  2019-12-17  144  	switch (fid) {
9db5653d335469 Anup Patel  2019-12-17  145  	case SBI_EXT_RFENCE_REMOTE_FENCE_I:
968b021e59c110 Atish Patra 2019-11-26 @146  		sbi_ecall(SBI_EXT_0_1_REMOTE_FENCE_I, 0,
968b021e59c110 Atish Patra 2019-11-26  147  			  (unsigned long)hart_mask, 0, 0, 0, 0, 0);
968b021e59c110 Atish Patra 2019-11-26  148  		break;
9db5653d335469 Anup Patel  2019-12-17  149  	case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA:
968b021e59c110 Atish Patra 2019-11-26  150  		sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA, 0,
968b021e59c110 Atish Patra 2019-11-26  151  			  (unsigned long)hart_mask, start, size,
968b021e59c110 Atish Patra 2019-11-26  152  			  0, 0, 0);
968b021e59c110 Atish Patra 2019-11-26  153  		break;
9db5653d335469 Anup Patel  2019-12-17  154  	case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID:
968b021e59c110 Atish Patra 2019-11-26  155  		sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID, 0,
968b021e59c110 Atish Patra 2019-11-26  156  			  (unsigned long)hart_mask, start, size,
968b021e59c110 Atish Patra 2019-11-26  157  			  arg4, 0, 0);
968b021e59c110 Atish Patra 2019-11-26  158  		break;
968b021e59c110 Atish Patra 2019-11-26  159  	default:
9db5653d335469 Anup Patel  2019-12-17  160  		pr_err("%s: unknown function ID [%lu]\n", __func__, fid);
9db5653d335469 Anup Patel  2019-12-17  161  		result = -EINVAL;
ce210825e919ab Atish Patra 2019-11-26  162  	}
968b021e59c110 Atish Patra 2019-11-26  163  
9db5653d335469 Anup Patel  2019-12-17  164  	return result;
968b021e59c110 Atish Patra 2019-11-26  165  }
968b021e59c110 Atish Patra 2019-11-26  166  #else
968b021e59c110 Atish Patra 2019-11-26  167  static void __sbi_set_timer_v01(uint64_t stime_value)
968b021e59c110 Atish Patra 2019-11-26  168  {
8b35455dcf7456 Anup Patel  2019-12-12  169  	pr_warn("Timer extension is not available in SBI v%lu.%lu\n",
8b35455dcf7456 Anup Patel  2019-12-12  170  		sbi_major_version(), sbi_minor_version());
968b021e59c110 Atish Patra 2019-11-26  171  }
8b35455dcf7456 Anup Patel  2019-12-12  172  
968b021e59c110 Atish Patra 2019-11-26  173  static int __sbi_send_ipi_v01(const unsigned long *hart_mask)
968b021e59c110 Atish Patra 2019-11-26  174  {
8b35455dcf7456 Anup Patel  2019-12-12  175  	pr_warn("IPI extension is not available in SBI v%lu.%lu\n",
8b35455dcf7456 Anup Patel  2019-12-12  176  		sbi_major_version(), sbi_minor_version());
8b35455dcf7456 Anup Patel  2019-12-12  177  	return 0;
968b021e59c110 Atish Patra 2019-11-26  178  }
8b35455dcf7456 Anup Patel  2019-12-12  179  
9db5653d335469 Anup Patel  2019-12-17  180  static int __sbi_rfence_v01(unsigned long fid,
968b021e59c110 Atish Patra 2019-11-26  181  			    const unsigned long *hart_mask,
968b021e59c110 Atish Patra 2019-11-26  182  			    unsigned long hbase, unsigned long start,
968b021e59c110 Atish Patra 2019-11-26  183  			    unsigned long size, unsigned long arg4,
968b021e59c110 Atish Patra 2019-11-26  184  			    unsigned long arg5)
968b021e59c110 Atish Patra 2019-11-26  185  {
8b35455dcf7456 Anup Patel  2019-12-12  186  	pr_warn("remote fence extension is not available in SBI v%lu.%lu\n",
8b35455dcf7456 Anup Patel  2019-12-12  187  		sbi_major_version(), sbi_minor_version());
8b35455dcf7456 Anup Patel  2019-12-12  188  	return 0;
968b021e59c110 Atish Patra 2019-11-26  189  }
968b021e59c110 Atish Patra 2019-11-26  190  #endif /* CONFIG_RISCV_SBI_V01 */
ce210825e919ab Atish Patra 2019-11-26  191  
5e5bad250fc1b2 Atish Patra 2019-11-26  192  static void __sbi_set_timer_v02(uint64_t stime_value)
5e5bad250fc1b2 Atish Patra 2019-11-26  193  {
5e5bad250fc1b2 Atish Patra 2019-11-26  194  #if __riscv_xlen == 32
5e5bad250fc1b2 Atish Patra 2019-11-26  195  	sbi_ecall(SBI_EXT_TIME, SBI_EXT_TIME_SET_TIMER, stime_value,
5e5bad250fc1b2 Atish Patra 2019-11-26  196  			  stime_value >> 32, 0, 0, 0, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  197  #else
5e5bad250fc1b2 Atish Patra 2019-11-26  198  	sbi_ecall(SBI_EXT_TIME, SBI_EXT_TIME_SET_TIMER, stime_value, 0,
5e5bad250fc1b2 Atish Patra 2019-11-26  199  		  0, 0, 0, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  200  #endif
5e5bad250fc1b2 Atish Patra 2019-11-26  201  }
5e5bad250fc1b2 Atish Patra 2019-11-26  202  
5e5bad250fc1b2 Atish Patra 2019-11-26  203  static int __sbi_send_ipi_v02(const unsigned long *hart_mask)
5e5bad250fc1b2 Atish Patra 2019-11-26  204  {
5e5bad250fc1b2 Atish Patra 2019-11-26  205  	unsigned long hmask_val;
5e5bad250fc1b2 Atish Patra 2019-11-26  206  	struct sbiret ret = {0};
5e5bad250fc1b2 Atish Patra 2019-11-26  207  	int result;
5e5bad250fc1b2 Atish Patra 2019-11-26  208  
5e5bad250fc1b2 Atish Patra 2019-11-26  209  	if (!hart_mask)
5e5bad250fc1b2 Atish Patra 2019-11-26  210  		hmask_val = *(cpumask_bits(cpu_online_mask));
5e5bad250fc1b2 Atish Patra 2019-11-26  211  	else
5e5bad250fc1b2 Atish Patra 2019-11-26  212  		hmask_val = *hart_mask;
5e5bad250fc1b2 Atish Patra 2019-11-26  213  
5e5bad250fc1b2 Atish Patra 2019-11-26  214  	ret = sbi_ecall(SBI_EXT_IPI, SBI_EXT_IPI_SEND_IPI, hmask_val,
5e5bad250fc1b2 Atish Patra 2019-11-26  215  			0, 0, 0, 0, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  216  	if (ret.error) {
9db5653d335469 Anup Patel  2019-12-17  217  		result = sbi_err_map_linux_errno(ret.error);
9db5653d335469 Anup Patel  2019-12-17  218  		pr_err("%s: failed with error [%d]\n", __func__, result);
5e5bad250fc1b2 Atish Patra 2019-11-26  219  	} else
5e5bad250fc1b2 Atish Patra 2019-11-26  220  		result = ret.value;
5e5bad250fc1b2 Atish Patra 2019-11-26  221  
5e5bad250fc1b2 Atish Patra 2019-11-26  222  	return result;
5e5bad250fc1b2 Atish Patra 2019-11-26  223  }
5e5bad250fc1b2 Atish Patra 2019-11-26  224  
9db5653d335469 Anup Patel  2019-12-17  225  static int __sbi_rfence_v02(unsigned long fid,
5e5bad250fc1b2 Atish Patra 2019-11-26  226  			    const unsigned long *hart_mask,
5e5bad250fc1b2 Atish Patra 2019-11-26  227  			    unsigned long hbase, unsigned long start,
5e5bad250fc1b2 Atish Patra 2019-11-26  228  			    unsigned long size, unsigned long arg4,
5e5bad250fc1b2 Atish Patra 2019-11-26  229  			    unsigned long arg5)
5e5bad250fc1b2 Atish Patra 2019-11-26  230  {
5e5bad250fc1b2 Atish Patra 2019-11-26  231  	unsigned long hmask_val;
5e5bad250fc1b2 Atish Patra 2019-11-26 @232  	struct sbiret ret = {0};
5e5bad250fc1b2 Atish Patra 2019-11-26  233  	int result;
5e5bad250fc1b2 Atish Patra 2019-11-26  234  
5e5bad250fc1b2 Atish Patra 2019-11-26  235  	if (!hart_mask)
5e5bad250fc1b2 Atish Patra 2019-11-26  236  		hmask_val = *(cpumask_bits(cpu_online_mask));
5e5bad250fc1b2 Atish Patra 2019-11-26  237  	else
5e5bad250fc1b2 Atish Patra 2019-11-26  238  		hmask_val = *hart_mask;
5e5bad250fc1b2 Atish Patra 2019-11-26  239  
5e5bad250fc1b2 Atish Patra 2019-11-26  240  	switch (fid) {
5e5bad250fc1b2 Atish Patra 2019-11-26  241  	case SBI_EXT_RFENCE_REMOTE_FENCE_I:
9db5653d335469 Anup Patel  2019-12-17  242  		ret = sbi_ecall(SBI_EXT_RFENCE, fid, hmask_val, 0, 0,
9db5653d335469 Anup Patel  2019-12-17  243  				0, 0, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  244  		break;
5e5bad250fc1b2 Atish Patra 2019-11-26  245  	case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA:
9db5653d335469 Anup Patel  2019-12-17  246  		ret = sbi_ecall(SBI_EXT_RFENCE, fid, hmask_val, 0, start,
5e5bad250fc1b2 Atish Patra 2019-11-26  247  				size, 0, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  248  		break;
5e5bad250fc1b2 Atish Patra 2019-11-26  249  	case SBI_EXT_RFENCE_REMOTE_SFENCE_VMA_ASID:
9db5653d335469 Anup Patel  2019-12-17  250  		ret = sbi_ecall(SBI_EXT_RFENCE, fid, hmask_val, 0, start,
5e5bad250fc1b2 Atish Patra 2019-11-26  251  				size, arg4, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  252  		break;
5e5bad250fc1b2 Atish Patra 2019-11-26  253  	/*TODO: Handle non zero hbase cases */
5e5bad250fc1b2 Atish Patra 2019-11-26  254  	case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA:
9db5653d335469 Anup Patel  2019-12-17  255  		ret = sbi_ecall(SBI_EXT_RFENCE, fid, hmask_val, 0, start,
5e5bad250fc1b2 Atish Patra 2019-11-26  256  				size, 0, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  257  		break;
5e5bad250fc1b2 Atish Patra 2019-11-26  258  	case SBI_EXT_RFENCE_REMOTE_HFENCE_GVMA_VMID:
9db5653d335469 Anup Patel  2019-12-17  259  		ret = sbi_ecall(SBI_EXT_RFENCE, fid, hmask_val, 0, start,
5e5bad250fc1b2 Atish Patra 2019-11-26  260  				size, arg4, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  261  		break;
5e5bad250fc1b2 Atish Patra 2019-11-26  262  	case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA:
9db5653d335469 Anup Patel  2019-12-17  263  		ret = sbi_ecall(SBI_EXT_RFENCE, fid, hmask_val, 0, start,
5e5bad250fc1b2 Atish Patra 2019-11-26  264  				size, 0, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  265  		break;
5e5bad250fc1b2 Atish Patra 2019-11-26  266  	case SBI_EXT_RFENCE_REMOTE_HFENCE_VVMA_ASID:
9db5653d335469 Anup Patel  2019-12-17  267  		ret = sbi_ecall(SBI_EXT_RFENCE, fid, hmask_val, 0, start,
5e5bad250fc1b2 Atish Patra 2019-11-26  268  				size, arg4, 0);
5e5bad250fc1b2 Atish Patra 2019-11-26  269  		break;
5e5bad250fc1b2 Atish Patra 2019-11-26  270  	default:
9db5653d335469 Anup Patel  2019-12-17  271  		pr_err("%s: unknown function ID [%lu]\n", __func__, fid);
5e5bad250fc1b2 Atish Patra 2019-11-26  272  		result = -EINVAL;
5e5bad250fc1b2 Atish Patra 2019-11-26  273  	}
5e5bad250fc1b2 Atish Patra 2019-11-26  274  
5e5bad250fc1b2 Atish Patra 2019-11-26  275  	if (ret.error) {
9db5653d335469 Anup Patel  2019-12-17  276  		result = sbi_err_map_linux_errno(ret.error);
9db5653d335469 Anup Patel  2019-12-17  277  		pr_err("%s: failed with error [%d]\n", __func__, result);
5e5bad250fc1b2 Atish Patra 2019-11-26  278  	} else
5e5bad250fc1b2 Atish Patra 2019-11-26  279  		result = ret.value;
5e5bad250fc1b2 Atish Patra 2019-11-26  280  
5e5bad250fc1b2 Atish Patra 2019-11-26  281  	return result;
5e5bad250fc1b2 Atish Patra 2019-11-26  282  }
5e5bad250fc1b2 Atish Patra 2019-11-26  283  
ce210825e919ab Atish Patra 2019-11-26  284  /**
968b021e59c110 Atish Patra 2019-11-26  285   * sbi_set_timer() - Program the timer for next timer event.
968b021e59c110 Atish Patra 2019-11-26  286   * @stime_value: The value after which next timer event should fire.
ce210825e919ab Atish Patra 2019-11-26  287   *
ce210825e919ab Atish Patra 2019-11-26  288   * Return: None
ce210825e919ab Atish Patra 2019-11-26  289   */
968b021e59c110 Atish Patra 2019-11-26  290  void sbi_set_timer(uint64_t stime_value)
ce210825e919ab Atish Patra 2019-11-26  291  {
968b021e59c110 Atish Patra 2019-11-26  292  	__sbi_set_timer(stime_value);
ce210825e919ab Atish Patra 2019-11-26  293  }
ce210825e919ab Atish Patra 2019-11-26  294  
ce210825e919ab Atish Patra 2019-11-26  295  /**
ce210825e919ab Atish Patra 2019-11-26  296   * sbi_send_ipi() - Send an IPI to any hart.
ce210825e919ab Atish Patra 2019-11-26  297   * @hart_mask: A cpu mask containing all the target harts.
ce210825e919ab Atish Patra 2019-11-26  298   *
ce210825e919ab Atish Patra 2019-11-26  299   * Return: None
ce210825e919ab Atish Patra 2019-11-26  300   */
ce210825e919ab Atish Patra 2019-11-26  301  void sbi_send_ipi(const unsigned long *hart_mask)
ce210825e919ab Atish Patra 2019-11-26  302  {
968b021e59c110 Atish Patra 2019-11-26  303  	__sbi_send_ipi(hart_mask);
ce210825e919ab Atish Patra 2019-11-26  304  }
ce210825e919ab Atish Patra 2019-11-26  305  EXPORT_SYMBOL(sbi_send_ipi);
ce210825e919ab Atish Patra 2019-11-26  306  
ce210825e919ab Atish Patra 2019-11-26  307  /**
ce210825e919ab Atish Patra 2019-11-26  308   * sbi_remote_fence_i() - Execute FENCE.I instruction on given remote harts.
ce210825e919ab Atish Patra 2019-11-26  309   * @hart_mask: A cpu mask containing all the target harts.
ce210825e919ab Atish Patra 2019-11-26  310   *
ce210825e919ab Atish Patra 2019-11-26  311   * Return: None
ce210825e919ab Atish Patra 2019-11-26  312   */
ce210825e919ab Atish Patra 2019-11-26  313  void sbi_remote_fence_i(const unsigned long *hart_mask)
ce210825e919ab Atish Patra 2019-11-26  314  {
9db5653d335469 Anup Patel  2019-12-17 @315  	__sbi_rfence(SBI_EXT_RFENCE_REMOTE_FENCE_I,
968b021e59c110 Atish Patra 2019-11-26  316  		     hart_mask, 0, 0, 0, 0, 0);
ce210825e919ab Atish Patra 2019-11-26  317  }
ce210825e919ab Atish Patra 2019-11-26  318  EXPORT_SYMBOL(sbi_remote_fence_i);
ce210825e919ab Atish Patra 2019-11-26  319  
ce210825e919ab Atish Patra 2019-11-26  320  /**
ce210825e919ab Atish Patra 2019-11-26  321   * sbi_remote_sfence_vma() - Execute SFENCE.VMA instructions on given remote
ce210825e919ab Atish Patra 2019-11-26  322   *			     harts for the specified virtual address range.
ce210825e919ab Atish Patra 2019-11-26  323   * @hart_mask: A cpu mask containing all the target harts.
ce210825e919ab Atish Patra 2019-11-26  324   * @start: Start of the virtual address
ce210825e919ab Atish Patra 2019-11-26  325   * @size: Total size of the virtual address range.
ce210825e919ab Atish Patra 2019-11-26  326   *
ce210825e919ab Atish Patra 2019-11-26  327   * Return: None
ce210825e919ab Atish Patra 2019-11-26  328   */
ce210825e919ab Atish Patra 2019-11-26  329  void sbi_remote_sfence_vma(const unsigned long *hart_mask,
ce210825e919ab Atish Patra 2019-11-26  330  			   unsigned long start,
ce210825e919ab Atish Patra 2019-11-26  331  			   unsigned long size)
ce210825e919ab Atish Patra 2019-11-26  332  {
9db5653d335469 Anup Patel  2019-12-17 @333  	__sbi_rfence(SBI_EXT_RFENCE_REMOTE_SFENCE_VMA,
968b021e59c110 Atish Patra 2019-11-26  334  		     hart_mask, 0, start, size, 0, 0);
ce210825e919ab Atish Patra 2019-11-26  335  }
ce210825e919ab Atish Patra 2019-11-26  336  EXPORT_SYMBOL(sbi_remote_sfence_vma);
ce210825e919ab Atish Patra 2019-11-26  337  

:::::: The code at line 146 was first introduced by commit
:::::: 968b021e59c110fda1233ec888fde25603d518fb RISC-V: Introduce a new config for SBI v0.1

:::::: TO: Atish Patra <atish.patra@wdc.com>
:::::: CC: Anup Patel <anup@brainfault.org>

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 24794 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-19 10:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-19 10:39 [avpatel:v5.5-rc1_unleashed 13/13] arch/riscv/kernel/sbi.c:146:13: error: 'SBI_EXT_0_1_REMOTE_FENCE_I' undeclared; did you mean 'SBI_EXT_RFENCE_REMOTE_FENCE_I'? kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.