mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

When the KCOV is enabled all functions get instrumented, unless the __no_sanitize_coverage attribute is used. To prepare for __no_sanitize_coverage being applied to __init functions, we have to handle differences in how GCC's inline optimizations get resolved. For LoongArch this exposed several places where __init annotations were missing but ended up being "accidentally correct". So fix these cases. Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
28 lines
646 B
C
28 lines
646 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/*
|
|
* Copyright (C) 2020-2022 Loongson Technology Corporation Limited
|
|
*/
|
|
|
|
#include <asm/io.h>
|
|
#include <asm-generic/early_ioremap.h>
|
|
|
|
void __init __iomem *early_ioremap(u64 phys_addr, unsigned long size)
|
|
{
|
|
return ((void __iomem *)TO_CACHE(phys_addr));
|
|
}
|
|
|
|
void __init early_iounmap(void __iomem *addr, unsigned long size)
|
|
{
|
|
|
|
}
|
|
|
|
void * __init early_memremap_ro(resource_size_t phys_addr, unsigned long size)
|
|
{
|
|
return early_memremap(phys_addr, size);
|
|
}
|
|
|
|
void * __init early_memremap_prot(resource_size_t phys_addr, unsigned long size,
|
|
unsigned long prot_val)
|
|
{
|
|
return early_memremap(phys_addr, size);
|
|
}
|