* [PATCH] powerpc: fix section mismatch warning in free_lppacas
@ 2013-09-29 12:41 Vladimir Murzin
2013-10-01 6:18 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Murzin @ 2013-09-29 12:41 UTC (permalink / raw)
To: linuxppc-dev; +Cc: geoff, Vladimir Murzin, paulus
While cross-building for PPC64 I've got bunch of
WARNING: arch/powerpc/kernel/built-in.o(.text.unlikely+0x2d2): Section
mismatch in reference from the function .free_lppacas() to the variable
.init.data:lppaca_size The function .free_lppacas() references the variable
__initdata lppaca_size. This is often because .free_lppacas lacks a __initdata
annotation or the annotation of lppaca_size is wrong.
Fix it by using proper annotation for free_lppacas. Additionally, annotate
{allocate,new}_llpcas properly.
Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
---
arch/powerpc/kernel/paca.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 3fc16e3..0620eaa 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -46,7 +46,7 @@ struct lppaca lppaca[] = {
static struct lppaca *extra_lppacas;
static long __initdata lppaca_size;
-static void allocate_lppacas(int nr_cpus, unsigned long limit)
+static void __init allocate_lppacas(int nr_cpus, unsigned long limit)
{
if (nr_cpus <= NR_LPPACAS)
return;
@@ -57,7 +57,7 @@ static void allocate_lppacas(int nr_cpus, unsigned long limit)
PAGE_SIZE, limit));
}
-static struct lppaca *new_lppaca(int cpu)
+static struct lppaca * __init new_lppaca(int cpu)
{
struct lppaca *lp;
@@ -70,7 +70,7 @@ static struct lppaca *new_lppaca(int cpu)
return lp;
}
-static void free_lppacas(void)
+static void __init free_lppacas(void)
{
long new_size = 0, nr;
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc: fix section mismatch warning in free_lppacas
2013-09-29 12:41 [PATCH] powerpc: fix section mismatch warning in free_lppacas Vladimir Murzin
@ 2013-10-01 6:18 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2013-10-01 6:18 UTC (permalink / raw)
To: Vladimir Murzin; +Cc: geoff, paulus, linuxppc-dev
On Sun, Sep 29, 2013 at 02:41:18PM +0200, Vladimir Murzin wrote:
> While cross-building for PPC64 I've got bunch of
>
> WARNING: arch/powerpc/kernel/built-in.o(.text.unlikely+0x2d2): Section
> mismatch in reference from the function .free_lppacas() to the variable
> .init.data:lppaca_size The function .free_lppacas() references the variable
> __initdata lppaca_size. This is often because .free_lppacas lacks a __initdata
> annotation or the annotation of lppaca_size is wrong.
>
> Fix it by using proper annotation for free_lppacas. Additionally, annotate
> {allocate,new}_llpcas properly.
Yep looks good.
Acked-by: Michael Ellerman <michael@ellerman.id.au>
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-01 6:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-29 12:41 [PATCH] powerpc: fix section mismatch warning in free_lppacas Vladimir Murzin
2013-10-01 6:18 ` Michael Ellerman
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).