Skip to content

Commit 8616dff

Browse files
murzinvozbenh
authored andcommitted
powerpc: Fix section mismatch warning in free_lppacas
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> Acked-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1 parent 0edfdd1 commit 8616dff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/powerpc/kernel/paca.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct lppaca lppaca[] = {
4646
static struct lppaca *extra_lppacas;
4747
static long __initdata lppaca_size;
4848

49-
static void allocate_lppacas(int nr_cpus, unsigned long limit)
49+
static void __init allocate_lppacas(int nr_cpus, unsigned long limit)
5050
{
5151
if (nr_cpus <= NR_LPPACAS)
5252
return;
@@ -57,7 +57,7 @@ static void allocate_lppacas(int nr_cpus, unsigned long limit)
5757
PAGE_SIZE, limit));
5858
}
5959

60-
static struct lppaca *new_lppaca(int cpu)
60+
static struct lppaca * __init new_lppaca(int cpu)
6161
{
6262
struct lppaca *lp;
6363

@@ -70,7 +70,7 @@ static struct lppaca *new_lppaca(int cpu)
7070
return lp;
7171
}
7272

73-
static void free_lppacas(void)
73+
static void __init free_lppacas(void)
7474
{
7575
long new_size = 0, nr;
7676

0 commit comments

Comments
 (0)