You need to sign in or sign up before continuing.
  • H
    LoongArch: Fix section mismatch due to acpi_os_ioremap() · 7c1b4a93
    Huacai Chen 提交于
    mainline inclusion
    from mainline-v6.0-rc4
    commit e0fba87c
    category: feature
    bugzilla: https://gitee.com/openeuler/kernel/issues/I6BWFP
    CVE: NA
    
    --------------------------------
    
    Now acpi_os_ioremap() is marked with __init because it calls memblock_
    is_memory() which is also marked with __init in the !ARCH_KEEP_MEMBLOCK
    case. However, acpi_os_ioremap() is called by ordinary functions such
    as acpi_os_{read, write}_memory() and causes section mismatch warnings:
    
    WARNING: modpost: vmlinux.o: section mismatch in reference: acpi_os_read_memory (section: .text) -> acpi_os_ioremap (section: .init.text)
    WARNING: modpost: vmlinux.o: section mismatch in reference: acpi_os_write_memory (section: .text) -> acpi_os_ioremap (section: .init.text)
    
    Fix these warnings by selecting ARCH_KEEP_MEMBLOCK unconditionally and
    removing the __init modifier of acpi_os_ioremap(). This can also give a
    chance to track "memory" and "reserved" memblocks after early boot.
    Signed-off-by: NHuacai Chen <chenhuacai@loongson.cn>
    Change-Id: If0cd1baeb01c8d627c70c2f1b4569d6ac68bf696
    (cherry picked from commit f3b12c25)
    7c1b4a93
Kconfig 14.1 KB