diff mbox series

powerpc/64s: Fix early_init_mmu section mismatch

Message ID 20200429070247.1678172-1-npiggin@gmail.com (mailing list archive)
State Accepted
Commit 9384e552aabb647ec22acb00181ca1715b0fcdfe
Headers show
Series powerpc/64s: Fix early_init_mmu section mismatch | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch powerpc/merge (54dc28ff5e0b3585224d49a31b53e030342ca5c3)
snowpatch_ozlabs/build-ppc64le success Build succeeded
snowpatch_ozlabs/build-ppc64be success Build succeeded
snowpatch_ozlabs/build-ppc64e success Build succeeded
snowpatch_ozlabs/build-pmac32 warning Upstream build failed, couldn't test patch
snowpatch_ozlabs/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
snowpatch_ozlabs/needsstable success Patch has no Fixes tags

Commit Message

Nicholas Piggin April 29, 2020, 7:02 a.m. UTC
Christian reports:

  MODPOST vmlinux.o
  WARNING: modpost: vmlinux.o(.text.unlikely+0x1a0): Section mismatch in
  reference from the function .early_init_mmu() to the function
  .init.text:.radix__early_init_mmu()
  The function .early_init_mmu() references
  the function __init .radix__early_init_mmu().
  This is often because .early_init_mmu lacks a __init
  annotation or the annotation of .radix__early_init_mmu is wrong.

  WARNING: modpost: vmlinux.o(.text.unlikely+0x1ac): Section mismatch in
  reference from the function .early_init_mmu() to the function
  .init.text:.hash__early_init_mmu()
  The function .early_init_mmu() references
  the function __init .hash__early_init_mmu().
  This is often because .early_init_mmu lacks a __init
  annotation or the annotation of .hash__early_init_mmu is wrong.

The compiler is uninlining early_init_mmu and not putting it in an init
section because there is no annotation. Add it.

Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/include/asm/book3s/64/mmu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christian Zigotzky May 17, 2020, 10:12 a.m. UTC | #1
Hi All,

This patch wasn't included in the PowerPC fixes 5.7-4. Please add it.

Thanks,
Christian


On 29 April 2020 at 09:02 am, Nicholas Piggin wrote:
> Christian reports:
>
>    MODPOST vmlinux.o
>    WARNING: modpost: vmlinux.o(.text.unlikely+0x1a0): Section mismatch in
>    reference from the function .early_init_mmu() to the function
>    .init.text:.radix__early_init_mmu()
>    The function .early_init_mmu() references
>    the function __init .radix__early_init_mmu().
>    This is often because .early_init_mmu lacks a __init
>    annotation or the annotation of .radix__early_init_mmu is wrong.
>
>    WARNING: modpost: vmlinux.o(.text.unlikely+0x1ac): Section mismatch in
>    reference from the function .early_init_mmu() to the function
>    .init.text:.hash__early_init_mmu()
>    The function .early_init_mmu() references
>    the function __init .hash__early_init_mmu().
>    This is often because .early_init_mmu lacks a __init
>    annotation or the annotation of .hash__early_init_mmu is wrong.
>
> The compiler is uninlining early_init_mmu and not putting it in an init
> section because there is no annotation. Add it.
>
> Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
> ---
>   arch/powerpc/include/asm/book3s/64/mmu.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
> index bb3deb76c951..3ffe5f967483 100644
> --- a/arch/powerpc/include/asm/book3s/64/mmu.h
> +++ b/arch/powerpc/include/asm/book3s/64/mmu.h
> @@ -208,7 +208,7 @@ void hash__early_init_devtree(void);
>   void radix__early_init_devtree(void);
>   extern void hash__early_init_mmu(void);
>   extern void radix__early_init_mmu(void);
> -static inline void early_init_mmu(void)
> +static inline void __init early_init_mmu(void)
>   {
>   	if (radix_enabled())
>   		return radix__early_init_mmu();
Michael Ellerman May 18, 2020, 2:40 a.m. UTC | #2
Christian Zigotzky <chzigotzky@xenosoft.de> writes:
> Hi All,
>
> This patch wasn't included in the PowerPC fixes 5.7-4. Please add it.

It's not an important bug. I'll take the patch for v5.8

cheers

> On 29 April 2020 at 09:02 am, Nicholas Piggin wrote:
>> Christian reports:
>>
>>    MODPOST vmlinux.o
>>    WARNING: modpost: vmlinux.o(.text.unlikely+0x1a0): Section mismatch in
>>    reference from the function .early_init_mmu() to the function
>>    .init.text:.radix__early_init_mmu()
>>    The function .early_init_mmu() references
>>    the function __init .radix__early_init_mmu().
>>    This is often because .early_init_mmu lacks a __init
>>    annotation or the annotation of .radix__early_init_mmu is wrong.
>>
>>    WARNING: modpost: vmlinux.o(.text.unlikely+0x1ac): Section mismatch in
>>    reference from the function .early_init_mmu() to the function
>>    .init.text:.hash__early_init_mmu()
>>    The function .early_init_mmu() references
>>    the function __init .hash__early_init_mmu().
>>    This is often because .early_init_mmu lacks a __init
>>    annotation or the annotation of .hash__early_init_mmu is wrong.
>>
>> The compiler is uninlining early_init_mmu and not putting it in an init
>> section because there is no annotation. Add it.
>>
>> Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>> ---
>>   arch/powerpc/include/asm/book3s/64/mmu.h | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
>> index bb3deb76c951..3ffe5f967483 100644
>> --- a/arch/powerpc/include/asm/book3s/64/mmu.h
>> +++ b/arch/powerpc/include/asm/book3s/64/mmu.h
>> @@ -208,7 +208,7 @@ void hash__early_init_devtree(void);
>>   void radix__early_init_devtree(void);
>>   extern void hash__early_init_mmu(void);
>>   extern void radix__early_init_mmu(void);
>> -static inline void early_init_mmu(void)
>> +static inline void __init early_init_mmu(void)
>>   {
>>   	if (radix_enabled())
>>   		return radix__early_init_mmu();
Christian Zigotzky May 18, 2020, 7:05 a.m. UTC | #3
OK, thanks.

> On 18. May 2020, at 04:40, Michael Ellerman <mpe@ellerman.id.au> wrote:
> 
> Christian Zigotzky <chzigotzky@xenosoft.de> writes:
>> Hi All,
>> 
>> This patch wasn't included in the PowerPC fixes 5.7-4. Please add it.
> 
> It's not an important bug. I'll take the patch for v5.8
> 
> cheers
> 
>>> On 29 April 2020 at 09:02 am, Nicholas Piggin wrote:
>>> Christian reports:
>>> 
>>>   MODPOST vmlinux.o
>>>   WARNING: modpost: vmlinux.o(.text.unlikely+0x1a0): Section mismatch in
>>>   reference from the function .early_init_mmu() to the function
>>>   .init.text:.radix__early_init_mmu()
>>>   The function .early_init_mmu() references
>>>   the function __init .radix__early_init_mmu().
>>>   This is often because .early_init_mmu lacks a __init
>>>   annotation or the annotation of .radix__early_init_mmu is wrong.
>>> 
>>>   WARNING: modpost: vmlinux.o(.text.unlikely+0x1ac): Section mismatch in
>>>   reference from the function .early_init_mmu() to the function
>>>   .init.text:.hash__early_init_mmu()
>>>   The function .early_init_mmu() references
>>>   the function __init .hash__early_init_mmu().
>>>   This is often because .early_init_mmu lacks a __init
>>>   annotation or the annotation of .hash__early_init_mmu is wrong.
>>> 
>>> The compiler is uninlining early_init_mmu and not putting it in an init
>>> section because there is no annotation. Add it.
>>> 
>>> Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>>> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de>
>>> Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
>>> ---
>>>  arch/powerpc/include/asm/book3s/64/mmu.h | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>> 
>>> diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
>>> index bb3deb76c951..3ffe5f967483 100644
>>> --- a/arch/powerpc/include/asm/book3s/64/mmu.h
>>> +++ b/arch/powerpc/include/asm/book3s/64/mmu.h
>>> @@ -208,7 +208,7 @@ void hash__early_init_devtree(void);
>>>  void radix__early_init_devtree(void);
>>>  extern void hash__early_init_mmu(void);
>>>  extern void radix__early_init_mmu(void);
>>> -static inline void early_init_mmu(void)
>>> +static inline void __init early_init_mmu(void)
>>>  {
>>>      if (radix_enabled())
>>>          return radix__early_init_mmu();
Michael Ellerman June 9, 2020, 5:29 a.m. UTC | #4
On Wed, 29 Apr 2020 17:02:47 +1000, Nicholas Piggin wrote:
> Christian reports:
> 
>   MODPOST vmlinux.o
>   WARNING: modpost: vmlinux.o(.text.unlikely+0x1a0): Section mismatch in
>   reference from the function .early_init_mmu() to the function
>   .init.text:.radix__early_init_mmu()
>   The function .early_init_mmu() references
>   the function __init .radix__early_init_mmu().
>   This is often because .early_init_mmu lacks a __init
>   annotation or the annotation of .radix__early_init_mmu is wrong.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/64s: Fix early_init_mmu section mismatch
      https://git.kernel.org/powerpc/c/9384e552aabb647ec22acb00181ca1715b0fcdfe

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/include/asm/book3s/64/mmu.h b/arch/powerpc/include/asm/book3s/64/mmu.h
index bb3deb76c951..3ffe5f967483 100644
--- a/arch/powerpc/include/asm/book3s/64/mmu.h
+++ b/arch/powerpc/include/asm/book3s/64/mmu.h
@@ -208,7 +208,7 @@  void hash__early_init_devtree(void);
 void radix__early_init_devtree(void);
 extern void hash__early_init_mmu(void);
 extern void radix__early_init_mmu(void);
-static inline void early_init_mmu(void)
+static inline void __init early_init_mmu(void)
 {
 	if (radix_enabled())
 		return radix__early_init_mmu();