LoongArch: Fix section mismatch due to acpi_os_ioremap()
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: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
Родитель
ad6846196a
Коммит
e0fba87c85
|
@ -39,6 +39,7 @@ config LOONGARCH
|
||||||
select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION
|
select ARCH_INLINE_SPIN_UNLOCK_BH if !PREEMPTION
|
||||||
select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION
|
select ARCH_INLINE_SPIN_UNLOCK_IRQ if !PREEMPTION
|
||||||
select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION
|
select ARCH_INLINE_SPIN_UNLOCK_IRQRESTORE if !PREEMPTION
|
||||||
|
select ARCH_KEEP_MEMBLOCK
|
||||||
select ARCH_MIGHT_HAVE_PC_PARPORT
|
select ARCH_MIGHT_HAVE_PC_PARPORT
|
||||||
select ARCH_MIGHT_HAVE_PC_SERIO
|
select ARCH_MIGHT_HAVE_PC_SERIO
|
||||||
select ARCH_SPARSEMEM_ENABLE
|
select ARCH_SPARSEMEM_ENABLE
|
||||||
|
|
|
@ -15,7 +15,7 @@ extern int acpi_pci_disabled;
|
||||||
extern int acpi_noirq;
|
extern int acpi_noirq;
|
||||||
|
|
||||||
#define acpi_os_ioremap acpi_os_ioremap
|
#define acpi_os_ioremap acpi_os_ioremap
|
||||||
void __init __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
|
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
|
||||||
|
|
||||||
static inline void disable_acpi(void)
|
static inline void disable_acpi(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -48,7 +48,7 @@ void __init __acpi_unmap_table(void __iomem *map, unsigned long size)
|
||||||
early_memunmap(map, size);
|
early_memunmap(map, size);
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
|
void __iomem *acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
|
||||||
{
|
{
|
||||||
if (!memblock_is_memory(phys))
|
if (!memblock_is_memory(phys))
|
||||||
return ioremap(phys, size);
|
return ioremap(phys, size);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче