linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* next-20250825: arc: seqlock.h:876:2: error: implicit declaration of function 'spin_lock' [-Werror=implicit-function-declaration]
@ 2025-08-26  6:35 Naresh Kamboju
  2025-08-26 12:42 ` Naresh Kamboju
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2025-08-26  6:35 UTC (permalink / raw)
  To: Linux-Arch, open list, lkft-triage, Linux Regressions
  Cc: Arnd Bergmann, Dan Carpenter, Anders Roxell, Ben Copeland,
	Peter Zijlstra, Ingo Molnar, Will Deacon, Boqun Feng, Waiman Long

The following build warnings / errors noticed with arc defconfig with
gcc-9 toolchain.

Regression Analysis:
- New regression? yes
- Reproducibility? yes

Build regression: next-20250825 arc seqlock.h:876:2: error: implicit
declaration of function 'spin_lock'
[-Werror=implicit-function-declaration]

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>

arc:
  build:
    * gcc-9-allnoconfig
    * gcc-9-tinyconfig
    * gcc-9-vdk_hs38_smp_defconfig
    * gcc-9-defconfig
    * gcc-9-axs103_defconfig

## Build log
In file included from include/linux/mmzone.h:17,
                 from include/linux/gfp.h:7,
                 from include/linux/mm.h:7,
                 from arch/arc/include/asm/arcregs.h:149,
                 from arch/arc/include/asm/irqflags-arcv2.h:9,
                 from arch/arc/include/asm/irqflags.h:13,
                 from include/linux/irqflags.h:18,
                 from include/linux/spinlock.h:59,
                 from include/linux/sched.h:37,
                 from arch/arc/kernel/asm-offsets.c:6:
include/linux/seqlock.h: In function 'write_seqlock':
include/linux/seqlock.h:876:2: error: implicit declaration of function
'spin_lock' [-Werror=implicit-function-declaration]
  876 |  spin_lock(&sl->lock);
      |  ^~~~~~~~~
include/linux/seqlock.h: In function 'write_sequnlock':
include/linux/seqlock.h:890:2: error: implicit declaration of function
'spin_unlock' [-Werror=implicit-function-declaration]
  890 |  spin_unlock(&sl->lock);
      |  ^~~~~~~~~~~
include/linux/seqlock.h: In function 'write_seqlock_bh':
include/linux/seqlock.h:902:2: error: implicit declaration of function
'spin_lock_bh' [-Werror=implicit-function-declaration]
  902 |  spin_lock_bh(&sl->lock);
      |  ^~~~~~~~~~~~
include/linux/seqlock.h: In function 'write_sequnlock_bh':
include/linux/seqlock.h:917:2: error: implicit declaration of function
'spin_unlock_bh' [-Werror=implicit-function-declaration]
  917 |  spin_unlock_bh(&sl->lock);
      |  ^~~~~~~~~~~~~~
include/linux/seqlock.h: In function 'write_seqlock_irq':
include/linux/seqlock.h:929:2: error: implicit declaration of function
'spin_lock_irq' [-Werror=implicit-function-declaration]
  929 |  spin_lock_irq(&sl->lock);
      |  ^~~~~~~~~~~~~
include/linux/seqlock.h: In function 'write_sequnlock_irq':
include/linux/seqlock.h:943:2: error: implicit declaration of function
'spin_unlock_irq'; did you mean 'write_sequnlock_irq'?
[-Werror=implicit-function-declaration]
  943 |  spin_unlock_irq(&sl->lock);
      |  ^~~~~~~~~~~~~~~
      |  write_sequnlock_irq
include/linux/seqlock.h: In function '__write_seqlock_irqsave':
include/linux/seqlock.h:950:2: error: implicit declaration of function
'spin_lock_irqsave' [-Werror=implicit-function-declaration]
  950 |  spin_lock_irqsave(&sl->lock, flags);
      |  ^~~~~~~~~~~~~~~~~
include/linux/seqlock.h: In function 'write_sequnlock_irqrestore':
include/linux/seqlock.h:981:2: error: implicit declaration of function
'spin_unlock_irqrestore'; did you mean 'write_sequnlock_irqrestore'?
[-Werror=implicit-function-declaration]
  981 |  spin_unlock_irqrestore(&sl->lock, flags);
      |  ^~~~~~~~~~~~~~~~~~~~~~
      |  write_sequnlock_irqrestore
In file included from include/linux/sched.h:15,
                 from arch/arc/kernel/asm-offsets.c:6:
include/linux/rcupdate.h: In function 'rcu_read_lock_sched_held':
include/linux/preempt.h:227:49: error: implicit declaration of
function 'irqs_disabled' [-Werror=implicit-function-declaration]
  227 | #define preemptible() (preempt_count() == 0 && !irqs_disabled())
      |                                                 ^~~~~~~~~~~~~
                          ^
cc1: some warnings being treated as errors

## Source
* Kernel version: 6.17.0-rc3-next-20250825
* Git tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git
* Git describe: next-20250825
* Git commit: 6c68f4c0a147c025ae0b25fab688c7c47964a02f
* Architectures: arc
* Toolchains: gcc-9
* Kconfigs: defconfig

## Build
* Build log: https://qa-reports.linaro.org/api/testruns/29652436/log_file/
* Build details:
https://regressions.linaro.org/lkft/linux-next-master/next-20250825/build/gcc-9-defconfig/
* Build error details:
https://regressions.linaro.org/lkft/linux-next-master/next-20250825/log-parser-build-gcc/gcc-compiler-include_asm-generic_getorder_h-error-implicit-declaration-of-function-ilog/
* Build plan: https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/builds/31lrYki7MzYyqtJKnutAe2oawoq
* Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/31lrYki7MzYyqtJKnutAe2oawoq/
* Kernel config:
https://storage.tuxsuite.com/public/linaro/lkft/builds/31lrYki7MzYyqtJKnutAe2oawoq/config

--
Linaro LKFT
https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: next-20250825: arc: seqlock.h:876:2: error: implicit declaration of function 'spin_lock' [-Werror=implicit-function-declaration]
  2025-08-26  6:35 next-20250825: arc: seqlock.h:876:2: error: implicit declaration of function 'spin_lock' [-Werror=implicit-function-declaration] Naresh Kamboju
@ 2025-08-26 12:42 ` Naresh Kamboju
  2025-08-26 13:56   ` Waiman Long
  0 siblings, 1 reply; 3+ messages in thread
From: Naresh Kamboju @ 2025-08-26 12:42 UTC (permalink / raw)
  To: Linux-Arch, open list, lkft-triage, Linux Regressions
  Cc: Andrew Morton, Anders Roxell, Arnd Bergmann, Dan Carpenter,
	Ben Copeland, Peter Zijlstra, Ingo Molnar, Will Deacon,
	Boqun Feng, Waiman Long, Vineet Gupta, Ye Liu, Zi Yan,
	Lorenzo Stoakes, Dev Jain, David Hildenbrand, Chris Li

On Tue, 26 Aug 2025 at 12:05, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>
> The following build warnings / errors noticed with arc defconfig with
> gcc-9 toolchain.
>
> Regression Analysis:
> - New regression? yes
> - Reproducibility? yes
>
> Build regression: next-20250825 arc seqlock.h:876:2: error: implicit
> declaration of function 'spin_lock'
> [-Werror=implicit-function-declaration]
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>
> arc:
>   build:
>     * gcc-9-allnoconfig
>     * gcc-9-tinyconfig
>     * gcc-9-vdk_hs38_smp_defconfig
>     * gcc-9-defconfig
>     * gcc-9-axs103_defconfig
>
> ## Build log
> In file included from include/linux/mmzone.h:17,
>                  from include/linux/gfp.h:7,
>                  from include/linux/mm.h:7,
>                  from arch/arc/include/asm/arcregs.h:149,
>                  from arch/arc/include/asm/irqflags-arcv2.h:9,
>                  from arch/arc/include/asm/irqflags.h:13,
>                  from include/linux/irqflags.h:18,
>                  from include/linux/spinlock.h:59,
>                  from include/linux/sched.h:37,
>                  from arch/arc/kernel/asm-offsets.c:6:
> include/linux/seqlock.h: In function 'write_seqlock':
> include/linux/seqlock.h:876:2: error: implicit declaration of function
> 'spin_lock' [-Werror=implicit-function-declaration]
>   876 |  spin_lock(&sl->lock);
>       |  ^~~~~~~~~
> include/linux/seqlock.h: In function 'write_sequnlock':
> include/linux/seqlock.h:890:2: error: implicit declaration of function
> 'spin_unlock' [-Werror=implicit-function-declaration]
>   890 |  spin_unlock(&sl->lock);
>       |  ^~~~~~~~~~~
> include/linux/seqlock.h: In function 'write_seqlock_bh':
> include/linux/seqlock.h:902:2: error: implicit declaration of function
> 'spin_lock_bh' [-Werror=implicit-function-declaration]
>   902 |  spin_lock_bh(&sl->lock);
>       |  ^~~~~~~~~~~~
> include/linux/seqlock.h: In function 'write_sequnlock_bh':
> include/linux/seqlock.h:917:2: error: implicit declaration of function
> 'spin_unlock_bh' [-Werror=implicit-function-declaration]
>   917 |  spin_unlock_bh(&sl->lock);
>       |  ^~~~~~~~~~~~~~
> include/linux/seqlock.h: In function 'write_seqlock_irq':
> include/linux/seqlock.h:929:2: error: implicit declaration of function
> 'spin_lock_irq' [-Werror=implicit-function-declaration]
>   929 |  spin_lock_irq(&sl->lock);
>       |  ^~~~~~~~~~~~~
> include/linux/seqlock.h: In function 'write_sequnlock_irq':
> include/linux/seqlock.h:943:2: error: implicit declaration of function
> 'spin_unlock_irq'; did you mean 'write_sequnlock_irq'?
> [-Werror=implicit-function-declaration]
>   943 |  spin_unlock_irq(&sl->lock);
>       |  ^~~~~~~~~~~~~~~
>       |  write_sequnlock_irq
> include/linux/seqlock.h: In function '__write_seqlock_irqsave':
> include/linux/seqlock.h:950:2: error: implicit declaration of function
> 'spin_lock_irqsave' [-Werror=implicit-function-declaration]
>   950 |  spin_lock_irqsave(&sl->lock, flags);
>       |  ^~~~~~~~~~~~~~~~~
> include/linux/seqlock.h: In function 'write_sequnlock_irqrestore':
> include/linux/seqlock.h:981:2: error: implicit declaration of function
> 'spin_unlock_irqrestore'; did you mean 'write_sequnlock_irqrestore'?
> [-Werror=implicit-function-declaration]
>   981 |  spin_unlock_irqrestore(&sl->lock, flags);
>       |  ^~~~~~~~~~~~~~~~~~~~~~
>       |  write_sequnlock_irqrestore
> In file included from include/linux/sched.h:15,
>                  from arch/arc/kernel/asm-offsets.c:6:
> include/linux/rcupdate.h: In function 'rcu_read_lock_sched_held':
> include/linux/preempt.h:227:49: error: implicit declaration of
> function 'irqs_disabled' [-Werror=implicit-function-declaration]
>   227 | #define preemptible() (preempt_count() == 0 && !irqs_disabled())
>       |                                                 ^~~~~~~~~~~~~
>                           ^
> cc1: some warnings being treated as errors

Anders bisected this and found,
 # first bad commit:
   [7cf258e5720ffdd5505faa04ab5afa9732ef0f6e]
   mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix

> ## Source
> * Kernel version: 6.17.0-rc3-next-20250825
> * Git tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git
> * Git describe: next-20250825
> * Git commit: 6c68f4c0a147c025ae0b25fab688c7c47964a02f
> * Architectures: arc
> * Toolchains: gcc-9
> * Kconfigs: defconfig
>
> ## Build
> * Build log: https://qa-reports.linaro.org/api/testruns/29652436/log_file/
> * Build details:
> https://regressions.linaro.org/lkft/linux-next-master/next-20250825/build/gcc-9-defconfig/
> * Build error details:
> https://regressions.linaro.org/lkft/linux-next-master/next-20250825/log-parser-build-gcc/gcc-compiler-include_asm-generic_getorder_h-error-implicit-declaration-of-function-ilog/
> * Build plan: https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/builds/31lrYki7MzYyqtJKnutAe2oawoq
> * Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/31lrYki7MzYyqtJKnutAe2oawoq/
> * Kernel config:
> https://storage.tuxsuite.com/public/linaro/lkft/builds/31lrYki7MzYyqtJKnutAe2oawoq/config
>
> --
> Linaro LKFT
> https://lkft.linaro.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: next-20250825: arc: seqlock.h:876:2: error: implicit declaration of function 'spin_lock' [-Werror=implicit-function-declaration]
  2025-08-26 12:42 ` Naresh Kamboju
@ 2025-08-26 13:56   ` Waiman Long
  0 siblings, 0 replies; 3+ messages in thread
From: Waiman Long @ 2025-08-26 13:56 UTC (permalink / raw)
  To: Naresh Kamboju, Linux-Arch, open list, lkft-triage,
	Linux Regressions
  Cc: Andrew Morton, Anders Roxell, Arnd Bergmann, Dan Carpenter,
	Ben Copeland, Peter Zijlstra, Ingo Molnar, Will Deacon,
	Boqun Feng, Vineet Gupta, Ye Liu, Zi Yan, Lorenzo Stoakes,
	Dev Jain, David Hildenbrand, Chris Li

On 8/26/25 8:42 AM, Naresh Kamboju wrote:
> On Tue, 26 Aug 2025 at 12:05, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>> The following build warnings / errors noticed with arc defconfig with
>> gcc-9 toolchain.
>>
>> Regression Analysis:
>> - New regression? yes
>> - Reproducibility? yes
>>
>> Build regression: next-20250825 arc seqlock.h:876:2: error: implicit
>> declaration of function 'spin_lock'
>> [-Werror=implicit-function-declaration]
>>
>> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>>
>> arc:
>>    build:
>>      * gcc-9-allnoconfig
>>      * gcc-9-tinyconfig
>>      * gcc-9-vdk_hs38_smp_defconfig
>>      * gcc-9-defconfig
>>      * gcc-9-axs103_defconfig
>>
>> ## Build log
>> In file included from include/linux/mmzone.h:17,
>>                   from include/linux/gfp.h:7,
>>                   from include/linux/mm.h:7,
>>                   from arch/arc/include/asm/arcregs.h:149,
>>                   from arch/arc/include/asm/irqflags-arcv2.h:9,
>>                   from arch/arc/include/asm/irqflags.h:13,
>>                   from include/linux/irqflags.h:18,
>>                   from include/linux/spinlock.h:59,
>>                   from include/linux/sched.h:37,
>>                   from arch/arc/kernel/asm-offsets.c:6:
>> include/linux/seqlock.h: In function 'write_seqlock':
>> include/linux/seqlock.h:876:2: error: implicit declaration of function
>> 'spin_lock' [-Werror=implicit-function-declaration]
>>    876 |  spin_lock(&sl->lock);
>>        |  ^~~~~~~~~
>> include/linux/seqlock.h: In function 'write_sequnlock':
>> include/linux/seqlock.h:890:2: error: implicit declaration of function
>> 'spin_unlock' [-Werror=implicit-function-declaration]
>>    890 |  spin_unlock(&sl->lock);
>>        |  ^~~~~~~~~~~
>> include/linux/seqlock.h: In function 'write_seqlock_bh':
>> include/linux/seqlock.h:902:2: error: implicit declaration of function
>> 'spin_lock_bh' [-Werror=implicit-function-declaration]
>>    902 |  spin_lock_bh(&sl->lock);
>>        |  ^~~~~~~~~~~~
>> include/linux/seqlock.h: In function 'write_sequnlock_bh':
>> include/linux/seqlock.h:917:2: error: implicit declaration of function
>> 'spin_unlock_bh' [-Werror=implicit-function-declaration]
>>    917 |  spin_unlock_bh(&sl->lock);
>>        |  ^~~~~~~~~~~~~~
>> include/linux/seqlock.h: In function 'write_seqlock_irq':
>> include/linux/seqlock.h:929:2: error: implicit declaration of function
>> 'spin_lock_irq' [-Werror=implicit-function-declaration]
>>    929 |  spin_lock_irq(&sl->lock);
>>        |  ^~~~~~~~~~~~~
>> include/linux/seqlock.h: In function 'write_sequnlock_irq':
>> include/linux/seqlock.h:943:2: error: implicit declaration of function
>> 'spin_unlock_irq'; did you mean 'write_sequnlock_irq'?
>> [-Werror=implicit-function-declaration]
>>    943 |  spin_unlock_irq(&sl->lock);
>>        |  ^~~~~~~~~~~~~~~
>>        |  write_sequnlock_irq
>> include/linux/seqlock.h: In function '__write_seqlock_irqsave':
>> include/linux/seqlock.h:950:2: error: implicit declaration of function
>> 'spin_lock_irqsave' [-Werror=implicit-function-declaration]
>>    950 |  spin_lock_irqsave(&sl->lock, flags);
>>        |  ^~~~~~~~~~~~~~~~~
>> include/linux/seqlock.h: In function 'write_sequnlock_irqrestore':
>> include/linux/seqlock.h:981:2: error: implicit declaration of function
>> 'spin_unlock_irqrestore'; did you mean 'write_sequnlock_irqrestore'?
>> [-Werror=implicit-function-declaration]
>>    981 |  spin_unlock_irqrestore(&sl->lock, flags);
>>        |  ^~~~~~~~~~~~~~~~~~~~~~
>>        |  write_sequnlock_irqrestore
>> In file included from include/linux/sched.h:15,
>>                   from arch/arc/kernel/asm-offsets.c:6:
>> include/linux/rcupdate.h: In function 'rcu_read_lock_sched_held':
>> include/linux/preempt.h:227:49: error: implicit declaration of
>> function 'irqs_disabled' [-Werror=implicit-function-declaration]
>>    227 | #define preemptible() (preempt_count() == 0 && !irqs_disabled())
>>        |                                                 ^~~~~~~~~~~~~
>>                            ^
>> cc1: some warnings being treated as errors
> Anders bisected this and found,
>   # first bad commit:
>     [7cf258e5720ffdd5505faa04ab5afa9732ef0f6e]
>     mm-replace-20-page_shift-with-common-macros-for-pages-mb-conversion-fix

The compilation problem is a result of bad include file ordering. Since 
the only users of PAGES_TO_MB() macro are kernel/rcu/rcuscale.c and 
mm/swap.c and they both include <linux/mm.h>. So this can be fixed by 
just removing the <linux/mm.h> include from arcregs.h.

Cheers,
Longman


>> ## Source
>> * Kernel version: 6.17.0-rc3-next-20250825
>> * Git tree: https://kernel.googlesource.com/pub/scm/linux/kernel/git/next/linux-next.git
>> * Git describe: next-20250825
>> * Git commit: 6c68f4c0a147c025ae0b25fab688c7c47964a02f
>> * Architectures: arc
>> * Toolchains: gcc-9
>> * Kconfigs: defconfig
>>
>> ## Build
>> * Build log: https://qa-reports.linaro.org/api/testruns/29652436/log_file/
>> * Build details:
>> https://regressions.linaro.org/lkft/linux-next-master/next-20250825/build/gcc-9-defconfig/
>> * Build error details:
>> https://regressions.linaro.org/lkft/linux-next-master/next-20250825/log-parser-build-gcc/gcc-compiler-include_asm-generic_getorder_h-error-implicit-declaration-of-function-ilog/
>> * Build plan: https://tuxapi.tuxsuite.com/v1/groups/linaro/projects/lkft/builds/31lrYki7MzYyqtJKnutAe2oawoq
>> * Build link: https://storage.tuxsuite.com/public/linaro/lkft/builds/31lrYki7MzYyqtJKnutAe2oawoq/
>> * Kernel config:
>> https://storage.tuxsuite.com/public/linaro/lkft/builds/31lrYki7MzYyqtJKnutAe2oawoq/config
>>
>> --
>> Linaro LKFT
>> https://lkft.linaro.org


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-08-26 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26  6:35 next-20250825: arc: seqlock.h:876:2: error: implicit declaration of function 'spin_lock' [-Werror=implicit-function-declaration] Naresh Kamboju
2025-08-26 12:42 ` Naresh Kamboju
2025-08-26 13:56   ` Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).