All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [avpatel:riscv_kvm_v10 4/31] arch/riscv/kernel/setup.c:78:2: error: implicit declaration of function 'sbi_init'; did you mean 'smp_init'?
Date: Sat, 30 Nov 2019 09:58:22 +0800	[thread overview]
Message-ID: <201911300917.dSStKOFx%lkp@intel.com> (raw)

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

tree:   https://github.com/avpatel/linux.git riscv_kvm_v10
head:   adf8e35ae72bfdf0ce6f00f7c30923ea8f791748
commit: 16e90702b40cf6a48017387bdfe1fb991d79077c [4/31] RISC-V: Add basic support for SBI v0.2
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 16e90702b40cf6a48017387bdfe1fb991d79077c
        # 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@intel.com>

All errors (new ones prefixed by >>):

   arch/riscv/kernel/setup.c: In function 'setup_arch':
>> arch/riscv/kernel/setup.c:78:2: error: implicit declaration of function 'sbi_init'; did you mean 'smp_init'? [-Werror=implicit-function-declaration]
     sbi_init();
     ^~~~~~~~
     smp_init
   cc1: some warnings being treated as errors
--
>> 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:11: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:16:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:33:9: warning: 'return' with a value, in function returning void
     return ret;
            ^~~
   arch/riscv/kernel/sbi.c:11:15: note: declared here
    struct sbiret sbi_ecall(int ext, int fid, unsigned long arg0,
                  ^~~~~~~~~
   arch/riscv/kernel/sbi.c:16: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:40:7: error: 'SBI_SUCCESS' undeclared (first use in this function)
     case SBI_SUCCESS:
          ^~~~~~~~~~~
   arch/riscv/kernel/sbi.c:40:7: note: each undeclared identifier is reported only once for each function it appears in
>> arch/riscv/kernel/sbi.c:42: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:44:7: error: 'SBI_ERR_INVALID_PARAM' undeclared (first use in this function)
     case SBI_ERR_INVALID_PARAM:
          ^~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kernel/sbi.c:46: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:48:7: error: 'SBI_ERR_NOT_SUPPORTED' undeclared (first use in this function)
     case SBI_ERR_NOT_SUPPORTED:
          ^~~~~~~~~~~~~~~~~~~~~
>> arch/riscv/kernel/sbi.c:49: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:63: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:74:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:76: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:74:16: warning: unused variable 'ret' [-Wunused-variable]
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c: In function 'sbi_set_timer':
   arch/riscv/kernel/sbi.c:94: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_shutdown':
   arch/riscv/kernel/sbi.c:106: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:117: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_send_ipi':
   arch/riscv/kernel/sbi.c:128: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_remote_fence_i':
>> arch/riscv/kernel/sbi.c:141:12: error: 'SBI_EXT_0_1_REMOTE_FENCE_I' undeclared (first use in this function)
     sbi_ecall(SBI_EXT_0_1_REMOTE_FENCE_I, 0, (unsigned long)hart_mask,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma':
   arch/riscv/kernel/sbi.c:159:12: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA' undeclared (first use in this function)
     sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA, 0,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_remote_sfence_vma_asid':
   arch/riscv/kernel/sbi.c:180:12: error: 'SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID' undeclared (first use in this function)
     sbi_ecall(SBI_EXT_0_1_REMOTE_SFENCE_VMA_ASID, 0,
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_probe_extension':
   arch/riscv/kernel/sbi.c:193:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
>> arch/riscv/kernel/sbi.c:195: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:195: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:193: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:206:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:208: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:208: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:206: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:218:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:220: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:220:32: error: 'SBI_BASE_GET_IMP_ID' undeclared (first use in this function)
     ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_ID,
                                   ^~~~~~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c:218: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:230:16: error: storage size of 'ret' isn't known
     struct sbiret ret;
                   ^~~
   arch/riscv/kernel/sbi.c:232: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_VERSION,
                     ^~~~~~~~~~~~
                     BIT_MASK
>> arch/riscv/kernel/sbi.c:232:32: error: 'SBI_BASE_GET_IMP_VERSION' undeclared (first use in this function); did you mean '__GXX_ABI_VERSION'?
     ret = sbi_ecall(SBI_EXT_BASE, SBI_BASE_GET_IMP_VERSION,
                                   ^~~~~~~~~~~~~~~~~~~~~~~~
                                   __GXX_ABI_VERSION
   arch/riscv/kernel/sbi.c:230: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:255: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:255: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 */
                     ^
   include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
   include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~
   arch/riscv/kernel/sbi.c:254:2: note: in expansion of macro 'pr_info'
     pr_info("SBI specification v%lu.%lu detected\n",
     ^~~~~~~
   arch/riscv/kernel/sbi.c:254:32: note: format string is defined here
     pr_info("SBI specification v%lu.%lu detected\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:14:19: note: in expansion of macro 'KERN_SOH'
    #define KERN_INFO KERN_SOH "6" /* informational */
                      ^~~~~~~~
   include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
     printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
            ^~~~~~~~~
   arch/riscv/kernel/sbi.c:254:2: note: in expansion of macro 'pr_info'
     pr_info("SBI specification v%lu.%lu detected\n",
     ^~~~~~~
   arch/riscv/kernel/sbi.c:254:36: note: format string is defined here
     pr_info("SBI specification v%lu.%lu detected\n",
                                     ~~^
                                     %u
>> arch/riscv/kernel/sbi.c:256:7: error: implicit declaration of function 'sbi_spec_is_0_1' [-Werror=implicit-function-declaration]
     if (!sbi_spec_is_0_1())
          ^~~~~~~~~~~~~~~
   arch/riscv/kernel/sbi.c: In function 'sbi_console_getchar':
   arch/riscv/kernel/sbi.c:79:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   arch/riscv/kernel/sbi.c: In function 'sbi_get_spec_version':
   arch/riscv/kernel/sbi.c:214:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_id':
   arch/riscv/kernel/sbi.c:226:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   arch/riscv/kernel/sbi.c: In function 'sbi_get_firmware_version':
   arch/riscv/kernel/sbi.c:238:1: warning: control reaches end of non-void function [-Wreturn-type]
    }
    ^
   cc1: some warnings being treated as errors

vim +78 arch/riscv/kernel/setup.c

    77	
  > 78		sbi_init();
    79	#ifdef CONFIG_SMP
    80		setup_smp();
    81	#endif
    82	

---
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: 5251 bytes --]

             reply	other threads:[~2019-11-30  1:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-30  1:58 kbuild test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-12-20 11:45 [avpatel:riscv_kvm_v10 4/31] arch/riscv/kernel/setup.c:78:2: error: implicit declaration of function 'sbi_init'; did you mean 'smp_init'? kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201911300917.dSStKOFx%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.