* Re: [linux-next:master 1875/2100] include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read'
[not found] <201601291512.vqk4lpvV%fengguang.wu@intel.com>
@ 2016-01-29 10:28 ` Vlastimil Babka
2016-01-29 10:53 ` Stephen Rothwell
2016-01-29 11:05 ` Heiko Carstens
0 siblings, 2 replies; 5+ messages in thread
From: Vlastimil Babka @ 2016-01-29 10:28 UTC (permalink / raw)
To: kbuild test robot, Heiko Carstens, Martin Schwidefsky
Cc: kbuild-all, linux-s390, Stephen Rothwell, Andrew Morton,
linux-mm@kvack.org, Peter Zijlstra
On 01/29/2016 08:06 AM, kbuild test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 735cfa51151aeae6df04074165aa36b42481df86
> commit: e8bd33570a656979c09ce66a11ca8864fda8ad0c [1875/2100] mm, printk: introduce new format string for flags-fix
> config: s390-allyesconfig (attached as .config)
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout e8bd33570a656979c09ce66a11ca8864fda8ad0c
> # save the attached .config to linux build tree
> make.cross ARCH=s390
>
> All errors (new ones prefixed by >>):
>
> In file included from include/linux/static_key.h:1:0,
> from include/linux/tracepoint-defs.h:11,
> from include/linux/mmdebug.h:6,
> from arch/s390/include/asm/cmpxchg.h:10,
> from arch/s390/include/asm/atomic.h:19,
> from include/linux/atomic.h:4,
> from include/linux/debug_locks.h:5,
> from include/linux/lockdep.h:23,
> from include/linux/hardirq.h:5,
> from include/linux/kvm_host.h:10,
> from arch/s390/kernel/asm-offsets.c:10:
> include/linux/jump_label.h: In function 'static_key_count':
>>> include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read' [-Werror=implicit-function-declaration]
> return atomic_read(&key->enabled);
Sigh.
I don't get it, there's "#include <linux/atomic.h>" in jump_label.h right before
it gets used. So, what implicit declaration?
BTW, do you really need to use VM_BUG_ON() and thus include mmdebug.h in
arch/s390/include/asm/cmpxchg.h ? Is that assertion really related to VM?
> ^
> In file included from include/linux/atomic.h:4:0,
> from include/linux/debug_locks.h:5,
> from include/linux/lockdep.h:23,
> from include/linux/hardirq.h:5,
> from include/linux/kvm_host.h:10,
> from arch/s390/kernel/asm-offsets.c:10:
> arch/s390/include/asm/atomic.h: At top level:
> arch/s390/include/asm/atomic.h:74:19: error: static declaration of 'atomic_read' follows non-static declaration
> static inline int atomic_read(const atomic_t *v)
> ^
> In file included from include/linux/static_key.h:1:0,
> from include/linux/tracepoint-defs.h:11,
> from include/linux/mmdebug.h:6,
> from arch/s390/include/asm/cmpxchg.h:10,
> from arch/s390/include/asm/atomic.h:19,
> from include/linux/atomic.h:4,
> from include/linux/debug_locks.h:5,
> from include/linux/lockdep.h:23,
> from include/linux/hardirq.h:5,
> from include/linux/kvm_host.h:10,
> from arch/s390/kernel/asm-offsets.c:10:
> include/linux/jump_label.h:122:9: note: previous implicit declaration of 'atomic_read' was here
> return atomic_read(&key->enabled);
> ^
> cc1: some warnings being treated as errors
> make[2]: *** [arch/s390/kernel/asm-offsets.s] Error 1
> make[2]: Target '__build' not remade because of errors.
> make[1]: *** [prepare0] Error 2
> make[1]: Target 'prepare' not remade because of errors.
> make: *** [sub-make] Error 2
>
> vim +/atomic_read +122 include/linux/jump_label.h
>
> c0ccf6f99 Anton Blanchard 2015-04-09 106 #include <asm/jump_label.h>
> c0ccf6f99 Anton Blanchard 2015-04-09 107 #endif
> c0ccf6f99 Anton Blanchard 2015-04-09 108
> c0ccf6f99 Anton Blanchard 2015-04-09 109 #ifndef __ASSEMBLY__
> bf5438fca Jason Baron 2010-09-17 110
> bf5438fca Jason Baron 2010-09-17 111 enum jump_label_type {
> 76b235c6b Peter Zijlstra 2015-07-24 112 JUMP_LABEL_NOP = 0,
> 76b235c6b Peter Zijlstra 2015-07-24 113 JUMP_LABEL_JMP,
> bf5438fca Jason Baron 2010-09-17 114 };
> bf5438fca Jason Baron 2010-09-17 115
> bf5438fca Jason Baron 2010-09-17 116 struct module;
> bf5438fca Jason Baron 2010-09-17 117
> 851cf6e7d Andrew Jones 2013-08-09 118 #include <linux/atomic.h>
> ea5e9539a Mel Gorman 2014-06-04 119
> ea5e9539a Mel Gorman 2014-06-04 120 static inline int static_key_count(struct static_key *key)
> ea5e9539a Mel Gorman 2014-06-04 121 {
> ea5e9539a Mel Gorman 2014-06-04 @122 return atomic_read(&key->enabled);
> ea5e9539a Mel Gorman 2014-06-04 123 }
> ea5e9539a Mel Gorman 2014-06-04 124
> bf5438fca Jason Baron 2010-09-17 125 #ifdef HAVE_JUMP_LABEL
> bf5438fca Jason Baron 2010-09-17 126
> a1efb01fe Peter Zijlstra 2015-07-24 127 #define JUMP_TYPE_FALSE 0UL
> a1efb01fe Peter Zijlstra 2015-07-24 128 #define JUMP_TYPE_TRUE 1UL
> a1efb01fe Peter Zijlstra 2015-07-24 129 #define JUMP_TYPE_MASK 1UL
> c5905afb0 Ingo Molnar 2012-02-24 130
>
> :::::: The code at line 122 was first introduced by commit
> :::::: ea5e9539abf1258f23e725cb9cb25aa74efa29eb include/linux/jump_label.h: expose the reference count
>
> :::::: TO: Mel Gorman <mgorman@suse.de>
> :::::: CC: Linus Torvalds <torvalds@linux-foundation.org>
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 1875/2100] include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read'
2016-01-29 10:28 ` [linux-next:master 1875/2100] include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read' Vlastimil Babka
@ 2016-01-29 10:53 ` Stephen Rothwell
2016-01-29 11:25 ` Vlastimil Babka
2016-01-29 11:05 ` Heiko Carstens
1 sibling, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2016-01-29 10:53 UTC (permalink / raw)
To: Vlastimil Babka
Cc: kbuild test robot, Heiko Carstens, Martin Schwidefsky, kbuild-all,
linux-s390, Andrew Morton, linux-mm@kvack.org, Peter Zijlstra
Hi Vlastimil,
On Fri, 29 Jan 2016 11:28:59 +0100 Vlastimil Babka <vbabka@suse.cz> wrote:
>
> On 01/29/2016 08:06 AM, kbuild test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: 735cfa51151aeae6df04074165aa36b42481df86
> > commit: e8bd33570a656979c09ce66a11ca8864fda8ad0c [1875/2100] mm, printk: introduce new format string for flags-fix
> > config: s390-allyesconfig (attached as .config)
> > reproduce:
> > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > git checkout e8bd33570a656979c09ce66a11ca8864fda8ad0c
> > # save the attached .config to linux build tree
> > make.cross ARCH=s390
> >
> > All errors (new ones prefixed by >>):
> >
> > In file included from include/linux/static_key.h:1:0,
> > from include/linux/tracepoint-defs.h:11,
> > from include/linux/mmdebug.h:6,
> > from arch/s390/include/asm/cmpxchg.h:10,
> > from arch/s390/include/asm/atomic.h:19,
> > from include/linux/atomic.h:4,
> > from include/linux/debug_locks.h:5,
> > from include/linux/lockdep.h:23,
> > from include/linux/hardirq.h:5,
> > from include/linux/kvm_host.h:10,
> > from arch/s390/kernel/asm-offsets.c:10:
> > include/linux/jump_label.h: In function 'static_key_count':
> >>> include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read' [-Werror=implicit-function-declaration]
> > return atomic_read(&key->enabled);
>
> Sigh.
>
> I don't get it, there's "#include <linux/atomic.h>" in jump_label.h right before
> it gets used. So, what implicit declaration?
But we are in the process of reading linux/atomic.h already, and the
#include in jump_label.h will just not read it then (because of the
include guards) so the body of linux/atomic.h has not yet been read
when we process static_key_count(). i.e. we have a circular inclusion.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 1875/2100] include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read'
2016-01-29 10:28 ` [linux-next:master 1875/2100] include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read' Vlastimil Babka
2016-01-29 10:53 ` Stephen Rothwell
@ 2016-01-29 11:05 ` Heiko Carstens
1 sibling, 0 replies; 5+ messages in thread
From: Heiko Carstens @ 2016-01-29 11:05 UTC (permalink / raw)
To: Vlastimil Babka
Cc: kbuild test robot, Martin Schwidefsky, kbuild-all, linux-s390,
Stephen Rothwell, Andrew Morton, linux-mm@kvack.org,
Peter Zijlstra
On Fri, Jan 29, 2016 at 11:28:59AM +0100, Vlastimil Babka wrote:
> On 01/29/2016 08:06 AM, kbuild test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: 735cfa51151aeae6df04074165aa36b42481df86
> > commit: e8bd33570a656979c09ce66a11ca8864fda8ad0c [1875/2100] mm, printk: introduce new format string for flags-fix
> > config: s390-allyesconfig (attached as .config)
> > reproduce:
> > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> > chmod +x ~/bin/make.cross
> > git checkout e8bd33570a656979c09ce66a11ca8864fda8ad0c
> > # save the attached .config to linux build tree
> > make.cross ARCH=s390
> >
> > All errors (new ones prefixed by >>):
> >
> > In file included from include/linux/static_key.h:1:0,
> > from include/linux/tracepoint-defs.h:11,
> > from include/linux/mmdebug.h:6,
> > from arch/s390/include/asm/cmpxchg.h:10,
> > from arch/s390/include/asm/atomic.h:19,
> > from include/linux/atomic.h:4,
> > from include/linux/debug_locks.h:5,
> > from include/linux/lockdep.h:23,
> > from include/linux/hardirq.h:5,
> > from include/linux/kvm_host.h:10,
> > from arch/s390/kernel/asm-offsets.c:10:
> > include/linux/jump_label.h: In function 'static_key_count':
> >>> include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read' [-Werror=implicit-function-declaration]
> > return atomic_read(&key->enabled);
>
> Sigh.
>
> I don't get it, there's "#include <linux/atomic.h>" in jump_label.h right before
> it gets used. So, what implicit declaration?
>
> BTW, do you really need to use VM_BUG_ON() and thus include mmdebug.h in
> arch/s390/include/asm/cmpxchg.h ? Is that assertion really related to VM?
That's more or less copied over from x86 (and arm64 has it too). Probably
because the only user used to be SLUB and the author has a strong memory
management background :)
However, I'd like to keep the sanity check.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 1875/2100] include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read'
2016-01-29 10:53 ` Stephen Rothwell
@ 2016-01-29 11:25 ` Vlastimil Babka
2016-01-31 20:52 ` Stephen Rothwell
0 siblings, 1 reply; 5+ messages in thread
From: Vlastimil Babka @ 2016-01-29 11:25 UTC (permalink / raw)
To: Stephen Rothwell
Cc: kbuild test robot, Heiko Carstens, Martin Schwidefsky, kbuild-all,
linux-s390, Andrew Morton, linux-mm@kvack.org, Peter Zijlstra
On 01/29/2016 11:53 AM, Stephen Rothwell wrote:
> Hi Vlastimil,
>
> On Fri, 29 Jan 2016 11:28:59 +0100 Vlastimil Babka <vbabka@suse.cz> wrote:
>> > include/linux/jump_label.h: In function 'static_key_count':
>> >>> include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read' [-Werror=implicit-function-declaration]
>> > return atomic_read(&key->enabled);
>>
>> Sigh.
>>
>> I don't get it, there's "#include <linux/atomic.h>" in jump_label.h right before
>> it gets used. So, what implicit declaration?
>
> But we are in the process of reading linux/atomic.h already, and the
> #include in jump_label.h will just not read it then (because of the
> include guards) so the body of linux/atomic.h has not yet been read
> when we process static_key_count(). i.e. we have a circular inclusion.
Oh, of course, doh. Thanks.
Please replace the -fix with this patch. Sorry again.
----8<----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-next:master 1875/2100] include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read'
2016-01-29 11:25 ` Vlastimil Babka
@ 2016-01-31 20:52 ` Stephen Rothwell
0 siblings, 0 replies; 5+ messages in thread
From: Stephen Rothwell @ 2016-01-31 20:52 UTC (permalink / raw)
To: Vlastimil Babka
Cc: kbuild test robot, Heiko Carstens, Martin Schwidefsky, kbuild-all,
linux-s390, Andrew Morton, linux-mm@kvack.org, Peter Zijlstra
Hi Vlastimil,
On Fri, 29 Jan 2016 12:25:17 +0100 Vlastimil Babka <vbabka@suse.cz> wrote:
>
> Please replace the -fix with this patch. Sorry again.
>
> ----8<----
> From 1e6b1ae6bf55410fb816cf910c4d91533642072b Mon Sep 17 00:00:00 2001
> From: Vlastimil Babka <vbabka@suse.cz>
> Date: Fri, 29 Jan 2016 12:18:21 +0100
> Subject: [PATCH] mm, printk: introduce new format string for flags-fix
>
> Due to rebasing mistake, mmdebug.h keeps including tracepoint.h, causing
> header dependency issues on some arches.
> Remove the include, and related declarations of flags arrays, which reside
> in mm/internal.h and lib/vsprintf.c already includes that header.
>
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> include/linux/mmdebug.h | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h
> index 3fb9bc65d61d..de7be78c6f0e 100644
> --- a/include/linux/mmdebug.h
> +++ b/include/linux/mmdebug.h
> @@ -3,17 +3,11 @@
>
> #include <linux/bug.h>
> #include <linux/stringify.h>
> -#include <linux/types.h>
> -#include <linux/tracepoint.h>
>
> struct page;
> struct vm_area_struct;
> struct mm_struct;
>
> -extern const struct trace_print_flags pageflag_names[];
> -extern const struct trace_print_flags vmaflag_names[];
> -extern const struct trace_print_flags gfpflag_names[];
> -
> extern void dump_page(struct page *page, const char *reason);
> extern void __dump_page(struct page *page, const char *reason);
> void dump_vma(const struct vm_area_struct *vma);
> --
> 2.7.0
OK, I have done that from today.
--
Cheers,
Stephen Rothwell
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-01-31 20:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <201601291512.vqk4lpvV%fengguang.wu@intel.com>
2016-01-29 10:28 ` [linux-next:master 1875/2100] include/linux/jump_label.h:122:2: error: implicit declaration of function 'atomic_read' Vlastimil Babka
2016-01-29 10:53 ` Stephen Rothwell
2016-01-29 11:25 ` Vlastimil Babka
2016-01-31 20:52 ` Stephen Rothwell
2016-01-29 11:05 ` Heiko Carstens
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).