* [PATCH] trace/ring_buffer: fix section mismatch warning
@ 2009-03-21 11:41 Heiko Carstens
2009-03-21 14:39 ` Ingo Molnar
0 siblings, 1 reply; 5+ messages in thread
From: Heiko Carstens @ 2009-03-21 11:41 UTC (permalink / raw)
To: Ingo Molnar, Steven Rostedt, Sam Ravnborg; +Cc: linux-kernel
From: Heiko Carstens <heiko.carstens@de.ibm.com>
With linux-next I get this:
Section mismatch in reference from the function ring_buffer_alloc() to the function .cpuinit.text:rb_cpu_notify()
The function ring_buffer_alloc() references
the function __cpuinit rb_cpu_notify().
This is often because ring_buffer_alloc lacks a __cpuinit
annotation or the annotation of rb_cpu_notify is wrong.
This is a false positive since rb_cpu_notify gets only referenced if
CONFIG_HOTPLUG_CPU=y.
To get rid of the warning annotate ring_buffer_alloc with __ref.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
kernel/trace/ring_buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-next/kernel/trace/ring_buffer.c
===================================================================
--- linux-next.orig/kernel/trace/ring_buffer.c
+++ linux-next/kernel/trace/ring_buffer.c
@@ -549,7 +549,7 @@ static int __cpuinit rb_cpu_notify(struc
* when the buffer wraps. If this flag is not set, the buffer will
* drop data when the tail hits the head.
*/
-struct ring_buffer *ring_buffer_alloc(unsigned long size, unsigned flags)
+struct ring_buffer * __ref ring_buffer_alloc(unsigned long size, unsigned flags)
{
struct ring_buffer *buffer;
int bsize;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] trace/ring_buffer: fix section mismatch warning
2009-03-21 11:41 [PATCH] trace/ring_buffer: fix section mismatch warning Heiko Carstens
@ 2009-03-21 14:39 ` Ingo Molnar
2009-03-21 15:01 ` Heiko Carstens
0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2009-03-21 14:39 UTC (permalink / raw)
To: Heiko Carstens, Frédéric Weisbecker
Cc: Steven Rostedt, Sam Ravnborg, linux-kernel
* Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> With linux-next I get this:
>
> Section mismatch in reference from the function
> ring_buffer_alloc() to the function .cpuinit.text:rb_cpu_notify()
> The function ring_buffer_alloc() references the function __cpuinit
> rb_cpu_notify(). This is often because ring_buffer_alloc lacks a
> __cpuinit annotation or the annotation of rb_cpu_notify is wrong.
>
> This is a false positive since rb_cpu_notify gets only referenced
> if CONFIG_HOTPLUG_CPU=y. To get rid of the warning annotate
> ring_buffer_alloc with __ref.
>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> ---
> kernel/trace/ring_buffer.c | 2 +-
Frederic has beaten you to it narrowly:
09c9e84: tracing/ring-buffer: don't annotate rb_cpu_notify with __cpuinit
:)
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] trace/ring_buffer: fix section mismatch warning
2009-03-21 14:39 ` Ingo Molnar
@ 2009-03-21 15:01 ` Heiko Carstens
2009-03-21 15:20 ` Ingo Molnar
2009-03-21 20:33 ` Sam Ravnborg
0 siblings, 2 replies; 5+ messages in thread
From: Heiko Carstens @ 2009-03-21 15:01 UTC (permalink / raw)
To: Ingo Molnar
Cc: Frédéric Weisbecker, Steven Rostedt, Sam Ravnborg,
linux-kernel
On Sat, 21 Mar 2009 15:39:11 +0100
Ingo Molnar <mingo@elte.hu> wrote:
> > Section mismatch in reference from the function
> > ring_buffer_alloc() to the function .cpuinit.text:rb_cpu_notify()
> > The function ring_buffer_alloc() references the function __cpuinit
> > rb_cpu_notify(). This is often because ring_buffer_alloc lacks a
> > __cpuinit annotation or the annotation of rb_cpu_notify is wrong.
> >
> > This is a false positive since rb_cpu_notify gets only referenced
> > if CONFIG_HOTPLUG_CPU=y. To get rid of the warning annotate
> > ring_buffer_alloc with __ref.
> >
> > Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> > ---
> > kernel/trace/ring_buffer.c | 2 +-
>
> Frederic has beaten you to it narrowly:
>
> 09c9e84: tracing/ring-buffer: don't annotate rb_cpu_notify with __cpuinit
Btw. that was the only section mismatch warning I got on linux-next
with an allyesconfig on s390. We probably could enable the verbose
section mismatch warnings at compile time?
Sam?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] trace/ring_buffer: fix section mismatch warning
2009-03-21 15:01 ` Heiko Carstens
@ 2009-03-21 15:20 ` Ingo Molnar
2009-03-21 20:33 ` Sam Ravnborg
1 sibling, 0 replies; 5+ messages in thread
From: Ingo Molnar @ 2009-03-21 15:20 UTC (permalink / raw)
To: Heiko Carstens
Cc: Frédéric Weisbecker, Steven Rostedt, Sam Ravnborg,
linux-kernel
* Heiko Carstens <heiko.carstens@de.ibm.com> wrote:
> On Sat, 21 Mar 2009 15:39:11 +0100
> Ingo Molnar <mingo@elte.hu> wrote:
> > > Section mismatch in reference from the function
> > > ring_buffer_alloc() to the function .cpuinit.text:rb_cpu_notify()
> > > The function ring_buffer_alloc() references the function __cpuinit
> > > rb_cpu_notify(). This is often because ring_buffer_alloc lacks a
> > > __cpuinit annotation or the annotation of rb_cpu_notify is wrong.
> > >
> > > This is a false positive since rb_cpu_notify gets only referenced
> > > if CONFIG_HOTPLUG_CPU=y. To get rid of the warning annotate
> > > ring_buffer_alloc with __ref.
> > >
> > > Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> > > ---
> > > kernel/trace/ring_buffer.c | 2 +-
> >
> > Frederic has beaten you to it narrowly:
> >
> > 09c9e84: tracing/ring-buffer: don't annotate rb_cpu_notify with __cpuinit
>
> Btw. that was the only section mismatch warning I got on linux-next
> with an allyesconfig on s390. We probably could enable the verbose
> section mismatch warnings at compile time?
>
> Sam?
There's still too many warnings in general on other platforms - but
as long as it's per arch we could in fact propagate the warnings to
build failures.
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] trace/ring_buffer: fix section mismatch warning
2009-03-21 15:01 ` Heiko Carstens
2009-03-21 15:20 ` Ingo Molnar
@ 2009-03-21 20:33 ` Sam Ravnborg
1 sibling, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2009-03-21 20:33 UTC (permalink / raw)
To: Heiko Carstens
Cc: Ingo Molnar, Frédéric Weisbecker, Steven Rostedt,
linux-kernel
On Sat, Mar 21, 2009 at 04:01:02PM +0100, Heiko Carstens wrote:
> On Sat, 21 Mar 2009 15:39:11 +0100
> Ingo Molnar <mingo@elte.hu> wrote:
> > > Section mismatch in reference from the function
> > > ring_buffer_alloc() to the function .cpuinit.text:rb_cpu_notify()
> > > The function ring_buffer_alloc() references the function __cpuinit
> > > rb_cpu_notify(). This is often because ring_buffer_alloc lacks a
> > > __cpuinit annotation or the annotation of rb_cpu_notify is wrong.
> > >
> > > This is a false positive since rb_cpu_notify gets only referenced
> > > if CONFIG_HOTPLUG_CPU=y. To get rid of the warning annotate
> > > ring_buffer_alloc with __ref.
> > >
> > > Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> > > ---
> > > kernel/trace/ring_buffer.c | 2 +-
> >
> > Frederic has beaten you to it narrowly:
> >
> > 09c9e84: tracing/ring-buffer: don't annotate rb_cpu_notify with __cpuinit
>
> Btw. that was the only section mismatch warning I got on linux-next
> with an allyesconfig on s390. We probably could enable the verbose
> section mismatch warnings at compile time?
>
> Sam?
When I get a bit more time (and a properly working setup again)
I will enable the verbose version.
But until I can dedicate enough time to support it I am not the
one to make it more verbose.
That may be in the timeframe of 2.6.30 but I'm not sure.
Sam
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-03-21 20:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-21 11:41 [PATCH] trace/ring_buffer: fix section mismatch warning Heiko Carstens
2009-03-21 14:39 ` Ingo Molnar
2009-03-21 15:01 ` Heiko Carstens
2009-03-21 15:20 ` Ingo Molnar
2009-03-21 20:33 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox