2022-09-09 03:57:51

by kernel test robot

[permalink] [raw]
Subject: [ammarfaizi2-block:arm64/linux/for-next/misc 2/2] arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack'

tree: https://github.com/ammarfaizi2/linux-block arm64/linux/for-next/misc
head: 2d2f3bb897a3de4190b1b6b296c3429d01327554
commit: 2d2f3bb897a3de4190b1b6b296c3429d01327554 [2/2] arm64: run softirqs on the per-CPU IRQ stack
config: arm64-randconfig-r023-20220907
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 1546df49f5a6d09df78f569e4137ddb365a3e827)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/ammarfaizi2/linux-block/commit/2d2f3bb897a3de4190b1b6b296c3429d01327554
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block arm64/linux/for-next/misc
git checkout 2d2f3bb897a3de4190b1b6b296c3429d01327554
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>):

>> arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack' [-Wmissing-prototypes]
void do_softirq_own_stack(void)
^
arch/arm64/kernel/irq.c:81:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void do_softirq_own_stack(void)
^
static
arch/arm64/kernel/irq.c:120:13: warning: no previous prototype for function 'init_IRQ' [-Wmissing-prototypes]
void __init init_IRQ(void)
^
arch/arm64/kernel/irq.c:120:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void __init init_IRQ(void)
^
static
2 warnings generated.


vim +/do_softirq_own_stack +81 arch/arm64/kernel/irq.c

80
> 81 void do_softirq_own_stack(void)
82 {
83 call_on_irq_stack(NULL, ____do_softirq);
84 }
85 #endif
86

--
0-DAY CI Kernel Test Service
https://01.org/lkp


Attachments:
(No filename) (2.31 kB)
config (180.76 kB)
Download all attachments

2022-09-09 07:35:24

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [ammarfaizi2-block:arm64/linux/for-next/misc 2/2] arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack'

On Fri, Sep 9, 2022, at 5:12 AM, kernel test robot wrote:
> tree: https://github.com/ammarfaizi2/linux-block
> arm64/linux/for-next/misc
> head: 2d2f3bb897a3de4190b1b6b296c3429d01327554
> commit: 2d2f3bb897a3de4190b1b6b296c3429d01327554 [2/2] arm64: run
> softirqs on the per-CPU IRQ stack
> config: arm64-randconfig-r023-20220907
> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project
> 1546df49f5a6d09df78f569e4137ddb365a3e827)
> reproduce (this is a W=1 build):
> wget
> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
> -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install arm64 cross compiling tool for clang build
> # apt-get install binutils-aarch64-linux-gnu
> #
> https://github.com/ammarfaizi2/linux-block/commit/2d2f3bb897a3de4190b1b6b296c3429d01327554
> git remote add ammarfaizi2-block
> https://github.com/ammarfaizi2/linux-block
> git fetch --no-tags ammarfaizi2-block arm64/linux/for-next/misc
> git checkout 2d2f3bb897a3de4190b1b6b296c3429d01327554
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1
> O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/
>
> If you fix the issue, kindly add following tag where applicable
> Reported-by: kernel test robot <[email protected]>
>
> All warnings (new ones prefixed by >>):
>
>>> arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack' [-Wmissing-prototypes]
> void do_softirq_own_stack(void)
> ^
> arch/arm64/kernel/irq.c:81:1: note: declare 'static' if the function
> is not intended to be used outside of this translation unit
> void do_softirq_own_stack(void)
> ^
> static


I think we are missing an "#include <asm/softirq_stack.h>"
in arch/arm64/kernel/irq.c

Arnd

2022-09-09 07:55:51

by Qi Zheng

[permalink] [raw]
Subject: Re: [ammarfaizi2-block:arm64/linux/for-next/misc 2/2] arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack'



On 2022/9/9 14:30, Arnd Bergmann wrote:
> On Fri, Sep 9, 2022, at 5:12 AM, kernel test robot wrote:
>> tree: https://github.com/ammarfaizi2/linux-block
>> arm64/linux/for-next/misc
>> head: 2d2f3bb897a3de4190b1b6b296c3429d01327554
>> commit: 2d2f3bb897a3de4190b1b6b296c3429d01327554 [2/2] arm64: run
>> softirqs on the per-CPU IRQ stack
>> config: arm64-randconfig-r023-20220907
>> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project
>> 1546df49f5a6d09df78f569e4137ddb365a3e827)
>> reproduce (this is a W=1 build):
>> wget
>> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
>> -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> # install arm64 cross compiling tool for clang build
>> # apt-get install binutils-aarch64-linux-gnu
>> #
>> https://github.com/ammarfaizi2/linux-block/commit/2d2f3bb897a3de4190b1b6b296c3429d01327554
>> git remote add ammarfaizi2-block
>> https://github.com/ammarfaizi2/linux-block
>> git fetch --no-tags ammarfaizi2-block arm64/linux/for-next/misc
>> git checkout 2d2f3bb897a3de4190b1b6b296c3429d01327554
>> # save the config file
>> mkdir build_dir && cp config build_dir/.config
>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1
>> O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/
>>
>> If you fix the issue, kindly add following tag where applicable
>> Reported-by: kernel test robot <[email protected]>
>>
>> All warnings (new ones prefixed by >>):
>>
>>>> arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack' [-Wmissing-prototypes]
>> void do_softirq_own_stack(void)
>> ^
>> arch/arm64/kernel/irq.c:81:1: note: declare 'static' if the function
>> is not intended to be used outside of this translation unit
>> void do_softirq_own_stack(void)
>> ^
>> static
>
>
> I think we are missing an "#include <asm/softirq_stack.h>"
> in arch/arm64/kernel/irq.c

Indeed. Hi Catalin, do I need to resend the v4 version? Or can you help
me to apply the following code change to the for-next/misc directly?
Both are fine for me, depending on which way is convenient for you. :)

diff --git a/arch/arm64/kernel/irq.c b/arch/arm64/kernel/irq.c
index c36ad20a52f3..181df57c812b 100644
--- a/arch/arm64/kernel/irq.c
+++ b/arch/arm64/kernel/irq.c
@@ -23,6 +23,7 @@
#include <asm/daifflags.h>
#include <asm/vmap_stack.h>
#include <asm/exception.h>
+#include <asm/softirq_stack.h>

/* Only access this in an NMI enter/exit */
DEFINE_PER_CPU(struct nmi_ctx, nmi_contexts);

BTW, when I just compiled the kernel with W=1, I found a lot of
compilation warnings, which is somewhat unexpected.

Thanks,
Qi

>
> Arnd

--
Thanks,
Qi

2022-09-09 07:59:11

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [ammarfaizi2-block:arm64/linux/for-next/misc 2/2] arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack'

On Fri, Sep 9, 2022, at 9:07 AM, Qi Zheng wrote:

> BTW, when I just compiled the kernel with W=1, I found a lot of
> compilation warnings, which is somewhat unexpected.

Correct, the kernel test robot only sends emails for newly introduced
warnings, but it will keep nagging you about them.

Aarn

2022-09-09 08:32:36

by Qi Zheng

[permalink] [raw]
Subject: Re: [ammarfaizi2-block:arm64/linux/for-next/misc 2/2] arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack'



On 2022/9/9 15:35, Arnd Bergmann wrote:
> On Fri, Sep 9, 2022, at 9:07 AM, Qi Zheng wrote:
>
>> BTW, when I just compiled the kernel with W=1, I found a lot of
>> compilation warnings, which is somewhat unexpected.
>
> Correct, the kernel test robot only sends emails for newly introduced
> warnings, but it will keep nagging you about them.

Got it. Thanks.

>
> Aarn

--
Thanks,
Qi

2022-09-09 18:30:34

by Catalin Marinas

[permalink] [raw]
Subject: Re: [ammarfaizi2-block:arm64/linux/for-next/misc 2/2] arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack'

On Fri, Sep 09, 2022 at 03:07:36PM +0800, Qi Zheng wrote:
> On 2022/9/9 14:30, Arnd Bergmann wrote:
> > On Fri, Sep 9, 2022, at 5:12 AM, kernel test robot wrote:
> > > tree: https://github.com/ammarfaizi2/linux-block
> > > arm64/linux/for-next/misc
> > > head: 2d2f3bb897a3de4190b1b6b296c3429d01327554
> > > commit: 2d2f3bb897a3de4190b1b6b296c3429d01327554 [2/2] arm64: run
> > > softirqs on the per-CPU IRQ stack
> > > config: arm64-randconfig-r023-20220907
> > > compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project
> > > 1546df49f5a6d09df78f569e4137ddb365a3e827)
> > > reproduce (this is a W=1 build):
> > > wget
> > > https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
> > > -O ~/bin/make.cross
> > > chmod +x ~/bin/make.cross
> > > # install arm64 cross compiling tool for clang build
> > > # apt-get install binutils-aarch64-linux-gnu
> > > #
> > > https://github.com/ammarfaizi2/linux-block/commit/2d2f3bb897a3de4190b1b6b296c3429d01327554
> > > git remote add ammarfaizi2-block
> > > https://github.com/ammarfaizi2/linux-block
> > > git fetch --no-tags ammarfaizi2-block arm64/linux/for-next/misc
> > > git checkout 2d2f3bb897a3de4190b1b6b296c3429d01327554
> > > # save the config file
> > > mkdir build_dir && cp config build_dir/.config
> > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1
> > > O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/
> > >
> > > If you fix the issue, kindly add following tag where applicable
> > > Reported-by: kernel test robot <[email protected]>
> > >
> > > All warnings (new ones prefixed by >>):
> > >
> > > > > arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack' [-Wmissing-prototypes]
> > > void do_softirq_own_stack(void)
> > > ^
> > > arch/arm64/kernel/irq.c:81:1: note: declare 'static' if the function
> > > is not intended to be used outside of this translation unit
> > > void do_softirq_own_stack(void)
> > > ^
> > > static
> >
> >
> > I think we are missing an "#include <asm/softirq_stack.h>"
> > in arch/arm64/kernel/irq.c
>
> Indeed. Hi Catalin, do I need to resend the v4 version? Or can you help
> me to apply the following code change to the for-next/misc directly?
> Both are fine for me, depending on which way is convenient for you. :)

I'll fold this in, that's the easiest.

Thanks.

--
Catalin

2022-09-10 07:58:12

by Qi Zheng

[permalink] [raw]
Subject: Re: [ammarfaizi2-block:arm64/linux/for-next/misc 2/2] arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack'



On 2022/9/10 02:00, Catalin Marinas wrote:
> On Fri, Sep 09, 2022 at 03:07:36PM +0800, Qi Zheng wrote:
>> On 2022/9/9 14:30, Arnd Bergmann wrote:
>>> On Fri, Sep 9, 2022, at 5:12 AM, kernel test robot wrote:
>>>> tree: https://github.com/ammarfaizi2/linux-block
>>>> arm64/linux/for-next/misc
>>>> head: 2d2f3bb897a3de4190b1b6b296c3429d01327554
>>>> commit: 2d2f3bb897a3de4190b1b6b296c3429d01327554 [2/2] arm64: run
>>>> softirqs on the per-CPU IRQ stack
>>>> config: arm64-randconfig-r023-20220907
>>>> compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project
>>>> 1546df49f5a6d09df78f569e4137ddb365a3e827)
>>>> reproduce (this is a W=1 build):
>>>> wget
>>>> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross
>>>> -O ~/bin/make.cross
>>>> chmod +x ~/bin/make.cross
>>>> # install arm64 cross compiling tool for clang build
>>>> # apt-get install binutils-aarch64-linux-gnu
>>>> #
>>>> https://github.com/ammarfaizi2/linux-block/commit/2d2f3bb897a3de4190b1b6b296c3429d01327554
>>>> git remote add ammarfaizi2-block
>>>> https://github.com/ammarfaizi2/linux-block
>>>> git fetch --no-tags ammarfaizi2-block arm64/linux/for-next/misc
>>>> git checkout 2d2f3bb897a3de4190b1b6b296c3429d01327554
>>>> # save the config file
>>>> mkdir build_dir && cp config build_dir/.config
>>>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1
>>>> O=build_dir ARCH=arm64 SHELL=/bin/bash arch/arm64/kernel/
>>>>
>>>> If you fix the issue, kindly add following tag where applicable
>>>> Reported-by: kernel test robot <[email protected]>
>>>>
>>>> All warnings (new ones prefixed by >>):
>>>>
>>>>>> arch/arm64/kernel/irq.c:81:6: warning: no previous prototype for function 'do_softirq_own_stack' [-Wmissing-prototypes]
>>>> void do_softirq_own_stack(void)
>>>> ^
>>>> arch/arm64/kernel/irq.c:81:1: note: declare 'static' if the function
>>>> is not intended to be used outside of this translation unit
>>>> void do_softirq_own_stack(void)
>>>> ^
>>>> static
>>>
>>>
>>> I think we are missing an "#include <asm/softirq_stack.h>"
>>> in arch/arm64/kernel/irq.c
>>
>> Indeed. Hi Catalin, do I need to resend the v4 version? Or can you help
>> me to apply the following code change to the for-next/misc directly?
>> Both are fine for me, depending on which way is convenient for you. :)
>
> I'll fold this in, that's the easiest.

Thank you very much! :)

>
> Thanks.
>

--
Thanks,
Qi