]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: fix function annotations to avoid section mismatch warnings with gcc-10
authorVladis Dronov <vdronov@redhat.com>
Wed, 29 Jul 2020 13:37:41 +0000 (15:37 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 30 Jul 2020 00:50:07 +0000 (10:50 +1000)
commitcd86f79490371534d82b779fa11994e8cf277d49
tree7233a76f884c9cda3fef4f00bbabc3d8bb6c56e7
parentae762f49b0615afa9bb10827027c23b1f7010eb3
powerpc: fix function annotations to avoid section mismatch warnings with gcc-10

Certain warnings are emitted for powerpc code when building with a gcc-10
toolset:

    WARNING: modpost: vmlinux.o(.text.unlikely+0x377c): Section mismatch in
    reference from the function remove_pmd_table() to the function
    .meminit.text:split_kernel_mapping()
    The function remove_pmd_table() references
    the function __meminit split_kernel_mapping().
    This is often because remove_pmd_table lacks a __meminit
    annotation or the annotation of split_kernel_mapping is wrong.

Add the appropriate __init and __meminit annotations to make modpost not
complain. In all the cases there are just a single callsite from another
__init or __meminit function:

__meminit remove_pagetable() -> remove_pud_table() -> remove_pmd_table()
__init prom_init() -> setup_secure_guest()
__init xive_spapr_init() -> xive_spapr_disabled()

Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20200729133741.62789-1-vdronov@redhat.com
arch/powerpc/kernel/prom_init.c
arch/powerpc/mm/book3s64/radix_pgtable.c
arch/powerpc/sysdev/xive/spapr.c